Merge pull request #74065 from Ericson2314/cc-versions

compilers, binutils: Add version and pname
This commit is contained in:
John Ericson 2019-11-24 18:35:13 -05:00 committed by GitHub
commit 6d3b7458cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 60 additions and 40 deletions

View File

@ -73,9 +73,9 @@ let
in
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${bintoolsName}-wrapper")
+ (stdenv.lib.optionalString (bintools != null && bintoolsVersion != "") "-${bintoolsVersion}");
pname = targetPrefix
+ (if name != "" then name else "${bintoolsName}-wrapper");
version = if bintools == null then null else bintoolsVersion;
preferLocalBuild = true;

View File

@ -93,9 +93,9 @@ assert nativeLibc == bintools.nativeLibc;
assert nativePrefix == bintools.nativePrefix;
stdenv.mkDerivation {
name = targetPrefix
+ (if name != "" then name else "${ccName}-wrapper")
+ (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}");
pname = targetPrefix
+ (if name != "" then name else "${ccName}-wrapper");
version = if cc == null then null else ccVersion;
preferLocalBuild = true;

View File

@ -111,7 +111,8 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -116,7 +116,8 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -107,7 +107,8 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -103,7 +103,8 @@ in
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -78,7 +78,8 @@ let majorVersion = "7";
in
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -70,7 +70,8 @@ let majorVersion = "8";
in
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -69,7 +69,8 @@ let majorVersion = "9";
in
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -66,7 +66,8 @@ let majorVersion = "7";
in
stdenv.mkDerivation ({
name = "${crossNameAddon}${name}${if stripped then "" else "-debug"}-${version}";
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;

View File

@ -6,7 +6,8 @@
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
self = stdenv.mkDerivation ({
name = "clang-${version}";
pname = "clang";
inherit version;
src = fetch "cfe" "16vnv3msnvx33dydd17k2cq0icndi1a06bg5vcxkrhjjb1rqlwv1";
@ -91,7 +92,7 @@ let
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "clang-manpages-${version}";
pname = "clang-manpages";
buildPhase = ''
make docs-clang-man

View File

@ -24,7 +24,8 @@ let
in
stdenv.mkDerivation ({
name = "llvm-${version}";
pname = "llvm";
inherit version;
src = fetch "llvm" "0l9bf7kdwhlj0kq1hawpyxhna1062z3h7qcz2y8nfl9dz2qksy6s";
@ -166,7 +167,7 @@ stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "llvm-manpages-${version}";
pname = "llvm-manpages";
buildPhase = ''
make docs-llvm-man

View File

@ -6,7 +6,8 @@
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
self = stdenv.mkDerivation ({
name = "clang-${version}";
pname = "clang";
inherit version;
src = fetch "cfe" "0018520c4qxf5hgjdqgpz2dgl3faf4gsz87fdlb8zdmx99rfk77s";
@ -87,7 +88,7 @@ let
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "clang-manpages-${version}";
pname = "clang-manpages";
buildPhase = ''
make docs-clang-man

View File

@ -23,7 +23,8 @@ let
in
stdenv.mkDerivation ({
name = "llvm-${version}";
pname = "llvm";
inherit version;
src = fetch "llvm" "0g1bbj2n6xv4p1n6hh17vj3vpvg56wacipc81dgwga9mg2lys8nm";
@ -149,7 +150,7 @@ stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "llvm-manpages-${version}";
pname = "llvm-manpages";
buildPhase = ''
make docs-llvm-man

View File

@ -6,7 +6,8 @@
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
self = stdenv.mkDerivation ({
name = "clang-${version}";
pname = "clang";
inherit version;
src = fetch "cfe" "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w";
@ -87,7 +88,7 @@ let
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "clang-manpages-${version}";
pname = "clang-manpages";
buildPhase = ''
make docs-clang-man

View File

@ -26,7 +26,8 @@ let
in
stdenv.mkDerivation ({
name = "llvm-${version}";
pname = "llvm";
inherit version;
src = fetch "llvm" "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn";
@ -154,7 +155,7 @@ stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "llvm-manpages-${version}";
pname = "llvm-manpages";
buildPhase = ''
make docs-llvm-man

View File

@ -6,7 +6,8 @@
let
self = stdenv.mkDerivation ({
name = "clang-${version}";
pname = "clang";
inherit version;
src = fetch "cfe" "0vc4i87qwxnw9lci4ayws9spakg0z6w5w670snj9f8g5m9rc8zg9";
@ -93,7 +94,7 @@ let
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "clang-manpages-${version}";
pname = "clang-manpages";
buildPhase = ''
make docs-clang-man

View File

@ -30,7 +30,8 @@ let
imap (i: _: concatStringsSep "." (take i parts)) parts;
in stdenv.mkDerivation ({
name = "llvm-${version}";
pname = "llvm";
inherit version;
src = fetch "llvm" "0r1p5didv4rkgxyvbkyz671xddg6i3dxvbpsi1xxipkla0l9pk0v";
polly_src = fetch "polly" "16qkns4ab4x0azrvhy4j7cncbyb2rrbdrqj87zphvqxm5pvm8m1h";
@ -175,7 +176,7 @@ in stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "llvm-manpages-${version}";
pname = "llvm-manpages";
buildPhase = ''
make docs-llvm-man

View File

@ -6,7 +6,8 @@
let
self = stdenv.mkDerivation ({
name = "clang-${version}";
pname = "clang";
inherit version;
src = fetch "cfe" "0ihnbdl058gvl2wdy45p5am55bq8ifx8m9mhcsgj9ax8yxlzvvvh";
@ -105,7 +106,7 @@ let
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "clang-manpages-${version}";
pname = "clang-manpages";
buildPhase = ''
make docs-clang-man

View File

@ -28,7 +28,8 @@ let
concatStringsSep "." (take 1 (splitVersion release_version));
in stdenv.mkDerivation ({
name = "llvm-${version}";
pname = "llvm";
inherit version;
src = fetch "llvm" "1rvm5gqp5v8hfn17kqws3zhk94w4kxndal12bqa0y57p09nply24";
polly_src = fetch "polly" "1lfjdz3ilj5xmjxvicd8f5ykybks67ry2pdb777352r3mzlgg8g8";
@ -150,7 +151,7 @@ in stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "llvm-manpages-${version}";
pname = "llvm-manpages";
buildPhase = ''
make docs-llvm-man

View File

@ -15,7 +15,7 @@ let
# is now upstream.
# https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3
version = "2.31.1";
basename = "binutils-${version}";
basename = "binutils";
# The targetPrefix prepended to binary names to allow multiple binuntils on the
# PATH to both be usable.
targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
@ -23,11 +23,12 @@ let
in
stdenv.mkDerivation {
name = targetPrefix + basename;
pname = targetPrefix + basename;
inherit version;
# HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM
src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl {
url = "mirror://gnu/binutils/${basename}.tar.bz2";
url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2";
sha256 = "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z";
});
@ -132,7 +133,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
passthru = {
inherit targetPrefix version;
inherit targetPrefix;
};
meta = with lib; {

View File

@ -14,7 +14,8 @@ in
# TODO: loop over targetPrefixed binaries too
stdenv.mkDerivation {
name = "${targetPrefix}cctools-binutils-darwin";
pname = "${targetPrefix}cctools-binutils-darwin";
inherit (cctools) version;
outputs = [ "out" "info" "man" ];
buildCommand = ''
mkdir -p $out/bin $out/include

View File

@ -18,7 +18,7 @@ assert (!stdenv.hostPlatform.isDarwin) -> maloader != null;
let
baseParams = rec {
name = "${targetPrefix}cctools-port-${version}";
pname = "${targetPrefix}cctools-port";
version = "895";
src = fetchFromGitHub {