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

haskell infra: Misc cleanups #27840

Closed

Conversation

Ericson2314
Copy link
Member

Motivation for this change
  • The haskell lib is very close to not relying on Nixpkgs. I think this is good---simpler to think about and matches Nixpkgs's lib.

  • stdenv is exposed more shallowly so it can be overriden more easily. I'll eventually use this on Darwin to avoid the Sierra shared library problems (unless changes are to be made system-wide).

Things done

Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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.

Copy link
Member

@shlevy shlevy left a comment

Choose a reason for hiding this comment

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

👏

Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

With that patch applied, I get errors trying to evaluate Nixpkgs:

❯ nix-env -qaP --show-trace
error: while evaluating the attribute ‘haskellPackages.callPackage’ at /home/simons/.config/nixpkgs/config.nix:168:5:
while evaluating the attribute ‘haskellPackages.override’ at /home/simons/.nix-defexpr/pkgs/top-level/all-packages.nix:5548:3:
while evaluating the attribute ‘packages.ghc802.override’ at /home/simons/.nix-defexpr/pkgs/top-level/haskell-packages.nix:162:5:
while evaluating ‘callPackageWith’ at /home/simons/.nix-defexpr/lib/customisation.nix:113:35, called from /home/simons/.nix-defexpr/pkgs/top-level/haskell-packages.nix:162:14:
while evaluating ‘makeOverridable’ at /home/simons/.nix-defexpr/lib/customisation.nix:72:24, called from /home/simons/.nix-defexpr/lib/customisation.nix:117:8:
undefined variable ‘callPackage’ at /home/simons/.nix-defexpr/pkgs/development/haskell-modules/default.nix:15:21

Did you actually test this patch?

@Ericson2314
Copy link
Member Author

Ericson2314 commented Aug 1, 2017

@peti I evaluated one derivation, but meant to mark it WIP pending more testing. Odd my one derivation did not pick that up...

 - The haskell lib is very close to not relying on Nixpkgs. I think
   this is good---simpler to think about and matches Nixpkgs's lib.

 - The haskell lib is only imported once

 - stdenv is exposed more shallowly so it can be overriden more easily.
   I'll eventually use this on Darwin to avoid the Sierra shared
   library problems (unless changes are to be made system-wide).
@Ericson2314
Copy link
Member Author

Ok, nix-env -qaP --show-trace -f . signed off on it.

@peti
Copy link
Member

peti commented Aug 2, 2017

Pulled to haskell-updates in 63ba91180bc46676785484e8febea88decc15c89. Test builds are running at https://hydra.nixos.org/jobset/nixpkgs/haskell-updates.

@Ericson2314
Copy link
Member Author

@peti err to be clear this shouldn't change any hashes. Can I force eval of your job to expedite merging then?

@peti peti closed this in 74f5fe5 Aug 3, 2017
Ericson2314 added a commit that referenced this pull request Aug 3, 2017
 - The haskell lib is very close to not relying on Nixpkgs. I think
   this is good---simpler to think about and matches Nixpkgs's lib.

 - The haskell lib is only imported once

 - stdenv is exposed more shallowly so it can be overriden more easily.
   I'll eventually use this on Darwin to avoid the Sierra shared
   library problems (unless changes are to be made system-wide).

Closes #27840.
adrianpk added a commit to adrianpk/nixpkgs that referenced this pull request May 31, 2024
 - The haskell lib is very close to not relying on Nixpkgs. I think
   this is good---simpler to think about and matches Nixpkgs's lib.

 - The haskell lib is only imported once

 - stdenv is exposed more shallowly so it can be overriden more easily.
   I'll eventually use this on Darwin to avoid the Sierra shared
   library problems (unless changes are to be made system-wide).

Closes NixOS#27840.
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

4 participants