nixpkgs/pkgs/tools/misc/czkawka/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.4 KiB
Nix
Raw Normal View History

2021-03-15 16:53:55 +00:00
{ lib
2023-07-27 04:00:06 +00:00
, stdenv
2021-03-15 16:53:55 +00:00
, rustPlatform
, fetchFromGitHub
, pkg-config
, glib
, cairo
, pango
, gdk-pixbuf
, atk
2022-08-02 19:46:19 +00:00
, gtk4
2023-07-27 04:00:06 +00:00
, Foundation
2022-10-09 18:13:52 +00:00
, wrapGAppsHook4
2022-08-02 19:46:19 +00:00
, gobject-introspection
, xvfb-run
, testers
, czkawka
2021-03-15 16:53:55 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "czkawka";
2023-10-15 10:44:54 +00:00
version = "6.1.0";
2021-03-15 16:53:55 +00:00
src = fetchFromGitHub {
owner = "qarmin";
repo = "czkawka";
2021-03-15 16:53:55 +00:00
rev = version;
2023-10-15 10:44:54 +00:00
hash = "sha256-uKmiBNwuu3Eduf0v3p2VYYNf6mgxJTBUsYs+tKZQZys=";
2021-03-15 16:53:55 +00:00
};
2023-10-15 10:44:54 +00:00
cargoHash = "sha256-iBO99kpITVl7ySlXPkEg2YecS1lonVx9CbKt9WI180s=";
2021-03-15 16:53:55 +00:00
nativeBuildInputs = [
pkg-config
2022-10-09 18:13:52 +00:00
wrapGAppsHook4
2022-08-02 19:46:19 +00:00
gobject-introspection
2021-03-15 16:53:55 +00:00
];
buildInputs = [
glib
cairo
pango
gdk-pixbuf
atk
2022-08-02 19:46:19 +00:00
gtk4
2023-07-27 04:00:06 +00:00
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Foundation
2021-03-15 16:53:55 +00:00
];
nativeCheckInputs = [
2022-08-02 19:46:19 +00:00
xvfb-run
];
checkPhase = ''
runHook preCheck
xvfb-run cargo test
runHook postCheck
'';
2023-07-27 04:00:06 +00:00
doCheck = stdenv.hostPlatform.isLinux
&& (stdenv.hostPlatform == stdenv.buildPlatform);
passthru.tests.version = testers.testVersion {
package = czkawka;
command = "czkawka_cli --version";
};
2021-03-15 16:53:55 +00:00
meta = with lib; {
2023-02-20 14:46:17 +00:00
changelog = "https://github.com/qarmin/czkawka/raw/${version}/Changelog.md";
2021-03-15 16:53:55 +00:00
description = "A simple, fast and easy to use app to remove unnecessary files from your computer";
homepage = "https://github.com/qarmin/czkawka";
license = with licenses; [ mit ];
maintainers = with maintainers; [ yanganto _0x4A6F ];
2021-03-15 16:53:55 +00:00
};
}