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
|
2022-04-20 14:40:48 +00:00
|
|
|
, testers
|
2021-11-21 02:12:40 +00:00
|
|
|
, 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";
|
2021-11-21 02:12:40 +00:00
|
|
|
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
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +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);
|
|
|
|
|
2022-04-20 14:40:48 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2021-11-21 02:12:40 +00:00
|
|
|
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 ];
|
2021-11-21 02:12:40 +00:00
|
|
|
maintainers = with maintainers; [ yanganto _0x4A6F ];
|
2021-03-15 16:53:55 +00:00
|
|
|
};
|
|
|
|
}
|