Skip to content

haskell.packages.ghc865Binary: drop unevaluatable packages#278074

Merged
maralorn merged 1 commit intoNixOS:masterfrom
trofi:haskell.packages.ghc865Binary-fix-eval
Jan 1, 2024
Merged

haskell.packages.ghc865Binary: drop unevaluatable packages#278074
maralorn merged 1 commit intoNixOS:masterfrom
trofi:haskell.packages.ghc865Binary-fix-eval

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.
@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Jan 1, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 1, 2024
@maralorn
Copy link
Member

maralorn commented Jan 1, 2024

Thx

@maralorn maralorn merged commit 1e946f8 into NixOS:master Jan 1, 2024
@trofi trofi deleted the haskell.packages.ghc865Binary-fix-eval branch January 1, 2024 17:04

# 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 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 <[email protected]>
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: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants