-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Example projects not working #27
Comments
Thanks for the detailed debugging messages!
I'm pretty surprised you're seeing this error. I test that Is there anything other debugging steps you could think of? |
Oh, maybe you also changed the My guess is that in older stackage resolvers, the |
Negative, I'm running
Just tried on another computer (macos x86_64) and same result. The other computer is an M1 $ nix build -L
source> trying https://github.com/commercialhaskell/all-cabal-hashes/archive/9ab160f48cb535719783bc43c0fbf33e6d52fa99.tar.gz
source> % Total % Received % Xferd Average Speed Time Time Time Current
source> Dload Upload Total Spent Left Speed
source> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
source> 100 63.0M 0 63.0M 0 0 634k 0 --:--:-- 0:01:41 --:--:-- 749k
source> unpacking source archive /private/tmp/nix-build-source.drv-0/9ab160f48cb535719783bc43c0fbf33e6d52fa99.tar.gz
error: hash mismatch in fixed-output derivation '/nix/store/kwr99xys5r3ykbsqa2zvh17mbdpcp9h9-source.drv':
specified: sha256-Hz/xaCoxe4cJBH3h/KIfjzsrEyD915YEVEK8HFR7nO4=
got: sha256-ULKUethJNV2/5bs5xMKcPtX3qX10pvyjd5+whVRwVmQ=
error: 1 dependencies of derivation '/nix/store/63v7n8989gq7kpcw7rx1p37aghq3aprw-all-cabal-hashes-component-hspec-2.9.7.drv' failed to build
error:
… while calling the 'derivationStrict' builtin
at //builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'my-example-haskell-app-0.1.0.0'
whose name attribute is located at /nix/store/9qkpbm10iypl7zclprk9r0pwncr0snjk-source/pkgs/stdenv/generic/make-derivation.nix:270:7
… while evaluating attribute 'buildInputs' of derivation 'my-example-haskell-app-0.1.0.0'
at /nix/store/9qkpbm10iypl7zclprk9r0pwncr0snjk-source/pkgs/stdenv/generic/make-derivation.nix:314:7:
313| depsHostHost = lib.elemAt (lib.elemAt dependencies 1) 0;
314| buildInputs = lib.elemAt (lib.elemAt dependencies 1) 1;
| ^
315| depsTargetTarget = lib.elemAt (lib.elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full trace)
error: 1 dependencies of derivation '/nix/store/jz0iqyn6irbdm5pkbbamsm9vig852i7h-cabal2nix-hspec-2.9.7.drv' failed to build |
@cdepillabout I would like to jump in and provide some additional context. I faced the same issues @oscar-izval mentioned before, however, I manage to go a little further by making the following changes: # my-example-haskell-lib-easy/flake.nix
- rev = "9ab160f48cb535719783bc43c0fbf33e6d52fa99";
- sha256 = "sha256-Hz/xaCoxe4cJBH3h/KIfjzsrEyD915YEVEK8HFR7nO4=";
+ rev = "4018a4b7b6c3d8c0db39b71e6900732399f7c96e";
+ sha256 = "sha256-adFkfnBgV0iTPFUlR9L6EuYFBiZwnTKd2LA8Xv+8PKE"; # nix/build-support/stacklock2nix/cabal2nixArgsForPkg.nix
- "splitmix" = ver: { testu01 = null; }; I think the reason why test-suite splitmix-testu01
if !os(linux)
buildable: False Source: https://github.com/haskellari/splitmix/blob/master/splitmix.cabal Getting rid of the
I didn't have time to debug this deeper, however, at first glance it looks unrelated to this project |
Going back to the changes I posted before, I think a better solution for the "splitmix" = ver:
if pkgs.stdenv.isLinux then
{ testu01 = null; }
else
{}; |
Thanks for reporting this. This looks the same as: I fixed this in #28 in 889f987. Could you test if this fixes the problem for you? |
In #28 (comment) you say
I'm not sure what could be going on here. Could you do @sestrella Do you have an idea what could be going on here? In #27 (comment) you say:
Is this the change that is necessary to work around the error from @oscar-izval? Do you have an idea why this was necessary? In #28, as of commit 889f987, the lines of code you're referencing look like: stacklock2nix/my-example-haskell-lib-easy/flake.nix Lines 92 to 97 in 889f987
It sounds like this hash may be incorrect if you're on OSX? |
Hi! I'm trying to follow the guide to test the examples provided in the repo, but I'm facing some issues, here's what I've done so far:
nix build
frommy-example-haskell-lib-easy/
. I get this error:nix build
I get the following (as I originally mentioned in Unordered-Containers error nothunks #25):Other things I've tried or found:
nix flake update
all-cabal-hashes
to latest revhttps://github.com/NixOS/nixpkgs/blob/a4b903646ce5f446877662a851ab1cc206b4d708/pkgs/development/haskell-modules/hackage-packages.nix#L274139-L274157
The text was updated successfully, but these errors were encountered: