parent
c37611f3e5
commit
cf5f282940
@ -0,0 +1,21 @@ |
||||
{ stdenv }: |
||||
|
||||
let |
||||
|
||||
version = "2014-11-28"; |
||||
|
||||
in stdenv.mkDerivation { |
||||
|
||||
name = "skarnet-conf-compile-${version}"; |
||||
|
||||
phases = [ "fixupPhase" ]; |
||||
|
||||
setupHook = ./setup-hook.sh; |
||||
|
||||
meta = { |
||||
homepage = http://www.skarnet.org/software/conf-compile.html; |
||||
description = "Support for configuring skarnet.org packages for nix builds"; |
||||
platforms = stdenv.lib.platforms.all; |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,42 @@ |
||||
# Packages from skarnet.org use a unique build system. These functions |
||||
# assist with some common configuration and shebang patching. |
||||
|
||||
skarnetConfigure() { |
||||
runHook preConfigure |
||||
|
||||
pushd conf-compile >/dev/null |
||||
|
||||
# paths |
||||
> conf-defaultpath printf "$out/bin" |
||||
> conf-etc printf "$out/etc" |
||||
> conf-install-command printf "$out/bin" |
||||
> conf-install-include printf "$out/include" |
||||
> conf-install-libexec printf "$out/libexec" |
||||
> conf-install-library printf "$out/lib" |
||||
> conf-install-library.so printf "$out/lib" |
||||
> conf-install-sysdeps printf "$out/sysdeps" |
||||
|
||||
# let nix builder strip things, cross-platform |
||||
truncate --size 0 conf-stripbins conf-striplibs |
||||
|
||||
rm -f flag-slashpackage |
||||
touch flag-allstatic |
||||
touch flag-forcedevr # only used for skalibs |
||||
|
||||
# build inputs |
||||
truncate --size 0 import path-include path-library |
||||
for input in $nativeBuildInputs; do |
||||
[[ -a "$input/sysdeps" ]] && >> import printf "$input/sysdeps" |
||||
[[ -a "$input/include" ]] && >> path-include printf "$input/include" |
||||
[[ -a "$input/lib" ]] && >> path-library printf "$input/lib" |
||||
done |
||||
|
||||
popd >/dev/null |
||||
|
||||
# patch various scripts to use stdenv shell |
||||
patchShebangs src/sys |
||||
|
||||
runHook postConfigure |
||||
} |
||||
|
||||
export configurePhase=skarnetConfigure |
Loading…
Reference in new issue