diff --git a/pkgs/by-name/ch/changelog-d/package.nix b/pkgs/by-name/ch/changelog-d/package.nix index c855beca0fe2..444e6de23357 100644 --- a/pkgs/by-name/ch/changelog-d/package.nix +++ b/pkgs/by-name/ch/changelog-d/package.nix @@ -1,10 +1,8 @@ { - cabal2nix, callPackage, lib, haskell, haskellPackages, - writeShellApplication, }: let @@ -16,16 +14,7 @@ let version = oldAttrs.version + "-git-${lib.strings.substring 0 7 oldAttrs.src.rev}"; - passthru.updateScript = lib.getExe (writeShellApplication { - name = "update-changelog-d"; - runtimeInputs = [ - cabal2nix - ]; - text = '' - cd pkgs/development/misc/haskell/changelog-d - cabal2nix https://codeberg.org/fgaz/changelog-d >changelog-d.nix - ''; - }); + passthru.updateScript = lib.getExe (callPackage ./updateScript.nix { }); passthru.tests = { basic = callPackage ./tests/basic.nix { changelog-d = finalAttrs.finalPackage; }; }; diff --git a/pkgs/by-name/ch/changelog-d/updateScript.nix b/pkgs/by-name/ch/changelog-d/updateScript.nix new file mode 100644 index 000000000000..7ef55f57f4cf --- /dev/null +++ b/pkgs/by-name/ch/changelog-d/updateScript.nix @@ -0,0 +1,12 @@ +{ writeShellApplication, cabal2nix }: + +writeShellApplication { + name = "update-changelog-d"; + runtimeInputs = [ + cabal2nix + ]; + text = '' + cd pkgs/development/misc/haskell/changelog-d + cabal2nix https://codeberg.org/fgaz/changelog-d >changelog-d.nix + ''; +}