about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/by-name/cr/cringify/package.nix (renamed from pkgs/tools/text/cringify/default.nix)19
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/tools/text/cringify/default.nix b/pkgs/by-name/cr/cringify/package.nix
index 6230f6575c3f..f9e4bc2f9050 100644
--- a/pkgs/tools/text/cringify/default.nix
+++ b/pkgs/by-name/cr/cringify/package.nix
@@ -1,29 +1,36 @@
 { lib
 , rustPlatform
 , fetchFromGitHub
+, python3
+, testers
+, cringify
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "cringify";
-  version = "0.1.1";
+  version = "0.2.0";
 
   src = fetchFromGitHub {
     owner = "sansyrox";
     repo = "cringify";
-    rev = "dd753818f8dd4b343be9370d2c29a6be070ad791";
-    hash = "sha256-6hSgOk9DzDfGtZX1vt6AQsKSLdPdqy2Mz3UtK6d2AuA=";
+    rev = "857c2620ac9f1f53139d3a599e55679a75e77053";
+    hash = "sha256-U0tKYFRZToMALSeItn9yia7Dl7omETDTkuRlWJ8EZEo=";
   };
 
-  cargoHash = "sha256-w6lqPyUCaXZBQ1EmMyj0sVnEHugMD6JugIIK0rEa19Y=";
+  cargoHash = "sha256-OQXGn6m6VdSlxaCPRonjvEo/GOpsEiZkqL12UdoLu0Q=";
 
   postPatch = ''
-    # Upstream forgot to update the version value
-    substituteInPlace src/main.rs --replace '0.1.0' ${version}
+    # Upstream doesn't set the version string itself
+    substituteInPlace src/main.rs --replace '0.0.1' ${version}
   '';
 
+  nativeBuildInputs = [ python3 ];
+
   # No tests are present in the repository
   doCheck = false;
 
+  passthru.tests.version = testers.testVersion { package = cringify; };
+
   meta = {
     description = "Annoy your friends with the cringified text";
     homepage = "https://github.com/sansyrox/cringify";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e481a780c3ce..2d9f865e40b0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7285,8 +7285,6 @@ with pkgs;
 
   createrepo_c = callPackage ../tools/package-management/createrepo_c { };
 
-  cringify = callPackage ../tools/text/cringify { };
-
   cromfs = callPackage ../tools/archivers/cromfs { };
 
   cron = callPackage ../tools/system/cron { };