mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
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 ```
This commit is contained in:
parent
7329dfcc63
commit
bf3bd5fee1
|
@ -65,6 +65,9 @@ in stdenv.mkDerivation {
|
||||||
|
|
||||||
configureFlags = configureFlags ++ [
|
configureFlags = configureFlags ++ [
|
||||||
"--enable-absolute-paths"
|
"--enable-absolute-paths"
|
||||||
|
# We assume every nix-based cross target has urandom.
|
||||||
|
# This might not hold for e.g. BSD.
|
||||||
|
"--with-sysdep-devurandom=yes"
|
||||||
(if stdenv.isDarwin
|
(if stdenv.isDarwin
|
||||||
then "--disable-shared"
|
then "--disable-shared"
|
||||||
else "--enable-shared")
|
else "--enable-shared")
|
||||||
|
|
|
@ -23,13 +23,13 @@ in runCommandCC "sdnotify-wrapper" {
|
||||||
mkdir -p $bin/bin
|
mkdir -p $bin/bin
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
|
||||||
# just dynamic for now
|
# the -lskarnet has to come at the end to support static builds
|
||||||
$CC \
|
$CC \
|
||||||
-o $bin/bin/sdnotify-wrapper \
|
-o $bin/bin/sdnotify-wrapper \
|
||||||
-I${skalibs.dev}/include \
|
-I${skalibs.dev}/include \
|
||||||
-L${skalibs.lib}/lib \
|
-L${skalibs.lib}/lib \
|
||||||
-lskarnet \
|
${src} \
|
||||||
${src}
|
-lskarnet
|
||||||
|
|
||||||
mkdir -p $doc/share/doc/sdnotify-wrapper
|
mkdir -p $doc/share/doc/sdnotify-wrapper
|
||||||
# copy the documentation comment
|
# copy the documentation comment
|
||||||
|
|
|
@ -35,15 +35,21 @@ buildPackage {
|
||||||
mv examples $doc/share/doc/execline/examples
|
mv examples $doc/share/doc/execline/examples
|
||||||
|
|
||||||
mv $bin/bin/execlineb $bin/bin/.execlineb-wrapped
|
mv $bin/bin/execlineb $bin/bin/.execlineb-wrapped
|
||||||
cc \
|
|
||||||
|
# A wrapper around execlineb, which provides all execline
|
||||||
|
# tools on `execlineb`’s PATH.
|
||||||
|
# It is implemented as a C script, because on non-Linux,
|
||||||
|
# nested shebang lines are not supported.
|
||||||
|
# The -lskarnet has to come at the end to support static builds.
|
||||||
|
$CC \
|
||||||
-O \
|
-O \
|
||||||
-Wall -Wpedantic \
|
-Wall -Wpedantic \
|
||||||
-D "EXECLINEB_PATH()=\"$bin/bin/.execlineb-wrapped\"" \
|
-D "EXECLINEB_PATH()=\"$bin/bin/.execlineb-wrapped\"" \
|
||||||
-D "EXECLINE_BIN_PATH()=\"$bin/bin\"" \
|
-D "EXECLINE_BIN_PATH()=\"$bin/bin\"" \
|
||||||
-I "${skalibs.dev}/include" \
|
-I "${skalibs.dev}/include" \
|
||||||
-L "${skalibs.lib}/lib" \
|
-L "${skalibs.lib}/lib" \
|
||||||
-lskarnet \
|
|
||||||
-o "$bin/bin/execlineb" \
|
-o "$bin/bin/execlineb" \
|
||||||
${./execlineb-wrapper.c}
|
${./execlineb-wrapper.c} \
|
||||||
|
-lskarnet
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue