Last active
April 6, 2019 21:23
-
-
Save AleXoundOS/9a27b23504f0cd57b6c87e2cfcc107a4 to your computer and use it in GitHub Desktop.
nix shell configuration for building stack project with zlib dependency using binary GHC distribution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with (import <nixpkgs> {}); | |
let | |
buildInputs = [haskell.compiler.ghc822Binary pkgconfig zlib]; | |
in stdenv.mkDerivation { | |
name = "myUsbZlibEnv"; | |
inherit buildInputs; | |
# For unknown reason libz.so cannot be found for linking without this | |
# despite being present in buildInputs. | |
# I took inspiration for this from haskell-modules/generic-stack-builder.nix. | |
# And if buildStackProject supports somehow binary ghc (i.e. ghc822Binary), | |
# the following expression in not needed. | |
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment