diff options
author | Malte Brandy <malte.brandy@maralorn.de> | 2020-10-14 01:46:17 +0200 |
---|---|---|
committer | Malte Brandy <malte.brandy@maralorn.de> | 2020-10-14 01:46:17 +0200 |
commit | cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a (patch) | |
tree | a63c3fb3954ecfd407aa649f777f102a262a4ddb /pkgs | |
parent | 74d875206a825007e27abaa7c590f4c1db35ad31 (diff) | |
download | nixpkgs-cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a.tar nixpkgs-cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a.tar.gz nixpkgs-cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a.tar.bz2 nixpkgs-cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a.tar.lz nixpkgs-cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a.tar.xz nixpkgs-cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a.tar.zst nixpkgs-cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a.zip |
treewide: De-inline uses of lib.boolToString
This commit should not change eval results
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/misc/razergenie/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/video/obs-studio/wlrobs.nix | 4 | ||||
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/gdk-pixbuf/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/geoclue/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/glib/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libsoup/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/mesa/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/v8/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/uchar/default.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/dpdk/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/networking/network-manager/libnma/default.nix | 3 |
12 files changed, 19 insertions, 17 deletions
diff --git a/pkgs/applications/misc/razergenie/default.nix b/pkgs/applications/misc/razergenie/default.nix index 9042ab38e75..ac0f373dc93 100644 --- a/pkgs/applications/misc/razergenie/default.nix +++ b/pkgs/applications/misc/razergenie/default.nix @@ -27,8 +27,8 @@ in stdenv.mkDerivation { ]; mesonFlags = [ - "-Denable_experimental=${if enableExperimental then "true" else "false"}" - "-Dinclude_matrix_discovery=${if includeMatrixDiscovery then "true" else "false"}" + "-Denable_experimental=${lib.boolToString enableExperimental}" + "-Dinclude_matrix_discovery=${lib.boolToString includeMatrixDiscovery}" ]; meta = with lib; { diff --git a/pkgs/applications/video/obs-studio/wlrobs.nix b/pkgs/applications/video/obs-studio/wlrobs.nix index 99486a9ccc0..14bc80dd388 100644 --- a/pkgs/applications/video/obs-studio/wlrobs.nix +++ b/pkgs/applications/video/obs-studio/wlrobs.nix @@ -7,7 +7,7 @@ # ln -s ~/.nix-profile/share/obs/obs-plugins/wlrobs/bin/64bit/libwlrobs.so ~/.config/obs-studio/plugins/wlrobs/bin/64bit { stdenv, fetchhg, wayland, obs-studio , meson, ninja, pkgconfig, libX11 -, dmabufSupport ? false, libdrm ? null, libGL ? null}: +, dmabufSupport ? false, libdrm ? null, libGL ? null, lib}: assert dmabufSupport -> libdrm != null && libGL != null; @@ -29,7 +29,7 @@ stdenv.mkDerivation { ''; mesonFlags = [ - "-Duse_dmabuf=${if dmabufSupport then "true" else "false"}" + "-Duse_dmabuf=${lib.boolToString dmabufSupport}" ]; meta = with stdenv.lib; { diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 7db4992d1d6..9efaa860832 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -47,7 +47,7 @@ let removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}''; - deleteFlag = if deleteVendor then "true" else "false"; + deleteFlag = lib.boolToString deleteVendor; vendCommand = if runVend then "${vend}/bin/vend" else "false"; diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 08b8f70b2d9..1f4bc5c12ad 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -21,6 +21,7 @@ , doCheck ? false , makeWrapper , fetchpatch +, lib }: stdenv.mkDerivation rec { @@ -74,7 +75,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Ddocs=true" "-Dx11=false" # use gdk-pixbuf-xlib - "-Dgir=${if gobject-introspection != null then "true" else "false"}" + "-Dgir=${lib.boolToString (gobject-introspection != null)}" "-Dgio_sniffing=false" ]; diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix index da76c6dfedc..74d778c5c55 100644 --- a/pkgs/development/libraries/geoclue/default.nix +++ b/pkgs/development/libraries/geoclue/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system" - "-Ddemo-agent=${if withDemoAgent then "true" else "false"}" + "-Ddemo-agent=${boolToString withDemoAgent}" "--sysconfdir=/etc" "-Dsysconfdir_install=${placeholder "out"}/etc" "-Ddbus-srv-user=geoclue" diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 88848deec41..df19b9fc88c 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation rec { mesonFlags = [ # Avoid the need for gobject introspection binaries in PATH in cross-compiling case. # Instead we just copy them over from the native output. - "-Dgtk_doc=${if stdenv.hostPlatform == stdenv.buildPlatform then "true" else "false"}" + "-Dgtk_doc=${boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" "-Dnls=enabled" "-Ddevbindir=${placeholder ''dev''}/bin" ]; diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index a497661725b..9f4a5bac25b 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, glib, libxml2, meson, ninja, pkgconfig, gnome3 , gnomeSupport ? true, sqlite, glib-networking, gobject-introspection, vala -, libpsl, python3, brotli }: +, libpsl, python3, brotli, lib }: stdenv.mkDerivation rec { pname = "libsoup"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency "-Dgssapi=disabled" "-Dvapi=enabled" - "-Dgnome=${if gnomeSupport then "true" else "false"}" + "-Dgnome=${lib.boolToString gnomeSupport}" "-Dntlm=disabled" ]; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index cf452fded14..756a6fd1508 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -129,7 +129,7 @@ stdenv.mkDerivation { "-Domx-libs-path=${placeholder "drivers"}/lib/bellagio" "-Dva-libs-path=${placeholder "drivers"}/lib/dri" "-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d" - "-Dgallium-nine=${if enableGalliumNine then "true" else "false"}" # Direct3D in Wine + "-Dgallium-nine=${boolToString enableGalliumNine}" # Direct3D in Wine "-Dosmesa=${if enableOSMesa then "gallium" else "none"}" # used by wine ] ++ optionals stdenv.isLinux [ "-Dglvnd=true" @@ -229,7 +229,7 @@ stdenv.mkDerivation { inherit (libglvnd) driverLink; }; - meta = with stdenv.lib; { + meta = { description = "An open source 3D graphics library"; longDescription = '' The Mesa project began as an open-source implementation of the OpenGL diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 60e856e61df..e6696626cb5 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { gnFlags = [ "use_custom_libcxx=false" - "is_clang=${if stdenv.cc.isClang then "true" else "false"}" + "is_clang=${lib.boolToString stdenv.cc.isClang}" "use_sysroot=false" # "use_system_icu=true" "is_component_build=false" diff --git a/pkgs/development/ocaml-modules/uchar/default.nix b/pkgs/development/ocaml-modules/uchar/default.nix index 819d8527b2a..fb56cca0f0a 100644 --- a/pkgs/development/ocaml-modules/uchar/default.nix +++ b/pkgs/development/ocaml-modules/uchar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true }: +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true, lib }: stdenv.mkDerivation { name = "ocaml${ocaml.version}-uchar-0.0.2"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ ocaml ocamlbuild findlib ]; buildInputs = [ findlib ocaml ocamlbuild ]; - buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}"; + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}"; installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR"; configurePlatforms = []; diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index aacbc3cdfbe..efe578c596b 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -43,7 +43,7 @@ in stdenv.mkDerivation rec { mesonFlags = [ "-Denable_docs=true" - "-Denable_kmods=${if mod then "true" else "false"}" + "-Denable_kmods=${lib.boolToString mod}" ] ++ lib.optional (!shared) "-Ddefault_library=static" ++ lib.optional stdenv.isx86_64 "-Dmachine=nehalem" diff --git a/pkgs/tools/networking/network-manager/libnma/default.nix b/pkgs/tools/networking/network-manager/libnma/default.nix index 7d7889f9a5b..d50ccc6517b 100644 --- a/pkgs/tools/networking/network-manager/libnma/default.nix +++ b/pkgs/tools/networking/network-manager/libnma/default.nix @@ -19,6 +19,7 @@ , gcr , glib , substituteAll +, lib }: stdenv.mkDerivation rec { @@ -61,7 +62,7 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgcr=${if withGnome then "true" else "false"}" + "-Dgcr=${lib.boolToString withGnome}" ]; postPatch = '' |