Open NCrashed opened 5 years ago
This works for me on latest master
commit 9a3e919a91e98a66e749a8aa9bdd2c353f210e57 with:
NIX_PATH=nixpkgs=nixpkgs nix-build --no-link survey/default.nix -A haskellPackages.cabal2nix
.
Please confirm whether it still doesn't work for you.
@nh2 I was trying to use callHackageDirect
(which uses callCabal2nix
, which uses the cabal2nix
binary), and I got an error about not being able to build cabal2nix
.
Here's my derivation:
let
survey = import ./survey { normalPkgs = import ./nixpkgs {}; };
myHaskellPackages =
survey.haskellPackages.override {
overrides = self: super: {
termonad =
self.callHackageDirect
{
pkg = "termonad";
ver = "2.0.0.0";
sha256 = "1xs15186zk0z4crcrflk0x4nch858i0rgr60zd89f8l225gjwfrq";
}
{};
};
};
in
myHaskellPackages.termonad
Here's some of the output I get when running nix-build
:
$ nix-build ./build-termonad.nix
...
configure: serf library configuration via prefix
checking serf.h usability... yes
checking serf.h presence... yes
checking for serf.h... yes
checking for serf_context_create in -lserf-1... no
checking was serf enabled... no
An appropriate version of serf could not be found, so libsvn_ra_serf
will not be built. If you want to build libsvn_ra_serf, please
install serf 1.3.4 or newer.
configure: error: Serf was explicitly enabled but an appropriate version was not found.
builder for '/nix/store/knfk0bsc00wfl9fbmr3zai6dwbhw1jzm-subversion-1.12.0.drv' failed with exit code 1
cannot build derivation '/nix/store/sn7g6bmx35b6wp01ciq5kbv6hsvg3bl4-nix-prefetch-svn.drv': 1 dependencies couldn't be built
building '/nix/store/bhy725wcsysp8i6l5narryfxp2z2x0d8-openssh-7.9p1.drv'...
cannot build derivation '/nix/store/y2hkqc1hh84v3d4r2f8fk09j5ani7v59-nix-prefetch-scripts.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/8hsdal5ck86907f0qz2aksgb0wcl4i6c-cabal2nix-2.14.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/0bgwq7ais1sxkiclvyj9zwcgqrf6fka8-cabal2nix-termonad.drv': 1 dependencies couldn't be built
error: build of '/nix/store/0bgwq7ais1sxkiclvyj9zwcgqrf6fka8-cabal2nix-termonad.drv' failed
It appears that cabal2nix
depends on nix-prefetch-scripts
, and nix-prefetch-svn
depends on subversion
, which is having problems.
However, I don't understand why this is happening, given that cabal2nix
is able to be built fine:
let
survey = import ./survey { normalPkgs = import ./nixpkgs {}; };
in
survey.haskellPackages.cabal2nix
On the console:
$ nix-build build-cabal2nix.nix
...
/nix/store/az3qzvnadamk4cqiqh50xsqa110k16rl-cabal2nix-2.14.4
Maybe there is some overriding of dependencies that is not happening correctly for the underlying cabal2nix
used in callCabal2nix
.
This is on the current HEAD of the static-haskell-nix
master
branch (commit 761f34bb4b09dd5838f82782c5e56ebfac4039fb).
I tried to use
callCabal2Nix
and got the following linking errors.nixpkgs version: