summary refs log tree commit diff
path: root/pkgs/development/libraries
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/development/libraries
parent1d87f9866c857b72f60eb6c9f7f4701a38ac2136 (diff)
downloadnixpkgs-8f94a33b38fdd8b5e1c3e57303855364887ec332.tar
nixpkgs-8f94a33b38fdd8b5e1c3e57303855364887ec332.tar.gz
nixpkgs-8f94a33b38fdd8b5e1c3e57303855364887ec332.tar.bz2
nixpkgs-8f94a33b38fdd8b5e1c3e57303855364887ec332.tar.lz
nixpkgs-8f94a33b38fdd8b5e1c3e57303855364887ec332.tar.xz
nixpkgs-8f94a33b38fdd8b5e1c3e57303855364887ec332.tar.zst
nixpkgs-8f94a33b38fdd8b5e1c3e57303855364887ec332.zip
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/development/libraries')
-rw-r--r--pkgs/development/libraries/flatbuffers/1.12.nix2
-rw-r--r--pkgs/development/libraries/libfm/default.nix4
-rw-r--r--pkgs/development/libraries/mbedtls/default.nix2
-rw-r--r--pkgs/development/libraries/silgraphite/graphite2.nix2
-rw-r--r--pkgs/development/libraries/t1lib/default.nix2
-rw-r--r--pkgs/development/libraries/zeroc-ice/3.6.nix2
-rw-r--r--pkgs/development/libraries/zeroc-ice/default.nix2
7 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/development/libraries/flatbuffers/1.12.nix b/pkgs/development/libraries/flatbuffers/1.12.nix
index df2980ba204..1ad490d3a01 100644
--- a/pkgs/development/libraries/flatbuffers/1.12.nix
+++ b/pkgs/development/libraries/flatbuffers/1.12.nix
@@ -20,7 +20,7 @@ callPackage ./generic.nix {
     })
   ];
 
-  preConfigure = lib.optional stdenv.buildPlatform.isDarwin ''
+  preConfigure = lib.optionalString stdenv.buildPlatform.isDarwin ''
     rm BUILD
   '';
 }
diff --git a/pkgs/development/libraries/libfm/default.nix b/pkgs/development/libraries/libfm/default.nix
index 255ddfa22ad..5d7389b6d18 100644
--- a/pkgs/development/libraries/libfm/default.nix
+++ b/pkgs/development/libraries/libfm/default.nix
@@ -13,7 +13,7 @@
 
 let
     gtk = if withGtk3 then gtk3 else gtk2;
-    inherit (lib) optional;
+    inherit (lib) optional optionalString;
 in
 stdenv.mkDerivation rec {
   pname = if extraOnly
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
   installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];
 
   # libfm-extra is pulled in by menu-cache and thus leads to a collision for libfm
-  postInstall = optional (!extraOnly) ''
+  postInstall = optionalString (!extraOnly) ''
      rm $out/lib/libfm-extra.so $out/lib/libfm-extra.so.* $out/lib/libfm-extra.la $out/lib/pkgconfig/libfm-extra.pc
   '';
 
diff --git a/pkgs/development/libraries/mbedtls/default.nix b/pkgs/development/libraries/mbedtls/default.nix
index 90e2c9bd9a7..9210f18ed96 100644
--- a/pkgs/development/libraries/mbedtls/default.nix
+++ b/pkgs/development/libraries/mbedtls/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  postConfigure = lib.optionals enableThreading ''
+  postConfigure = lib.optionalString enableThreading ''
     perl scripts/config.pl set MBEDTLS_THREADING_C    # Threading abstraction layer
     perl scripts/config.pl set MBEDTLS_THREADING_PTHREAD    # POSIX thread wrapper layer for the threading layer.
   '';
diff --git a/pkgs/development/libraries/silgraphite/graphite2.nix b/pkgs/development/libraries/silgraphite/graphite2.nix
index 25f4b5e1317..b047d687074 100644
--- a/pkgs/development/libraries/silgraphite/graphite2.nix
+++ b/pkgs/development/libraries/silgraphite/graphite2.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
   # Remove a test that fails to statically link (undefined reference to png and
   # freetype symbols)
-  postConfigure = lib.optionals static ''
+  postConfigure = lib.optionalString static ''
     sed -e '/freetype freetype.c/d' -i ../tests/examples/CMakeLists.txt
   '';
 
diff --git a/pkgs/development/libraries/t1lib/default.nix b/pkgs/development/libraries/t1lib/default.nix
index 495993a64ab..5bd4b02b61d 100644
--- a/pkgs/development/libraries/t1lib/default.nix
+++ b/pkgs/development/libraries/t1lib/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
   buildInputs = [ libX11 libXaw ];
   buildFlags = [ "without_doc" ];
 
-  postInstall = lib.optional (!stdenv.isDarwin) "chmod +x $out/lib/*.so.*"; # ??
+  postInstall = lib.optionalString (!stdenv.isDarwin) "chmod +x $out/lib/*.so.*"; # ??
 
   meta = with lib; {
     description = "A type 1 font rasterizer library for UNIX/X11";
diff --git a/pkgs/development/libraries/zeroc-ice/3.6.nix b/pkgs/development/libraries/zeroc-ice/3.6.nix
index 896973e32eb..725af51487c 100644
--- a/pkgs/development/libraries/zeroc-ice/3.6.nix
+++ b/pkgs/development/libraries/zeroc-ice/3.6.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     sourceRoot=$sourceRoot/cpp
   '';
 
-  prePatch = lib.optional stdenv.isDarwin ''
+  prePatch = lib.optionalString stdenv.isDarwin ''
     substituteInPlace config/Make.rules.Darwin \
         --replace xcrun ""
   '';
diff --git a/pkgs/development/libraries/zeroc-ice/default.nix b/pkgs/development/libraries/zeroc-ice/default.nix
index ef16e381bcf..f522c181039 100644
--- a/pkgs/development/libraries/zeroc-ice/default.nix
+++ b/pkgs/development/libraries/zeroc-ice/default.nix
@@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = "-Wno-error=class-memaccess -Wno-error=deprecated-copy";
 
-  prePatch = lib.optional stdenv.isDarwin ''
+  prePatch = lib.optionalString stdenv.isDarwin ''
     substituteInPlace Make.rules.Darwin \
         --replace xcrun ""
   '';