[Nix-dev] Where does
Amy de Buitléir
amy at nualeargais.ie
Thu Jun 4 17:54:51 CEST 2015
> Peter Simons <simons <at> cryp.to> writes:
>
> > At this point, the proper way to go forward is to open an upstream
> > ticket and to ask them to update their software:
> >
> > https://github.com/mhwombat/creatur/issues/1
>
> Thank you Peter. Actually, I am the developer of the Créatúr library
> (mhwombat == Amy de Buitléir), so I'll fix that now.
Sigh... back to square one.
What I'm trying to compile isn't the version of Créatúr that's on GitHub,
it's a new version that I plan to upload to GitHub as soon as I've tested
it. And that version already has those updates (MonadRandom ==0.4.*, zlib
==0.6.*). So I'm back to my original problem: I haven't been able to build
this on NixOS.
[amy at wombat9000:~/creatur]$ nix-shell
[nix-shell:~/creatur]$ cabal build
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring creatur-5.9.6...
cabal: At least the following dependencies are missing:
zlib ==0.6.*
I already have zlib installed:
[nix-shell:~/creatur]$ nix-env -q
. . .
haskell-zlib-ghc7.8.4-0.5.4.2-shared
. . .
zlib-1.2.8
Just to see if I could figure out what was wrong, I tried:
[nix-shell:~/creatur]$ cabal install --dependencies-only
Resolving dependencies...
Configuring zlib-0.6.1.1...
Failed to install zlib-0.6.1.1
Build log ( /home/amy/.cabal/logs/zlib-0.6.1.1.log ):
Configuring zlib-0.6.1.1...
setup-Simple-Cabal-1.22.2.0-x86_64-linux-ghc-7.10.1: Missing dependency on a
foreign library:
* Missing (or bad) header file: zlib.h
* Missing C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
cabal: Error: some packages failed to install:
zlib-0.6.1.1 failed during the configure step. The exception was:
ExitFailure 1
So eelco suggested that I add buildInputs = [ zlib ]; I tried adding that to
shell.nix, but that causes an error:
[amy at wombat9000:~/creatur]$ nix-shell
error: anonymous function at
"/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/development
/haskell-modules/generic-builder.nix":5:1
called with unexpected argument ‘buildInputs’, at
"/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/development
/haskell-modules/configuration-ghc-7.10.x.nix":51:23
Here's my version of shell.nix, with the buildInputs thingie added:
with (import <nixpkgs> {}).pkgs;
let pkg = haskellngPackages.callPackage
({ mkDerivation, array, base, binary, bytestring, cereal, cond
, directory, filepath, gray-extended, hdaemonize, hsyslog, HUnit
, MonadRandom, mtl, old-locale, process, QuickCheck, random, split
, stdenv, temporary, test-framework, test-framework-hunit
, test-framework-quickcheck2, time, transformers, unix, zlib
}:
mkDerivation {
pname = "creatur";
version = "5.9.6";
src = ./.;
buildInputs = [
zlib
];
buildDepends = [
array base bytestring cereal cond directory filepath
gray-extended
hdaemonize hsyslog MonadRandom mtl old-locale process
random split
time transformers unix zlib
];
testDepends = [
array base binary cereal directory filepath hsyslog HUnit
MonadRandom mtl QuickCheck temporary test-framework
test-framework-hunit test-framework-quickcheck2
];
homepage = "https://github.com/mhwombat/creatur";
description = "Framework for artificial life experiments";
license = stdenv.lib.licenses.bsd3;
}) {};
in
pkg.env
More information about the nix-dev
mailing list