nh2 / nh2/static-haskell-nix

cabal2nix evaluation failures

Open
#73 29 comments 1 reaction 0 assignees View on GitHub
Dominant language
Nix
Stars
401
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Here's the reproduction:

```nix
let
compiler = "ghc865";

nixpkgs = builtins.fetchTarball {
url = "https://github.com/nh2/nixpkgs/archive/11aa987ea5b5a593c9ca7a38b391804959f905e5.tar.gz";
sha256 = "1wns6051fxpgmszyxjvk7020zzhljjxqxkrnqmyd3b6fah7q4vny";
};

static-haskell-nix = builtins.fetchTarball {
url = "https://github.com/nh2/static-haskell-nix/archive/d24dea3d46a727e1cd93e67458ce2768109efe0a.tar.gz";

sha256 = "0ri4r77md77kmbqmx0j3h0paj538zpq4hki7vy8ycpwssm2xd442";
};

overlay = pkgsNew: pkgsOld: {
haskell = pkgsOld.haskell // {
packages = pkgsOld.haskell.packages // {
"${compiler}" = pkgsOld.haskell.packages."${compiler}".override (old: {
overrides = pkgsNew.haskell.lib.packageSourceOverrides {
dhall = "1.27";
};
}
);
};
};
};

normalPkgs = import nixpkgs {
system = "x86_64-linux";

config = { };

overlays = [ overlay ];
};

staticHaskell = import "${static-haskell-nix}/survey/default.nix" {
inherit compiler normalPkgs;
};

in
staticHaskell.all.dhall
```

Here's the evaluation failure:

```
$ nix build --file ./minimal.nix --show-trace
error: while evaluating the file '/root/dhall-haskell/minimal.nix':
while evaluating the attribute 'all.dhall' at /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:1263:32:
while evaluating the attribute 'dhall' at undefined position:
while evaluating anonymous function at /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:1245:35, called from undefined position:
while evaluating 'isProperHaskellPackage' at /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:84:28, called from /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:1246:15:
while evaluating 'isDerivation' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/attrsets.nix:305:18, called from /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:85:5:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/lib.nix:48:54, called from undefined position:
while evaluating 'callPackageKeepDeriver' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:157:33, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/lib.nix:53:10:
while evaluating 'overrideCabal' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/lib.nix:37:24, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:158:5:
while evaluating 'callPackage' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:114:22, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:158:20:
while evaluating 'callPackageWithScope' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:74:37, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:114:28:
while evaluating 'makeOverridable' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:67:24, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:97:8:
while evaluating 'drvScope' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:87:18, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:69:12:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'cabal2nix-dhall-1.27' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:126:7:
while evaluating 'getOutput' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/attrsets.nix:464:23, called from undefined position:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/stdenv/generic/make-derivation.nix:133:17, called from undefined position:
while evaluating the attribute 'cabal2nix' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:1262:3:
while evaluating 'overrideCabal' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/lib.nix:37:24, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:1262:15:
while evaluating 'override' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:73:20, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/lib.nix:37:28:
while evaluating 'makeOverridable' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:67:24, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:73:29:
while evaluating 'drvScope' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:87:18, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:69:12:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/hackage-packages.nix:45954:6, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/make-package-set.nix:87:27:
while evaluating 'mkDerivation' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/lib.nix:38:20, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/hackage-packages.nix:45960:6:
while evaluating 'override' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:73:20, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/lib.nix:38:25:
while evaluating 'makeOverridable' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:67:24, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:73:29:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/generic-builder.nix:12:1, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:69:12:
while evaluating 'fix' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/fixed-points.nix:19:9, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/generic-builder.nix:240:4:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/generic-builder.nix:240:20, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/fixed-points.nix:19:20:
while evaluating 'optionalAttrs' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/attrsets.nix:331:25, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/development/haskell-modules/generic-builder.nix:511:4:
while evaluating the attribute 'configureFlags' of the derivation 'nix-2.3.1' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/tools/package-management/nix/default.nix:28:14:
while evaluating the attribute 'configurePhase' of the derivation 'busybox-1.30.1-x86_64-unknown-linux-musl' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'cc.targetPrefix' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/stdenv/generic/default.nix:148:14:
while evaluating the attribute 'gcc' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:7605:3:
while evaluating 'addMetaAttrs' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/meta.nix:15:28, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:7765:10:
while evaluating 'wrapCC' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:8625:12, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:7765:19:
while evaluating 'wrapCCWith' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:8604:5, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:8625:16:
while evaluating 'callPackageWith' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:108:35, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/top-level/all-packages.nix:8613:7:
while evaluating 'makeOverridable' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:67:24, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:112:8:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/build-support/cc-wrapper/default.nix:8:1, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:69:12:
while evaluating the attribute 'patches' of the derivation 'musl-1.1.22-x86_64-unknown-linux-musl' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'nativeBuildInputs' of the derivation '300-relative.patch' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/build-support/fetchurl/default.nix:119:3:
while evaluating 'getOutput' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/attrsets.nix:464:23, called from undefined position:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/stdenv/generic/make-derivation.nix:133:17, called from undefined position:
while evaluating 'override' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:73:20, called from /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:697:14:
while evaluating 'makeOverridable' at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:67:24, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:73:29:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:77:28, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:69:12:
while evaluating anonymous function at /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/pkgs/tools/networking/curl/default.nix:1:1, called from /nix/store/7fjx5cza1ijdf6bsnchqn8g5zd0hza33-source/lib/customisation.nix:77:35:
while evaluating 'statify_zlib' at /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:459:18, called from /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:697:41:
attribute 'override' missing, at /nix/store/2yha1cvdl0d3l9p8zv00qhnbrkfx41fr-source/survey/default.nix:460:6
```

I believe this is not the same thing as #9 since that is a build failure whereas this is an evaluation failure.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.