about summary refs log tree commit diff
path: root/pkgs/build-support/fetchhg/default.nix
diff options
context:
space:
mode:
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";