diff --git a/doc/languages-frameworks/perl.section.md b/doc/languages-frameworks/perl.section.md index dcb7dcb77b65..c992b9d658bb 100644 --- a/doc/languages-frameworks/perl.section.md +++ b/doc/languages-frameworks/perl.section.md @@ -122,7 +122,7 @@ ImageExifTool = buildPerlPackage { }; buildInputs = lib.optional stdenv.isDarwin shortenPerlShebang; - postInstall = lib.optional stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.isDarwin '' shortenPerlShebang $out/bin/exiftool ''; }; diff --git a/pkgs/applications/audio/zynaddsubfx/default.nix b/pkgs/applications/audio/zynaddsubfx/default.nix index 986e3215b93f..4b3cbb171bd0 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 00727d294df2..8bbeda2e0d4e 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 a40371ddb466..fe3d10bae635 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 88f0e13e91ba..a38c1002a01f 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 d501869770e0..cb4f5ec34425 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 d93fea1f702a..c7500d903288 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 7bfef3a82fed..804407968e1c 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 596083c27098..d7398f39ec43 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 ba519cc2d032..eb718be12e4a 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 8ddee9c0b49c..6c2e5a8443b8 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 ''; diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index bd001d5a10e8..8f93a6746ea2 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 df2980ba204f..1ad490d3a01b 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 255ddfa22ad7..5d7389b6d188 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 90e2c9bd9a73..9210f18ed962 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 25f4b5e13177..b047d6870746 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 495993a64ab6..5bd4b02b61d9 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 896973e32eb8..725af51487c8 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 ef16e381bcfd..f522c1810397 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 dee6c2ab499e..b5bbc88c341f 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 9068814ffd79..b7b5c7f55af0 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 c34bbdfb83d8..0e0f1f19640f 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 2de586f97cbf..a29ac38eb136 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 b2245ff9c9b9..ec2c9eeb2d1c 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 cc0ecb148c44..aeb141649772 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 0bc26db57504..e0895bab68d8 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 6bbcf36cd2c2..c23b352decea 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 5926b3fda5eb..9df547308f56 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 ''; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index bd977960f42e..f26258de3ba4 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -834,7 +834,7 @@ self: super: { }); vim-xdebug = super.vim-xdebug.overrideAttrs (old: { - postInstall = false; + postInstall = null; }); vim-xkbswitch = super.vim-xkbswitch.overrideAttrs (old: { diff --git a/pkgs/os-specific/linux/iptables/default.nix b/pkgs/os-specific/linux/iptables/default.nix index 912d9078c947..fe0e82c4a8e6 100644 --- a/pkgs/os-specific/linux/iptables/default.nix +++ b/pkgs/os-specific/linux/iptables/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - postInstall = optional nftablesCompat '' + postInstall = optionalString nftablesCompat '' rm $out/sbin/{iptables,iptables-restore,iptables-save,ip6tables,ip6tables-restore,ip6tables-save} ln -sv xtables-nft-multi $out/bin/iptables ln -sv xtables-nft-multi $out/bin/iptables-restore diff --git a/pkgs/servers/klipper/default.nix b/pkgs/servers/klipper/default.nix index f120454ac84a..aa933b0fb660 100644 --- a/pkgs/servers/klipper/default.nix +++ b/pkgs/servers/klipper/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { }; # We have no LTO on i686 since commit 22284b0 - postPatch = lib.optional stdenv.isi686 '' + postPatch = lib.optionalString stdenv.isi686 '' substituteInPlace chelper/__init__.py \ --replace "-flto -fwhole-program " "" ''; diff --git a/pkgs/servers/sql/mysql/5.7.x.nix b/pkgs/servers/sql/mysql/5.7.x.nix index 36e26d38fc48..c1ce4d9e1e14 100644 --- a/pkgs/servers/sql/mysql/5.7.x.nix +++ b/pkgs/servers/sql/mysql/5.7.x.nix @@ -16,7 +16,7 @@ self = stdenv.mkDerivation rec { sha256 = "1fhv16zr46pxm1j8vb8x8mh3nwzglg01arz8gnazbmjqldr5idpq"; }; - preConfigure = lib.optional stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.isDarwin '' ln -s /bin/ps $TMPDIR/ps export PATH=$PATH:$TMPDIR ''; diff --git a/pkgs/tools/filesystems/moosefs/default.nix b/pkgs/tools/filesystems/moosefs/default.nix index e07ca270b5c8..dc1d77bfa7ed 100644 --- a/pkgs/tools/filesystems/moosefs/default.nix +++ b/pkgs/tools/filesystems/moosefs/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { "/usr/local/lib/pkgconfig" "/nonexistent" ''; - preBuild = lib.optional stdenv.isDarwin '' + preBuild = lib.optionalString stdenv.isDarwin '' substituteInPlace config.h --replace \ "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" \ "#undef HAVE_STRUCT_STAT_ST_BIRTHTIME" diff --git a/pkgs/tools/networking/dhcpcd/default.nix b/pkgs/tools/networking/dhcpcd/default.nix index cc1bad106f75..0962335ad1a3 100644 --- a/pkgs/tools/networking/dhcpcd/default.nix +++ b/pkgs/tools/networking/dhcpcd/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { installFlags = [ "DBDIR=$(TMPDIR)/db" "SYSCONFDIR=${placeholder "out"}/etc" ]; # Check that the udev plugin got built. - postInstall = lib.optional (udev != null) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]"; + postInstall = lib.optionalString (udev != null) "[ -e ${placeholder "out"}/lib/dhcpcd/dev/udev.so ]"; meta = with lib; { description = "A client for the Dynamic Host Configuration Protocol (DHCP)";