From 26e74d8a3e06f665d25627677a3e6ac013f02c47 Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Tue, 23 Dec 2014 10:06:27 -0600 Subject: [PATCH] Update skarnet.org software for 2.0 release. New build system using configure script and GNU Make 4.0, and new releases of the following using the new build system: execline 2.0.0.0 s6 2.0.0.0 s6-dns 2.0.0.0 s6-linux-utils 2.0.0.0 s6-networking 2.0.0.0 s6-portable-utils 2.0.0.0 skalibs 2.0.0.0 --- .../development/libraries/skalibs/default.nix | 22 ++++----- .../libraries/skalibs/getpeereid.patch | 28 ----------- .../tools/build-managers/skarnet/default.nix | 21 --------- .../build-managers/skarnet/setup-hook.sh | 47 ------------------- .../linux/s6-linux-utils/default.nix | 18 +++++-- pkgs/servers/s6/default.nix | 20 ++++++-- pkgs/tools/misc/execline/default.nix | 19 ++++++-- pkgs/tools/misc/s6-portable-utils/default.nix | 19 ++++---- pkgs/tools/networking/s6-dns/default.nix | 19 ++++++-- .../networking/s6-networking/default.nix | 23 +++++++-- pkgs/top-level/all-packages.nix | 2 - 11 files changed, 96 insertions(+), 142 deletions(-) delete mode 100644 pkgs/development/libraries/skalibs/getpeereid.patch delete mode 100644 pkgs/development/tools/build-managers/skarnet/default.nix delete mode 100644 pkgs/development/tools/build-managers/skarnet/setup-hook.sh diff --git a/pkgs/development/libraries/skalibs/default.nix b/pkgs/development/libraries/skalibs/default.nix index 55c69b137e52..3fe8e275ea9c 100644 --- a/pkgs/development/libraries/skalibs/default.nix +++ b/pkgs/development/libraries/skalibs/default.nix @@ -1,11 +1,11 @@ { stdenv -, skarnetConfCompile , fetchurl +, gnumake40 }: let - version = "1.6.0.0"; + version = "2.0.0.0"; in stdenv.mkDerivation rec { @@ -13,19 +13,19 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://skarnet.org/software/skalibs/${name}.tar.gz"; - sha256 = "0jz3farll9n5jvz3g6wri99s6njkgmnf0r9jqjlg03f20dzv8c8w"; + sha256 = "0cz30wqg8fnkwjlacs4s3sjs3l34sa91xgci95fmb187zhiq693n"; }; - sourceRoot = "prog/${name}"; + dontDisableStatic = true; - # See http://skarnet.org/cgi-bin/archive.cgi?1:mss:75:201405:pkmodhckjklemogbplje - patches = [ ./getpeereid.patch ]; + buildInputs = [ gnumake40 ]; - buildInputs = [ skarnetConfCompile ]; - - preInstall = '' - mkdir -p "$out/etc" - ''; + configureFlags = [ + "--enable-force-devr" # assume /dev/random works + "--libdir=\${prefix}/lib" + "--includedir=\${prefix}/include" + "--sysdepdir=\${prefix}/lib/skalibs/sysdeps" + ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]); meta = { homepage = http://skarnet.org/software/skalibs/; diff --git a/pkgs/development/libraries/skalibs/getpeereid.patch b/pkgs/development/libraries/skalibs/getpeereid.patch deleted file mode 100644 index c366780e2670..000000000000 --- a/pkgs/development/libraries/skalibs/getpeereid.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/libstddjb/getpeereid.h -+++ b/src/libstddjb/getpeereid.h -@@ -3,6 +3,14 @@ - #ifndef GETPEEREID_H - #define GETPEEREID_H - -+#include "sysdeps.h" -+ -+#ifdef HASGETPEEREID -+/* syscall exists - do nothing */ -+ -+#else -+ - extern int getpeereid (int, int *, int *) ; - - #endif -+#endif ---- a/src/libstddjb/ipc_eid.c -+++ b/src/libstddjb/ipc_eid.c -@@ -5,7 +5,7 @@ - - int ipc_eid (int s, unsigned int *u, unsigned int *g) - { -- int dummyu, dummyg ; -+ unsigned int dummyu, dummyg ; - if (getpeereid(s, &dummyu, &dummyg) < 0) return -1 ; - *u = (unsigned int)dummyu ; - *g = (unsigned int)dummyg ; diff --git a/pkgs/development/tools/build-managers/skarnet/default.nix b/pkgs/development/tools/build-managers/skarnet/default.nix deleted file mode 100644 index 5490fcabef96..000000000000 --- a/pkgs/development/tools/build-managers/skarnet/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv }: - -let - - version = "2014-11-28"; - -in stdenv.mkDerivation { - - name = "skarnet-conf-compile-${version}"; - - phases = [ "fixupPhase" ]; - - setupHook = ./setup-hook.sh; - - meta = { - homepage = http://www.skarnet.org/software/conf-compile.html; - description = "Support for configuring skarnet.org packages for nix builds"; - platforms = stdenv.lib.platforms.all; - }; - -} diff --git a/pkgs/development/tools/build-managers/skarnet/setup-hook.sh b/pkgs/development/tools/build-managers/skarnet/setup-hook.sh deleted file mode 100644 index e9cd02a4e7e6..000000000000 --- a/pkgs/development/tools/build-managers/skarnet/setup-hook.sh +++ /dev/null @@ -1,47 +0,0 @@ -# Packages from skarnet.org use a unique build system. These functions -# assist with some common configuration and shebang patching. - -skarnetConfigure() { - runHook preConfigure - - pushd conf-compile >/dev/null - - # paths - > conf-defaultpath printf "$out/bin" - > conf-etc printf "$out/etc" - > conf-install-command printf "$out/bin" - > conf-install-include printf "$out/include" - > conf-install-libexec printf "$out/libexec" - > conf-install-library printf "$out/lib" - > conf-install-library.so printf "$out/lib" - > conf-install-sysdeps printf "$out/sysdeps" - - # use generic 'cc' to support both gcc and clang (darwin) stdenvs - for file in conf-cc conf-dynld conf-ld; do - substituteInPlace $file --replace gcc cc - done - - # let nix builder strip things, cross-platform - truncate --size 0 conf-stripbins conf-striplibs - - rm -f flag-slashpackage - touch flag-allstatic - touch flag-forcedevr # only used for skalibs - - # build inputs - truncate --size 0 import path-include path-library - for input in $nativeBuildInputs; do - [[ -a "$input/sysdeps" ]] && >> import printf "$input/sysdeps" - [[ -a "$input/include" ]] && >> path-include printf "$input/include" - [[ -a "$input/lib" ]] && >> path-library printf "$input/lib" - done - - popd >/dev/null - - # patch various scripts to use stdenv shell - patchShebangs src/sys - - runHook postConfigure -} - -export configurePhase=skarnetConfigure diff --git a/pkgs/os-specific/linux/s6-linux-utils/default.nix b/pkgs/os-specific/linux/s6-linux-utils/default.nix index b7a546a3ea06..76f46a32125b 100644 --- a/pkgs/os-specific/linux/s6-linux-utils/default.nix +++ b/pkgs/os-specific/linux/s6-linux-utils/default.nix @@ -1,12 +1,12 @@ { stdenv , fetchurl +, gnumake40 , skalibs -, skarnetConfCompile }: let - version = "1.0.3.1"; + version = "2.0.0.0"; in stdenv.mkDerivation rec { @@ -14,12 +14,20 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://www.skarnet.org/software/s6-linux-utils/${name}.tar.gz"; - sha256 = "1s17g03z5hfpiz32g001g5wyamyvn9l36fr2csk3k7r0jkqfnl0d"; + sha256 = "0lfgfwnk81vjlkvmr1gzknz9swgcrp5s7x19dfkw6shvi95fyirh"; }; - buildInputs = [ skalibs skarnetConfCompile ]; + dontDisableStatic = true; - sourceRoot = "admin/${name}"; + buildInputs = [ gnumake40 ]; + + configureFlags = [ + "--includedir=\${prefix}/include" + "--with-sysdeps=${skalibs}/lib/skalibs/sysdeps" + "--with-include=${skalibs}/include" + "--with-lib=${skalibs}/lib" + "--with-dynlib=${skalibs}/lib" + ]; meta = { homepage = http://www.skarnet.org/software/s6-linux-utils/; diff --git a/pkgs/servers/s6/default.nix b/pkgs/servers/s6/default.nix index 491dc625cf21..87235dcd696b 100644 --- a/pkgs/servers/s6/default.nix +++ b/pkgs/servers/s6/default.nix @@ -1,13 +1,13 @@ { stdenv , execline , fetchurl +, gnumake40 , skalibs -, skarnetConfCompile }: let - version = "1.1.3.2"; + version = "2.0.0.0"; in stdenv.mkDerivation rec { @@ -15,12 +15,22 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://www.skarnet.org/software/s6/${name}.tar.gz"; - sha256 = "0djxdd3d3mlp63sjqqs0ilf8p68m86c1s98d82fl0kgaaibpsikp"; + sha256 = "14x4l3xp152c9v34zs7nzxzacizfpp0k0lzwh40rxm0w5wz4x0ls"; }; - buildInputs = [ skalibs execline skarnetConfCompile ]; + dontDisableStatic = true; - sourceRoot = "admin/${name}"; + buildInputs = [ gnumake40 ]; + + configureFlags = [ + "--with-sysdeps=${skalibs}/lib/skalibs/sysdeps" + "--with-include=${skalibs}/include" + "--with-include=${execline}/include" + "--with-lib=${skalibs}/lib" + "--with-lib=${execline}/lib" + "--with-dynlib=${skalibs}/lib" + "--with-dynlib=${execline}/lib" + ] ++ stdenv.lib.optional stdenv.isDarwin [ "--disable-shared" ]; preBuild = '' substituteInPlace "src/daemontools-extras/s6-log.c" \ diff --git a/pkgs/tools/misc/execline/default.nix b/pkgs/tools/misc/execline/default.nix index 6bfb1852f870..b2bca22433cc 100644 --- a/pkgs/tools/misc/execline/default.nix +++ b/pkgs/tools/misc/execline/default.nix @@ -1,12 +1,12 @@ { stdenv , fetchurl +, gnumake40 , skalibs -, skarnetConfCompile }: let - version = "1.3.1.1"; + version = "2.0.0.0"; in stdenv.mkDerivation rec { @@ -14,12 +14,21 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://skarnet.org/software/execline/${name}.tar.gz"; - sha256 = "1br3qzif166kbp4k813ljbyq058p7mfsp2lj88n8vi4dmj935nzg"; + sha256 = "1g5v6icxsf7p2ccj9iq85iikkm12xph65ri86ydakihv6al3jw71"; }; - buildInputs = [ skalibs skarnetConfCompile ]; + dontDisableStatic = true; - sourceRoot = "admin/${name}"; + buildInputs = [ gnumake40 ]; + + configureFlags = [ + "--libdir=\${prefix}/lib" + "--includedir=\${prefix}/include" + "--with-sysdeps=${skalibs}/lib/skalibs/sysdeps" + "--with-include=${skalibs}/include" + "--with-lib=${skalibs}/lib" + "--with-dynlib=${skalibs}/lib" + ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]); meta = { homepage = http://skarnet.org/software/execline/; diff --git a/pkgs/tools/misc/s6-portable-utils/default.nix b/pkgs/tools/misc/s6-portable-utils/default.nix index 650886351e6b..4d871cf79118 100644 --- a/pkgs/tools/misc/s6-portable-utils/default.nix +++ b/pkgs/tools/misc/s6-portable-utils/default.nix @@ -1,12 +1,12 @@ { stdenv , fetchurl +, gnumake40 , skalibs -, skarnetConfCompile }: let - version = "1.0.3.2"; + version = "2.0.0.0"; in stdenv.mkDerivation rec { @@ -14,16 +14,19 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://www.skarnet.org/software/s6-portable-utils/${name}.tar.gz"; - sha256 = "040nmls7qbgw8yn502lym4kgqh5zxr2ks734bqajpi2ricnasvhl"; + sha256 = "1vszqaqkyhz1v69pxls3c7y1qs8wjkdylpg0yz183xlirywimwwk"; }; - buildInputs = [ skalibs skarnetConfCompile ]; + dontDisableStatic = true; - sourceRoot = "admin/${name}"; + buildInputs = [ gnumake40 ]; - preInstall = '' - mkdir -p "$out/libexec" - ''; + configureFlags = [ + "--with-sysdeps=${skalibs}/lib/skalibs/sysdeps" + "--with-include=${skalibs}/include" + "--with-lib=${skalibs}/lib" + "--with-dynlib=${skalibs}/lib" + ]; meta = { homepage = http://www.skarnet.org/software/s6-portable-utils/; diff --git a/pkgs/tools/networking/s6-dns/default.nix b/pkgs/tools/networking/s6-dns/default.nix index 16467e84a1e7..4ffa2d931a11 100644 --- a/pkgs/tools/networking/s6-dns/default.nix +++ b/pkgs/tools/networking/s6-dns/default.nix @@ -1,12 +1,12 @@ { stdenv , fetchurl +, gnumake40 , skalibs -, skarnetConfCompile }: let - version = "0.1.0.0"; + version = "2.0.0.0"; in stdenv.mkDerivation rec { @@ -14,12 +14,21 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://www.skarnet.org/software/s6-dns/${name}.tar.gz"; - sha256 = "1r82l5fnz2rrwm5wq2sldqp74lk9fifr0d8hyq98xdyh24hish68"; + sha256 = "07k6rzgsgcxr0bq209as79sjn2nrcjj9mlmk9vvy1hvsag0xnkcq"; }; - buildInputs = [ skalibs skarnetConfCompile ]; + dontDisableStatic = true; - sourceRoot = "web/${name}"; + buildInputs = [ gnumake40 ]; + + configureFlags = [ + "--includedir=\${prefix}/include" + "--libdir=\${prefix}/lib" + "--with-sysdeps=${skalibs}/lib/skalibs/sysdeps" + "--with-include=${skalibs}/include" + "--with-lib=${skalibs}/lib" + "--with-dynlib=${skalibs}/lib" + ] ++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ]); meta = { homepage = http://www.skarnet.org/software/s6-dns/; diff --git a/pkgs/tools/networking/s6-networking/default.nix b/pkgs/tools/networking/s6-networking/default.nix index a4482bb71c3f..87dd783636d6 100644 --- a/pkgs/tools/networking/s6-networking/default.nix +++ b/pkgs/tools/networking/s6-networking/default.nix @@ -1,14 +1,14 @@ { stdenv , execline , fetchurl +, gnumake40 , s6Dns , skalibs -, skarnetConfCompile }: let - version = "0.1.0.0"; + version = "2.0.0.0"; in stdenv.mkDerivation rec { @@ -16,12 +16,25 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "http://www.skarnet.org/software/s6-networking/${name}.tar.gz"; - sha256 = "1np9m2j1i2450mbcjvpbb56kv3wc2fbyvmv2a039q61j2lk6vjz7"; + sha256 = "0k2i0g5lsvh1gz90ixwdip1pngj9vd45d4fpmdg075vd8zhh7j37"; }; - buildInputs = [ skalibs s6Dns execline skarnetConfCompile ]; + dontDisableStatic = true; - sourceRoot = "net/${name}"; + buildInputs = [ gnumake40 ]; + + configureFlags = [ + "--with-sysdeps=${skalibs}/lib/skalibs/sysdeps" + "--with-include=${skalibs}/include" + "--with-include=${execline}/include" + "--with-include=${s6Dns}/include" + "--with-lib=${skalibs}/lib" + "--with-lib=${execline}/lib" + "--with-lib=${s6Dns}/lib" + "--with-dynlib=${skalibs}/lib" + "--with-dynlib=${execline}/lib" + "--with-dynlib=${s6Dns}/lib" + ]; meta = { homepage = http://www.skarnet.org/software/s6-networking/; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c287ca23986a..40ebfd3a88fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6881,8 +6881,6 @@ let skalibs = callPackage ../development/libraries/skalibs { }; - skarnetConfCompile = callPackage ../development/tools/build-managers/skarnet { }; - slang = callPackage ../development/libraries/slang { }; slibGuile = callPackage ../development/libraries/slib {