Skip to content

Comments

cabal-install: Fix for justStaticExecutables#315460

Closed
9999years wants to merge 1 commit intoNixOS:haskell-updatesfrom
9999years:fix-cabal-instal-darwin
Closed

cabal-install: Fix for justStaticExecutables#315460
9999years wants to merge 1 commit intoNixOS:haskell-updatesfrom
9999years:fix-cabal-instal-darwin

Conversation

@9999years
Copy link
Contributor

@9999years 9999years commented May 28, 2024

Description of changes

Fixes cabal-install to remove references to GHC, mostly through other libraries that are included in the binary.

Should also fix tests.haskell.shellFor.

See: #304352

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label May 28, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels May 29, 2024
Fixes `cabal-install` to remove references to GHC, mostly through other
libraries that are included in the binary.

See: NixOS#304352
@9999years 9999years force-pushed the fix-cabal-instal-darwin branch from 49e4033 to 2eef4ba Compare May 29, 2024 15:36
Comment on lines +59 to +69
cabal-install =
let cabal-install = super.cabal-install.overrideScope cabalInstallOverlay;
scope = cabal-install.scope;
in overrideCabal (old: {
postInstall = ''
${old.postInstall or ""}
remove-references-to -t ${scope.ghc} "$out/bin/.cabal-wrapped"
remove-references-to -t ${scope.HTTP} "$out/bin/.cabal-wrapped"
remove-references-to -t ${scope.Cabal} "$out/bin/.cabal-wrapped"
'';
}) cabal-install;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a cleaner way to do this?

@sternenseemann
Copy link
Member

caa1c96

@9999years 9999years deleted the fix-cabal-instal-darwin branch June 6, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants