about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorSebastián Mancilla <smancill@smancill.dev>2021-08-17 20:14:20 -0400
committerSebastián Mancilla <smancill@smancill.dev>2021-08-20 19:08:42 -0400
commit8f94a33b38fdd8b5e1c3e57303855364887ec332 (patch)
treeb2482923cda2bb402fdde538e52dd021bf728d60 /pkgs/applications
parent1d87f9866c857b72f60eb6c9f7f4701a38ac2136 (diff)
treewide: ensure pre/post phase hooks are strings
Some derivations use lib.optional or lib.optionals when setting pre/post
phase hooks. Ensure the proper lib.optionalString is used.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/zynaddsubfx/default.nix2
-rw-r--r--pkgs/applications/blockchains/bitcoin/default.nix2
-rw-r--r--pkgs/applications/graphics/rx/default.nix2
-rw-r--r--pkgs/applications/misc/waybar/default.nix2
-rw-r--r--pkgs/applications/misc/wmname/default.nix2
-rw-r--r--pkgs/applications/networking/mumble/default.nix2
-rw-r--r--pkgs/applications/science/biology/neuron/default.nix4
-rw-r--r--pkgs/applications/science/electronics/kicad/base.nix4
-rw-r--r--pkgs/applications/science/physics/sherpa/default.nix2
-rw-r--r--pkgs/applications/system/glances/default.nix2
10 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/applications/audio/zynaddsubfx/default.nix b/pkgs/applications/audio/zynaddsubfx/default.nix
index 986e3215b93fc..4b3cbb171bd0e 100644
--- a/pkgs/applications/audio/zynaddsubfx/default.nix
+++ b/pkgs/applications/audio/zynaddsubfx/default.nix
@@ -91,7 +91,7 @@ in stdenv.mkDerivation rec {
 
   # When building with zest GUI, patch plugins
   # and standalone executable to properly locate zest
-  postFixup = lib.optional (guiModule == "zest") ''
+  postFixup = lib.optionalString (guiModule == "zest") ''
     patchelf --set-rpath "${mruby-zest}:$(patchelf --print-rpath "$out/lib/lv2/ZynAddSubFX.lv2/ZynAddSubFX_ui.so")" \
       "$out/lib/lv2/ZynAddSubFX.lv2/ZynAddSubFX_ui.so"
 
diff --git a/pkgs/applications/blockchains/bitcoin/default.nix b/pkgs/applications/blockchains/bitcoin/default.nix
index 00727d294df27..8bbeda2e0d4ea 100644
--- a/pkgs/applications/blockchains/bitcoin/default.nix
+++ b/pkgs/applications/blockchains/bitcoin/default.nix
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
     ++ optionals withWallet [ db48 sqlite ]
     ++ optionals withGui [ qrencode qtbase qttools ];
 
-  postInstall = optional withGui ''
+  postInstall = optionalString withGui ''
     install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
     substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
     install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
diff --git a/pkgs/applications/graphics/rx/default.nix b/pkgs/applications/graphics/rx/default.nix
index a40371ddb4660..fe3d10bae6356 100644
--- a/pkgs/applications/graphics/rx/default.nix
+++ b/pkgs/applications/graphics/rx/default.nix
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
   # FIXME: GLFW (X11) requires DISPLAY env variable for all tests
   doCheck = false;
 
-  postInstall = optional stdenv.isLinux ''
+  postInstall = optionalString stdenv.isLinux ''
     mkdir -p $out/share/applications
     cp $src/rx.desktop $out/share/applications
     wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${libGL}/lib
diff --git a/pkgs/applications/misc/waybar/default.nix b/pkgs/applications/misc/waybar/default.nix
index 88f0e13e91ba7..a38c1002a01f5 100644
--- a/pkgs/applications/misc/waybar/default.nix
+++ b/pkgs/applications/misc/waybar/default.nix
@@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
     "-Dman-pages=enabled"
   ];
 
-  preFixup = lib.optional withMediaPlayer ''
+  preFixup = lib.optionalString withMediaPlayer ''
       cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py
 
       wrapProgram $out/bin/waybar-mediaplayer.py \
diff --git a/pkgs/applications/misc/wmname/default.nix b/pkgs/applications/misc/wmname/default.nix
index d501869770e0d..cb4f5ec34425f 100644
--- a/pkgs/applications/misc/wmname/default.nix
+++ b/pkgs/applications/misc/wmname/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ libX11 ];
 
-  preConfigure = [ ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'' ];
+  preConfigure = ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'';
 
   meta = {
     description = "Prints or set the window manager name property of the root window";
diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix
index d93fea1f702a9..c7500d903288b 100644
--- a/pkgs/applications/networking/mumble/default.nix
+++ b/pkgs/applications/networking/mumble/default.nix
@@ -104,7 +104,7 @@ let
   server = source: generic {
     type = "murmur";
 
-    postPatch = lib.optional iceSupport ''
+    postPatch = lib.optionalString iceSupport ''
       grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc-ice.dev}/share/ice/,g'
     '';
 
diff --git a/pkgs/applications/science/biology/neuron/default.nix b/pkgs/applications/science/biology/neuron/default.nix
index 7bfef3a82fed8..804407968e1c7 100644
--- a/pkgs/applications/science/biology/neuron/default.nix
+++ b/pkgs/applications/science/biology/neuron/default.nix
@@ -60,13 +60,13 @@ stdenv.mkDerivation rec {
                         else ["--without-mpi"]);
 
 
-  postInstall = lib.optionals (python != null) [ ''
+  postInstall = lib.optionalString (python != null) ''
     ## standardise python neuron install dir if any
     if [[ -d $out/lib/python ]]; then
         mkdir -p ''${out}/${python.sitePackages}
         mv ''${out}/lib/python/*  ''${out}/${python.sitePackages}/
     fi
-  ''];
+  '';
 
   propagatedBuildInputs = [ readline ncurses which libtool ];
 
diff --git a/pkgs/applications/science/electronics/kicad/base.nix b/pkgs/applications/science/electronics/kicad/base.nix
index 596083c270980..d7398f39ec43f 100644
--- a/pkgs/applications/science/electronics/kicad/base.nix
+++ b/pkgs/applications/science/electronics/kicad/base.nix
@@ -64,7 +64,7 @@ assert lib.assertMsg (!(sanitizeAddress && sanitizeThreads))
   "'sanitizeAddress' and 'sanitizeThreads' are mutually exclusive, use one.";
 
 let
-  inherit (lib) optional optionals;
+  inherit (lib) optional optionals optionalString;
 in
 stdenv.mkDerivation rec {
   pname = "kicad-base";
@@ -172,7 +172,7 @@ stdenv.mkDerivation rec {
 
   dontStrip = debug;
 
-  postInstall = optional (withI18n) ''
+  postInstall = optionalString (withI18n) ''
     mkdir -p $out/share
     lndir ${i18n}/share $out/share
   '';
diff --git a/pkgs/applications/science/physics/sherpa/default.nix b/pkgs/applications/science/physics/sherpa/default.nix
index ba519cc2d0323..eb718be12e4a9 100644
--- a/pkgs/applications/science/physics/sherpa/default.nix
+++ b/pkgs/applications/science/physics/sherpa/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1iwa17s8ipj6a2b8zss5csb1k5y9s5js38syvq932rxcinbyjsl4";
   };
 
-  postPatch = lib.optional (stdenv.hostPlatform.libc == "glibc") ''
+  postPatch = lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
     sed -ie '/sys\/sysctl.h/d' ATOOLS/Org/Run_Parameter.C
   '';
 
diff --git a/pkgs/applications/system/glances/default.nix b/pkgs/applications/system/glances/default.nix
index 8ddee9c0b49cb..6c2e5a8443b83 100644
--- a/pkgs/applications/system/glances/default.nix
+++ b/pkgs/applications/system/glances/default.nix
@@ -31,7 +31,7 @@ buildPythonApplication rec {
   ];
 
   doCheck = true;
-  preCheck = lib.optional stdenv.isDarwin ''
+  preCheck = lib.optionalString stdenv.isDarwin ''
     export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks
   '';