cabal2nix: add pname and version, also move to by-name

This commit is contained in:
jopejoe1
2026-01-26 10:17:52 +01:00
parent 70d225e9c8
commit f9369208ac
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
@@ -1653,20 +1653,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) (_: {