about summary refs log tree commit diff
path: root/pkgs/build-support/fetchhg/default.nix
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-02-06 21:49:02 +0100
committerFelix Buehler <account@buehler.rocks>2023-02-13 21:52:34 +0100
commitcdb39a86e0dd7cda3a057f4f4795485a5c9b9be5 (patch)
tree1fef6e55f39dab2289b68b68972ee4c9b89520f7 /pkgs/build-support/fetchhg/default.nix
parent7f610b4d3f6e6f695b1f5521862066c0ece79a5a (diff)
treewide: use optionalString
Diffstat (limited to 'pkgs/build-support/fetchhg/default.nix')
-rw-r--r--pkgs/build-support/fetchhg/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchhg/default.nix b/pkgs/build-support/fetchhg/default.nix
index 15309d0a19508..b3c28fb0e2649 100644
--- a/pkgs/build-support/fetchhg/default.nix
+++ b/pkgs/build-support/fetchhg/default.nix
@@ -12,13 +12,13 @@ if md5 != null then
 else
 # TODO: statically check if mercurial as the https support if the url starts woth https.
 stdenvNoCC.mkDerivation {
-  name = "hg-archive" + (if name != null then "-${name}" else "");
+  name = "hg-archive" + (lib.optionalString (name != null) "-${name}");
   builder = ./builder.sh;
   nativeBuildInputs = [mercurial];
 
   impureEnvVars = lib.fetchers.proxyImpureEnvVars;
 
-  subrepoClause = if fetchSubrepos then "S" else "";
+  subrepoClause = lib.optionalString fetchSubrepos "S";
 
   outputHashAlgo = "sha256";
   outputHashMode = "recursive";