scyther: Separated into two derivations

This commit is contained in:
Silvan Mosberger
2017-07-23 03:17:38 +02:00
parent 75fde4130d
commit 313b8b7e4b
3 changed files with 93 additions and 64 deletions
@@ -0,0 +1,32 @@
{ stdenv, glibc, flex, bison, cmake
, version, src, meta }:
stdenv.mkDerivation {
name = "scyther-cli-${version}";
inherit src meta;
buildInputs = [
cmake
glibc.static
flex
bison
];
patchPhase = ''
# Since we're not in a git dir, the normal command this project uses to create this file wouldn't work
printf "%s\n" "#define TAGVERSION \"${version}\"" > src/version.h
'';
configurePhase = ''
(cd src && cmakeConfigurePhase)
'';
dontUseCmakeBuildDir = true;
cmakeFlags = [ "-DCMAKE_C_FLAGS=-std=gnu89" ];
installPhase = ''
mkdir -p "$out/bin"
mv src/scyther-linux "$out/bin/scyther-cli"
ln -s "$out/bin/scyther-cli" "$out/bin/scyther-linux"
'';
}