Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haskellPackages.base-compat-batteries: fix bad dependency #39456

Merged
merged 1 commit into from Apr 27, 2018

Conversation

endgame
Copy link
Contributor

@endgame endgame commented Apr 24, 2018

Motivation for this change

cabal2nix generates an incorrect dependency on haskellPackages.base-compat, which is still at 0.9. This may not be the correct way to fix it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions - nix-build -A haskellPackages.base-compat-batteries
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

# cabal2nix generates a dependency on base-compat, which is the wrong version
base-compat-batteries = overrideCabal super.base-compat-batteries (drv: {
libraryHaskellDepends =
with pkgs.haskellPackages; [ base base-compat_0_10_1 ];
Copy link
Member

Choose a reason for hiding this comment

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

The proper way to fix that issue is to pass the appropriate version of the package as an argument to the build expression, i.e. by using override or overrideScope (if necessary). If you look around in that file, you'll find plenty of examples how to do that.

@endgame
Copy link
Contributor Author

endgame commented Apr 27, 2018

Changed and pushed, thank you. I think I've done the right thing now. I can't see an obvious order to the packages that get tweaked. Should there be one?

@peti
Copy link
Member

peti commented Apr 27, 2018

@GrahamcOfBorg build haskellPackages.base-compat-batteries

@endgame, no, the order in that file does not matter much.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: haskellPackages.base-compat-batteries

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: haskellPackages.base-compat-batteries

Partial log (click to expand)

strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/3n3v05nkh6h7b42vl897avbw89gcxbdr-base-compat-batteries-0.10.1/lib
patching script interpreter paths in /nix/store/3n3v05nkh6h7b42vl897avbw89gcxbdr-base-compat-batteries-0.10.1
checking for references to /build in /nix/store/3n3v05nkh6h7b42vl897avbw89gcxbdr-base-compat-batteries-0.10.1...
wrong ELF type
shrinking RPATHs of ELF executables and libraries in /nix/store/gp70y21b63dh7ai05v0322iz6sizfn97-base-compat-batteries-0.10.1-doc
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/gp70y21b63dh7ai05v0322iz6sizfn97-base-compat-batteries-0.10.1-doc
checking for references to /build in /nix/store/gp70y21b63dh7ai05v0322iz6sizfn97-base-compat-batteries-0.10.1-doc...
/nix/store/3n3v05nkh6h7b42vl897avbw89gcxbdr-base-compat-batteries-0.10.1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: haskellPackages.base-compat-batteries

Partial log (click to expand)

/nix/store/99z87412i6mcdynih26ya6sk7jvvb4c5-base-compat-batteries-0.10.1

@peti peti merged commit ab5dcdd into NixOS:master Apr 27, 2018
@endgame endgame deleted the base-compat-batteries-deps branch April 27, 2018 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants