From e158e113a6b74f6cd0e1de9e976b882a03714bf8 Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Fri, 23 Aug 2019 11:30:13 +0100 Subject: [PATCH] gcc: use pname and fix the dashes --- pkgs/development/compilers/gcc/4.8/default.nix | 6 +++--- pkgs/development/compilers/gcc/4.9/default.nix | 6 +++--- pkgs/development/compilers/gcc/5/default.nix | 6 +++--- pkgs/development/compilers/gcc/6/default.nix | 6 +++--- pkgs/development/compilers/gcc/7/default.nix | 6 +++--- pkgs/development/compilers/gcc/8/default.nix | 6 +++--- pkgs/development/compilers/gcc/9/default.nix | 6 +++--- pkgs/development/compilers/gcc/snapshot/default.nix | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 9f26900a6e4c..f2874d8e79ac 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -101,8 +101,8 @@ let majorVersion = "4"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -110,7 +110,7 @@ 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; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index baa78122d837..d887b47db343 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -106,8 +106,8 @@ let majorVersion = "4"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -115,7 +115,7 @@ 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; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index d506e15dcbe6..ddd95a5cb8c2 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -97,8 +97,8 @@ let majorVersion = "5"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -106,7 +106,7 @@ 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; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index ed5f871193c3..48aa36bc923b 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -93,8 +93,8 @@ let majorVersion = "6"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; in @@ -102,7 +102,7 @@ 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; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index f6d392789cc7..d371b7252ddc 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -71,13 +71,13 @@ let majorVersion = "7"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 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; diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 1899f29824ba..ec9b782bb9e2 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -63,13 +63,13 @@ let majorVersion = "8"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 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; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index a349dc354518..3e1b13ca337d 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -62,13 +62,13 @@ let majorVersion = "9"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 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; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index fd465eeba38f..7e4afa169a0d 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -59,13 +59,13 @@ let majorVersion = "7"; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; - stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + stageNameAddon = if crossStageStatic then "stage-static" else "stage-final"; + crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-"; 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;