diff --git a/pkgs/os-specific/linux/musl/getconf.nix b/pkgs/os-specific/linux/musl/getconf.nix new file mode 100644 index 000000000000..dbfaca296bf9 --- /dev/null +++ b/pkgs/os-specific/linux/musl/getconf.nix @@ -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/ + ''; +} + + diff --git a/pkgs/os-specific/linux/musl/getent.nix b/pkgs/os-specific/linux/musl/getent.nix new file mode 100644 index 000000000000..6eed17a76b02 --- /dev/null +++ b/pkgs/os-specific/linux/musl/getent.nix @@ -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/ + ''; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db8fc1c2f084..461e255e400c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };