summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-06-24 20:19:19 +0200
committerFelix Buehler <account@buehler.rocks>2023-06-24 20:19:19 +0200
commitf3719756b550113c1acbbab00c89a56fb77256f2 (patch)
treea94f6678f9b1b25c6773bdd7a35422aabc816032 /pkgs/applications/editors
parente9e3f2e7362aba3ef709173d1777f0b893fc0ebf (diff)
treewide: use optionalString instead of 'then ""'
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/texmacs/darwin.nix8
-rw-r--r--pkgs/applications/editors/vscode/vscodium.nix2
2 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/applications/editors/texmacs/darwin.nix b/pkgs/applications/editors/texmacs/darwin.nix
index ff090dd3259a..8c74d8c5c8f2 100644
--- a/pkgs/applications/editors/texmacs/darwin.nix
+++ b/pkgs/applications/editors/texmacs/darwin.nix
@@ -47,10 +47,10 @@ stdenv.mkDerivation {
postInstall = "wrapProgram $out/Applications/TeXmacs-${version}/Contents/MacOS/TeXmacs --suffix PATH : " +
"${ghostscript}/bin:" +
- (if aspell == null then "" else "${aspell}/bin:") +
- (if tex == null then "" else "${tex}/bin:") +
- (if netpbm == null then "" else "${lib.getBin netpbm}/bin:") +
- (if imagemagick == null then "" else "${imagemagick}/bin:");
+ (lib.optionalString (aspell != null) "${aspell}/bin:") +
+ (lib.optionalString (tex != null) "${tex}/bin:") +
+ (lib.optionalString (netpbm != null) "${lib.getBin netpbm}/bin:") +
+ (lib.optionalString (imagemagick != null) "${imagemagick}/bin:");
enableParallelBuilding = true;
diff --git a/pkgs/applications/editors/vscode/vscodium.nix b/pkgs/applications/editors/vscode/vscodium.nix
index 3e66c7e6abd0..b434279621d1 100644
--- a/pkgs/applications/editors/vscode/vscodium.nix
+++ b/pkgs/applications/editors/vscode/vscodium.nix
@@ -22,7 +22,7 @@ let
armv7l-linux = "0m1v24gg2dy79hgrz37gysgrazg8vkr1gkp52j6m6y76vi0l8249";
}.${system} or throwSystem;
- sourceRoot = if stdenv.isDarwin then "" else ".";
+ sourceRoot = lib.optionalString (!stdenv.isDarwin) ".";
in
callPackage ./generic.nix rec {
inherit sourceRoot commandLineArgs useVSCodeRipgrep;