cabal2nix: add pname and version, also move to by-name (#482978)

This commit is contained in:
Wolfgang Walther
2026-02-13 13:06:53 +00:00
committed by GitHub
2 changed files with 21 additions and 14 deletions
+21
View File
@@ -0,0 +1,21 @@
{
lib,
symlinkJoin,
cabal2nix-unwrapped,
makeWrapper,
nix-prefetch-scripts,
}:
symlinkJoin {
inherit (cabal2nix-unwrapped) pname version meta;
nativeBuildInputs = [ makeWrapper ];
paths = [ cabal2nix-unwrapped ];
postBuild = ''
wrapProgram $out/bin/cabal2nix \
--prefix PATH ":" "${
lib.makeBinPath [
nix-prefetch-scripts
]
}"
'';
}
-14
View File
@@ -1595,20 +1595,6 @@ with pkgs;
haskellPackages.generateOptparseApplicativeCompletions [ "cabal2nix" ] haskellPackages.cabal2nix
);
cabal2nix = symlinkJoin {
inherit (cabal2nix-unwrapped) name meta;
nativeBuildInputs = [ buildPackages.makeWrapper ];
paths = [ cabal2nix-unwrapped ];
postBuild = ''
wrapProgram $out/bin/cabal2nix \
--prefix PATH ":" "${
lib.makeBinPath [
nix-prefetch-scripts
]
}"
'';
};
stack2nix =
with haskell.lib;
overrideCabal (justStaticExecutables haskellPackages.stack2nix) (_: {