Commit f9369208 authored by jopejoe1's avatar jopejoe1
Browse files

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

parent 70d225e9
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
{
  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
        ]
      }"
  '';
}
+0 −14
Original line number Diff line number Diff line
@@ -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) (_: {