about summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorJulien Malka <julien@malka.sh>2024-03-02 17:53:38 +0100
committerGitHub <noreply@github.com>2024-03-02 17:53:38 +0100
commit3196f72254ea9dafac0a86b5f92c19e983f7c4b3 (patch)
treed95d5f5a7ccb1da60c7650264b46fe5c39e4f1c3 /pkgs/tools/misc
parent55ead8c56aa6b255e8c93b1c2c5f87bfa98546be (diff)
parent1158bc4aac077c4217642b19c3fffee4039e873c (diff)
downloadnixlib-3196f72254ea9dafac0a86b5f92c19e983f7c4b3.tar
nixlib-3196f72254ea9dafac0a86b5f92c19e983f7c4b3.tar.gz
nixlib-3196f72254ea9dafac0a86b5f92c19e983f7c4b3.tar.bz2
nixlib-3196f72254ea9dafac0a86b5f92c19e983f7c4b3.tar.lz
nixlib-3196f72254ea9dafac0a86b5f92c19e983f7c4b3.tar.xz
nixlib-3196f72254ea9dafac0a86b5f92c19e983f7c4b3.tar.zst
nixlib-3196f72254ea9dafac0a86b5f92c19e983f7c4b3.zip
Merge pull request #292669 from JulienMalka/cowsay-finalattrs
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/cowsay/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/tools/misc/cowsay/default.nix b/pkgs/tools/misc/cowsay/default.nix
index 62ae9994fff8..874299905e07 100644
--- a/pkgs/tools/misc/cowsay/default.nix
+++ b/pkgs/tools/misc/cowsay/default.nix
@@ -1,6 +1,6 @@
-{ lib, stdenv, perl, fetchFromGitHub, fetchpatch, makeWrapper, nix-update-script, testers, cowsay }:
+{ lib, stdenv, perl, fetchFromGitHub, fetchpatch, makeWrapper, nix-update-script, testers }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "cowsay";
   version = "3.7.0";
 
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "cowsay-org";
     repo = "cowsay";
-    rev = "v${version}";
+    rev = "v${finalAttrs.version}";
     hash = "sha256-t1grmCPQhRgwS64RjEwkK61F2qxxMBKuv0/DzBTnL3s=";
   };
 
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
   passthru = {
     updateScript = nix-update-script { };
     tests.version = testers.testVersion {
-      package = cowsay;
+      package = finalAttrs.finalPackage;
       command = "cowsay --version";
     };
   };
@@ -45,9 +45,9 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "A program which generates ASCII pictures of a cow with a message";
     homepage = "https://cowsay.diamonds";
-    changelog = "https://github.com/cowsay-org/cowsay/releases/tag/v${version}";
+    changelog = "https://github.com/cowsay-org/cowsay/releases/tag/v${finalAttrs.version}";
     license = licenses.gpl3Only;
     platforms = platforms.all;
     maintainers = with maintainers; [ rob anthonyroussel ];
   };
-}
+})