Merge pull request #212170 from alyssais/libcIconv

libiconv: use libc header on NetBSD
This commit is contained in:
John Ericson
2023-01-22 23:21:26 -05:00
committed by GitHub
2 changed files with 5 additions and 6 deletions
+2 -1
View File
@@ -54,7 +54,8 @@ in makeScopeWithSplicing
mkDerivation = lib.makeOverridable (attrs: let
stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv;
in stdenv'.mkDerivation ({
name = "${attrs.pname or (baseNameOf attrs.path)}-netbsd-${attrs.version}";
pname = "${attrs.pname or (baseNameOf attrs.path)}-netbsd";
inherit (attrs) version;
src = fetchNetBSD attrs.path attrs.version attrs.sha256;
extraPaths = [ ];
+3 -5
View File
@@ -21148,17 +21148,15 @@ with pkgs;
# We also provide `libiconvReal`, which will always be a standalone libiconv,
# just in case you want it regardless of platform.
libiconv =
if lib.elem stdenv.hostPlatform.libc ["glibc" "musl" "wasilibc"]
then glibcIconv (if stdenv.hostPlatform != stdenv.buildPlatform
if lib.elem stdenv.hostPlatform.libc [ "glibc" "musl" "nblibc" "wasilibc" ]
then libcIconv (if stdenv.hostPlatform != stdenv.buildPlatform
then libcCross
else stdenv.cc.libc)
else if stdenv.hostPlatform.isDarwin
then darwin.libiconv
else if stdenv.hostPlatform.isNetBSD
then null
else libiconvReal;
glibcIconv = libc: let
libcIconv = libc: let
inherit (libc) pname version;
libcDev = lib.getDev libc;
in runCommand "${pname}-iconv-${version}" { strictDeps = true; } ''