Created
August 14, 2018 08:37
-
-
Save eugeneia/05f4d186bd66b27b811c67af5e3e24c4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Run like this: | |
# nix-build /path/to/this/directory | |
# ... and the files are produced in ./result/bin/snabb | |
{ pkgs ? (import <nixpkgs> {}), source ? ./., version ? "dev" }: | |
with pkgs; | |
stdenv.mkDerivation rec { | |
name = "athens-${version}"; | |
src = lib.cleanSource source; | |
buildInputs = [ makeWrapper ccl openssl libxml2 ]; | |
inherit version openssl libxml2; | |
preBuild = '' | |
make clean | |
export LD_LIBRARY_PATH=${lib.makeLibraryPath [ openssl libxml2 ]} | |
export XDG_CACHE_HOME="$TMP/.cache" | |
''; | |
installPhase = '' | |
mkdir -p $out/bin | |
cp bin/athens $out/bin/athens.orig | |
makeWrapper $out/bin/athens.orig $out/bin/athens \ | |
--suffix LD_LIBRARY_PATH : $LD_LIBRARY_PATH | |
''; | |
dontStrip = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment