depot/third_party/nixpkgs/pkgs/tools/misc/czkawka/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

75 lines
1.4 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, glib
, cairo
, pango
, gdk-pixbuf
, atk
, gtk4
, Foundation
, wrapGAppsHook4
, gobject-introspection
, xvfb-run
, testers
, czkawka
}:
rustPlatform.buildRustPackage rec {
pname = "czkawka";
version = "6.1.0";
src = fetchFromGitHub {
owner = "qarmin";
repo = "czkawka";
rev = version;
hash = "sha256-uKmiBNwuu3Eduf0v3p2VYYNf6mgxJTBUsYs+tKZQZys=";
};
cargoHash = "sha256-iBO99kpITVl7ySlXPkEg2YecS1lonVx9CbKt9WI180s=";
nativeBuildInputs = [
pkg-config
wrapGAppsHook4
gobject-introspection
];
buildInputs = [
glib
cairo
pango
gdk-pixbuf
atk
gtk4
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Foundation
];
nativeCheckInputs = [
xvfb-run
];
checkPhase = ''
runHook preCheck
xvfb-run cargo test
runHook postCheck
'';
doCheck = stdenv.hostPlatform.isLinux
&& (stdenv.hostPlatform == stdenv.buildPlatform);
passthru.tests.version = testers.testVersion {
package = czkawka;
command = "czkawka_cli --version";
};
meta = with lib; {
changelog = "https://github.com/qarmin/czkawka/raw/${version}/Changelog.md";
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 ];
};
}