Merge pull request #122522 from Ericson2314/glibc-pname

glibc, libiconv: use pname and version
This commit is contained in:
John Ericson 2021-05-11 11:47:21 -04:00 committed by GitHub
commit 032a1e4478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 13 deletions

View File

@ -32,7 +32,7 @@
, python3Minimal
}:
{ name
{ pname
, withLinuxHeaders ? false
, profilingLibraries ? false
, withGd ? false
@ -50,7 +50,7 @@ assert withLinuxHeaders -> linuxHeaders != null;
assert withGd -> gd != null && libpng != null;
stdenv.mkDerivation ({
inherit version;
version = version + patchSuffix;
linuxHeaders = if withLinuxHeaders then linuxHeaders else null;
inherit (stdenv) is64bit;
@ -186,15 +186,11 @@ stdenv.mkDerivation ({
# prevent a retained dependency on the bootstrap tools in the stdenv-linux
# bootstrap.
BASH_SHELL = "/bin/sh";
passthru = { inherit version; };
}
// (removeAttrs args [ "withLinuxHeaders" "withGd" ]) //
{
name = name + "-${version}${patchSuffix}";
src = fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.xz";
inherit sha256;

View File

@ -14,7 +14,7 @@ let
in
callPackage ./common.nix { inherit stdenv; } {
name = "glibc" + lib.optionalString withGd "-gd";
pname = "glibc" + lib.optionalString withGd "-gd";
inherit withLinuxHeaders profilingLibraries withGd;

View File

@ -1,7 +1,7 @@
{ callPackage, texinfo, perl }:
callPackage ./common.nix {} {
name = "glibc-info";
pname = "glibc-info";
outputs = [ "out" ];

View File

@ -11,7 +11,7 @@
}:
callPackage ./common.nix { inherit stdenv; } {
name = "glibc-locales";
pname = "glibc-locales";
builder = ./locales-builder.sh;

View File

@ -1,7 +1,8 @@
{ stdenv, fetchFromGitHub, lib }:
stdenv.mkDerivation {
name = "wasilibc-20190712";
pname = "wasilibc";
version = "20190712";
src = fetchFromGitHub {
owner = "CraneStation";
repo = "wasi-libc";

View File

@ -159,7 +159,8 @@ in
# create a dummy Glibc here, which will be used in the stdenv of
# stage1.
${localSystem.libc} = self.stdenv.mkDerivation {
name = "bootstrap-stage0-${localSystem.libc}";
pname = "bootstrap-stage0-${localSystem.libc}";
version = "bootstrap";
buildCommand = ''
mkdir -p $out
ln -s ${bootstrapTools}/lib $out/lib

View File

@ -16054,9 +16054,9 @@ in
else libiconvReal;
glibcIconv = libc: let
inherit (builtins.parseDrvName libc.name) name version;
inherit (libc) pname version;
libcDev = lib.getDev libc;
in runCommand "${name}-iconv-${version}" {} ''
in runCommand "${pname}-iconv-${version}" {} ''
mkdir -p $out/include
ln -sv ${libcDev}/include/iconv.h $out/include
'';