Consolidate conf-compile steps for skarnet.org pkgs.

This commit is contained in:
Patrick Mahoney
2014-11-28 13:10:37 -06:00
parent c37611f3e5
commit cf5f282940
10 changed files with 104 additions and 197 deletions

View File

@@ -1,10 +1,14 @@
{stdenv, fetchurl}:
{ stdenv
, skarnetConfCompile
, fetchurl
}:
let
version = "1.6.0.0";
in stdenv.mkDerivation rec {
name = "skalibs-${version}";
src = fetchurl {
@@ -17,32 +21,7 @@ in stdenv.mkDerivation rec {
# See http://skarnet.org/cgi-bin/archive.cgi?1:mss:75:201405:pkmodhckjklemogbplje
patches = [ ./getpeereid.patch ];
configurePhase = ''
pushd conf-compile
printf "$out/bin" > conf-defaultpath
printf "$out/etc" > conf-etc
printf "$out/bin" > conf-install-command
printf "$out/include" > conf-install-include
printf "$out/libexec" > conf-install-libexec
printf "$out/lib" > conf-install-library
printf "$out/lib" > conf-install-library.so
printf "$out/sysdeps" > conf-install-sysdeps
# let nix builder strip things, cross-platform
truncate --size 0 conf-stripbins
truncate --size 0 conf-striplibs
rm -f flag-slashpackage
touch flag-allstatic
touch flag-forcedevr
popd
'';
preBuild = ''
patchShebangs src/sys
'';
buildInputs = [ skarnetConfCompile ];
preInstall = ''
mkdir -p "$out/etc"