3
0
Fork 0
forked from mirrors/nixpkgs

Simplify changes

This commit is contained in:
Travis Athougies 2018-10-27 14:35:05 -07:00
parent 4177dc3f77
commit a2f0c95baf
4 changed files with 2 additions and 49 deletions

View file

@ -19,9 +19,7 @@ let
pkgs.diffutils
pkgs.findutils
pkgs.gawk
(if pkgs.stdenv.hostPlatform.isMusl
then pkgs.musl-utils
else pkgs.glibc) # for ldd, getent
pkgs.glibc # for ldd, getent
pkgs.gnugrep
pkgs.gnupatch
pkgs.gnused

View file

@ -21,9 +21,7 @@ let
[ coreutils
gnugrep
findutils
(if pkgs.stdenv.hostPlatform.isMusl
then pkgs.musl-utils
else glibc) # needed for getent
glibc # needed for getent
shadow
nettools # needed for hostname
utillinux # needed for mount and mountpoint

View file

@ -1,42 +0,0 @@
{ stdenv, lib, musl, ... }:
with lib;
let
getent_c = builtins.fetchurl {
url = https://raw.githubusercontent.com/alpinelinux/aports/89a718d88ec7466e721f3bbe9ede5ffe58061d78/main/musl/getent.c;
sha256 = "0b4jqnsmv1hjgcz7db3vd61k682aphl59c3yhwya2q7mkc6g48xk";
};
getconf_c = builtins.fetchurl {
url = https://raw.githubusercontent.com/alpinelinux/aports/89a718d88ec7466e721f3bbe9ede5ffe58061d78/main/musl/getconf.c;
sha256 = "0z14ml5343p5gapxw9fnbn2r72r7v2gk8662iifjrblh6sxhqzfq";
};
iconv_c = builtins.fetchurl {
url = https://raw.githubusercontent.com/alpinelinux/aports/89a718d88ec7466e721f3bbe9ede5ffe58061d78/main/musl/iconv.c;
sha256 = "1mzxnc2ncq8lw9x6n7p00fvfklc9p3wfv28m68j0dfz5l8q2k6pp";
};
in stdenv.mkDerivation rec {
name = "musl-utils-${version}";
version = "1.1.20";
buildInputs = [ musl ];
unpackPhase = "true";
buildPhase = ''
${getBin stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc ${getent_c} -o getent
${getBin stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc ${getconf_c} -o getconf
${getBin stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc ${iconv_c} -o iconv
'';
installPhase = ''
mkdir -p $out/bin
cp getent $out/bin/getent
cp getconf $out/bin/getconf
cp iconv $out/bin/iconv
ln -s ${musl}/lib/libc.so $out/bin/ldd
'';
}

View file

@ -14662,7 +14662,6 @@ with pkgs;
multipath-tools = callPackage ../os-specific/linux/multipath-tools { };
musl = callPackage ../os-specific/linux/musl { };
musl-utils = callPackage ../os-specific/linux/musl-utils { };
nettools = if stdenv.isLinux then callPackage ../os-specific/linux/net-tools { }
else unixtools.nettools;