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 {