diff options
author | Sebastián Mancilla <smancill@smancill.dev> | 2021-08-17 20:14:20 -0400 |
---|---|---|
committer | Sebastián Mancilla <smancill@smancill.dev> | 2021-08-20 19:08:42 -0400 |
commit | 8f94a33b38fdd8b5e1c3e57303855364887ec332 (patch) | |
tree | b2482923cda2bb402fdde538e52dd021bf728d60 /pkgs/development | |
parent | 1d87f9866c857b72f60eb6c9f7f4701a38ac2136 (diff) | |
download | nixpkgs-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')
17 files changed, 27 insertions, 27 deletions
diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index bd001d5a10e..8f93a6746ea 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -69,7 +69,7 @@ let # so that it can be used to regenerate documentation. patches = lib.optionals disableGraphviz [ graphvizPatch ./gvc-compat.patch ]; configureFlags = lib.optional disableGraphviz "--disable-graphviz"; - preBuild = lib.optional disableGraphviz "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")"; + preBuild = lib.optionalString disableGraphviz "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")"; outputs = [ "out" "devdoc" ]; 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 "" ''; diff --git a/pkgs/development/python-modules/cmd2/default.nix b/pkgs/development/python-modules/cmd2/default.nix index dee6c2ab499..b5bbc88c341 100644 --- a/pkgs/development/python-modules/cmd2/default.nix +++ b/pkgs/development/python-modules/cmd2/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { LC_ALL="en_US.UTF-8"; - postPatch = lib.optional stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.isDarwin '' # Fake the impure dependencies pbpaste and pbcopy mkdir bin echo '#!${stdenv.shell}' > bin/pbpaste diff --git a/pkgs/development/python-modules/cvxpy/default.nix b/pkgs/development/python-modules/cvxpy/default.nix index 9068814ffd7..b7b5c7f55af 100644 --- a/pkgs/development/python-modules/cvxpy/default.nix +++ b/pkgs/development/python-modules/cvxpy/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { ]; # Required flags from https://github.com/cvxgrp/cvxpy/releases/tag/v1.1.11 - preBuild = lib.optional useOpenmp '' + preBuild = lib.optionalString useOpenmp '' export CFLAGS="-fopenmp" export LDFLAGS="-lgomp" ''; diff --git a/pkgs/development/python-modules/spacy/models.nix b/pkgs/development/python-modules/spacy/models.nix index c34bbdfb83d..0e0f1f19640 100644 --- a/pkgs/development/python-modules/spacy/models.nix +++ b/pkgs/development/python-modules/spacy/models.nix @@ -25,7 +25,7 @@ let ++ lib.optionals (lang == "ru") [ pymorphy2 ] ++ lib.optionals (pname == "fr_dep_news_trf") [ sentencepiece ]; - postPatch = lib.optionals (pname == "fr_dep_news_trf") '' + postPatch = lib.optionalString (pname == "fr_dep_news_trf") '' substituteInPlace meta.json \ --replace "sentencepiece==0.1.91" "sentencepiece>=0.1.91" ''; diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 2de586f97cb..a29ac38eb13 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -102,7 +102,7 @@ stdenv.mkDerivation rec { ]; # make install attempts to use the just-built cmake - preInstall = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) '' + preInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile ''; diff --git a/pkgs/development/tools/parsing/flex/2.5.35.nix b/pkgs/development/tools/parsing/flex/2.5.35.nix index b2245ff9c9b..ec2c9eeb2d1 100644 --- a/pkgs/development/tools/parsing/flex/2.5.35.nix +++ b/pkgs/development/tools/parsing/flex/2.5.35.nix @@ -16,10 +16,10 @@ stdenv.mkDerivation { propagatedBuildInputs = [ m4 ]; - preConfigure = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "ac_cv_func_malloc_0_nonnull=yes" - "ac_cv_func_realloc_0_nonnull=yes" - ]; + preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + ac_cv_func_malloc_0_nonnull=yes + ac_cv_func_realloc_0_nonnull=yes + ''; doCheck = false; # fails 2 out of 46 tests diff --git a/pkgs/development/tools/parsing/flex/2.6.1.nix b/pkgs/development/tools/parsing/flex/2.6.1.nix index cc0ecb148c4..aeb14164977 100644 --- a/pkgs/development/tools/parsing/flex/2.6.1.nix +++ b/pkgs/development/tools/parsing/flex/2.6.1.nix @@ -18,10 +18,10 @@ stdenv.mkDerivation { propagatedBuildInputs = [ m4 ]; - preConfigure = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "ac_cv_func_malloc_0_nonnull=yes" - "ac_cv_func_realloc_0_nonnull=yes" - ]; + preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + ac_cv_func_malloc_0_nonnull=yes + ac_cv_func_realloc_0_nonnull=yes + ''; postConfigure = lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) '' sed -i Makefile -e 's/-no-undefined//;' diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/default.nix index 0bc26db5750..e0895bab68d 100644 --- a/pkgs/development/tools/parsing/flex/default.nix +++ b/pkgs/development/tools/parsing/flex/default.nix @@ -33,10 +33,10 @@ stdenv.mkDerivation rec { buildInputs = [ bison ]; propagatedBuildInputs = [ m4 ]; - preConfigure = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "export ac_cv_func_malloc_0_nonnull=yes" - "export ac_cv_func_realloc_0_nonnull=yes" - ]; + preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + export ac_cv_func_malloc_0_nonnull=yes + export ac_cv_func_realloc_0_nonnull=yes + ''; postConfigure = lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) '' sed -i Makefile -e 's/-no-undefined//;' diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix index 6bbcf36cd2c..c23b352dece 100644 --- a/pkgs/development/tools/parsing/ragel/default.nix +++ b/pkgs/development/tools/parsing/ragel/default.nix @@ -15,7 +15,7 @@ let buildInputs = lib.optional build-manual [ transfig ghostscript tex ]; - preConfigure = lib.optional build-manual '' + preConfigure = lib.optionalString build-manual '' sed -i "s/build_manual=no/build_manual=yes/g" DIST ''; diff --git a/pkgs/development/tools/qtcreator/default.nix b/pkgs/development/tools/qtcreator/default.nix index 5926b3fda5e..9df547308f5 100644 --- a/pkgs/development/tools/qtcreator/default.nix +++ b/pkgs/development/tools/qtcreator/default.nix @@ -68,7 +68,7 @@ mkDerivation rec { --replace 'LLVM_CXXFLAGS ~= s,-gsplit-dwarf,' '${lib.concatStringsSep "\n" ["LLVM_CXXFLAGS ~= s,-gsplit-dwarf," " LLVM_CXXFLAGS += -fno-rtti"]}' ''; - preBuild = optional withDocumentation '' + preBuild = optionalString withDocumentation '' ln -s ${getLib qtbase}/$qtDocPrefix $NIX_QT5_TMP/share ''; |