Merge pull request #38712 from matthewbauer/unixtools2

Unix-tools: Cleanup and more tweaks
This commit is contained in:
Matthew Justin Bauer 2018-04-11 11:40:34 -05:00 committed by GitHub
commit ce5455b2ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 18 deletions

View File

@ -1,17 +1,11 @@
{ stdenv, fetchurl, runCommand
, erlang, python, libxml2, libxslt, xmlto
, docbook_xml_dtd_45, docbook_xsl, zip, unzip, rsync
, AppKit, Carbon, Cocoa
, getconf
}:
let
# we only need that one glibc binary (28k instead of 2.7M)
getconf = runCommand "getconf" {} ''
install -D ${stdenv.lib.getBin stdenv.cc.libc}/bin/getconf $out/bin/getconf
'';
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
name = "rabbitmq-server-${version}";
version = "3.6.15";

View File

@ -13705,14 +13705,6 @@ with pkgs;
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 { };
getent =
if hostPlatform.isMusl then musl-getent
# This may not be right on other platforms, but preserves existing behavior
else /* if hostPlatform.libc == "glibc" then */ glibc.bin;
getconf =
if hostPlatform.isMusl then musl-getconf
else lib.getBin stdenv.cc.libc;
nettools = if stdenv.isLinux then callPackage ../os-specific/linux/net-tools { }
else unixtools.nettools;
@ -21233,5 +21225,6 @@ with pkgs;
# Unix tools
unixtools = recurseIntoAttrs (callPackages ./unix-tools.nix { });
inherit (unixtools) hexdump ps logger eject modprobe umount
mount wall hostname more sysctl;
mount wall hostname more sysctl getconf
getent;
}

View File

@ -24,7 +24,7 @@ let
exit 1
fi
ln -s "${provider}" "$out/bin/${cmd}"
cp "${provider}" "$out/bin/${cmd}"
'';
in rec {
@ -44,6 +44,13 @@ in rec {
eject = singleBinary "eject" {
linux = pkgs.utillinux;
};
getconf = singleBinary "getconf" {
linux = pkgs.musl-getconf;
darwin = pkgs.darwin.system_cmds;
};
getent = singleBinary "getconf" {
linux = pkgs.musl-getent;
};
getopt = singleBinary "getopt" {
linux = pkgs.utillinux;
darwin = pkgs.getopt;