diff options
author | Oleg Pykhalov | 2021-04-16 10:28:01 +0300 |
---|---|---|
committer | Oleg Pykhalov | 2021-04-16 12:38:37 +0300 |
commit | 920c9d2ed4034e2200c948868c7bd510e58b1371 (patch) | |
tree | 2737004639587c3713b92f6f00fa7be99b9d9f38 /flake.nix | |
parent | 6093dc02e98ae68f73c997c8d5d18f19074a46e1 (diff) |
Apply notgne2 suggestions.
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -61,14 +61,11 @@ activate = rec { custom = { - __toString = customSelf: "TODO: dryActivate"; __functor = customSelf: base: activate: pkgs.buildEnv { name = ("activatable-" + base.name); paths = - let - hasDryActivate = builtins.hasAttr "dryActivate" customSelf; - in [ + [ base (pkgs.writeTextFile { name = base.name + "-activate-path"; @@ -78,12 +75,11 @@ if [[ $DRY_ACTIVATE == "1" ]] then - if ${pkgs.lib.boolToString hasDryActivate} - then - ${if hasDryActivate then customSelf.dryActivate else ":"} - else - echo ${pkgs.writeScript "activate" activate} - fi + ${if builtins.hasAttr "dryActivate" customSelf + then + customSelf.dryActivate + else + "echo ${pkgs.writeScript "activate" activate}"} else ${activate} fi |