about summary refs log tree commit diff
path: root/pkgs/by-name/cz/czkawka/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/cz/czkawka/package.nix')
-rw-r--r--pkgs/by-name/cz/czkawka/package.nix23
1 files changed, 13 insertions, 10 deletions
diff --git a/pkgs/by-name/cz/czkawka/package.nix b/pkgs/by-name/cz/czkawka/package.nix
index 6e8cf21d298a..0ec3c8d6d00f 100644
--- a/pkgs/by-name/cz/czkawka/package.nix
+++ b/pkgs/by-name/cz/czkawka/package.nix
@@ -17,30 +17,26 @@
   testers,
   wrapGAppsHook4,
   xvfb-run,
+  versionCheckHook,
 }:
 
 let
   buildRustPackage' = rustPlatform.buildRustPackage.override {
-    stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
+    stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
   };
 
   self = buildRustPackage' {
     pname = "czkawka";
-    version = "7.0.0";
+    version = "8.0.0";
 
     src = fetchFromGitHub {
       owner = "qarmin";
       repo = "czkawka";
-      rev = self.version;
-      hash = "sha256-SOWtLmehh1F8SoDQ+9d7Fyosgzya5ZztCv8IcJZ4J94=";
+      rev = "refs/tags/${self.version}";
+      hash = "sha256-Uxko2TRIjqQvd7n9C+P7oMUrm3YY5j7TVzvijEjDwOM=";
     };
 
-    cargoPatches = [
-      # Updates time and time-macros from Cargo.lock
-      ./0000-time.diff
-    ];
-
-    cargoHash = "sha256-cQv8C0P3xizsvnJODkTMJQA98P4nYSCHFT75isJE6es=";
+    cargoHash = "sha256-DR2JU+QcGWliNoRMjSjJns7FsicpNAX5gTariFuQ/dw=";
 
     nativeBuildInputs = [
       gobject-introspection
@@ -85,6 +81,13 @@ let
       install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml
     '';
 
+    nativeInstallCheckInputs = [
+      versionCheckHook
+    ];
+    versionCheckProgram = "${placeholder "out"}/bin/czkawka_cli";
+    versionCheckProgramArg = [ "--version" ];
+    doInstallCheck = true;
+
     passthru = {
       tests.version = testers.testVersion {
         package = self;