Closed KristianBalaj closed 4 years ago
You can bypass the evaluation check
env NIXPKGS_ALLOW_BROKEN=1 some-nix-command
but the thing is there for you to avoid having to build and fail:
builder for '/nix/store/55x59089ncp5iyjcaagj374zhgv964wr-superbuffer-0.3.1.1.drv' failed with exit code 1; last 10 log lines:
die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:950:20 in Cabal-2.4.0.1:Distribution.Simple.Configure
configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:460:12 in Cabal-2.4.0.1:Distribution.Simple.Configure
configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:596:20 in Cabal-2.4.0.1:Distribution.Simple
confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.4.0.1:Distribution.Simple.UserHooks
configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:178:19 in Cabal-2.4.0.1:Distribution.Simple
defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:115:27 in Cabal-2.4.0.1:Distribution.Simple
defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing dependencies:
QuickCheck <2.13
cannot build derivation '/nix/store/dpkyr1bkr4wb3rrpd0v98j0ahvjjc3bl-Spock-core-0.13.0.0.drv': 1 dependencies couldn't be built
builder for '/nix/store/nl5nlj0213qppkh2gjifg8wc95dzskfb-stm-hamt-1.2.0.4.drv' failed with exit code 1; last 10 log lines:
die', called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:950:20 in Cabal-2.4.0.1:Distribution.Simple.Configure
configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:460:12 in Cabal-2.4.0.1:Distribution.Simple.Configure
configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:596:20 in Cabal-2.4.0.1:Distribution.Simple
confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:67:5 in Cabal-2.4.0.1:Distribution.Simple.UserHooks
configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:178:19 in Cabal-2.4.0.1:Distribution.Simple
defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:115:27 in Cabal-2.4.0.1:Distribution.Simple
defaultMain, called at Setup.hs:2:8 in main:Main
Setup: Encountered missing dependencies:
primitive ==0.7.*, primitive-extras ==0.8.*
cannot build derivation '/nix/store/36xa374nnj5nq1c7lwas7jwddmfnlv2q-stm-containers-1.1.0.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/lk1sy9c6dm2g5akq4g2m26wm6whj704y-Spock-0.13.0.0.drv': 2 dependencies couldn't be built
Yeah I've tried it to run with the allowBroken = true flag and got the same result - build failed because of missing dependencies.
Any solution there?
Spock is unmaintained and has been broken for at least two stackage LTS releases, there's not much NixOS can do about this. See this issue: https://github.com/agrafix/Spock/issues/149.
If you really need it you can override the package to use the (never released) 0.13.0.2 version. I recovered from a backup the override I used until last year and converted it to a (modern) overlay. I haven't tested it but it should still work:
super: self: {
haskellPackages = super.haskellPackages.override {
overrides = hself: hsuper: with self.haskell.lib; {
# Remove unecessary constraint
superbuffer = overrideCabal hsuper.superbuffer (drv: {
postPatch = "sed -i 's#QuickCheck < 2.10#QuickCheck < 2.13#' superbuffer.cabal";
broken = false;
});
# Force update on LTS 13.2
Spock = overrideCabal hsuper.Spock (drv: {
version = "0.13.0.2";
src = "${self.fetchFromGitHub {
owner = "agrafix";
repo = "Spock";
rev = "1ba2ac810321eacdf11fc99eed1c0a83e14e79d0";
sha256 = "0b4yacnz25392bb6mlp5binj4kzrxn4gqa5vwg9l937ijp4g4kk8";
}}/Spock";
broken = false;
});
Spock-core = overrideCabal hsuper.Spock-core (drv: {
version = "0.13.0.2";
src = "${self.fetchFromGitHub {
owner = "agrafix";
repo = "Spock";
rev = "1ba2ac810321eacdf11fc99eed1c0a83e14e79d0";
sha256 = "0b4yacnz25392bb6mlp5binj4kzrxn4gqa5vwg9l937ijp4g4kk8";
}}/Spock-core";
broken = false;
});
};
};
}
Btw, if you're starting a new project give servant a try.
Great @rnhmjoj! Thank you for the explanation. Currently, as a noob user of the nix tooling I'm gonna use a package that is maintained. :)
I'm closing the issue since it's not really a NixOS problem.
Describe the bug Package Spock is marked as broken. What are the actual steps to solve this issue when I want to use the package in my project? And what is the reason of this? (I'm new to nix and haskell so I'm looking for answers.)
To Reproduce Running this command:
nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [pkgs.Spock])"
results in this output:
error: Package ‘Spock-0.13.0.0’ in /nix/store/hl5404ba6gp3hn8z9a56g06zprzmdzdx-nixpkgs-20.09pre214374.1fe82110feb/nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix:18438 is marked as broken, refusing to evaluate.
Metadata
"x86_64-linux"
Linux 4.4.0-18362-Microsoft, Ubuntu, 18.04.2 LTS (Bionic Beaver)
no
no
nix-env (Nix) 2.3.3
"nixpkgs-20.09pre214374.1fe82110feb"
/home/kristian/.nix-defexpr/channels/nixpkgs