skawarePackages: support static builds via pkgsStatic

Most of the skaware packages already build just fine with pkgsStatic,
however the wrapper scripts for execline and stdnotify-wrapper needed
the `-lskarlib` argument to go at the end.

`utmps` and `nsss` still fail with this error:

```
exec ./tools/install.sh -D -m 600 utmps-utmpd /bin/utmps-utmpd
/build/utmps-0.0.3.1/tools/install.sh: line 48: can't create /bin/utmps-utmpd.tmp.479: Permission denied
make: *** [Makefile:121: /bin/utmps-utmpd] Error 1
```

+15 -6
+3
pkgs/build-support/skaware/build-skaware-package.nix
··· 65 66 configureFlags = configureFlags ++ [ 67 "--enable-absolute-paths" 68 (if stdenv.isDarwin 69 then "--disable-shared" 70 else "--enable-shared")
··· 65 66 configureFlags = configureFlags ++ [ 67 "--enable-absolute-paths" 68 + # We assume every nix-based cross target has urandom. 69 + # This might not hold for e.g. BSD. 70 + "--with-sysdep-devurandom=yes" 71 (if stdenv.isDarwin 72 then "--disable-shared" 73 else "--enable-shared")
+3 -3
pkgs/os-specific/linux/sdnotify-wrapper/default.nix
··· 23 mkdir -p $bin/bin 24 mkdir $out 25 26 - # just dynamic for now 27 $CC \ 28 -o $bin/bin/sdnotify-wrapper \ 29 -I${skalibs.dev}/include \ 30 -L${skalibs.lib}/lib \ 31 - -lskarnet \ 32 - ${src} 33 34 mkdir -p $doc/share/doc/sdnotify-wrapper 35 # copy the documentation comment
··· 23 mkdir -p $bin/bin 24 mkdir $out 25 26 + # the -lskarnet has to come at the end to support static builds 27 $CC \ 28 -o $bin/bin/sdnotify-wrapper \ 29 -I${skalibs.dev}/include \ 30 -L${skalibs.lib}/lib \ 31 + ${src} \ 32 + -lskarnet 33 34 mkdir -p $doc/share/doc/sdnotify-wrapper 35 # copy the documentation comment
+9 -3
pkgs/tools/misc/execline/default.nix
··· 35 mv examples $doc/share/doc/execline/examples 36 37 mv $bin/bin/execlineb $bin/bin/.execlineb-wrapped 38 - cc \ 39 -O \ 40 -Wall -Wpedantic \ 41 -D "EXECLINEB_PATH()=\"$bin/bin/.execlineb-wrapped\"" \ 42 -D "EXECLINE_BIN_PATH()=\"$bin/bin\"" \ 43 -I "${skalibs.dev}/include" \ 44 -L "${skalibs.lib}/lib" \ 45 - -lskarnet \ 46 -o "$bin/bin/execlineb" \ 47 - ${./execlineb-wrapper.c} 48 ''; 49 }
··· 35 mv examples $doc/share/doc/execline/examples 36 37 mv $bin/bin/execlineb $bin/bin/.execlineb-wrapped 38 + 39 + # A wrapper around execlineb, which provides all execline 40 + # tools on `execlineb`’s PATH. 41 + # It is implemented as a C script, because on non-Linux, 42 + # nested shebang lines are not supported. 43 + # The -lskarnet has to come at the end to support static builds. 44 + $CC \ 45 -O \ 46 -Wall -Wpedantic \ 47 -D "EXECLINEB_PATH()=\"$bin/bin/.execlineb-wrapped\"" \ 48 -D "EXECLINE_BIN_PATH()=\"$bin/bin\"" \ 49 -I "${skalibs.dev}/include" \ 50 -L "${skalibs.lib}/lib" \ 51 -o "$bin/bin/execlineb" \ 52 + ${./execlineb-wrapper.c} \ 53 + -lskarnet 54 ''; 55 }