treewide: get rid of musl stuff

This commit is contained in:
Matthew Bauer 2018-05-31 12:33:36 -04:00
parent 480434f7ee
commit e99322507e
7 changed files with 9 additions and 71 deletions

View File

@ -1,4 +0,0 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
export NIX_${role_pre}LDFLAGS+=" -lfts"

View File

@ -1,19 +0,0 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig }:
stdenv.mkDerivation rec {
name = "musl-fts-${version}";
version = "2017-01-13";
src = fetchFromGitHub {
owner = "pullmoll";
repo = "musl-fts";
rev = "0bde52df588e8969879a2cae51c3a4774ec62472";
sha256 = "1q8cpzisziysrs08b89wj0rm4p6dsyl177cclpfa0f7spjm3jg03";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
setupHooks = [
../../../build-support/setup-hooks/role.bash
./fts-setup-hook.sh
];
}

View File

@ -1,19 +0,0 @@
{ 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

@ -1,18 +0,0 @@
{ 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

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libxml2, openssl, zlib, bzip2, musl-fts }:
{ stdenv, fetchurl, libxml2, openssl, zlib, bzip2, fts }:
stdenv.mkDerivation rec {
version = "1.6.1";
@ -9,8 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0ghmsbs6xwg1092v7pjcibmk5wkyifwxw6ygp08gfz25d2chhipf";
};
buildInputs = [ libxml2 openssl zlib bzip2 ]
++ stdenv.lib.optional stdenv.hostPlatform.isMusl musl-fts;
buildInputs = [ libxml2 openssl zlib bzip2 fts ];
meta = {
homepage = https://mackyle.github.io/xar/;

View File

@ -13843,9 +13843,6 @@ with pkgs;
multipath-tools = callPackage ../os-specific/linux/multipath-tools { };
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 = if stdenv.isLinux then callPackage ../os-specific/linux/net-tools { }
else unixtools.nettools;
@ -21460,6 +21457,8 @@ with pkgs;
mount wall hostname more sysctl getconf
getent;
fts = if hostPlatform.isMusl then netbsd.fts else null;
libbsd = netbsd.compat;
inherit (recurseIntoAttrs (callPackages ../os-specific/bsd { }))

View File

@ -50,14 +50,14 @@ let
linux = pkgs.utillinux;
};
getconf = {
linux = if hostPlatform.isMusl then pkgs.musl-getconf
else lib.getBin stdenv.cc.libc;
linux = if hostPlatform.isGNU then lib.getBin pkgs.glibc
else pkgs.netbsd.getconf;
darwin = pkgs.darwin.system_cmds;
};
getent = {
linux = if hostPlatform.isMusl then pkgs.musl-getent
# This may not be right on other platforms, but preserves existing behavior
else /* if hostPlatform.libc == "glibc" then */ pkgs.glibc.bin;
linux = if hostPlatform.isGNU then lib.getBin pkgs.glibc
else pkgs.netbsd.getent;
darwin = pkgs.netbsd.getent;
};
getopt = {
linux = pkgs.utillinux;