git.iko.soy/typeable/nixpkgs
on master help sign in
tup: add setupHook
commit3065ab3a925a8a9654e904e44f5c4cb2ae4184c4 authorEmery Hemingway <ehmry@posteo.net> dateSat 13 Jun 2020, 10:56 (6 years ago) parent896959c
2 files changed+46
pkgs/development/tools/build-managers/tup/default.nix+2 pkgs/development/tools/build-managers/tup/setup-hook.sh+44
pkgs/development/tools/build-managers/tup/default.nix+2
@@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
3737 cp tup.1 $out/share/man/man1/
3838 '';
3939
40+ setupHook = ./tup/setup-hook.sh;
41+
4042 meta = with stdenv.lib; {
4143 description = "A fast, file-based build system";
4244 longDescription = ''
pkgs/development/tools/build-managers/tup/setup-hook.shnew file+44
@@ -0,0 +1,44 @@
1+#!/bin/sh
2+
3+tupConfigurePhase() {
4+ runHook preConfigure
5+
6+ echo -n CONFIG_TUP_ARCH= >> tup.config
7+ case "$system" in
8+ "i686-*") echo i386 >> tup.config;;
9+ "x86_64-*") echo x86_64 >> tup.config;;
10+ "powerpc-*") echo powerpc >> tup.config;;
11+ "powerpc64-*") echo powerpc64 >> tup.config;;
12+ "ia64-*") echo ia64 >> tup.config;;
13+ "alpha-*") echo alpha >> tup.config;;
14+ "sparc-*") echo sparc >> tup.config;;
15+ "aarch64-*") echo arm64 >> tup.config;;
16+ "arm*") echo arm >> tup.config;;
17+ esac
18+
19+ echo "${tupConfig-}" >> tup.config
20+
21+ tup init
22+ tup generate tupBuild.sh
23+
24+ runHook postConfigure
25+}
26+
27+if [ -z "${dontUseTupConfigure-}" -a -z "${configurePhase-}" ]; then
28+ configurePhase=tupConfigurePhase
29+fi
30+
31+
32+tupBuildPhase() {
33+ runHook preBuild
34+
35+ pushd .
36+ . tupBuild.sh
37+ popd
38+
39+ runHook postBuild
40+}
41+
42+if [ -z "${dontUseTupBuild-}" -a -z "${buildPhase-}" ]; then
43+ buildPhase=tupBuildPhase
44+fi