mirror of
https://github.com/NixOS/nix-pills
synced 2024-09-19 04:00:13 -04:00
40 lines
572 B
Plaintext
40 lines
572 B
Plaintext
|
unset PATH
|
||
|
for p in $baseInputs $buildInputs; do
|
||
|
export PATH=$p/bin${PATH:+:}$PATH
|
||
|
done
|
||
|
|
||
|
function unpackPhase() {
|
||
|
tar -xzf $src
|
||
|
|
||
|
for d in *; do
|
||
|
if [ -d "$d" ]; then
|
||
|
cd "$d"
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
function configurePhase() {
|
||
|
./configure --prefix=$out
|
||
|
}
|
||
|
|
||
|
function buildPhase() {
|
||
|
make
|
||
|
}
|
||
|
|
||
|
function installPhase() {
|
||
|
make install
|
||
|
}
|
||
|
|
||
|
function fixupPhase() {
|
||
|
find $out -type f -exec patchelf --shrink-rpath '{}' \; -exec strip '{}' \; 2>/dev/null
|
||
|
}
|
||
|
|
||
|
function genericBuild() {
|
||
|
unpackPhase
|
||
|
configurePhase
|
||
|
buildPhase
|
||
|
installPhase
|
||
|
fixupPhase
|
||
|
}
|