add getconf, getent from Alpine for use w/musl

This commit is contained in:
Will Dietz 2017-11-11 11:01:43 -06:00
parent 9df72c0290
commit b12a7c9225
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,19 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "musl-getconf";
src = fetchurl {
url = "https://raw.githubusercontent.com/alpinelinux/aports/48b16204aeeda5bc1f87e49c6b8e23d9abb07c73/main/musl/getconf.c";
sha256 = "0z14ml5343p5gapxw9fnbn2r72r7v2gk8662iifjrblh6sxhqzfq";
};
unpackPhase = ":";
buildPhase = ''$CC $src -o getconf'';
installPhase = ''
mkdir -p $out/bin
cp getconf $out/bin/
'';
}

View File

@ -0,0 +1,18 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "musl-getent";
src = fetchurl {
url = "https://raw.githubusercontent.com/alpinelinux/aports/89a718d88ec7466e721f3bbe9ede5ffe58061d78/main/musl/getent.c";
sha256 = "0b4jqnsmv1hjgcz7db3vd61k682aphl59c3yhwya2q7mkc6g48xk";
};
unpackPhase = ":";
buildPhase = ''$CC $src -o getent'';
installPhase = ''
mkdir -p $out/bin
cp getent $out/bin/
'';
}

View File

@ -13355,6 +13355,8 @@ with pkgs;
musl = callPackage ../os-specific/linux/musl { };
musl-fts = callPackage ../os-specific/linux/musl/fts.nix { };
musl-getconf = callPackage ../os-specific/linux/musl/getconf.nix { };
musl-getent = callPackage ../os-specific/linux/musl/getent.nix { };
nettools = callPackage ../os-specific/linux/net-tools { };