diff options
author | Felix Buehler <account@buehler.rocks> | 2023-06-24 20:19:19 +0200 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-06-24 20:19:19 +0200 |
commit | f3719756b550113c1acbbab00c89a56fb77256f2 (patch) | |
tree | a94f6678f9b1b25c6773bdd7a35422aabc816032 /pkgs/build-support/fetchgithub/default.nix | |
parent | e9e3f2e7362aba3ef709173d1777f0b893fc0ebf (diff) |
treewide: use optionalString instead of 'then ""'
Diffstat (limited to 'pkgs/build-support/fetchgithub/default.nix')
-rw-r--r-- | pkgs/build-support/fetchgithub/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix index faa338b672f0..a2498700b545 100644 --- a/pkgs/build-support/fetchgithub/default.nix +++ b/pkgs/build-support/fetchgithub/default.nix @@ -24,7 +24,7 @@ let position = "${position.file}:${toString position.line}"; }; passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "forceFetchGit" "private" "githubBase" "varPrefix" ]; - varBase = "NIX${if varPrefix == null then "" else "_${varPrefix}"}_GITHUB_PRIVATE_"; + varBase = "NIX${lib.optionalString (varPrefix != null) "_${varPrefix}"}_GITHUB_PRIVATE_"; useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || (sparseCheckout != []); # We prefer fetchzip in cases we don't need submodules as the hash # is more stable in that case. |