skawarePackages: factor out the common parts
Introduce a `skawarePackages.buildPackage` function that contains the common setup, removing a lot of duplication. In particular, we require that the build directory has to be empty after the `fixupPhase`, to make sure every relevant file is moved to the outputs. A next step would be to deduplicate the `configureFlags` attributes and only require a `skawareInputs` field.
This commit is contained in:
parent
57b431590b
commit
0071ae1d4f
|
@ -0,0 +1,128 @@
|
||||||
|
{ stdenv, fetchgit, writeScript, file }:
|
||||||
|
let lib = stdenv.lib;
|
||||||
|
in {
|
||||||
|
# : string
|
||||||
|
pname
|
||||||
|
# : string
|
||||||
|
, version
|
||||||
|
# : string
|
||||||
|
, sha256
|
||||||
|
# : string
|
||||||
|
, description
|
||||||
|
# : list Platform
|
||||||
|
, platforms ? lib.platforms.all
|
||||||
|
# : list string
|
||||||
|
, outputs ? [ "bin" "lib" "dev" "doc" "out" ]
|
||||||
|
# TODO(Profpatsch): automatically infer most of these
|
||||||
|
# : list string
|
||||||
|
, configureFlags
|
||||||
|
# mostly for moving and deleting files from the build directory
|
||||||
|
# : lines
|
||||||
|
, postInstall
|
||||||
|
# : list Maintainer
|
||||||
|
, maintainers ? []
|
||||||
|
|
||||||
|
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
# File globs that can always be deleted
|
||||||
|
commonNoiseFiles = [
|
||||||
|
".gitignore"
|
||||||
|
"Makefile"
|
||||||
|
"INSTALL"
|
||||||
|
"configure"
|
||||||
|
"patch-for-solaris"
|
||||||
|
"src/**/*"
|
||||||
|
"tools/**/*"
|
||||||
|
"package/**/*"
|
||||||
|
"config.mak"
|
||||||
|
];
|
||||||
|
|
||||||
|
# File globs that should be moved to $doc
|
||||||
|
commonMetaFiles = [
|
||||||
|
"COPYING"
|
||||||
|
"AUTHORS"
|
||||||
|
"NEWS"
|
||||||
|
"CHANGELOG"
|
||||||
|
"README"
|
||||||
|
"README.*"
|
||||||
|
];
|
||||||
|
|
||||||
|
globWith = stdenv.lib.concatMapStringsSep "\n";
|
||||||
|
rmNoise = globWith (f:
|
||||||
|
''rm -rf ${f}'') commonNoiseFiles;
|
||||||
|
mvMeta = globWith
|
||||||
|
(f: ''mv ${f} "$DOCDIR" 2>/dev/null || true'')
|
||||||
|
commonMetaFiles;
|
||||||
|
|
||||||
|
# Move & remove actions, taking the package doc directory
|
||||||
|
commonFileActions = writeScript "common-file-actions.sh" ''
|
||||||
|
#!${stdenv.shell}
|
||||||
|
set -e
|
||||||
|
DOCDIR="$1"
|
||||||
|
shopt -s globstar extglob nullglob
|
||||||
|
${rmNoise}
|
||||||
|
mkdir -p "$DOCDIR"
|
||||||
|
${mvMeta}
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "git://git.skarnet.org/${pname}";
|
||||||
|
rev = "refs/tags/v${version}";
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit outputs;
|
||||||
|
|
||||||
|
dontDisableStatic = true;
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
configureFlags = configureFlags ++ [
|
||||||
|
"--enable-absolute-paths"
|
||||||
|
(if stdenv.isDarwin
|
||||||
|
then "--disable-shared"
|
||||||
|
else "--enable-shared")
|
||||||
|
]
|
||||||
|
# On darwin, the target triplet from -dumpmachine includes version number,
|
||||||
|
# but skarnet.org software uses the triplet to test binary compatibility.
|
||||||
|
# Explicitly setting target ensures code can be compiled against a skalibs
|
||||||
|
# binary built on a different version of darwin.
|
||||||
|
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
|
||||||
|
++ (lib.optional stdenv.isDarwin
|
||||||
|
"--build=${stdenv.hostPlatform.system}");
|
||||||
|
|
||||||
|
# TODO(Profpatsch): ensure that there is always a $doc output!
|
||||||
|
postInstall = ''
|
||||||
|
echo "Cleaning & moving common files"
|
||||||
|
mkdir -p $doc/share/doc/${pname}
|
||||||
|
${commonFileActions} $doc/share/doc/${pname}
|
||||||
|
|
||||||
|
${postInstall}
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
echo "Checking for remaining source files"
|
||||||
|
rem=$(find -mindepth 1 -xtype f -print0 \
|
||||||
|
| tee $TMP/remaining-files)
|
||||||
|
if [[ "$rem" != "" ]]; then
|
||||||
|
echo "ERROR: These files should be either moved or deleted:"
|
||||||
|
cat $TMP/remaining-files | xargs -0 ${file}/bin/file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://skarnet.org/software/${pname}/";
|
||||||
|
inherit description platforms;
|
||||||
|
license = stdenv.lib.licenses.isc;
|
||||||
|
maintainers = with lib.maintainers;
|
||||||
|
[ pmahoney Profpatsch ] ++ maintainers;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -1,51 +1,30 @@
|
||||||
{ stdenv, fetchgit }:
|
{ stdenv, skawarePackages }:
|
||||||
|
|
||||||
let
|
with skawarePackages;
|
||||||
|
|
||||||
|
buildPackage {
|
||||||
|
pname = "skalibs";
|
||||||
version = "2.7.0.0";
|
version = "2.7.0.0";
|
||||||
|
sha256 = "068pkbl91mi35amlhv491dwrbzyfifrlxijss0g2vf693xvx6lxm";
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
description = "A set of general-purpose C programming libraries";
|
||||||
|
|
||||||
name = "skalibs-${version}";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "git://git.skarnet.org/skalibs";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
sha256 = "068pkbl91mi35amlhv491dwrbzyfifrlxijss0g2vf693xvx6lxm";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "lib" "dev" "doc" "out" ];
|
outputs = [ "lib" "dev" "doc" "out" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-force-devr" # assume /dev/random works
|
# assume /dev/random works
|
||||||
|
"--enable-force-devr"
|
||||||
"--libdir=\${lib}/lib"
|
"--libdir=\${lib}/lib"
|
||||||
"--dynlibdir=\${lib}/lib"
|
"--dynlibdir=\${lib}/lib"
|
||||||
"--includedir=\${dev}/include"
|
"--includedir=\${dev}/include"
|
||||||
"--sysdepdir=\${lib}/lib/skalibs/sysdeps"
|
"--sysdepdir=\${lib}/lib/skalibs/sysdeps"
|
||||||
]
|
];
|
||||||
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
|
|
||||||
# On darwin, the target triplet from -dumpmachine includes version number, but
|
|
||||||
# skarnet.org software uses the triplet to test binary compatibility.
|
|
||||||
# Explicitly setting target ensures code can be compiled against a skalibs
|
|
||||||
# binary built on a different version of darwin.
|
|
||||||
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
|
|
||||||
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/skalibs
|
rm -rf sysdeps.cfg
|
||||||
|
rm libskarnet.*
|
||||||
|
|
||||||
mv doc $doc/share/doc/skalibs/html
|
mv doc $doc/share/doc/skalibs/html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://skarnet.org/software/skalibs/;
|
|
||||||
description = "A set of general-purpose C programming libraries";
|
|
||||||
platforms = stdenv.lib.platforms.all;
|
|
||||||
license = stdenv.lib.licenses.isc;
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,19 @@
|
||||||
{ stdenv, fetchurl, skalibs }:
|
{ stdenv, skawarePackages }:
|
||||||
|
|
||||||
let
|
with skawarePackages;
|
||||||
|
|
||||||
|
buildPackage {
|
||||||
|
pname = "s6-linux-utils";
|
||||||
version = "2.5.0.0";
|
version = "2.5.0.0";
|
||||||
|
sha256 = "0wbxwki2alyym6dm44s5ajp9ndw6sgrqvizkznz71c30i0dlxrnf";
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
description = "A set of minimalistic Linux-specific system utilities";
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
name = "s6-linux-utils-${version}";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://www.skarnet.org/software/s6-linux-utils/${name}.tar.gz";
|
|
||||||
sha256 = "04q2z71dkzahd2ppga2zikclz2qk014c23gm7rigqxjc8rs1amvq";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "bin" "dev" "doc" "out" ];
|
outputs = [ "bin" "dev" "doc" "out" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
# TODO: nsss support
|
# TODO: nsss support
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-absolute-paths"
|
|
||||||
"--bindir=\${bin}/bin"
|
"--bindir=\${bin}/bin"
|
||||||
"--includedir=\${dev}/include"
|
"--includedir=\${dev}/include"
|
||||||
"--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
|
"--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
|
||||||
|
@ -29,16 +23,10 @@ in stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/s6-networking/
|
# remove all s6 executables from build directory
|
||||||
mv doc $doc/share/doc/s6-networking/html
|
rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
|
||||||
|
|
||||||
|
mv doc $doc/share/doc/s6-linux-utils/html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://www.skarnet.org/software/s6-linux-utils/;
|
|
||||||
description = "A set of minimalistic Linux-specific system utilities";
|
|
||||||
platforms = stdenv.lib.platforms.linux;
|
|
||||||
license = stdenv.lib.licenses.isc;
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,18 @@
|
||||||
{ stdenv, fetchgit, skalibs }:
|
{ stdenv, skawarePackages }:
|
||||||
|
|
||||||
let
|
with skawarePackages;
|
||||||
|
|
||||||
|
buildPackage {
|
||||||
|
pname = "execline";
|
||||||
version = "2.5.0.1";
|
version = "2.5.0.1";
|
||||||
|
sha256 = "0d4gvixz7xja03hnwc2bf13xrgh1jq27ij4m1jlrpgrzhfpqz37q";
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
description = "A small scripting language, to be used in place of a shell in non-interactive scripts";
|
||||||
|
|
||||||
name = "execline-${version}";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "git://git.skarnet.org/execline";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
sha256 = "0d4gvixz7xja03hnwc2bf13xrgh1jq27ij4m1jlrpgrzhfpqz37q";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
# TODO: nsss support
|
# TODO: nsss support
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-absolute-paths"
|
|
||||||
"--libdir=\${lib}/lib"
|
"--libdir=\${lib}/lib"
|
||||||
"--dynlibdir=\${lib}/lib"
|
"--dynlibdir=\${lib}/lib"
|
||||||
"--bindir=\${bin}/bin"
|
"--bindir=\${bin}/bin"
|
||||||
|
@ -31,22 +21,15 @@ in stdenv.mkDerivation rec {
|
||||||
"--with-include=${skalibs.dev}/include"
|
"--with-include=${skalibs.dev}/include"
|
||||||
"--with-lib=${skalibs.lib}/lib"
|
"--with-lib=${skalibs.lib}/lib"
|
||||||
"--with-dynlib=${skalibs.lib}/lib"
|
"--with-dynlib=${skalibs.lib}/lib"
|
||||||
]
|
];
|
||||||
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
|
|
||||||
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/execline
|
# remove all execline executables from build directory
|
||||||
|
rm $(find -type f -mindepth 1 -maxdepth 1 -executable)
|
||||||
|
rm libexecline.*
|
||||||
|
|
||||||
mv doc $doc/share/doc/execline/html
|
mv doc $doc/share/doc/execline/html
|
||||||
mv examples $doc/share/doc/execline/examples
|
mv examples $doc/share/doc/execline/examples
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://skarnet.org/software/execline/;
|
|
||||||
description = "A small scripting language, to be used in place of a shell in non-interactive scripts";
|
|
||||||
platforms = stdenv.lib.platforms.all;
|
|
||||||
license = stdenv.lib.licenses.isc;
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +1,35 @@
|
||||||
{ stdenv, fetchurl, skalibs }:
|
{ stdenv, skawarePackages }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with skawarePackages;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
name = "s6-portable-utils-${version}";
|
pname = "s6-portable-utils";
|
||||||
|
|
||||||
|
in buildPackage {
|
||||||
|
pname = pname;
|
||||||
version = "2.2.1.2";
|
version = "2.2.1.2";
|
||||||
|
sha256 = "1zfanja5mbyafmzw28dlx1bb3fixa7lidbs62sxf849ly3z0zqp2";
|
||||||
|
|
||||||
src = fetchurl {
|
description = "A set of tiny general Unix utilities optimized for simplicity and small size";
|
||||||
url = "https://www.skarnet.org/software/s6-portable-utils/${name}.tar.gz";
|
|
||||||
sha256 = "0if77z07rfygd1yk9d2abxkdbx3dg52vcjhb20isb8kvqxhkg8ih";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "bin" "dev" "doc" "out" ];
|
outputs = [ "bin" "dev" "doc" "out" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-absolute-paths"
|
|
||||||
"--bindir=\${bin}/bin"
|
"--bindir=\${bin}/bin"
|
||||||
"--includedir=\${dev}/include"
|
"--includedir=\${dev}/include"
|
||||||
"--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
|
"--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
|
||||||
"--with-include=${skalibs.dev}/include"
|
"--with-include=${skalibs.dev}/include"
|
||||||
"--with-lib=${skalibs.lib}/lib"
|
"--with-lib=${skalibs.lib}/lib"
|
||||||
"--with-dynlib=${skalibs.lib}/lib"
|
"--with-dynlib=${skalibs.lib}/lib"
|
||||||
]
|
];
|
||||||
# On darwin, the target triplet from -dumpmachine includes version number, but
|
|
||||||
# skarnet.org software uses the triplet to test binary compatibility.
|
|
||||||
# Explicitly setting target ensures code can be compiled against a skalibs
|
|
||||||
# binary built on a different version of darwin.
|
|
||||||
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
|
|
||||||
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/s6-portable-utils/
|
# remove all s6 executables from build directory
|
||||||
mv doc $doc/share/doc/s6-portable-utils/html
|
rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
|
||||||
|
rm seekablepipe
|
||||||
|
|
||||||
|
mv doc $doc/share/doc/${pname}/html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://www.skarnet.org/software/s6-portable-utils/;
|
|
||||||
description = "A set of tiny general Unix utilities optimized for simplicity and small size";
|
|
||||||
platforms = platforms.all;
|
|
||||||
license = licenses.isc;
|
|
||||||
maintainers = with maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,17 @@
|
||||||
{ stdenv, fetchgit, skalibs }:
|
{ stdenv, skawarePackages }:
|
||||||
|
|
||||||
let
|
with skawarePackages;
|
||||||
|
|
||||||
|
buildPackage {
|
||||||
|
pname = "s6-dns";
|
||||||
version = "2.3.0.1";
|
version = "2.3.0.1";
|
||||||
|
sha256 = "0flxkrnff2c28514k2nxv2y41k38pbiwd8dxlqaxgs2cl27i0ggb";
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
description = "A suite of DNS client programs and libraries for Unix systems";
|
||||||
|
|
||||||
name = "s6-dns-${version}";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "git://git.skarnet.org/s6-dns";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
sha256 = "0flxkrnff2c28514k2nxv2y41k38pbiwd8dxlqaxgs2cl27i0ggb";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-absolute-paths"
|
|
||||||
"--libdir=\${lib}/lib"
|
"--libdir=\${lib}/lib"
|
||||||
"--libexecdir=\${lib}/libexec"
|
"--libexecdir=\${lib}/libexec"
|
||||||
"--dynlibdir=\${lib}/lib"
|
"--dynlibdir=\${lib}/lib"
|
||||||
|
@ -31,21 +21,15 @@ in stdenv.mkDerivation rec {
|
||||||
"--with-include=${skalibs.dev}/include"
|
"--with-include=${skalibs.dev}/include"
|
||||||
"--with-lib=${skalibs.lib}/lib"
|
"--with-lib=${skalibs.lib}/lib"
|
||||||
"--with-dynlib=${skalibs.lib}/lib"
|
"--with-dynlib=${skalibs.lib}/lib"
|
||||||
]
|
];
|
||||||
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
|
|
||||||
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/s6-dns/
|
# remove all s6-dns executables from build directory
|
||||||
|
rm $(find -type f -mindepth 1 -maxdepth 1 -executable)
|
||||||
|
rm libs6dns.*
|
||||||
|
rm libskadns.*
|
||||||
|
|
||||||
mv doc $doc/share/doc/s6-dns/html
|
mv doc $doc/share/doc/s6-dns/html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://www.skarnet.org/software/s6-dns/;
|
|
||||||
description = "A suite of DNS client programs and libraries for Unix systems";
|
|
||||||
platforms = stdenv.lib.platforms.all;
|
|
||||||
license = stdenv.lib.licenses.isc;
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, execline, fetchgit, s6, s6-dns, skalibs
|
{ stdenv, skawarePackages
|
||||||
|
|
||||||
# Whether to build the TLS/SSL tools and what library to use
|
# Whether to build the TLS/SSL tools and what library to use
|
||||||
# acceptable values: "libressl", false
|
# acceptable values: "libressl", false
|
||||||
|
@ -6,11 +6,9 @@
|
||||||
, sslSupport ? "libressl" , libressl
|
, sslSupport ? "libressl" , libressl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with skawarePackages;
|
||||||
let
|
let
|
||||||
inherit (stdenv) lib;
|
inherit (stdenv) lib;
|
||||||
|
|
||||||
version = "2.3.0.3";
|
|
||||||
|
|
||||||
sslSupportEnabled = sslSupport != false;
|
sslSupportEnabled = sslSupport != false;
|
||||||
sslLibs = {
|
sslLibs = {
|
||||||
"libressl" = libressl;
|
"libressl" = libressl;
|
||||||
|
@ -19,25 +17,18 @@ let
|
||||||
in
|
in
|
||||||
assert sslSupportEnabled -> sslLibs ? ${sslSupport};
|
assert sslSupportEnabled -> sslLibs ? ${sslSupport};
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
|
|
||||||
name = "s6-networking-${version}";
|
buildPackage {
|
||||||
|
pname = "s6-networking";
|
||||||
|
version = "2.3.0.3";
|
||||||
|
sha256 = "06kv2l31ch0zw538bpivgnwymb056x5hpmqafglffgkbq3izp7wc";
|
||||||
|
|
||||||
src = fetchgit {
|
description = "A suite of small networking utilities for Unix systems";
|
||||||
url = "git://git.skarnet.org/s6-networking";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
sha256 = "06kv2l31ch0zw538bpivgnwymb056x5hpmqafglffgkbq3izp7wc";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
# TODO: nsss support
|
# TODO: nsss support
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-absolute-paths"
|
|
||||||
"--libdir=\${lib}/lib"
|
"--libdir=\${lib}/lib"
|
||||||
"--libexecdir=\${lib}/libexec"
|
"--libexecdir=\${lib}/libexec"
|
||||||
"--dynlibdir=\${lib}/lib"
|
"--dynlibdir=\${lib}/lib"
|
||||||
|
@ -61,20 +52,16 @@ stdenv.mkDerivation rec {
|
||||||
"--enable-ssl=${sslSupport}"
|
"--enable-ssl=${sslSupport}"
|
||||||
"--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
|
"--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
|
||||||
"--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
|
"--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
|
||||||
])
|
"--with-dynlib=${lib.getLib sslLibs.${sslSupport}}/lib"
|
||||||
++ (lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
|
]);
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/s6-networking/
|
# remove all s6 executables from build directory
|
||||||
|
rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
|
||||||
|
rm minidentd
|
||||||
|
rm libs6net.* libstls.*
|
||||||
|
|
||||||
mv doc $doc/share/doc/s6-networking/html
|
mv doc $doc/share/doc/s6-networking/html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://www.skarnet.org/software/s6-networking/;
|
|
||||||
description = "A suite of small networking utilities for Unix systems";
|
|
||||||
platforms = lib.platforms.all;
|
|
||||||
license = lib.licenses.isc;
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,18 @@
|
||||||
{ stdenv, execline, fetchgit, skalibs, s6 }:
|
{ stdenv, skawarePackages }:
|
||||||
|
|
||||||
let
|
with skawarePackages;
|
||||||
|
|
||||||
|
buildPackage {
|
||||||
|
pname = "s6-rc";
|
||||||
version = "0.4.1.0";
|
version = "0.4.1.0";
|
||||||
|
sha256 = "1as7jhlp4cvh1bzvcli1hk1pbdzkac8gys1h379blymfy8hmp805";
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
description = "A service manager for s6-based systems";
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
name = "s6-rc-${version}";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "git://git.skarnet.org/s6-rc";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
sha256 = "1as7jhlp4cvh1bzvcli1hk1pbdzkac8gys1h379blymfy8hmp805";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
outputs = [ "bin" "lib" "dev" "doc" "out" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-absolute-paths"
|
|
||||||
"--libdir=\${lib}/lib"
|
"--libdir=\${lib}/lib"
|
||||||
"--libexecdir=\${lib}/libexec"
|
"--libexecdir=\${lib}/libexec"
|
||||||
"--dynlibdir=\${lib}/lib"
|
"--dynlibdir=\${lib}/lib"
|
||||||
|
@ -37,22 +28,15 @@ in stdenv.mkDerivation rec {
|
||||||
"--with-dynlib=${skalibs.lib}/lib"
|
"--with-dynlib=${skalibs.lib}/lib"
|
||||||
"--with-dynlib=${execline.lib}/lib"
|
"--with-dynlib=${execline.lib}/lib"
|
||||||
"--with-dynlib=${s6.out}/lib"
|
"--with-dynlib=${s6.out}/lib"
|
||||||
]
|
];
|
||||||
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
|
|
||||||
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/s6-rc/
|
# remove all s6 executables from build directory
|
||||||
|
rm $(find -name "s6-rc-*" -type f -mindepth 1 -maxdepth 1 -executable)
|
||||||
|
rm s6-rc libs6rc.*
|
||||||
|
|
||||||
mv doc $doc/share/doc/s6-rc/html
|
mv doc $doc/share/doc/s6-rc/html
|
||||||
mv examples $doc/share/doc/s6-rc/examples
|
mv examples $doc/share/doc/s6-rc/examples
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://skarnet.org/software/s6-rc/;
|
|
||||||
description = "A service manager for s6-based systems";
|
|
||||||
platforms = stdenv.lib.platforms.linux;
|
|
||||||
license = stdenv.lib.licenses.isc;
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,21 @@
|
||||||
{ stdenv, execline, fetchgit, skalibs }:
|
{ stdenv, skawarePackages }:
|
||||||
|
|
||||||
let
|
with skawarePackages;
|
||||||
|
|
||||||
|
buildPackage {
|
||||||
|
pname = "s6";
|
||||||
version = "2.7.2.0";
|
version = "2.7.2.0";
|
||||||
|
sha256 = "07j4is7kxkynschwbf83q5rw1872kg3ij2vhxyfp3bg71k5pw1az";
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
description = "skarnet.org's small & secure supervision software suite";
|
||||||
|
|
||||||
name = "s6-${version}";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "git://git.skarnet.org/s6";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
sha256 = "07j4is7kxkynschwbf83q5rw1872kg3ij2vhxyfp3bg71k5pw1az";
|
|
||||||
};
|
|
||||||
|
|
||||||
# NOTE lib: cannot split lib from bin at the moment,
|
# NOTE lib: cannot split lib from bin at the moment,
|
||||||
# since some parts of lib depend on executables in bin.
|
# since some parts of lib depend on executables in bin.
|
||||||
# (the `*_startf` functions in `libs6`)
|
# (the `*_startf` functions in `libs6`)
|
||||||
|
|
||||||
outputs = [ /*"bin" "lib"*/ "out" "dev" "doc" ];
|
outputs = [ /*"bin" "lib"*/ "out" "dev" "doc" ];
|
||||||
|
|
||||||
dontDisableStatic = true;
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
# TODO: nsss support
|
# TODO: nsss support
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-absolute-paths"
|
|
||||||
"--libdir=\${out}/lib"
|
"--libdir=\${out}/lib"
|
||||||
"--libexecdir=\${out}/libexec"
|
"--libexecdir=\${out}/libexec"
|
||||||
"--dynlibdir=\${out}/lib"
|
"--dynlibdir=\${out}/lib"
|
||||||
|
@ -39,22 +28,15 @@ in stdenv.mkDerivation rec {
|
||||||
"--with-lib=${execline.lib}/lib"
|
"--with-lib=${execline.lib}/lib"
|
||||||
"--with-dynlib=${skalibs.lib}/lib"
|
"--with-dynlib=${skalibs.lib}/lib"
|
||||||
"--with-dynlib=${execline.lib}/lib"
|
"--with-dynlib=${execline.lib}/lib"
|
||||||
]
|
];
|
||||||
++ (if stdenv.isDarwin then [ "--disable-shared" ] else [ "--enable-shared" ])
|
|
||||||
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $doc/share/doc/s6/
|
# remove all s6 executables from build directory
|
||||||
|
rm $(find -type f -mindepth 1 -maxdepth 1 -executable)
|
||||||
|
rm libs6.*
|
||||||
|
|
||||||
mv doc $doc/share/doc/s6/html
|
mv doc $doc/share/doc/s6/html
|
||||||
mv examples $doc/share/doc/s6/examples
|
mv examples $doc/share/doc/s6/examples
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://www.skarnet.org/software/s6/;
|
|
||||||
description = "skarnet.org's small & secure supervision software suite";
|
|
||||||
platforms = stdenv.lib.platforms.all;
|
|
||||||
license = stdenv.lib.licenses.isc;
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ pmahoney Profpatsch ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12006,6 +12006,8 @@ with pkgs;
|
||||||
skalibs = skawarePackages.skalibs;
|
skalibs = skawarePackages.skalibs;
|
||||||
|
|
||||||
skawarePackages = recurseIntoAttrs {
|
skawarePackages = recurseIntoAttrs {
|
||||||
|
buildPackage = callPackage ../build-support/skaware/build-skaware-package.nix { };
|
||||||
|
|
||||||
skalibs = callPackage ../development/libraries/skalibs { };
|
skalibs = callPackage ../development/libraries/skalibs { };
|
||||||
execline = callPackage ../tools/misc/execline { };
|
execline = callPackage ../tools/misc/execline { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue