Skip to content

Commit

Permalink
cabal2nix: Fix for justStaticExecutables
Browse files Browse the repository at this point in the history
Remove references to `hpack` and `distribution-nixpkgs` paths so that
`cabal2nix` can build on macOS.

See: #304352
  • Loading branch information
9999years authored and sternenseemann committed Jun 3, 2024
1 parent 2d2e0b1 commit 2901eb8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/development/haskell-modules/configuration-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,15 @@ self: super: ({

} // lib.optionalAttrs pkgs.stdenv.isAarch64 { # aarch64-darwin

cabal2nix = overrideCabal (old: {
postInstall = ''
${old.postInstall or ""}
remove-references-to -t ${self.hpack} "$out/bin/cabal2nix"
# Note: The `data` output is needed at runtime.
remove-references-to -t ${self.distribution-nixpkgs.out} "$out/bin/hackage2nix"
'';
}) super.cabal2nix;

# https://github.com/fpco/unliftio/issues/87
unliftio = dontCheck super.unliftio;
# This is the same issue as above; the rio tests call functions in unliftio
Expand Down

0 comments on commit 2901eb8

Please sign in to comment.