dmjio
1/23/2017 - 10:22 PM

wut.nix

[nix-shell:~/Desktop/ssh-hans]$ cabal haddock
Running Haddock for ssh-hans-0.1.0.0...
Running hscolour for ssh-hans-0.1.0.0...
Preprocessing library ssh-hans-0.1.0.0...
ZlibCompression.hsc:8:10: fatal error: 'zlib.h' file not found
#include <zlib.h>
         ^
1 error generated.
compiling dist/build/Network/SSH/ZlibCompression_hsc_make.c failed (exit code 1)
command was: /nix/store/v3hl3nl8xhgbg0zzr765chwix901grl8-clang-wrapper-3.7.1/bin/cc -c dist/build/Network/SSH/ZlibCompression_hsc_make.c -o dist/build/Network/SSH/ZlibCompression_hsc_make.o -m64 -fno-stack-protector -m64 -fno-stack-protector -D__GLASGOW_HASKELL__=800 -Ddarwin_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Ddarwin_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iinclude -DSSH_HANS_SUPPORT_COMPRESSION -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/nix/store/jh2v5dc42jhlsnqz3f8n3h9ww1qvdwwp-ghc-8.0.1/lib/ghc-8.0.1/bytestring-0.10.8.1/include -I/nix/store/6iaki289jhrb26jdphzdzghgvhrd81rx-libiconv-osx-10.11.6/include -I/nix/store/jh2v5dc42jhlsnqz3f8n3h9ww1qvdwwp-ghc-8.0.1/lib/ghc-8.0.1/base-4.9.0.0/include -I/nix/store/szyb5ilvgymnv4gk46v8ww8xpph53h84-gmp-6.1.1-dev/include -I/nix/store/jh2v5dc42jhlsnqz3f8n3h9ww1qvdwwp-ghc-8.0.1/lib/ghc-8.0.1/integer-gmp-1.0.0.1/include -I/nix/store/jh2v5dc42jhlsnqz3f8n3h9ww1qvdwwp-ghc-8.0.1/lib/ghc-8.0.1/include -I/nix/store/jh2v5dc42jhlsnqz3f8n3h9ww1qvdwwp-ghc-8.0.1/lib/ghc-8.0.1/include/

[nix-shell:~/Desktop/ssh-hans]$ cat *.nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc801" }:
	    nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./ssh-hans.nix
	   { }
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc801" }:
	   (import ./default.nix { inherit nixpkgs compiler; }).env
{ mkDerivation, async, base, bytestring, cereal, containers
, cryptonite, memory, QuickCheck, stdenv, stm, test-framework
, test-framework-quickcheck2, transformers
}:
let pkgs = import <nixpkgs> {};
in mkDerivation {
  pname = "ssh-hans";
  version = "0.1.0.0";
  src = ./.;
  libraryHaskellDepends = [
    async base bytestring cereal containers cryptonite memory stm
    transformers pkgs.zlib
  ];
  extraLibraries = [ pkgs.zlib ];
  pkgconfigDepends = [ pkgs.zlib ];
  librarySystemDepends = [ pkgs.zlib ];
  executableSystemDepends = [ pkgs.zlib ];
  executableHaskellDepends = [ pkgs.zlib ];
  testHaskellDepends = [
    base bytestring cereal cryptonite memory QuickCheck test-framework
    test-framework-quickcheck2 pkgs.zlib
  ];
  description = "Implementation of the SSH2.0 protocol";
  license = stdenv.lib.licenses.bsd3;
}