2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
2023-08-04 22:07:22 +00:00
|
|
|
, stdenv
|
2024-01-13 08:15:51 +00:00
|
|
|
, atk
|
2021-03-19 17:17:44 +00:00
|
|
|
, cairo
|
2024-01-13 08:15:51 +00:00
|
|
|
, czkawka
|
|
|
|
, darwin
|
|
|
|
, fetchFromGitHub
|
2021-03-19 17:17:44 +00:00
|
|
|
, gdk-pixbuf
|
2024-01-13 08:15:51 +00:00
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
2022-08-12 12:06:08 +00:00
|
|
|
, gtk4
|
2024-01-13 08:15:51 +00:00
|
|
|
, pango
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, testers
|
2022-10-21 18:38:19 +00:00
|
|
|
, wrapGAppsHook4
|
2022-08-12 12:06:08 +00:00
|
|
|
, xvfb-run
|
2021-03-19 17:17:44 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
let
|
2021-03-19 17:17:44 +00:00
|
|
|
pname = "czkawka";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "7.0.0";
|
2021-03-19 17:17:44 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qarmin";
|
2021-12-06 16:07:01 +00:00
|
|
|
repo = "czkawka";
|
2021-03-19 17:17:44 +00:00
|
|
|
rev = version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-SOWtLmehh1F8SoDQ+9d7Fyosgzya5ZztCv8IcJZ4J94=";
|
2021-03-19 17:17:44 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-GOX7V6NLEMP06nMeRZINwcWCaHwK6T3nkRKl4e25DPg=";
|
2024-01-13 08:15:51 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
inherit pname version src cargoHash;
|
2021-03-19 17:17:44 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
gobject-introspection
|
2021-03-19 17:17:44 +00:00
|
|
|
pkg-config
|
2022-10-21 18:38:19 +00:00
|
|
|
wrapGAppsHook4
|
2021-03-19 17:17:44 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
atk
|
2021-03-19 17:17:44 +00:00
|
|
|
cairo
|
|
|
|
gdk-pixbuf
|
2024-01-13 08:15:51 +00:00
|
|
|
glib
|
2022-08-12 12:06:08 +00:00
|
|
|
gtk4
|
2024-01-13 08:15:51 +00:00
|
|
|
pango
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
|
|
Foundation
|
|
|
|
AppKit
|
|
|
|
]);
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
xvfb-run
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
xvfb-run cargo test
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
doCheck = stdenv.hostPlatform.isLinux
|
|
|
|
&& (stdenv.hostPlatform == stdenv.buildPlatform);
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2021-12-06 16:07:01 +00:00
|
|
|
package = czkawka;
|
|
|
|
command = "czkawka_cli --version";
|
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# Desktop items, icons and metainfo are not installed automatically
|
2023-11-16 04:20:00 +00:00
|
|
|
postInstall = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
install -Dm444 -t $out/share/applications data/com.github.qarmin.czkawka.desktop
|
2023-11-16 04:20:00 +00:00
|
|
|
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka.svg
|
|
|
|
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka-symbolic.svg
|
|
|
|
install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml
|
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
meta = {
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/qarmin/czkawka/raw/${version}/Changelog.md";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple, fast and easy to use app to remove unnecessary files from your computer";
|
2021-03-19 17:17:44 +00:00
|
|
|
homepage = "https://github.com/qarmin/czkawka";
|
2024-01-13 08:15:51 +00:00
|
|
|
license = with lib.licenses; [ mit ];
|
|
|
|
mainProgram = "czkawka_gui";
|
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres yanganto _0x4A6F ];
|
2021-03-19 17:17:44 +00:00
|
|
|
};
|
|
|
|
}
|