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.packages.ghc865Binary: drop unevaluatable packages #278074

Merged

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Jan 1, 2024

haskell.packages.ghc865Binary has a few packages that fails to evaluate by referring non-existent attributes. This turns evaluation attempts into unrecoverable errors.

Before the change an attempt to instantiate all ghc810 packages failed as:

$ nix-instantiate --strict --eval --expr 'with import ./. {}; lib.mapAttrs (n: v: builtins.tryEval (lib.isDerivation v)) haskell.packages.ghc865Binary'
error:
   … while evaluating the attribute 'llvmPackages'

     at lib/attrsets.nix:1180:11:

     1179|     attrs:
     1180|     attrs // { recurseForDerivations = false; };
         |           ^
     1181|

   error: value is null while a set was expected

The change follows definition of pkgs/top-level/haskell-packages.nix and also sets llvmPackages to null. While at it dropped other references to deleted packages like exceptions pin.

Description of changes

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.05 Release Notes (or backporting 23.05 and 23.11 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.

`haskell.packages.ghc865Binary` has a few packages that fails to evaluate
by referring non-existent attributes. This turns evaluation attempts into
unrecoverable errors.

Before the change an attempt to instantiate all `ghc810` packages failed
as:

    $ nix-instantiate --strict --eval --expr 'with import ./. {}; lib.mapAttrs (n: v: builtins.tryEval (lib.isDerivation v)) haskell.packages.ghc865Binary'
    error:
       … while evaluating the attribute 'llvmPackages'

         at lib/attrsets.nix:1180:11:

         1179|     attrs:
         1180|     attrs // { recurseForDerivations = false; };
             |           ^
         1181|

       error: value is null while a set was expected

The change follows definition of `pkgs/top-level/haskell-packages.nix`
and also sets `llvmPackages` to `null`. While at it dropped other
references to deleted packages like `exceptions` pin.
@maralorn
Copy link
Member

maralorn commented Jan 1, 2024

Thx

@maralorn maralorn merged commit 1e946f8 into NixOS:master Jan 1, 2024
21 checks passed
@trofi trofi deleted the haskell.packages.ghc865Binary-fix-eval branch January 1, 2024 17:04
@@ -91,7 +95,7 @@ self: super: {
ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex;

# This became a core library in ghc 8.10., so we don’t have an "exception" attribute anymore.
exceptions = super.exceptions_0_10_4;
exceptions = null;
Copy link
Member

Choose a reason for hiding this comment

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

We could still build a version of exceptions, but I suppose it hardly matters here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! Let's restore it for consistency. Used 0.10.7 in proposed #278310

trofi added a commit to trofi/nixpkgs that referenced this pull request Jan 2, 2024
… version

In NixOS#278074 I removed `exception`
completely. But `nixpkgs` has a version of `exceptions we could use.
Let's enable that instead.
trofi added a commit to trofi/nixpkgs that referenced this pull request Jan 3, 2024
… version

In NixOS#278074 I removed `exception`
completely. But `nixpkgs` has a version of `exceptions we could use.
Let's enable that instead.

Co-authored-by: Dennis Gosnell <cdep.illabout@gmail.com>
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