From e99322507e4535c64c0aab9a5a6b15ae3ffaf761 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 31 May 2018 12:33:36 -0400 Subject: [PATCH] treewide: get rid of musl stuff --- pkgs/os-specific/linux/musl/fts-setup-hook.sh | 4 ---- pkgs/os-specific/linux/musl/fts.nix | 19 ------------------- pkgs/os-specific/linux/musl/getconf.nix | 19 ------------------- pkgs/os-specific/linux/musl/getent.nix | 18 ------------------ pkgs/tools/compression/xar/default.nix | 5 ++--- pkgs/top-level/all-packages.nix | 5 ++--- pkgs/top-level/unix-tools.nix | 10 +++++----- 7 files changed, 9 insertions(+), 71 deletions(-) delete mode 100644 pkgs/os-specific/linux/musl/fts-setup-hook.sh delete mode 100644 pkgs/os-specific/linux/musl/fts.nix delete mode 100644 pkgs/os-specific/linux/musl/getconf.nix delete mode 100644 pkgs/os-specific/linux/musl/getent.nix diff --git a/pkgs/os-specific/linux/musl/fts-setup-hook.sh b/pkgs/os-specific/linux/musl/fts-setup-hook.sh deleted file mode 100644 index 5cf8c753aec3..000000000000 --- a/pkgs/os-specific/linux/musl/fts-setup-hook.sh +++ /dev/null @@ -1,4 +0,0 @@ -# See pkgs/build-support/setup-hooks/role.bash -getHostRole - -export NIX_${role_pre}LDFLAGS+=" -lfts" diff --git a/pkgs/os-specific/linux/musl/fts.nix b/pkgs/os-specific/linux/musl/fts.nix deleted file mode 100644 index 24d25de3a2d9..000000000000 --- a/pkgs/os-specific/linux/musl/fts.nix +++ /dev/null @@ -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 - ]; -} diff --git a/pkgs/os-specific/linux/musl/getconf.nix b/pkgs/os-specific/linux/musl/getconf.nix deleted file mode 100644 index dbfaca296bf9..000000000000 --- a/pkgs/os-specific/linux/musl/getconf.nix +++ /dev/null @@ -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/ - ''; -} - - diff --git a/pkgs/os-specific/linux/musl/getent.nix b/pkgs/os-specific/linux/musl/getent.nix deleted file mode 100644 index 6eed17a76b02..000000000000 --- a/pkgs/os-specific/linux/musl/getent.nix +++ /dev/null @@ -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/ - ''; -} - diff --git a/pkgs/tools/compression/xar/default.nix b/pkgs/tools/compression/xar/default.nix index 01d18fe6ad7d..69d4284b795d 100644 --- a/pkgs/tools/compression/xar/default.nix +++ b/pkgs/tools/compression/xar/default.nix @@ -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/; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac8c97bdfaa3..d5fc9283e0f9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { })) diff --git a/pkgs/top-level/unix-tools.nix b/pkgs/top-level/unix-tools.nix index c057aa45be6f..f8e269168a13 100644 --- a/pkgs/top-level/unix-tools.nix +++ b/pkgs/top-level/unix-tools.nix @@ -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;