about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/skaware-packages
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/skaware-packages
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/skaware-packages')
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/build-skaware-man-pages.nix45
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix117
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/clean-packaging.nix53
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/default.nix33
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/execline-man-pages/default.nix9
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/execline/default.nix68
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/execline/execlineb-wrapper.c51
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/mdevd/default.nix29
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/nsss/default.nix33
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-dns/default.nix36
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-linux-init/default.nix39
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-linux-utils/default.nix33
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-man-pages/default.nix9
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-networking-man-pages/default.nix9
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-networking/default.nix65
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-portable-utils-man-pages/default.nix9
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-portable-utils/default.nix32
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6-rc/default.nix61
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/s6/default.nix44
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/default.nix37
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/sdnotify-wrapper.c174
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/skalibs/2_10.nix31
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/skalibs/default.nix39
-rw-r--r--nixpkgs/pkgs/development/skaware-packages/utmps/default.nix31
24 files changed, 1087 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/skaware-packages/build-skaware-man-pages.nix b/nixpkgs/pkgs/development/skaware-packages/build-skaware-man-pages.nix
new file mode 100644
index 000000000000..92d8202ae95a
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/build-skaware-man-pages.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+{
+  # : string
+  pname
+  # : string
+, version
+  # : string
+, sha256
+  # : string
+, description
+  # : list Maintainer
+, maintainers
+  # : license
+, license ? lib.licenses.isc
+  # : string
+, owner ? "flexibeast"
+  # : string
+, rev ? "v${version}"
+}:
+
+let
+  manDir = "${placeholder "out"}/share/man";
+
+  src = fetchFromGitHub {
+    inherit owner rev sha256;
+    repo = pname;
+  };
+in
+
+stdenv.mkDerivation {
+  inherit pname version src;
+
+  makeFlags = [
+    "MANPATH=${manDir}"
+  ];
+
+  dontBuild = true;
+
+  meta = with lib; {
+    inherit description license maintainers;
+    inherit (src.meta) homepage;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix b/nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix
new file mode 100644
index 000000000000..3ae9b7ce8aac
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/build-skaware-package.nix
@@ -0,0 +1,117 @@
+{ lib, stdenv, cleanPackaging, fetchurl }:
+{
+  # : 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
+  # : string
+, postConfigure ? null
+  # mostly for moving and deleting files from the build directory
+  # : lines
+, postInstall
+  # : list Maintainer
+, maintainers ? [ ]
+  # : passthru arguments (e.g. tests)
+, passthru ? { }
+
+}:
+
+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.*"
+    "DCO"
+    "CONTRIBUTING"
+  ];
+
+in
+stdenv.mkDerivation {
+  inherit pname version;
+
+  src = fetchurl {
+    url = "https://skarnet.org/software/${pname}/${pname}-${version}.tar.gz";
+    inherit sha256;
+  };
+
+  inherit outputs;
+
+  dontDisableStatic = true;
+  enableParallelBuilding = true;
+
+  configureFlags = configureFlags ++ [
+    "--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
+    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}");
+
+  inherit postConfigure;
+
+  makeFlags = lib.optionals stdenv.cc.isClang [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" ];
+
+  # TODO(Profpatsch): ensure that there is always a $doc output!
+  postInstall = ''
+    echo "Cleaning & moving common files"
+    ${cleanPackaging.commonFileActions {
+       noiseFiles = commonNoiseFiles;
+       docFiles = commonMetaFiles;
+     }} $doc/share/doc/${pname}
+
+    ${postInstall}
+  '';
+
+  postFixup = ''
+    ${cleanPackaging.checkForRemainingFiles}
+  '';
+
+  meta = {
+    homepage = "https://skarnet.org/software/${pname}/";
+    inherit description platforms;
+    license = lib.licenses.isc;
+    maintainers = with lib.maintainers;
+      [ pmahoney Profpatsch qyliss ] ++ maintainers;
+  };
+
+  inherit passthru;
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/clean-packaging.nix b/nixpkgs/pkgs/development/skaware-packages/clean-packaging.nix
new file mode 100644
index 000000000000..d51cbec8aeb2
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/clean-packaging.nix
@@ -0,0 +1,53 @@
+# set of utilities that assure the cwd of a build
+# is completely clean after the build, meaning all
+# files were either discarded or moved to outputs.
+# This ensures nothing is forgotten and new files
+# are correctly handled on update.
+{ lib, stdenv, file, writeScript }:
+
+let
+  globWith = lib.concatMapStringsSep "\n";
+  rmNoise = noiseGlobs: globWith (f:
+    "rm -rf ${f}") noiseGlobs;
+  mvDoc = docGlobs: globWith
+    (f: ''mv ${f} "$DOCDIR" 2>/dev/null || true'')
+    docGlobs;
+
+  # Shell script that implements common move & remove actions
+  # $1 is the doc directory (will be created).
+  # Best used in conjunction with checkForRemainingFiles
+  commonFileActions =
+    { # list of fileglobs that are removed from the source dir
+      noiseFiles
+      # files that are moved to the doc directory ($1)
+      # TODO(Profpatsch): allow to set target dir with
+      # { glob = …; to = "html" } (relative to docdir)
+    , docFiles }:
+    writeScript "common-file-actions.sh" ''
+      #!${stdenv.shell}
+      set -e
+      DOCDIR="''${1?commonFileActions: DOCDIR as argv[1] required}"
+      shopt -s globstar extglob nullglob
+      mkdir -p "$DOCDIR"
+      ${mvDoc docFiles}
+      ${rmNoise noiseFiles}
+    '';
+
+  # Shell script to check whether the build directory is empty.
+  # If there are still files remaining, exit 1 with a helpful
+  # listing of all remaining files and their types.
+  checkForRemainingFiles = writeScript "check-for-remaining-files.sh" ''
+    #!${stdenv.shell}
+    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
+  '';
+
+in {
+  inherit commonFileActions checkForRemainingFiles;
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/default.nix b/nixpkgs/pkgs/development/skaware-packages/default.nix
new file mode 100644
index 000000000000..02dc064ecb72
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/default.nix
@@ -0,0 +1,33 @@
+{ lib, pkgs }:
+
+lib.makeScope pkgs.newScope (self:
+  let
+    inherit (self) callPackage;
+  in {
+  buildManPages = callPackage ./build-skaware-man-pages.nix { };
+  buildPackage = callPackage ./build-skaware-package.nix { };
+  cleanPackaging = callPackage ./clean-packaging.nix { };
+
+  execline = callPackage ./execline { };
+  execline-man-pages = callPackage ./execline-man-pages { };
+
+  mdevd = callPackage ./mdevd { };
+  nsss = callPackage ./nsss { };
+  sdnotify-wrapper = callPackage ./sdnotify-wrapper { };
+  utmps = callPackage ./utmps { };
+
+  skalibs = callPackage ./skalibs { };
+  skalibs_2_10 = callPackage ./skalibs/2_10.nix { };
+
+  s6 = callPackage ./s6 { };
+  s6-dns = callPackage ./s6-dns { };
+  s6-linux-init = callPackage ./s6-linux-init { };
+  s6-linux-utils = callPackage ./s6-linux-utils { };
+  s6-networking = callPackage ./s6-networking { };
+  s6-portable-utils = callPackage ./s6-portable-utils { };
+  s6-rc = callPackage ./s6-rc { };
+
+  s6-man-pages = callPackage ./s6-man-pages { };
+  s6-networking-man-pages = callPackage ./s6-networking-man-pages { };
+  s6-portable-utils-man-pages = callPackage ./s6-portable-utils-man-pages { };
+})
diff --git a/nixpkgs/pkgs/development/skaware-packages/execline-man-pages/default.nix b/nixpkgs/pkgs/development/skaware-packages/execline-man-pages/default.nix
new file mode 100644
index 000000000000..822bbea1aee5
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/execline-man-pages/default.nix
@@ -0,0 +1,9 @@
+{ lib, buildManPages }:
+
+buildManPages {
+  pname = "execline-man-pages";
+  version = "2.9.0.0.1";
+  sha256 = "sha256-hT0YsuYJ3XSMYwtlwDR8PGlD8ng8XPky93rCprruHu8=";
+  description = "Port of the documentation for the execline suite to mdoc";
+  maintainers = [ lib.maintainers.sternenseemann ];
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/execline/default.nix b/nixpkgs/pkgs/development/skaware-packages/execline/default.nix
new file mode 100644
index 000000000000..c57db9240155
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/execline/default.nix
@@ -0,0 +1,68 @@
+{ fetchFromGitHub, skawarePackages }:
+
+with skawarePackages;
+let
+  version = "2.9.3.0";
+
+  # Maintainer of manpages uses following versioning scheme: for every
+  # upstream $version he tags manpages release as ${version}.1, and,
+  # in case of extra fixes to manpages, new tags in form ${version}.2,
+  # ${version}.3 and so on are created.
+  manpages = fetchFromGitHub {
+    owner = "flexibeast";
+    repo = "execline-man-pages";
+    rev = "v2.9.1.0.1";
+    sha256 = "nZzzQFMUPmIgPS3aAIgcORr/TSpaLf8UtzBUFD7blt8=";
+  };
+
+in buildPackage {
+  inherit version;
+
+  pname = "execline";
+  sha256 = "yAJ/pwki0RfN7ozCDSd+ONA/2WDm0TbYzsMmA9TsI40=";
+
+  description = "A small scripting language, to be used in place of a shell in non-interactive scripts";
+
+  outputs = [ "bin" "man" "lib" "dev" "doc" "out" ];
+
+  # TODO: nsss support
+  configureFlags = [
+    "--libdir=\${lib}/lib"
+    "--dynlibdir=\${lib}/lib"
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+  ];
+
+  postInstall = ''
+    # 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 examples $doc/share/doc/execline/examples
+
+    mv $bin/bin/execlineb $bin/bin/.execlineb-wrapped
+
+    # 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 \
+      -Wall -Wpedantic \
+      -D "EXECLINEB_PATH()=\"$bin/bin/.execlineb-wrapped\"" \
+      -D "EXECLINE_BIN_PATH()=\"$bin/bin\"" \
+      -I "${skalibs.dev}/include" \
+      -L "${skalibs.lib}/lib" \
+      -o "$bin/bin/execlineb" \
+      ${./execlineb-wrapper.c} \
+      -lskarnet
+    mkdir -p $man/share/
+    cp -vr ${manpages}/man* $man/share
+  '';
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/execline/execlineb-wrapper.c b/nixpkgs/pkgs/development/skaware-packages/execline/execlineb-wrapper.c
new file mode 100644
index 000000000000..c8e91813b774
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/execline/execlineb-wrapper.c
@@ -0,0 +1,51 @@
+/*
+ * A wrapper around execlineb, which provides all execline
+ * tools on execlineb’s PATH.
+ * It is implemented as a C program, because on non-Linux,
+ * nested shebang lines are not supported.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <skalibs/stralloc.h>
+#include <skalibs/djbunix.h>
+#include <skalibs/strerr2.h>
+#include <skalibs/env.h>
+#include <skalibs/exec.h>
+
+#define dienomem() strerr_diefu1sys(111, "stralloc_catb")
+
+// macros from outside
+/* const char* EXECLINEB_PATH; */
+/* const char* EXECLINE_BIN_PATH; */
+
+int main(int argc, char const* argv[], char const *const *envp)
+{
+  PROG = "execlineb-wrapper";
+
+  char const* path = getenv("PATH");
+  stralloc path_modif = STRALLOC_ZERO;
+
+  // modify PATH if unset or EXECLINEB_BIN_PATH is not yet there
+  if ( !path || ! strstr(path, EXECLINE_BIN_PATH())) {
+    // prepend our execline path
+    if ( ! stralloc_cats(&path_modif, "PATH=")
+         || ! stralloc_cats(&path_modif, EXECLINE_BIN_PATH()) ) dienomem();
+    // old path was not empty
+    if ( path && path[0] ) {
+      if ( ! stralloc_catb(&path_modif, ":", 1)
+           || ! stralloc_cats(&path_modif, path) ) dienomem();
+    }
+    // append final \0
+    if ( ! stralloc_0(&path_modif) ) dienomem();
+  }
+
+  // exec into execlineb and append path_modif to the environment
+  xmexec_aem(
+    EXECLINEB_PATH(),
+    argv,
+    envp,
+    path_modif.s, path_modif.len
+  );
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/mdevd/default.nix b/nixpkgs/pkgs/development/skaware-packages/mdevd/default.nix
new file mode 100644
index 000000000000..3762e4a16d94
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/mdevd/default.nix
@@ -0,0 +1,29 @@
+{ lib, skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "mdevd";
+  version = "0.1.6.2";
+  sha256 = "rC/PkATweQRZLFiU4sQB4VuwJ+zze8uOpmHip5k0R74=";
+
+  description = "mdev-compatible Linux hotplug manager daemon";
+  platforms = lib.platforms.linux;
+
+  outputs = [ "bin" "out" "dev" "doc" ];
+
+  configureFlags = [
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+  ];
+
+  postInstall = ''
+    # remove all mdevd executables from build directory
+    rm $(find -type f -mindepth 1 -maxdepth 1 -executable)
+    rm libmdevd.*
+
+    mv doc $doc/share/doc/mdevd/html
+    mv examples $doc/share/doc/mdevd/examples
+  '';
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/nsss/default.nix b/nixpkgs/pkgs/development/skaware-packages/nsss/default.nix
new file mode 100644
index 000000000000..1533da89bcbe
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/nsss/default.nix
@@ -0,0 +1,33 @@
+{ skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "nsss";
+  version = "0.2.0.3";
+  sha256 = "seOX7VsydhGnwsjB3GDpH+81PFT+rUZPiHcgvAkUFI4=";
+
+  description = "An implementation of a subset of the pwd.h, group.h and shadow.h family of functions.";
+
+  # TODO: nsss support
+  configureFlags = [
+    "--libdir=\${lib}/lib"
+    "--dynlibdir=\${lib}/lib"
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+  ];
+
+  postInstall = ''
+    # remove all nsss executables from build directory
+    rm $(find -name "nsssd-*" -type f -mindepth 1 -maxdepth 1 -executable)
+    rm libnsss.* libnsssd.*
+
+    mv doc $doc/share/doc/nsss/html
+    mv examples $doc/share/doc/nsss/examples
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-dns/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-dns/default.nix
new file mode 100644
index 000000000000..a4f018621f11
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-dns/default.nix
@@ -0,0 +1,36 @@
+{ skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "s6-dns";
+  version = "2.3.5.5";
+  sha256 = "VpebXVElw4BxqAtePfDUprKnxSu4Y6JBC249eX/+Hug=";
+
+  description = "A suite of DNS client programs and libraries for Unix systems";
+
+  outputs = [ "bin" "lib" "dev" "doc" "out" ];
+
+  configureFlags = [
+    "--libdir=\${lib}/lib"
+    "--libexecdir=\${lib}/libexec"
+    "--dynlibdir=\${lib}/lib"
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+  ];
+
+  postInstall = ''
+    # remove all s6-dns executables from build directory
+    rm $(find -type f -mindepth 1 -maxdepth 1 -executable)
+    rm libs6dns.*
+    rm libskadns.*
+    rm libdcache.*
+
+    mv doc $doc/share/doc/s6-dns/html
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-linux-init/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-linux-init/default.nix
new file mode 100644
index 000000000000..f95e2343cb14
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-linux-init/default.nix
@@ -0,0 +1,39 @@
+{ lib, skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "s6-linux-init";
+  version = "1.1.1.0";
+  sha256 = "rUg/NTJleQB+Wn48ufH9EXfq9x7FwRxHzXhKBClWqO4=";
+
+  description = "A set of minimalistic tools used to create a s6-based init system, including a /sbin/init binary, on a Linux kernel";
+  platforms = lib.platforms.linux;
+
+  outputs = [ "bin" "dev" "doc" "out" ];
+
+  configureFlags = [
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-include=${execline.dev}/include"
+    "--with-include=${s6.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-lib=${s6.out}/lib"
+    "--with-lib=${execline.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+    "--with-dynlib=${execline.lib}/lib"
+    "--with-dynlib=${s6.out}/lib"
+  ];
+
+  postInstall = ''
+    # remove all s6 executables from build directory
+    rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
+    rm libs6_linux_init.* libhpr.*
+    rm -rf skel
+
+    mv doc $doc/share/doc/s6-linux-init/html
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-linux-utils/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-linux-utils/default.nix
new file mode 100644
index 000000000000..f6eba321c198
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-linux-utils/default.nix
@@ -0,0 +1,33 @@
+{ lib, skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "s6-linux-utils";
+  version = "2.6.1.2";
+  sha256 = "2GPcXXgt535GUEFFGI+1fbsLZiUGF6Z9NB6wy0qdnNk=";
+
+  description = "A set of minimalistic Linux-specific system utilities";
+  platforms = lib.platforms.linux;
+
+  outputs = [ "bin" "dev" "doc" "out" ];
+
+  # TODO: nsss support
+  configureFlags = [
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+  ];
+
+  postInstall = ''
+    # remove all s6 executables from build directory
+    rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable) rngseed
+    rm libs6ps.a.xyzzy
+
+    mv doc $doc/share/doc/s6-linux-utils/html
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-man-pages/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-man-pages/default.nix
new file mode 100644
index 000000000000..16837746e2fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-man-pages/default.nix
@@ -0,0 +1,9 @@
+{ lib, buildManPages }:
+
+buildManPages {
+  pname = "s6-man-pages";
+  version = "2.11.2.0.1";
+  sha256 = "LHpQgM+uMDdGYfdaMlhP1bA7Y4UgydUJaDJr7fZlq5Y=";
+  description = "Port of the documentation for the s6 supervision suite to mdoc";
+  maintainers = [ lib.maintainers.sternenseemann ];
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-networking-man-pages/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-networking-man-pages/default.nix
new file mode 100644
index 000000000000..9b36093c6e55
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-networking-man-pages/default.nix
@@ -0,0 +1,9 @@
+{ lib, buildManPages }:
+
+buildManPages {
+  pname = "s6-networking-man-pages";
+  version = "2.5.1.2.1";
+  sha256 = "ffTfHqINi0vXGVHbk926U48fxZInrn4AMlSqODOWevo=";
+  description = "Port of the documentation for the s6-networking suite to mdoc";
+  maintainers = [ lib.maintainers.sternenseemann ];
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-networking/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-networking/default.nix
new file mode 100644
index 000000000000..e8367dd19cda
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-networking/default.nix
@@ -0,0 +1,65 @@
+{ lib, skawarePackages
+
+# Whether to build the TLS/SSL tools and what library to use
+# acceptable values: "bearssl", "libressl", false
+, sslSupport ? "bearssl" , libressl, bearssl
+}:
+
+with skawarePackages;
+let
+  sslSupportEnabled = sslSupport != false;
+  sslLibs = {
+    libressl = libressl;
+    bearssl = bearssl;
+  };
+
+in
+assert sslSupportEnabled -> sslLibs ? ${sslSupport};
+
+
+buildPackage {
+  pname = "s6-networking";
+  version = "2.5.1.3";
+  sha256 = "oJ5DyVn/ngyqj/QAJgjnPA9X+H8EqNnCTmya/v5F6Xc=";
+
+  description = "A suite of small networking utilities for Unix systems";
+
+  outputs = [ "bin" "lib" "dev" "doc" "out" ];
+
+  # TODO: nsss support
+  configureFlags = [
+    "--libdir=\${lib}/lib"
+    "--libexecdir=\${lib}/libexec"
+    "--dynlibdir=\${lib}/lib"
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-include=${execline.dev}/include"
+    "--with-include=${s6.dev}/include"
+    "--with-include=${s6-dns.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-lib=${execline.lib}/lib"
+    "--with-lib=${s6.out}/lib"
+    "--with-lib=${s6-dns.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+    "--with-dynlib=${execline.lib}/lib"
+    "--with-dynlib=${s6.out}/lib"
+    "--with-dynlib=${s6-dns.lib}/lib"
+  ]
+  ++ (lib.optionals sslSupportEnabled [
+       "--enable-ssl=${sslSupport}"
+       "--with-include=${lib.getDev sslLibs.${sslSupport}}/include"
+       "--with-lib=${lib.getLib sslLibs.${sslSupport}}/lib"
+       "--with-dynlib=${lib.getLib sslLibs.${sslSupport}}/lib"
+     ]);
+
+  postInstall = ''
+    # remove all s6 executables from build directory
+    rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
+    rm libs6net.* libstls.* libs6tls.* libsbearssl.*
+
+    mv doc $doc/share/doc/s6-networking/html
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-portable-utils-man-pages/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-portable-utils-man-pages/default.nix
new file mode 100644
index 000000000000..d391add7166b
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-portable-utils-man-pages/default.nix
@@ -0,0 +1,9 @@
+{ lib, buildManPages }:
+
+buildManPages {
+  pname = "s6-portable-utils-man-pages";
+  version = "2.2.5.1.1";
+  sha256 = "5up4IfsoHJGYwnDJVnnPWU9sSWS6qq+/6ICtHYjI6pg=";
+  description = "Port of the documentation for the s6-portable-utils suite to mdoc";
+  maintainers = [ lib.maintainers.somasis ];
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-portable-utils/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-portable-utils/default.nix
new file mode 100644
index 000000000000..759731bfe1b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-portable-utils/default.nix
@@ -0,0 +1,32 @@
+{ skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "s6-portable-utils";
+  version = "2.3.0.2";
+  sha256 = "hxQmkTTwEmUNqsBA5WRjct6lZYucDYmnygO7Kr7E0eg=";
+
+  description = "A set of tiny general Unix utilities optimized for simplicity and small size";
+
+  outputs = [ "bin" "dev" "doc" "out" ];
+
+  configureFlags = [
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+  ];
+
+  postInstall = ''
+    # remove all s6 executables from build directory
+    rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
+    rm seekablepipe
+
+    mv doc $doc/share/doc/s6-portable-utils/html
+  '';
+
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6-rc/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6-rc/default.nix
new file mode 100644
index 000000000000..442e29dac17d
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6-rc/default.nix
@@ -0,0 +1,61 @@
+{ lib, stdenv, skawarePackages, targetPackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "s6-rc";
+  version = "0.5.4.1";
+  sha256 = "1yaMq3xUIzBc+VmKM9T82rijFZUrPsgPechbjLdhWPY=";
+
+  description = "A service manager for s6-based systems";
+  platforms = lib.platforms.unix;
+
+  outputs = [ "bin" "lib" "dev" "doc" "out" ];
+
+  configureFlags = [
+    "--libdir=\${lib}/lib"
+    "--libexecdir=\${lib}/libexec"
+    "--dynlibdir=\${lib}/lib"
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-include=${execline.dev}/include"
+    "--with-include=${s6.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-lib=${execline.lib}/lib"
+    "--with-lib=${s6.out}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+    "--with-dynlib=${execline.lib}/lib"
+    "--with-dynlib=${s6.out}/lib"
+  ];
+
+  # s6-rc-compile generates built-in service definitions containing
+  # absolute paths to execline, s6, and s6-rc programs.  If we're
+  # running s6-rc-compile as part of a Nix derivation, and we want to
+  # cross-compile that derivation, those paths will be wrong --
+  # they'll be for execline, s6, and s6-rc on the platform we're
+  # running s6-rc-compile on, not the platform we're targeting.
+  #
+  # We can detect this special case of s6-rc being used at build time
+  # in a derivation that's being cross-compiled, because that's the
+  # only time hostPlatform != targetPlatform.  When that happens we
+  # modify s6-rc-compile to use the configuration headers for the
+  # system we're cross-compiling for.
+  postConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) ''
+    substituteInPlace src/s6-rc/s6-rc-compile.c \
+        --replace '<execline/config.h>' '"${targetPackages.execline.dev}/include/execline/config.h"' \
+        --replace '<s6/config.h>' '"${targetPackages.s6.dev}/include/s6/config.h"' \
+        --replace '<s6-rc/config.h>' '"${targetPackages.s6-rc.dev}/include/s6-rc/config.h"'
+  '';
+
+  postInstall = ''
+    # 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 examples $doc/share/doc/s6-rc/examples
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/s6/default.nix b/nixpkgs/pkgs/development/skaware-packages/s6/default.nix
new file mode 100644
index 000000000000..35d90086ad16
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/s6/default.nix
@@ -0,0 +1,44 @@
+{ skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "s6";
+  version = "2.11.3.2";
+  sha256 = "fBYTitLw/74O0q6N0M7K2p98eH7dM6aQhNIZEQaT33Q=";
+
+  description = "skarnet.org's small & secure supervision software suite";
+
+  # NOTE lib: cannot split lib from bin at the moment,
+  # since some parts of lib depend on executables in bin.
+  # (the `*_startf` functions in `libs6`)
+  outputs = [ /*"bin" "lib"*/ "out" "dev" "doc" ];
+
+  # TODO: nsss support
+  configureFlags = [
+    "--libdir=\${out}/lib"
+    "--libexecdir=\${out}/libexec"
+    "--dynlibdir=\${out}/lib"
+    "--bindir=\${out}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-include=${execline.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-lib=${execline.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+    "--with-dynlib=${execline.lib}/lib"
+  ];
+
+  postInstall = ''
+    # remove all s6 executables from build directory
+    rm $(find -type f -mindepth 1 -maxdepth 1 -executable)
+    rm libs6.*
+    rm ./libs6auto.a.xyzzy
+    rm ./libs6lockd.a.xyzzy
+
+    mv doc $doc/share/doc/s6/html
+    mv examples $doc/share/doc/s6/examples
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/default.nix b/nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/default.nix
new file mode 100644
index 000000000000..b4b6a7f42a7e
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, runCommandCC, skawarePackages }:
+
+with skawarePackages;
+
+let
+  # From https://skarnet.org/software/misc/sdnotify-wrapper.c,
+  # which is unversioned.
+  src = ./sdnotify-wrapper.c;
+
+in runCommandCC "sdnotify-wrapper" {
+
+   outputs = [ "bin" "doc" "out" ];
+
+   meta = {
+     homepage = "https://skarnet.org/software/misc/sdnotify-wrapper.c";
+     description = "Use systemd sd_notify without having to link against libsystemd";
+     platforms = lib.platforms.linux;
+     license = lib.licenses.isc;
+     maintainers = with lib.maintainers; [ Profpatsch ];
+   };
+
+} ''
+  mkdir -p $bin/bin
+  mkdir $out
+
+  # the -lskarnet has to come at the end to support static builds
+  $CC \
+    -o $bin/bin/sdnotify-wrapper \
+    -I${skalibs.dev}/include \
+    -L${skalibs.lib}/lib \
+    ${src} \
+    -lskarnet
+
+  mkdir -p $doc/share/doc/sdnotify-wrapper
+  # copy the documentation comment
+  sed -ne '/Usage:/,/*\//p' ${src} > $doc/share/doc/sdnotify-wrapper/README
+''
diff --git a/nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/sdnotify-wrapper.c b/nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/sdnotify-wrapper.c
new file mode 100644
index 000000000000..3ad3cbc69063
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/sdnotify-wrapper/sdnotify-wrapper.c
@@ -0,0 +1,174 @@
+/*
+   Copyright: (C)2015-2020 Laurent Bercot.  http://skarnet.org/
+   ISC license. See http://opensource.org/licenses/ISC
+
+   Build-time requirements: skalibs.  https://skarnet.org/software/skalibs/
+   Run-time requirements: none, if you link skalibs statically.
+
+   Compilation:
+     gcc -o sdnotify-wrapper -L/usr/lib/skalibs sdnotify-wrapper.c -lskarnet
+   Use /usr/lib/skalibs/libskarnet.a instead of -lskarnet to link statically.
+   Adapt gcc's -I and -L options to your skalibs installation paths.
+
+   Usage: if a daemon would be launched by systemd as "foobard args...",
+   launch it as "sdnotify-wrapper foobard args..." instead, and you can now
+   tell systemd that this daemon supports readiness notification.
+
+   Instead of using sd_notify() and having to link against the systemd
+   library, the daemon notifies readiness by writing whatever it wants
+   to a file descriptor (by default: stdout), then a newline. (Then it
+   should close that file descriptor.) The simplest way is something like
+   int notify_readiness() { write(1, "\n", 1) ; close(1) ; }
+   This mechanism is understandable by any notification readiness framework.
+
+   Readiness notification occurs when the newline is written, not when
+   the descriptor is closed; but since sdnotify-wrapper stops reading
+   after the first newline and will exit, any subsequent writes will
+   fail and it's best to simply close the descriptor right away.
+
+   sdnotify-wrapper sees the notification when it occurs and sends it
+   to systemd using the sd_notify format.
+
+   Options:
+     -d fd: the daemon will write its notification on descriptor fd.
+     Default is 1.
+     -f: do not doublefork. Use if the daemon waits for children it does
+     not know it has (for instance, superservers do this). When in doubt,
+     do not use that option, or you may have a zombie hanging around.
+     -t timeout: if the daemon has not sent a notification after timeout
+     milliseconds, give up and exit; systemd will not be notified.
+     -k: keep the NOTIFY_SOCKET environment variable when execing into the
+     daemon. By default, the variable is unset: the daemon should not need it.
+
+   Notes:
+     sdnotify-wrapper does not change the daemon's pid. It runs as a
+     (grand)child of the daemon.
+     If the NOTIFY_SOCKET environment variable is not set, sdnotify-wrapper
+     does nothing - it only execs into the daemon.
+     sdnotify-wrapper is more liberal than sd_notify(). It will accept
+     a relative path in NOTIFY_SOCKET.
+*/
+
+
+#include <sys/types.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+#include <skalibs/uint64.h>
+#include <skalibs/types.h>
+#include <skalibs/bytestr.h>
+#include <skalibs/sgetopt.h>
+#include <skalibs/strerr2.h>
+#include <skalibs/allreadwrite.h>
+#include <skalibs/tai.h>
+#include <skalibs/iopause.h>
+#include <skalibs/djbunix.h>
+#include <skalibs/socket.h>
+#include <skalibs/exec.h>
+
+#define USAGE "sdnotify-wrapper [ -d fd ] [ -f ] [ -t timeout ] [ -k ] prog..."
+#define dieusage() strerr_dieusage(100, USAGE)
+
+#define VAR "NOTIFY_SOCKET"
+
+static inline int ipc_sendto (int fd, char const *s, size_t len, char const *path)
+{
+  struct sockaddr_un sa ;
+  size_t l = strlen(path) ;
+  if (l > IPCPATH_MAX) return (errno = ENAMETOOLONG, 0) ;
+  memset(&sa, 0, sizeof sa) ;
+  sa.sun_family = AF_UNIX ;
+  memcpy(sa.sun_path, path, l+1) ;
+  if (path[0] == '@') sa.sun_path[0] = 0 ;
+  return sendto(fd, s, len, MSG_NOSIGNAL, (struct sockaddr *)&sa, sizeof sa) >= 0 ;
+}
+
+static inline void notify_systemd (pid_t pid, char const *socketpath)
+{
+  size_t n = 16 ;
+  char fmt[16 + PID_FMT] = "READY=1\nMAINPID=" ;
+  int fd = ipc_datagram_b() ;
+  if (fd < 0) strerr_diefu1sys(111, "create socket") ;
+  n += pid_fmt(fmt + n, pid) ;
+  fmt[n++] = '\n' ;
+  if (!ipc_sendto(fd, fmt, n, socketpath))
+    strerr_diefu2sys(111, "send notification message to ", socketpath) ;
+  close(fd) ;
+}
+
+static inline int run_child (int fd, unsigned int timeout, pid_t pid, char const *s)
+{
+  char dummy[4096] ;
+  iopause_fd x = { .fd = fd, .events = IOPAUSE_READ } ;
+  tain deadline ;
+  tain_now_g() ;
+  if (timeout) tain_from_millisecs(&deadline, timeout) ;
+  else deadline = tain_infinite_relative ;
+  tain_add_g(&deadline, &deadline) ;
+  for (;;)
+  {
+    int r = iopause_g(&x, 1, &deadline) ;
+    if (r < 0) strerr_diefu1sys(111, "iopause") ;
+    if (!r) return 99 ;
+    r = sanitize_read(fd_read(fd, dummy, 4096)) ;
+    if (r < 0)
+      if (errno == EPIPE) return 1 ;
+      else strerr_diefu1sys(111, "read from parent") ;
+    else if (r && memchr(dummy, '\n', r)) break ;
+  }
+  close(fd) ;
+  notify_systemd(pid, s) ;
+  return 0 ;
+}
+
+int main (int argc, char const *const *argv)
+{
+  char const *s = getenv(VAR) ;
+  unsigned int fd = 1 ;
+  unsigned int timeout = 0 ;
+  int df = 1, keep = 0 ;
+  PROG = "sdnotify-wrapper" ;
+  {
+    subgetopt l = SUBGETOPT_ZERO ;
+    for (;;)
+    {
+      int opt = subgetopt_r(argc, argv, "d:ft:k", &l) ;
+      if (opt == -1) break ;
+      switch (opt)
+      {
+        case 'd' : if (!uint0_scan(l.arg, &fd)) dieusage() ; break ;
+        case 'f' : df = 0 ; break ;
+        case 't' : if (!uint0_scan(l.arg, &timeout)) dieusage() ; break ;
+        case 'k' : keep = 1 ; break ;
+        default : dieusage() ;
+      }
+    }
+    argc -= l.ind ; argv += l.ind ;
+  }
+  if (!argc) dieusage() ;
+
+  if (!s) xexec(argv) ;
+  else
+  {
+    pid_t parent = getpid() ;
+    pid_t child ;
+    int p[2] ;
+    if (pipe(p) < 0) strerr_diefu1sys(111, "pipe") ;
+    child = df ? doublefork() : fork() ;
+    if (child < 0) strerr_diefu1sys(111, df ? "doublefork" : "fork") ;
+    else if (!child)
+    {
+      PROG = "sdnotify-wrapper (child)" ;
+      close(p[1]) ;
+      return run_child(p[0], timeout, parent, s) ;
+    }
+    close(p[0]) ;
+    if (fd_move((int)fd, p[1]) < 0) strerr_diefu1sys(111, "move descriptor") ;
+    if (keep) xexec(argv) ;
+    else xmexec_m(argv, VAR, sizeof(VAR)) ;
+  }
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/skalibs/2_10.nix b/nixpkgs/pkgs/development/skaware-packages/skalibs/2_10.nix
new file mode 100644
index 000000000000..af4c04dab1e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/skalibs/2_10.nix
@@ -0,0 +1,31 @@
+{ skawarePackages }:
+
+skawarePackages.buildPackage {
+  pname = "skalibs";
+  version = "2.10.0.3";
+  sha256 = "0ka6n5rnxd5sn5lycarf596d5wlak5s535zqqlz0rnhdcnpb105p";
+
+  description = "A set of general-purpose C programming libraries";
+
+  outputs = [ "lib" "dev" "doc" "out" ];
+
+  configureFlags = [
+    # assume /dev/random works
+    "--enable-force-devr"
+    "--libdir=\${lib}/lib"
+    "--dynlibdir=\${lib}/lib"
+    "--includedir=\${dev}/include"
+    "--sysdepdir=\${lib}/lib/skalibs/sysdeps"
+    # Empty the default path, which would be "/usr/bin:bin".
+    # It would be set when PATH is empty. This hurts hermeticity.
+    "--with-default-path="
+  ];
+
+  postInstall = ''
+    rm -rf sysdeps.cfg
+    rm libskarnet.*
+
+    mv doc $doc/share/doc/skalibs/html
+  '';
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/skalibs/default.nix b/nixpkgs/pkgs/development/skaware-packages/skalibs/default.nix
new file mode 100644
index 000000000000..3123b8c42761
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/skalibs/default.nix
@@ -0,0 +1,39 @@
+{ skawarePackages, pkgs }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "skalibs";
+  version = "2.13.1.1";
+  sha256 = "snKhq3mff6xEubT7Ws54qWFrL+SIIVl1S4CIxNgZnjM=";
+
+  description = "A set of general-purpose C programming libraries";
+
+  outputs = [ "lib" "dev" "doc" "out" ];
+
+  configureFlags = [
+    # assume /dev/random works
+    "--enable-force-devr"
+    "--libdir=\${lib}/lib"
+    "--dynlibdir=\${lib}/lib"
+    "--includedir=\${dev}/include"
+    "--sysdepdir=\${lib}/lib/skalibs/sysdeps"
+    # Empty the default path, which would be "/usr/bin:bin".
+    # It would be set when PATH is empty. This hurts hermeticity.
+    "--with-default-path="
+  ];
+
+  postInstall = ''
+    rm -rf sysdeps.cfg
+    rm libskarnet.*
+
+    mv doc $doc/share/doc/skalibs/html
+  '';
+
+  passthru.tests = {
+    # fdtools is one of the few non-skalib packages that depends on skalibs
+    # and might break if skalibs gets an breaking update.
+    fdtools = pkgs.fdtools;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/skaware-packages/utmps/default.nix b/nixpkgs/pkgs/development/skaware-packages/utmps/default.nix
new file mode 100644
index 000000000000..7e0958593937
--- /dev/null
+++ b/nixpkgs/pkgs/development/skaware-packages/utmps/default.nix
@@ -0,0 +1,31 @@
+{ skawarePackages }:
+
+with skawarePackages;
+
+buildPackage {
+  pname = "utmps";
+  version = "0.1.2.1";
+  sha256 = "BCPfx0vxOQ5G4uDCECIbsgX8247yMn5x7QhQd3xdyb0=";
+
+  description = "A secure utmpx and wtmp implementation";
+
+  configureFlags = [
+    "--libdir=\${lib}/lib"
+    "--dynlibdir=\${lib}/lib"
+    "--bindir=\${bin}/bin"
+    "--includedir=\${dev}/include"
+    "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
+    "--with-include=${skalibs.dev}/include"
+    "--with-lib=${skalibs.lib}/lib"
+    "--with-dynlib=${skalibs.lib}/lib"
+  ];
+
+  postInstall = ''
+    # remove all execline executables from build directory
+    rm $(find -type f -mindepth 1 -maxdepth 1 -executable)
+    rm libutmps.*
+
+    mv doc $doc/share/doc/utmps/html
+    mv examples $doc/share/doc/utmps/examples
+  '';
+}