diff options
author | Felix Buehler <account@buehler.rocks> | 2023-02-06 21:49:02 +0100 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-02-13 21:52:34 +0100 |
commit | cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5 (patch) | |
tree | 1fef6e55f39dab2289b68b68972ee4c9b89520f7 /pkgs/development/compilers/llvm | |
parent | 7f610b4d3f6e6f695b1f5521862066c0ece79a5a (diff) | |
download | nixlib-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar nixlib-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.gz nixlib-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.bz2 nixlib-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.lz nixlib-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.xz nixlib-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.zst nixlib-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.zip |
treewide: use optionalString
Diffstat (limited to 'pkgs/development/compilers/llvm')
10 files changed, 19 insertions, 49 deletions
diff --git a/pkgs/development/compilers/llvm/10/bintools/default.nix b/pkgs/development/compilers/llvm/10/bintools/default.nix index 1eb7215c0085..38002439c205 100644 --- a/pkgs/development/compilers/llvm/10/bintools/default.nix +++ b/pkgs/development/compilers/llvm/10/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/11/bintools/default.nix b/pkgs/development/compilers/llvm/11/bintools/default.nix index 1eb7215c0085..38002439c205 100644 --- a/pkgs/development/compilers/llvm/11/bintools/default.nix +++ b/pkgs/development/compilers/llvm/11/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/12/bintools/default.nix b/pkgs/development/compilers/llvm/12/bintools/default.nix index 1eb7215c0085..38002439c205 100644 --- a/pkgs/development/compilers/llvm/12/bintools/default.nix +++ b/pkgs/development/compilers/llvm/12/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/13/bintools/default.nix b/pkgs/development/compilers/llvm/13/bintools/default.nix index b6ee7b4dc25c..b69f4bd12917 100644 --- a/pkgs/development/compilers/llvm/13/bintools/default.nix +++ b/pkgs/development/compilers/llvm/13/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/14/bintools/default.nix b/pkgs/development/compilers/llvm/14/bintools/default.nix index b6ee7b4dc25c..b69f4bd12917 100644 --- a/pkgs/development/compilers/llvm/14/bintools/default.nix +++ b/pkgs/development/compilers/llvm/14/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/15/bintools/default.nix b/pkgs/development/compilers/llvm/15/bintools/default.nix index 303faf7bbb61..c7b20dd28e23 100644 --- a/pkgs/development/compilers/llvm/15/bintools/default.nix +++ b/pkgs/development/compilers/llvm/15/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/7/bintools/default.nix b/pkgs/development/compilers/llvm/7/bintools/default.nix index 1eb7215c0085..38002439c205 100644 --- a/pkgs/development/compilers/llvm/7/bintools/default.nix +++ b/pkgs/development/compilers/llvm/7/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/8/bintools/default.nix b/pkgs/development/compilers/llvm/8/bintools/default.nix index 1eb7215c0085..38002439c205 100644 --- a/pkgs/development/compilers/llvm/8/bintools/default.nix +++ b/pkgs/development/compilers/llvm/8/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/9/bintools/default.nix b/pkgs/development/compilers/llvm/9/bintools/default.nix index 1eb7215c0085..38002439c205 100644 --- a/pkgs/development/compilers/llvm/9/bintools/default.nix +++ b/pkgs/development/compilers/llvm/9/bintools/default.nix @@ -1,10 +1,7 @@ -{ runCommand, stdenv, llvm, lld, version }: +{ lib, runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { diff --git a/pkgs/development/compilers/llvm/git/bintools/default.nix b/pkgs/development/compilers/llvm/git/bintools/default.nix index 303faf7bbb61..3162b0d41e02 100644 --- a/pkgs/development/compilers/llvm/git/bintools/default.nix +++ b/pkgs/development/compilers/llvm/git/bintools/default.nix @@ -1,10 +1,7 @@ { runCommand, stdenv, llvm, lld, version }: let - prefix = - if stdenv.hostPlatform != stdenv.targetPlatform - then "${stdenv.targetPlatform.config}-" - else ""; + prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-"; in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru = { |