lol
1# This is the builder for all X.org components.
2source $stdenv/setup
3
4
5# After installation, automatically add all "Requires" fields in the
6# pkgconfig files (*.pc) to the propagated build inputs.
7origPostInstall=$postInstall
8postInstall() {
9 if test -n "$origPostInstall"; then eval "$origPostInstall"; fi
10
11 local r p requires
12 set +o pipefail
13 requires=$(grep "Requires:" $out/lib/pkgconfig/*.pc | \
14 sed "s/Requires://" | sed "s/,/ /g")
15 set -o pipefail
16
17 echo "propagating requisites $requires"
18
19 for r in $requires; do
20 if test -n "$crossConfig"; then
21 for p in $crossPkgs; do
22 if test -e $p/lib/pkgconfig/$r.pc; then
23 echo " found requisite $r in $p"
24 propagatedBuildInputs="$propagatedBuildInputs $p"
25 fi
26 done
27 else
28 for p in $nativePkgs; do
29 if test -e $p/lib/pkgconfig/$r.pc; then
30 echo " found requisite $r in $p"
31 propagatedNativeBuildInputs="$propagatedNativeBuildInputs $p"
32 fi
33 done
34 fi
35 done
36
37 mkdir -p "$out/nix-support"
38 echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
39 echo "$propagatedNativeBuildInputs" > "$out/nix-support/propagated-native-build-inputs"
40}
41
42
43installFlags="appdefaultdir=$out/share/X11/app-defaults $installFlags"
44
45
46if test -n "$x11BuildHook"; then
47 source $x11BuildHook
48fi
49
50
51enableParallelBuilding=1
52
53
54genericBuild