treewide: remove global with lib; in pkgs/{misc,networking}

+157 -219
+11 -12
pkgs/applications/misc/blender/default.nix
··· 16 16 , embree, gmp, libharu 17 17 }: 18 18 19 - with lib; 20 19 let 21 20 python = python310Packages.python; 22 21 optix = fetchzip { ··· 38 37 patches = lib.optional stdenv.isDarwin ./darwin.patch; 39 38 40 39 nativeBuildInputs = [ cmake makeWrapper python310Packages.wrapPython llvmPackages.llvm.dev ] 41 - ++ optionals cudaSupport [ addOpenGLRunpath ]; 40 + ++ lib.optionals cudaSupport [ addOpenGLRunpath ]; 42 41 buildInputs = 43 42 [ boost ffmpeg gettext glew ilmbase 44 43 freetype libjpeg libpng libsamplerate libsndfile libtiff libwebp ··· 63 62 else [ 64 63 llvmPackages.openmp SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL 65 64 ]) 66 - ++ optional jackaudioSupport libjack2 67 - ++ optional cudaSupport cudaPackages.cudatoolkit 68 - ++ optional colladaSupport opencollada 69 - ++ optional spaceNavSupport libspnav; 65 + ++ lib.optional jackaudioSupport libjack2 66 + ++ lib.optional cudaSupport cudaPackages.cudatoolkit 67 + ++ lib.optional colladaSupport opencollada 68 + ++ lib.optional spaceNavSupport libspnav; 70 69 pythonPath = with python310Packages; [ numpy requests ]; 71 70 72 71 postPatch = '' ··· 118 117 "-DWITH_IMAGE_OPENJPEG=ON" 119 118 "-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}" 120 119 ] 121 - ++ optionals stdenv.isDarwin [ 120 + ++ lib.optionals stdenv.isDarwin [ 122 121 "-DWITH_CYCLES_OSL=OFF" # requires LLVM 123 122 "-DWITH_OPENVDB=OFF" # OpenVDB currently doesn't build on darwin 124 123 125 124 "-DLIBDIR=/does-not-exist" 126 125 ] 127 126 # Clang doesn't support "-export-dynamic" 128 - ++ optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" 129 - ++ optional jackaudioSupport "-DWITH_JACK=ON" 130 - ++ optionals cudaSupport [ 127 + ++ lib.optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" 128 + ++ lib.optional jackaudioSupport "-DWITH_JACK=ON" 129 + ++ lib.optionals cudaSupport [ 131 130 "-DWITH_CYCLES_CUDA_BINARIES=ON" 132 131 "-DWITH_CYCLES_DEVICE_OPTIX=ON" 133 132 "-DOPTIX_ROOT_DIR=${optix}" ··· 137 136 138 137 # Since some dependencies are built with gcc 6, we need gcc 6's 139 138 # libstdc++ in our RPATH. Sigh. 140 - NIX_LDFLAGS = optionalString cudaSupport "-rpath ${stdenv.cc.cc.lib}/lib"; 139 + NIX_LDFLAGS = lib.optionalString cudaSupport "-rpath ${stdenv.cc.cc.lib}/lib"; 141 140 142 141 blenderExecutable = 143 142 placeholder "out" + (if stdenv.isDarwin then "/Applications/Blender.app/Contents/MacOS/Blender" else "/bin/blender"); ··· 154 153 155 154 # Set RUNPATH so that libcuda and libnvrtc in /run/opengl-driver(-32)/lib can be 156 155 # found. See the explanation in libglvnd. 157 - postFixup = optionalString cudaSupport '' 156 + postFixup = lib.optionalString cudaSupport '' 158 157 for program in $out/bin/blender $out/bin/.blender-wrapped; do 159 158 isELF "$program" || continue 160 159 addOpenGLRunpath "$program"
+2 -4
pkgs/applications/misc/electrum/update.nix
··· 10 10 , nix 11 11 }: 12 12 13 - with lib; 14 - 15 13 let 16 14 downloadPageUrl = "https://download.electrum.org"; 17 15 ··· 23 21 24 22 set -eu -o pipefail 25 23 26 - export PATH=${makeBinPath [ 24 + export PATH=${lib.makeBinPath [ 27 25 common-updater-scripts 28 26 coreutils 29 27 curl ··· 50 48 export GNUPGHOME=$PWD/gnupg 51 49 mkdir -m 700 -p "$GNUPGHOME" 52 50 53 - gpg --batch --recv-keys ${concatStringsSep " " (map (x: "'${x}'") signingKeys)} 51 + gpg --batch --recv-keys ${lib.concatStringsSep " " (map (x: "'${x}'") signingKeys)} 54 52 gpg --batch --verify "$sigFile" "$srcFile" 55 53 56 54 sha256=$(nix-prefetch-url --type sha256 "file://$PWD/$srcFile")
+1 -3
pkgs/applications/misc/elogind/default.nix
··· 25 25 , enableSystemd ? false 26 26 }: 27 27 28 - with lib; 29 - 30 28 stdenv.mkDerivation rec { 31 29 pname = "elogind"; 32 30 version = "246.10"; ··· 72 70 "-Dsysconfdir=${placeholder "out"}/etc" 73 71 ]; 74 72 75 - meta = { 73 + meta = with lib; { 76 74 homepage = "https://github.com/elogind/elogind"; 77 75 description = ''The systemd project's "logind", extracted to a standalone package''; 78 76 platforms = platforms.linux; # probably more
+3 -5
pkgs/applications/misc/gammu/default.nix
··· 4 4 , postgresSupport ? false, postgresql ? null 5 5 }: 6 6 7 - with lib; 8 - 9 7 stdenv.mkDerivation rec { 10 8 pname = "gammu"; 11 9 version = "1.42.0"; ··· 31 29 strictDeps = true; 32 30 33 31 buildInputs = [ bash bluez libusb1 curl gettext sqlite libiconv ] 34 - ++ optionals dbiSupport [ libdbi libdbiDrivers ] 35 - ++ optionals postgresSupport [ postgresql ]; 32 + ++ lib.optionals dbiSupport [ libdbi libdbiDrivers ] 33 + ++ lib.optionals postgresSupport [ postgresql ]; 36 34 37 - meta = { 35 + meta = with lib; { 38 36 homepage = "https://wammu.eu/gammu/"; 39 37 description = "Command line utility and library to control mobile phones"; 40 38 license = licenses.gpl2;
+2 -4
pkgs/applications/misc/get_iplayer/default.nix
··· 1 1 { lib, fetchFromGitHub, atomicparsley, flvstreamer, ffmpeg, makeWrapper, perl, perlPackages, rtmpdump}: 2 2 3 - with lib; 4 - 5 3 perlPackages.buildPerlPackage rec { 6 4 pname = "get_iplayer"; 7 5 version = "3.27"; ··· 26 24 installPhase = '' 27 25 mkdir -p $out/bin $out/share/man/man1 28 26 cp get_iplayer $out/bin 29 - wrapProgram $out/bin/get_iplayer --suffix PATH : ${makeBinPath [ atomicparsley ffmpeg flvstreamer rtmpdump ]} --prefix PERL5LIB : $PERL5LIB 27 + wrapProgram $out/bin/get_iplayer --suffix PATH : ${lib.makeBinPath [ atomicparsley ffmpeg flvstreamer rtmpdump ]} --prefix PERL5LIB : $PERL5LIB 30 28 cp get_iplayer.1 $out/share/man/man1 31 29 ''; 32 30 33 - meta = { 31 + meta = with lib; { 34 32 description = "Downloads TV and radio from BBC iPlayer"; 35 33 license = licenses.gpl3Plus; 36 34 homepage = "https://squarepenguin.co.uk/";
+7 -9
pkgs/applications/misc/k2pdfopt/default.nix
··· 8 8 , enableTesseract ? true, leptonica, tesseract4 9 9 }: 10 10 11 - with lib; 12 - 13 11 # k2pdfopt is a pain to package. It requires modified versions of mupdf, 14 12 # leptonica, and tesseract. Instead of shipping patches for these upstream 15 13 # packages, k2pdfopt includes just the modified source files for these ··· 140 138 }; 141 139 in 142 140 [ zlib libpng ] ++ 143 - optional enableGSL gsl ++ 144 - optional enableGhostScript ghostscript ++ 145 - optional enableMuPDF mupdf_modded ++ 146 - optional enableDJVU djvulibre ++ 147 - optional enableGOCR gocr ++ 148 - optionals enableTesseract [ leptonica_modded tesseract_modded ]; 141 + lib.optional enableGSL gsl ++ 142 + lib.optional enableGhostScript ghostscript ++ 143 + lib.optional enableMuPDF mupdf_modded ++ 144 + lib.optional enableDJVU djvulibre ++ 145 + lib.optional enableGOCR gocr ++ 146 + lib.optionals enableTesseract [ leptonica_modded tesseract_modded ]; 149 147 150 148 dontUseCmakeBuildDir = true; 151 149 ··· 157 155 install -D -m 755 k2pdfopt $out/bin/k2pdfopt 158 156 ''; 159 157 160 - preFixup = optionalString enableTesseract '' 158 + preFixup = lib.optionalString enableTesseract '' 161 159 wrapProgram $out/bin/k2pdfopt --set-default TESSDATA_PREFIX ${tesseract4}/share/tessdata 162 160 ''; 163 161
+14 -16
pkgs/applications/misc/keepassx/community.nix
··· 37 37 , nixosTests 38 38 }: 39 39 40 - with lib; 41 - 42 40 stdenv.mkDerivation rec { 43 41 pname = "keepassxc"; 44 42 version = "2.7.4"; ··· 50 48 sha256 = "sha256-amedKK9nplLVJTldeabN3/c+g/QesrdH+qx+rba2/4s="; 51 49 }; 52 50 53 - NIX_CFLAGS_COMPILE = optionalString stdenv.cc.isClang [ 51 + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang [ 54 52 "-Wno-old-style-cast" 55 53 "-Wno-error" 56 54 "-D__BIG_ENDIAN__=${if stdenv.isBigEndian then "1" else "0"}" 57 55 ]; 58 56 59 - NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${libargon2}/lib"; 57 + NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-rpath ${libargon2}/lib"; 60 58 61 59 patches = [ 62 60 ./darwin.patch ··· 67 65 "-DWITH_GUI_TESTS=ON" 68 66 "-DWITH_XC_UPDATECHECK=OFF" 69 67 ] 70 - ++ (optional (!withKeePassX11) "-DWITH_XC_X11=OFF") 71 - ++ (optional (withKeePassFDOSecrets && stdenv.isLinux) "-DWITH_XC_FDOSECRETS=ON") 72 - ++ (optional (withKeePassYubiKey && stdenv.isLinux) "-DWITH_XC_YUBIKEY=ON") 73 - ++ (optional withKeePassBrowser "-DWITH_XC_BROWSER=ON") 74 - ++ (optional withKeePassKeeShare "-DWITH_XC_KEESHARE=ON") 75 - ++ (optional withKeePassNetworking "-DWITH_XC_NETWORKING=ON") 76 - ++ (optional withKeePassSSHAgent "-DWITH_XC_SSHAGENT=ON"); 68 + ++ (lib.optional (!withKeePassX11) "-DWITH_XC_X11=OFF") 69 + ++ (lib.optional (withKeePassFDOSecrets && stdenv.isLinux) "-DWITH_XC_FDOSECRETS=ON") 70 + ++ (lib.optional (withKeePassYubiKey && stdenv.isLinux) "-DWITH_XC_YUBIKEY=ON") 71 + ++ (lib.optional withKeePassBrowser "-DWITH_XC_BROWSER=ON") 72 + ++ (lib.optional withKeePassKeeShare "-DWITH_XC_KEESHARE=ON") 73 + ++ (lib.optional withKeePassNetworking "-DWITH_XC_NETWORKING=ON") 74 + ++ (lib.optional withKeePassSSHAgent "-DWITH_XC_SSHAGENT=ON"); 77 75 78 76 doCheck = true; 79 77 checkPhase = '' ··· 112 110 readline 113 111 zlib 114 112 ] 115 - ++ optional (stdenv.isDarwin && withKeePassTouchID) darwin.apple_sdk.frameworks.LocalAuthentication 116 - ++ optional stdenv.isDarwin qtmacextras 117 - ++ optional stdenv.isLinux libusb1 118 - ++ optional withKeePassX11 qtx11extras; 113 + ++ lib.optional (stdenv.isDarwin && withKeePassTouchID) darwin.apple_sdk.frameworks.LocalAuthentication 114 + ++ lib.optional stdenv.isDarwin qtmacextras 115 + ++ lib.optional stdenv.isLinux libusb1 116 + ++ lib.optional withKeePassX11 qtx11extras; 119 117 120 118 passthru.tests = nixosTests.keepassxc; 121 119 122 - meta = { 120 + meta = with lib; { 123 121 description = "Offline password manager with many features."; 124 122 longDescription = '' 125 123 A community fork of KeePassX, which is itself a port of KeePass Password Safe.
+1 -3
pkgs/applications/misc/rm-improved/default.nix
··· 1 1 { fetchFromGitHub, rustPlatform, lib }: 2 2 3 - with lib; 4 - 5 3 rustPlatform.buildRustPackage rec { 6 4 pname = "rm-improved"; 7 5 version = "0.13.0"; ··· 15 13 sha256 = "0d065xia4mwdhxkiqfg7pic6scfzipzmsvvx7l6l97w62lzpiqx3"; 16 14 }; 17 15 18 - meta = { 16 + meta = with lib; { 19 17 description = "Replacement for rm with focus on safety, ergonomics and performance"; 20 18 homepage = "https://github.com/nivekuil/rip"; 21 19 maintainers = with maintainers; [ nils-degroot ];
+3 -5
pkgs/applications/misc/slstatus/default.nix
··· 1 1 { lib, stdenv, fetchgit, pkg-config, writeText, libX11, conf ? null, patches ? [] }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "slstatus"; 7 5 version = "unstable-2019-02-16"; ··· 12 10 sha256 = "0kayyhpmppybhwndxgabw48wsk9v8x9xdb05xrly9szkw3jbvgw4"; 13 11 }; 14 12 15 - configFile = optionalString (conf!=null) (writeText "config.def.h" conf); 16 - preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h"; 13 + configFile = lib.optionalString (conf!=null) (writeText "config.def.h" conf); 14 + preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.def.h"; 17 15 18 16 inherit patches; 19 17 ··· 24 22 25 23 installFlags = [ "PREFIX=$(out)" ]; 26 24 27 - meta = { 25 + meta = with lib; { 28 26 homepage = "https://tools.suckless.org/slstatus/"; 29 27 description = "status monitor for window managers that use WM_NAME like dwm"; 30 28 license = licenses.isc;
+2 -4
pkgs/applications/misc/veracrypt/default.nix
··· 14 14 , btrfs-progs 15 15 }: 16 16 17 - with lib; 18 - 19 17 stdenv.mkDerivation rec { 20 18 pname = "veracrypt"; 21 19 version = "1.25.9"; 22 20 23 21 src = fetchurl { 24 - url = "https://launchpad.net/${pname}/trunk/${toLower version}/+download/VeraCrypt_${version}_Source.tar.bz2"; 22 + url = "https://launchpad.net/${pname}/trunk/${lib.toLower version}/+download/VeraCrypt_${version}_Source.tar.bz2"; 25 23 sha256 = "sha256-drbhgYS8IaQdKUn/Y9ch1JBUpxbO/zpL13tcNRC3lK8="; 26 24 }; 27 25 ··· 54 52 --replace "Icon=veracrypt" "Icon=veracrypt.xpm" 55 53 ''; 56 54 57 - meta = { 55 + meta = with lib; { 58 56 description = "Free Open-Source filesystem on-the-fly encryption"; 59 57 homepage = "https://www.veracrypt.fr/"; 60 58 license = with licenses; [ asl20 /* and */ unfree /* TrueCrypt License version 3.0 */ ];
+2 -4
pkgs/applications/misc/xsuspender/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, cmake, makeWrapper, pkg-config 2 2 , glib, libwnck, procps }: 3 3 4 - with lib; 5 - 6 4 stdenv.mkDerivation rec { 7 5 pname = "xsuspender"; 8 6 version = "1.3"; ··· 21 19 22 20 postInstall = '' 23 21 wrapProgram $out/bin/xsuspender \ 24 - --prefix PATH : "${makeBinPath [ procps ]}" 22 + --prefix PATH : "${lib.makeBinPath [ procps ]}" 25 23 ''; 26 24 27 - meta = { 25 + meta = with lib; { 28 26 description = "Auto-suspend inactive X11 applications"; 29 27 homepage = "https://kernc.github.io/xsuspender/"; 30 28 license = licenses.wtfpl;
+4 -6
pkgs/applications/misc/zathura/core/default.nix
··· 6 6 , gtk-mac-integration 7 7 }: 8 8 9 - with lib; 10 - 11 9 stdenv.mkDerivation rec { 12 10 pname = "zathura"; 13 11 version = "0.5.2"; ··· 28 26 "-Dsynctex=enabled" 29 27 # Make sure tests are enabled for doCheck 30 28 "-Dtests=enabled" 31 - ] ++ optional (!stdenv.isLinux) "-Dseccomp=disabled"; 29 + ] ++ lib.optional (!stdenv.isLinux) "-Dseccomp=disabled"; 32 30 33 31 nativeBuildInputs = [ 34 32 meson ninja pkg-config desktop-file-utils python3.pkgs.sphinx ··· 38 36 buildInputs = [ 39 37 gtk girara libintl sqlite glib file librsvg 40 38 texlive.bin.core 41 - ] ++ optional stdenv.isLinux libseccomp 42 - ++ optional stdenv.isDarwin gtk-mac-integration; 39 + ] ++ lib.optional stdenv.isLinux libseccomp 40 + ++ lib.optional stdenv.isDarwin gtk-mac-integration; 43 41 44 42 doCheck = !stdenv.isDarwin; 45 43 46 - meta = { 44 + meta = with lib; { 47 45 homepage = "https://git.pwmt.org/pwmt/zathura"; 48 46 description = "A core component for zathura PDF viewer"; 49 47 license = licenses.zlib;
+6 -6
pkgs/applications/networking/appgate-sdp/default.nix
··· 38 38 , xorg 39 39 , zlib 40 40 }: 41 - with lib; 41 + 42 42 let 43 43 deps = [ 44 44 alsa-lib ··· 89 89 version = "6.0.3"; 90 90 91 91 src = fetchurl { 92 - url = "https://bin.appgate-sdp.com/${versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb"; 92 + url = "https://bin.appgate-sdp.com/${lib.versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb"; 93 93 sha256 = "sha256-UDyVPoQM78CKVWXgr08An77QTiFVmRNHwQPGaj1jAIM="; 94 94 }; 95 95 ··· 134 134 --replace "/etc/appgate.conf" "$out/etc/appgate.conf" 135 135 136 136 wrapProgram $out/opt/appgate/service/createdump \ 137 - --set LD_LIBRARY_PATH "${makeLibraryPath [ stdenv.cc.cc ]}" 137 + --set LD_LIBRARY_PATH "${lib.makeLibraryPath [ stdenv.cc.cc ]}" 138 138 139 139 wrapProgram $out/opt/appgate/appgate-driver \ 140 - --prefix PATH : ${makeBinPath [ iproute2 networkmanager dnsmasq ]} \ 140 + --prefix PATH : ${lib.makeBinPath [ iproute2 networkmanager dnsmasq ]} \ 141 141 --set LD_LIBRARY_PATH $out/opt/appgate/service 142 142 143 143 # make xdg-open overrideable at runtime 144 144 makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \ 145 - --suffix PATH : ${makeBinPath [ xdg-utils ]} \ 146 - --set LD_LIBRARY_PATH $out/opt/appgate:${makeLibraryPath deps} 145 + --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \ 146 + --set LD_LIBRARY_PATH $out/opt/appgate:${lib.makeLibraryPath deps} 147 147 148 148 wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH 149 149 '';
+4 -6
pkgs/applications/networking/browsers/chromium/browser.nix
··· 3 3 , enableWideVine, ungoogled 4 4 }: 5 5 6 - with lib; 7 - 8 6 mkChromiumDerivation (base: rec { 9 7 name = "chromium-browser"; 10 8 packageName = "chromium"; ··· 76 74 77 75 meta = { 78 76 description = "An open source web browser from Google" 79 - + optionalString ungoogled ", with dependencies on Google web services removed"; 77 + + lib.optionalString ungoogled ", with dependencies on Google web services removed"; 80 78 longDescription = '' 81 79 Chromium is an open source web browser from Google that aims to build a 82 80 safer, faster, and more stable way for all Internet users to experience ··· 86 84 homepage = if ungoogled 87 85 then "https://github.com/Eloston/ungoogled-chromium" 88 86 else "https://www.chromium.org/"; 89 - maintainers = with maintainers; if ungoogled 87 + maintainers = with lib.maintainers; if ungoogled 90 88 then [ squalus primeos michaeladler ] 91 89 else [ primeos thefloweringash ]; 92 - license = if enableWideVine then licenses.unfree else licenses.bsd3; 93 - platforms = platforms.linux; 90 + license = if enableWideVine then lib.licenses.unfree else lib.licenses.bsd3; 91 + platforms = lib.platforms.linux; 94 92 mainProgram = "chromium"; 95 93 hydraPlatforms = if (channel == "stable" || channel == "ungoogled-chromium") 96 94 then ["aarch64-linux" "x86_64-linux"]
+15 -17
pkgs/applications/networking/browsers/chromium/common.nix
··· 51 51 52 52 buildFun: 53 53 54 - with lib; 55 - 56 54 let 57 55 python3WithPackages = python3.withPackages(ps: with ps; [ 58 56 ply jinja2 setuptools ··· 75 73 let 76 74 # Serialize Nix types into GN types according to this document: 77 75 # https://source.chromium.org/gn/gn/+/master:docs/language.md 78 - mkGnString = value: "\"${escape ["\"" "$" "\\"] value}\""; 76 + mkGnString = value: "\"${lib.escape ["\"" "$" "\\"] value}\""; 79 77 sanitize = value: 80 78 if value == true then "true" 81 79 else if value == false then "false" 82 - else if isList value then "[${concatMapStringsSep ", " sanitize value}]" 83 - else if isInt value then toString value 84 - else if isString value then mkGnString value 80 + else if lib.isList value then "[${lib.concatMapStringsSep ", " sanitize value}]" 81 + else if lib.isInt value then toString value 82 + else if lib.isString value then mkGnString value 85 83 else throw "Unsupported type for GN value `${value}'."; 86 84 toFlag = key: value: "${key}=${sanitize value}"; 87 - in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs)); 85 + in attrs: lib.concatStringsSep " " (lib.attrValues (lib.mapAttrs toFlag attrs)); 88 86 89 87 # https://source.chromium.org/chromium/chromium/src/+/master:build/linux/unbundle/replace_gn_files.py 90 88 gnSystemLibraries = [ ··· 151 149 libdrm wayland mesa.drivers libxkbcommon 152 150 curl 153 151 libepoxy 154 - ] ++ optional systemdSupport systemd 155 - ++ optionals cupsSupport [ libgcrypt cups ] 156 - ++ optional pulseSupport libpulseaudio; 152 + ] ++ lib.optional systemdSupport systemd 153 + ++ lib.optionals cupsSupport [ libgcrypt cups ] 154 + ++ lib.optional pulseSupport libpulseaudio; 157 155 158 156 patches = [ 159 157 # Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed): ··· 237 235 # Allow building against system libraries in official builds 238 236 sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' tools/generate_shim_headers/generate_shim_headers.py 239 237 240 - '' + optionalString stdenv.isAarch64 '' 238 + '' + lib.optionalString stdenv.isAarch64 '' 241 239 substituteInPlace build/toolchain/linux/BUILD.gn \ 242 240 --replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""' 243 - '' + optionalString ungoogled '' 241 + '' + lib.optionalString ungoogled '' 244 242 ${ungoogler}/utils/prune_binaries.py . ${ungoogler}/pruning.list || echo "some errors" 245 243 ${ungoogler}/utils/patches.py . ${ungoogler}/patches 246 244 ${ungoogler}/utils/domain_substitution.py apply -r ${ungoogler}/domain_regex.list -f ${ungoogler}/domain_substitution.list -c ./ungoogled-domsubcache.tar.gz . ··· 300 298 # as well to avoid incompatibilities (if this continues to be a problem 301 299 # from time to time): 302 300 use_system_libwayland = true; 303 - } // optionalAttrs proprietaryCodecs { 301 + } // lib.optionalAttrs proprietaryCodecs { 304 302 # enable support for the H.264 codec 305 303 proprietary_codecs = true; 306 304 enable_hangout_services_extension = true; 307 305 ffmpeg_branding = "Chrome"; 308 - } // optionalAttrs pulseSupport { 306 + } // lib.optionalAttrs pulseSupport { 309 307 use_pulseaudio = true; 310 308 link_pulseaudio = true; 311 - } // optionalAttrs ungoogled (importTOML ./ungoogled-flags.toml) 309 + } // lib.optionalAttrs ungoogled (lib.importTOML ./ungoogled-flags.toml) 312 310 // (extraAttrs.gnFlags or {})); 313 311 314 312 configurePhase = '' ··· 317 315 # This is to ensure expansion of $out. 318 316 libExecPath="${libExecPath}" 319 317 ${python3}/bin/python3 build/linux/unbundle/replace_gn_files.py --system-libraries ${toString gnSystemLibraries} 320 - ${gnChromium}/bin/gn gen --args=${escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt 318 + ${gnChromium}/bin/gn gen --args=${lib.escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt 321 319 322 320 # Fail if `gn gen` contains a WARNING. 323 321 grep -o WARNING gn-gen-outputs.txt && echo "Found gn WARNING, exiting nix build" && exit 1 ··· 342 340 ''; 343 341 targets = extraAttrs.buildTargets or []; 344 342 commands = map buildCommand targets; 345 - in concatStringsSep "\n" commands; 343 + in lib.concatStringsSep "\n" commands; 346 344 347 345 postFixup = '' 348 346 # Make sure that libGLESv2 is found by dlopen (if using EGL).
+6 -8
pkgs/applications/networking/browsers/google-chrome/default.nix
··· 47 47 , addOpenGLRunpath 48 48 }: 49 49 50 - with lib; 51 - 52 50 let 53 51 opusWithCustomModes = libopus.override { 54 52 withCustomModes = true; ··· 68 66 bzip2 libcap at-spi2-atk at-spi2-core 69 67 libkrb5 libdrm libglvnd mesa coreutils 70 68 libxkbcommon pipewire wayland 71 - ] ++ optional pulseSupport libpulseaudio 72 - ++ optional libvaSupport libva 69 + ] ++ lib.optional pulseSupport libpulseaudio 70 + ++ lib.optional libvaSupport libva 73 71 ++ [ gtk3 ]; 74 72 75 73 suffix = if channel != "stable" then "-" + channel else ""; ··· 99 97 tar xf data.tar.xz 100 98 ''; 101 99 102 - rpath = makeLibraryPath deps + ":" + makeSearchPathOutput "lib" "lib64" deps; 103 - binpath = makeBinPath deps; 100 + rpath = lib.makeLibraryPath deps + ":" + lib.makeSearchPathOutput "lib" "lib64" deps; 101 + binpath = lib.makeBinPath deps; 104 102 105 103 installPhase = '' 106 104 runHook preInstall ··· 149 147 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH:${addOpenGLRunpath.driverLink}/share" \ 150 148 --set CHROME_WRAPPER "google-chrome-$dist" \ 151 149 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ 152 - --add-flags ${escapeShellArg commandLineArgs} 150 + --add-flags ${lib.escapeShellArg commandLineArgs} 153 151 154 152 for elf in $out/share/google/$appname/{chrome,chrome-sandbox,${crashpadHandlerBinary},nacl_helper}; do 155 153 patchelf --set-rpath $rpath $elf ··· 159 157 runHook postInstall 160 158 ''; 161 159 162 - meta = { 160 + meta = with lib; { 163 161 description = "A freeware web browser developed by Google"; 164 162 homepage = "https://www.google.com/chrome/browser/"; 165 163 license = licenses.unfree;
+11 -13
pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
··· 53 53 , extraPrefs ? "" 54 54 }: 55 55 56 - with lib; 57 - 58 56 let 59 - libPath = makeLibraryPath libPkgs; 57 + libPath = lib.makeLibraryPath libPkgs; 60 58 61 59 libPkgs = [ 62 60 atk ··· 78 76 stdenv.cc.libc 79 77 zlib 80 78 ] 81 - ++ optionals pulseaudioSupport [ libpulseaudio ] 82 - ++ optionals mediaSupport [ 79 + ++ lib.optionals pulseaudioSupport [ libpulseaudio ] 80 + ++ lib.optionals mediaSupport [ 83 81 ffmpeg 84 82 ]; 85 83 86 84 # Library search path for the fte transport 87 - fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ]; 85 + fteLibPath = lib.makeLibraryPath [ stdenv.cc.cc gmp ]; 88 86 89 87 # Upstream source 90 88 version = "11.5.8"; ··· 156 154 libPath=${libPath}:$TBB_IN_STORE:$TBB_IN_STORE/TorBrowser/Tor 157 155 158 156 # apulse uses a non-standard library path. For now special-case it. 159 - ${optionalString (audioSupport && !pulseaudioSupport) '' 157 + ${lib.optionalString (audioSupport && !pulseaudioSupport) '' 160 158 libPath=${apulse}/lib/apulse:$libPath 161 159 ''} 162 160 ··· 224 222 clearPref("security.sandbox.content.write_path_whitelist"); 225 223 ''} 226 224 227 - ${optionalString (extraPrefs != "") '' 225 + ${lib.optionalString (extraPrefs != "") '' 228 226 ${extraPrefs} 229 227 ''} 230 228 EOF ··· 251 249 GeoIPv6File $TBB_IN_STORE/TorBrowser/Data/Tor/geoip6 252 250 EOF 253 251 254 - WRAPPER_LD_PRELOAD=${optionalString useHardenedMalloc 252 + WRAPPER_LD_PRELOAD=${lib.optionalString useHardenedMalloc 255 253 "${graphene-hardened-malloc}/lib/libhardened_malloc.so"} 256 254 257 - WRAPPER_XDG_DATA_DIRS=${concatMapStringsSep ":" (x: "${x}/share") [ 255 + WRAPPER_XDG_DATA_DIRS=${lib.concatMapStringsSep ":" (x: "${x}/share") [ 258 256 gnome.adwaita-icon-theme 259 257 shared-mime-info 260 258 ]} 261 - WRAPPER_XDG_DATA_DIRS+=":"${concatMapStringsSep ":" (x: "${x}/share/gsettings-schemas/${x.name}") [ 259 + WRAPPER_XDG_DATA_DIRS+=":"${lib.concatMapStringsSep ":" (x: "${x}/share/gsettings-schemas/${x.name}") [ 262 260 glib 263 261 gsettings-desktop-schemas 264 262 gtk3 ··· 270 268 #! ${runtimeShell} 271 269 set -o errexit -o nounset 272 270 273 - PATH=${makeBinPath [ coreutils ]} 271 + PATH=${lib.makeBinPath [ coreutils ]} 274 272 export LC_ALL=C 275 273 export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive 276 274 ··· 317 315 : "\''${XDG_RUNTIME_DIR:=/run/user/\$(id -u)}" 318 316 : "\''${XDG_CONFIG_HOME:=\$REAL_HOME/.config}" 319 317 320 - ${optionalString pulseaudioSupport '' 318 + ${lib.optionalString pulseaudioSupport '' 321 319 # Figure out some envvars for pulseaudio 322 320 : "\''${PULSE_SERVER:=\$XDG_RUNTIME_DIR/pulse/native}" 323 321 : "\''${PULSE_COOKIE:=\$XDG_CONFIG_HOME/pulse/cookie}"
+1 -3
pkgs/applications/networking/cluster/k3s/default.nix
··· 25 25 , pkgsBuildBuild 26 26 }: 27 27 28 - with lib; 29 - 30 28 # k3s is a kinda weird derivation. One of the main points of k3s is the 31 29 # simplicity of it being one binary that can perform several tasks. 32 30 # However, when you have a good package manager (like nix), that doesn't ··· 73 71 # run `grep github.com/kubernetes-sigs/cri-tools go.mod | head -n1 | awk '{print $4}'` in the k3s repo at the tag 74 72 criCtlVersion = "1.26.0-rc.0-k3s1"; 75 73 76 - baseMeta = { 74 + baseMeta = with lib; { 77 75 description = "A lightweight Kubernetes distribution"; 78 76 license = licenses.asl20; 79 77 homepage = "https://k3s.io";
+5 -7
pkgs/applications/networking/cluster/spark/default.nix
··· 12 12 , R 13 13 }: 14 14 15 - with lib; 16 - 17 15 let 18 16 spark = { pname, version, sha256, extraMeta ? {} }: 19 17 stdenv.mkDerivation rec { ··· 26 24 nativeBuildInputs = [ makeWrapper ]; 27 25 buildInputs = [ jdk python3Packages.python ] 28 26 ++ extraPythonPackages 29 - ++ optional RSupport R; 27 + ++ lib.optional RSupport R; 30 28 31 29 untarDir = "${pname}-${version}"; 32 30 installPhase = '' ··· 38 36 cat > $out/lib/${untarDir}/conf/spark-env.sh <<- EOF 39 37 export JAVA_HOME="${jdk}" 40 38 export SPARK_HOME="$out/lib/${untarDir}" 41 - '' + optionalString hadoopSupport '' 39 + '' + lib.optionalString hadoopSupport '' 42 40 export SPARK_DIST_CLASSPATH=$(${hadoop}/bin/hadoop classpath) 43 41 '' + '' 44 42 export PYSPARK_PYTHON="${python3Packages.python}/bin/${python3Packages.python.executable}" 45 43 export PYTHONPATH="\$PYTHONPATH:$PYTHONPATH" 46 - ${optionalString RSupport '' 44 + ${lib.optionalString RSupport '' 47 45 export SPARKR_R_SHELL="${R}/bin/R" 48 46 export PATH="\$PATH:${R}/bin"''} 49 47 EOF ··· 64 62 meta = { 65 63 description = "Apache Spark is a fast and general engine for large-scale data processing"; 66 64 homepage = "https://spark.apache.org/"; 67 - sourceProvenance = with sourceTypes; [ binaryBytecode ]; 65 + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 68 66 license = lib.licenses.asl20; 69 67 platforms = lib.platforms.all; 70 - maintainers = with maintainers; [ thoughtpolice offline kamilchm illustris ]; 68 + maintainers = with lib.maintainers; [ thoughtpolice offline kamilchm illustris ]; 71 69 } // extraMeta; 72 70 }; 73 71 in
+1 -3
pkgs/applications/networking/droopy/default.nix
··· 1 1 { stdenv, lib, fetchFromGitHub, wrapPython, fetchpatch }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation { 6 4 pname = "droopy"; 7 5 version = "20160830"; ··· 32 30 wrapPythonPrograms 33 31 ''; 34 32 35 - meta = { 33 + meta = with lib; { 36 34 description = "Mini Web server that let others upload files to your computer"; 37 35 homepage = "http://stackp.online.fr/droopy"; 38 36 license = licenses.bsd3;
+1 -2
pkgs/applications/networking/instant-messengers/bitlbee-discord/default.nix
··· 1 1 { lib, fetchFromGitHub, stdenv, bitlbee, autoreconfHook, pkg-config, glib }: 2 2 3 - with lib; 4 3 stdenv.mkDerivation rec { 5 4 pname = "bitlbee-discord"; 6 5 version = "0.4.3"; ··· 21 20 ./autogen.sh 22 21 ''; 23 22 24 - meta = { 23 + meta = with lib; { 25 24 description = "Bitlbee plugin for Discord"; 26 25 27 26 homepage = "https://github.com/sm00th/bitlbee-discord";
+1 -2
pkgs/applications/networking/instant-messengers/bitlbee-mastodon/default.nix
··· 1 1 { lib, fetchgit, stdenv, bitlbee, autoreconfHook, pkg-config, glib }: 2 2 3 - with lib; 4 3 stdenv.mkDerivation rec { 5 4 pname = "bitlbee-mastodon"; 6 5 version = "1.4.5"; ··· 19 18 export BITLBEE_DATADIR=$out/share/bitlbee 20 19 ''; 21 20 22 - meta = { 21 + meta = with lib; { 23 22 description = "Bitlbee plugin for Mastodon"; 24 23 homepage = "https://alexschroeder.ch/cgit/bitlbee-mastodon/about"; 25 24 license = licenses.gpl2Plus;
+1 -2
pkgs/applications/networking/instant-messengers/bitlbee-steam/default.nix
··· 1 1 { lib, fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkg-config, libgcrypt }: 2 2 3 - with lib; 4 3 stdenv.mkDerivation rec { 5 4 version = "1.4.2"; 6 5 pname = "bitlbee-steam"; ··· 20 19 ./autogen.sh 21 20 ''; 22 21 23 - meta = { 22 + meta = with lib; { 24 23 description = "Steam protocol plugin for BitlBee"; 25 24 26 25 homepage = "https://github.com/jgeboski/bitlbee-steam";
+6 -7
pkgs/applications/networking/instant-messengers/bitlbee/default.nix
··· 3 3 , enablePam ? false, pam ? null 4 4 }: 5 5 6 - with lib; 7 6 stdenv.mkDerivation rec { 8 7 pname = "bitlbee"; 9 8 version = "3.6"; ··· 13 12 sha256 = "0zhhcbcr59sx9h4maf8zamzv2waya7sbsl7w74gbyilvy93dw5cz"; 14 13 }; 15 14 16 - nativeBuildInputs = [ pkg-config ] ++ optional doCheck check; 15 + nativeBuildInputs = [ pkg-config ] ++ lib.optional doCheck check; 17 16 18 17 buildInputs = [ gnutls libotr python3 ] 19 - ++ optional enableLibPurple pidgin 20 - ++ optional enablePam pam; 18 + ++ lib.optional enableLibPurple pidgin 19 + ++ lib.optional enablePam pam; 21 20 22 21 propagatedBuildInputs = [ glib ]; 23 22 ··· 25 24 "--otr=1" 26 25 "--ssl=gnutls" 27 26 "--pidfile=/var/lib/bitlbee/bitlbee.pid" 28 - ] ++ optional enableLibPurple "--purple=1" 29 - ++ optional enablePam "--pam=1"; 27 + ] ++ lib.optional enableLibPurple "--purple=1" 28 + ++ lib.optional enablePam "--pam=1"; 30 29 31 30 patches = [ 32 31 # This should be dropped once the issue is fixed upstream. ··· 46 45 47 46 enableParallelBuilding = true; 48 47 49 - meta = { 48 + meta = with lib; { 50 49 description = "IRC instant messaging gateway"; 51 50 52 51 longDescription = ''
-2
pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix
··· 1 1 { lib, runCommandLocal, bitlbee }: 2 2 3 - with lib; 4 - 5 3 plugins: runCommandLocal "bitlbee-plugins" { 6 4 inherit plugins; 7 5 buildInputs = [ bitlbee plugins ];
+3 -5
pkgs/applications/networking/instant-messengers/ratox/default.nix
··· 1 1 { lib, stdenv, fetchgit, libtoxcore 2 2 , conf ? null }: 3 3 4 - with lib; 5 - 6 4 let 7 - configFile = optionalString (conf!=null) (builtins.toFile "config.h" conf); 5 + configFile = lib.optionalString (conf!=null) (builtins.toFile "config.h" conf); 8 6 9 7 in stdenv.mkDerivation { 10 8 pname = "ratox"; ··· 22 20 substituteInPlace config.mk \ 23 21 --replace '-lsodium -lopus -lvpx ' "" 24 22 25 - ${optionalString (conf!=null) "cp ${configFile} config.def.h"} 23 + ${lib.optionalString (conf!=null) "cp ${configFile} config.def.h"} 26 24 ''; 27 25 28 26 makeFlags = [ "PREFIX=$(out)" ]; 29 27 30 - meta = { 28 + meta = with lib; { 31 29 description = "FIFO based tox client"; 32 30 homepage = "http://ratox.2f30.org/"; 33 31 license = licenses.isc;
+7 -9
pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix
··· 65 65 , MetalKit 66 66 }: 67 67 68 - with lib; 69 - 70 68 let 71 69 tg_owt = callPackage ./tg_owt.nix { 72 70 abseil-cpp = abseil-cpp.override { ··· 99 97 ./shortcuts-binary-path.patch 100 98 ]; 101 99 102 - postPatch = optionalString stdenv.isLinux '' 100 + postPatch = lib.optionalString stdenv.isLinux '' 103 101 substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp \ 104 102 --replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"' 105 103 substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp \ 106 104 --replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"' 107 105 substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp \ 108 106 --replace '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"' 109 - '' + optionalString stdenv.isDarwin '' 107 + '' + lib.optionalString stdenv.isDarwin '' 110 108 sed -i "13i#import <CoreAudio/CoreAudio.h>" Telegram/lib_webrtc/webrtc/mac/webrtc_media_devices_mac.mm 111 109 substituteInPlace Telegram/CMakeLists.txt \ 112 110 --replace 'COMMAND iconutil' 'COMMAND png2icns' \ ··· 122 120 python3 123 121 wrapQtAppsHook 124 122 removeReferencesTo 125 - ] ++ optionals stdenv.isLinux [ 123 + ] ++ lib.optionals stdenv.isLinux [ 126 124 # to build bundled libdispatch 127 125 clang 128 126 extra-cmake-modules ··· 143 141 rnnoise 144 142 tg_owt 145 143 microsoft_gsl 146 - ] ++ optionals stdenv.isLinux [ 144 + ] ++ lib.optionals stdenv.isLinux [ 147 145 kwayland 148 146 alsa-lib 149 147 libpulseaudio ··· 151 149 glibmm 152 150 jemalloc 153 151 wayland 154 - ] ++ optionals stdenv.isDarwin [ 152 + ] ++ lib.optionals stdenv.isDarwin [ 155 153 Cocoa 156 154 CoreFoundation 157 155 CoreServices ··· 192 190 "-DDESKTOP_APP_QT6=OFF" 193 191 ]; 194 192 195 - installPhase = optionalString stdenv.isDarwin '' 193 + installPhase = lib.optionalString stdenv.isDarwin '' 196 194 mkdir -p $out/Applications 197 195 cp -r Kotatogram.app $out/Applications 198 196 ln -s $out/Applications/Kotatogram.app/Contents/MacOS $out/bin ··· 209 207 inherit tg_owt; 210 208 }; 211 209 212 - meta = { 210 + meta = with lib; { 213 211 description = "Kotatogram – experimental Telegram Desktop fork"; 214 212 longDescription = '' 215 213 Unofficial desktop client for the Telegram messenger, based on Telegram Desktop.
+2 -4
pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/with-webkit.nix
··· 1 1 { stdenv, lib, kotatogram-desktop, glib-networking, webkitgtk, makeWrapper }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation { 6 4 pname = "${kotatogram-desktop.pname}-with-webkit"; 7 5 version = kotatogram-desktop.version; ··· 15 13 mkdir -p $out/bin 16 14 makeWrapper ${kotatogram-desktop}/bin/kotatogram-desktop $out/bin/kotatogram-desktop \ 17 15 --prefix GIO_EXTRA_MODULES : ${glib-networking}/lib/gio/modules \ 18 - --prefix LD_LIBRARY_PATH : ${makeLibraryPath [ webkitgtk ]} 16 + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ webkitgtk ]} 19 17 ''; 20 18 meta = kotatogram-desktop.meta // { 21 - platforms = platforms.linux; 19 + platforms = lib.platforms.linux; 22 20 }; 23 21 }
+2 -4
pkgs/applications/networking/instant-messengers/wavebox/default.nix
··· 3 3 , xorg 4 4 }: 5 5 6 - with lib; 7 - 8 6 let 9 7 bits = "x86_64"; 10 8 ··· 19 17 categories = [ "Network" ]; 20 18 }; 21 19 22 - tarball = "Wavebox_${replaceStrings ["."] ["_"] (toString version)}_linux_${bits}.tar.gz"; 20 + tarball = "Wavebox_${lib.replaceStrings ["."] ["_"] (toString version)}_linux_${bits}.tar.gz"; 23 21 24 22 in stdenv.mkDerivation { 25 23 pname = "wavebox"; ··· 40 38 alsa-lib gtk3 nss 41 39 ]; 42 40 43 - runtimeDependencies = [ (getLib udev) libnotify ]; 41 + runtimeDependencies = [ (lib.getLib udev) libnotify ]; 44 42 45 43 installPhase = '' 46 44 mkdir -p $out/bin $out/opt/wavebox
+3 -5
pkgs/applications/networking/irc/convos/default.nix
··· 2 2 , nixosTests 3 3 }: 4 4 5 - with lib; 6 - 7 5 perlPackages.buildPerlPackage rec { 8 6 pname = "convos"; 9 7 version = "7.02"; ··· 16 14 }; 17 15 18 16 nativeBuildInputs = [ makeWrapper ] 19 - ++ optionals stdenv.isDarwin [ shortenPerlShebang ]; 17 + ++ lib.optionals stdenv.isDarwin [ shortenPerlShebang ]; 20 18 21 19 buildInputs = with perlPackages; [ 22 20 CryptPassphrase CryptPassphraseArgon2 CryptPassphraseBcrypt ··· 79 77 ln -s $AUTO_SHARE_PATH/public/asset $out/asset 80 78 cp -vR templates $out/templates 81 79 cp cpanfile $out/cpanfile 82 - '' + optionalString stdenv.isDarwin '' 80 + '' + lib.optionalString stdenv.isDarwin '' 83 81 shortenPerlShebang $out/bin/convos 84 82 '' + '' 85 83 wrapProgram $out/bin/convos --set MOJO_HOME $out ··· 91 89 homepage = "https://convos.chat"; 92 90 description = "Convos is the simplest way to use IRC in your browser"; 93 91 license = lib.licenses.artistic2; 94 - maintainers = with maintainers; [ sgo ]; 92 + maintainers = with lib.maintainers; [ sgo ]; 95 93 }; 96 94 }
+3 -5
pkgs/applications/networking/mailreaders/claws-mail/default.nix
··· 52 52 , enablePluginVcalendar ? true, libical 53 53 }: 54 54 55 - with lib; 56 - 57 55 let 58 56 pythonPkgs = with python3.pkgs; [ python3 wrapPython pygobject3 ]; 59 57 ··· 130 128 131 129 buildInputs = 132 130 [ curl gsettings-desktop-schemas glib-networking gtk3 ] 133 - ++ concatMap (f: optionals f.enabled f.deps) (filter (f: f ? deps) features) 131 + ++ lib.concatMap (f: lib.optionals f.enabled f.deps) (lib.filter (f: f ? deps) features) 134 132 ; 135 133 136 134 configureFlags = ··· 141 139 142 140 "--disable-gdata-plugin" # Complains about missing libgdata, even when provided 143 141 ] ++ 144 - (map (feature: map (flag: strings.enableFeature feature.enabled flag) feature.flags) features); 142 + (map (feature: map (flag: lib.strings.enableFeature feature.enabled flag) feature.flags) features); 145 143 146 144 enableParallelBuilding = true; 147 145 ··· 155 153 cp claws-mail.desktop $out/share/applications 156 154 ''; 157 155 158 - meta = { 156 + meta = with lib; { 159 157 description = "The user-friendly, lightweight, and fast email client"; 160 158 homepage = "https://www.claws-mail.org/"; 161 159 license = licenses.gpl3Plus;
+6 -8
pkgs/applications/networking/mailreaders/sylpheed/default.nix
··· 4 4 assert gpgSupport -> gpgme != null; 5 5 assert sslSupport -> openssl != null; 6 6 7 - with lib; 8 - 9 7 stdenv.mkDerivation rec { 10 8 pname = "sylpheed"; 11 9 version = "3.7.0"; ··· 33 31 nativeBuildInputs = [ pkg-config ]; 34 32 35 33 buildInputs = [ gtk2 ] 36 - ++ optionals gpgSupport [ gpgme ] 37 - ++ optionals sslSupport [ openssl ] 38 - ++ optionals stdenv.isDarwin [ Foundation ]; 34 + ++ lib.optionals gpgSupport [ gpgme ] 35 + ++ lib.optionals sslSupport [ openssl ] 36 + ++ lib.optionals stdenv.isDarwin [ Foundation ]; 39 37 40 - configureFlags = optional gpgSupport "--enable-gpgme" 41 - ++ optional sslSupport "--enable-ssl"; 38 + configureFlags = lib.optional gpgSupport "--enable-gpgme" 39 + ++ lib.optional sslSupport "--enable-ssl"; 42 40 43 41 # Undefined symbols for architecture arm64: "_OBJC_CLASS_$_NSAutoreleasePool" 44 42 NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework Foundation"; 45 43 46 - meta = { 44 + meta = with lib; { 47 45 homepage = "https://sylpheed.sraoss.jp/en/"; 48 46 description = "Lightweight and user-friendly e-mail client"; 49 47 maintainers = with maintainers; [ eelco ];
+7 -8
pkgs/applications/networking/p2p/qbittorrent/default.nix
··· 9 9 assert guiSupport -> (dbus != null); 10 10 assert trackerSearch -> (python3 != null); 11 11 12 - with lib; 13 12 mkDerivation rec { 14 13 pname = "qbittorrent"; 15 14 version = "4.4.5"; ··· 27 26 nativeBuildInputs = [ pkg-config ]; 28 27 29 28 buildInputs = [ boost libtorrent-rasterbar qtbase qttools qtsvg ] 30 - ++ optional guiSupport dbus # D(esktop)-Bus depends on GUI support 31 - ++ optional trackerSearch python3; 29 + ++ lib.optional guiSupport dbus # D(esktop)-Bus depends on GUI support 30 + ++ lib.optional trackerSearch python3; 32 31 33 32 # Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist. 34 33 QMAKE_LRELEASE = "lrelease"; ··· 36 35 configureFlags = [ 37 36 "--with-boost-libdir=${boost.out}/lib" 38 37 "--with-boost=${boost.dev}" ] 39 - ++ optionals (!guiSupport) [ "--disable-gui" "--enable-systemd" ] # Also place qbittorrent-nox systemd service files 40 - ++ optional (!webuiSupport) "--disable-webui" 41 - ++ optional debugSupport "--enable-debug"; 38 + ++ lib.optionals (!guiSupport) [ "--disable-gui" "--enable-systemd" ] # Also place qbittorrent-nox systemd service files 39 + ++ lib.optional (!webuiSupport) "--disable-webui" 40 + ++ lib.optional debugSupport "--enable-debug"; 42 41 43 - qtWrapperArgs = optional trackerSearch "--prefix PATH : ${makeBinPath [ python3 ]}"; 42 + qtWrapperArgs = lib.optional trackerSearch "--prefix PATH : ${lib.makeBinPath [ python3 ]}"; 44 43 45 44 postInstall = lib.optionalString stdenv.isDarwin '' 46 45 mkdir -p $out/{Applications,bin} ··· 48 47 makeWrapper $out/{Applications/qbittorrent.app/Contents/MacOS,bin}/qbittorrent 49 48 ''; 50 49 51 - meta = { 50 + meta = with lib; { 52 51 description = "Featureful free software BitTorrent client"; 53 52 homepage = "https://www.qbittorrent.org/"; 54 53 changelog = "https://github.com/qbittorrent/qBittorrent/blob/release-${version}/Changelog";
+6 -8
pkgs/applications/networking/sniffers/wireshark/default.nix
··· 8 8 9 9 assert withQt -> qt5 != null; 10 10 11 - with lib; 12 - 13 11 let 14 12 version = "4.0.2"; 15 13 variant = if withQt then "qt" else "cli"; ··· 39 37 NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ]; 40 38 41 39 nativeBuildInputs = [ asciidoctor bison cmake flex makeWrapper pkg-config python3 perl ] 42 - ++ optionals withQt [ qt5.wrapQtAppsHook wrapGAppsHook ]; 40 + ++ lib.optionals withQt [ qt5.wrapQtAppsHook wrapGAppsHook ]; 43 41 44 42 depsBuildBuild = [ buildPackages.stdenv.cc ]; 45 43 46 44 buildInputs = [ 47 45 gettext pcre2 libpcap lua5 libssh nghttp2 openssl libgcrypt 48 46 libgpg-error gnutls geoip c-ares glib zlib 49 - ] ++ optionals withQt (with qt5; [ qtbase qtmultimedia qtsvg qttools ]) 50 - ++ optionals stdenv.isLinux [ libcap libnl ] 51 - ++ optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ] 52 - ++ optionals (withQt && stdenv.isDarwin) (with qt5; [ qtmacextras ]); 47 + ] ++ lib.optionals withQt (with qt5; [ qtbase qtmultimedia qtsvg qttools ]) 48 + ++ lib.optionals stdenv.isLinux [ libcap libnl ] 49 + ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ] 50 + ++ lib.optionals (withQt && stdenv.isDarwin) (with qt5; [ qtmacextras ]); 53 51 54 52 strictDeps = true; 55 53 ··· 72 70 install_name_tool -change "$dylib" "$out/lib/$dylib" "$f" 73 71 done 74 72 done 75 - '' else optionalString withQt '' 73 + '' else lib.optionalString withQt '' 76 74 pwd 77 75 install -Dm644 -t $out/share/applications ../resources/freedesktop/org.wireshark.Wireshark.desktop 78 76
+8 -10
pkgs/applications/networking/znc/default.nix
··· 9 9 , withDebug ? false 10 10 }: 11 11 12 - with lib; 13 - 14 12 stdenv.mkDerivation rec { 15 13 pname = "znc"; 16 14 version = "1.8.2"; ··· 23 21 nativeBuildInputs = [ pkg-config ]; 24 22 25 23 buildInputs = [ openssl ] 26 - ++ optional withPerl perl 27 - ++ optional withPython python3 28 - ++ optional withTcl tcl 29 - ++ optional withCyrus cyrus_sasl 30 - ++ optional withUnicode icu 31 - ++ optional withZlib zlib; 24 + ++ lib.optional withPerl perl 25 + ++ lib.optional withPython python3 26 + ++ lib.optional withTcl tcl 27 + ++ lib.optional withCyrus cyrus_sasl 28 + ++ lib.optional withUnicode icu 29 + ++ lib.optional withZlib zlib; 32 30 33 31 configureFlags = [ 34 32 (lib.enableFeature withPerl "perl") ··· 36 34 (lib.enableFeature withTcl "tcl") 37 35 (lib.withFeatureAs withTcl "tcl" "${tcl}/lib") 38 36 (lib.enableFeature withCyrus "cyrus") 39 - ] ++ optionals (!withIPv6) [ "--disable-ipv6" ] 40 - ++ optionals withDebug [ "--enable-debug" ]; 37 + ] ++ lib.optionals (!withIPv6) [ "--disable-ipv6" ] 38 + ++ lib.optionals withDebug [ "--enable-debug" ]; 41 39 42 40 enableParallelBuilding = true; 43 41