lol

treewide: remove global with lib; in pkgs/tools

+153 -235
+1 -3
pkgs/tools/X11/xpra/default.nix
··· 36 36 , xorgserver 37 37 }: 38 38 39 - with lib; 40 - 41 39 let 42 40 inherit (python3.pkgs) cython buildPythonApplication; 43 41 ··· 206 204 updateScript = ./update.sh; 207 205 }; 208 206 209 - meta = { 207 + meta = with lib; { 210 208 homepage = "https://xpra.org/"; 211 209 downloadPage = "https://xpra.org/src/"; 212 210 description = "Persistent remote applications for X";
+3 -5
pkgs/tools/admin/pulumi-bin/default.nix
··· 1 1 { lib, stdenv, fetchurl, autoPatchelfHook, makeWrapper, installShellFiles }: 2 2 3 - with lib; 4 - 5 3 let 6 4 data = import ./data.nix {}; 7 5 in stdenv.mkDerivation { ··· 16 14 17 15 installPhase = '' 18 16 install -D -t $out/bin/ * 19 - '' + optionalString stdenv.isLinux '' 17 + '' + lib.optionalString stdenv.isLinux '' 20 18 wrapProgram $out/bin/pulumi --set LD_LIBRARY_PATH "${stdenv.cc.cc.lib}/lib" 21 19 '' + '' 22 20 installShellCompletion --cmd pulumi \ ··· 25 23 --zsh <($out/bin/pulumi completion zsh) 26 24 ''; 27 25 28 - nativeBuildInputs = [ installShellFiles ] ++ optionals stdenv.isLinux [ autoPatchelfHook makeWrapper ]; 26 + nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook makeWrapper ]; 29 27 30 - meta = { 28 + meta = with lib; { 31 29 homepage = "https://pulumi.io/"; 32 30 description = "Pulumi is a cloud development platform that makes creating cloud programs easy and productive"; 33 31 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
-2
pkgs/tools/admin/tigervnc/default.nix
··· 23 23 , nixosTests 24 24 }: 25 25 26 - with lib; 27 - 28 26 stdenv.mkDerivation rec { 29 27 version = "1.12.0"; 30 28 pname = "tigervnc";
+2 -4
pkgs/tools/backup/bup/default.nix
··· 7 7 8 8 let version = "0.32"; in 9 9 10 - with lib; 11 - 12 10 stdenv.mkDerivation { 13 11 pname = "bup"; 14 12 inherit version; ··· 31 29 postPatch = '' 32 30 patchShebangs . 33 31 substituteInPlace Makefile --replace "-Werror" "" 34 - '' + optionalString par2Support '' 32 + '' + lib.optionalString par2Support '' 35 33 substituteInPlace cmd/fsck-cmd.py --replace "'par2'" "'${par2cmdline}/bin/par2'" 36 34 ''; 37 35 ··· 49 47 --prefix PATH : ${git}/bin 50 48 ''; 51 49 52 - meta = { 50 + meta = with lib; { 53 51 homepage = "https://github.com/bup/bup"; 54 52 description = "Efficient file backup system based on the git packfile format"; 55 53 license = licenses.gpl2Plus;
+1 -2
pkgs/tools/backup/luckybackup/default.nix
··· 3 3 , rsync, ssh 4 4 }: 5 5 6 - with lib; 7 6 mkDerivation rec { 8 7 pname = "luckybackup"; 9 8 version = "0.5.0"; ··· 26 25 done 27 26 ''; 28 27 29 - meta = { 28 + meta = with lib; { 30 29 description = "A powerful, fast and reliable backup & sync tool"; 31 30 longDescription = '' 32 31 luckyBackup is an application for data back-up and synchronization
+3 -5
pkgs/tools/bluetooth/bluez-alsa/default.nix
··· 9 9 # TODO: aptxSupport 10 10 }: 11 11 12 - with lib; 13 - 14 12 stdenv.mkDerivation rec { 15 13 pname = "bluez-alsa"; 16 14 version = "4.0.0"; ··· 28 26 alsa-lib bluez glib sbc dbus 29 27 readline libbsd ncurses 30 28 ] 31 - ++ optional aacSupport fdk_aac; 29 + ++ lib.optional aacSupport fdk_aac; 32 30 33 31 configureFlags = [ 34 32 "--with-alsaplugindir=${placeholder "out"}/lib/alsa-lib" ··· 36 34 "--enable-rfcomm" 37 35 "--enable-hcitop" 38 36 ] 39 - ++ optional aacSupport "--enable-aac"; 37 + ++ lib.optional aacSupport "--enable-aac"; 40 38 41 - meta = { 39 + meta = with lib; { 42 40 description = "Bluez 5 Bluetooth Audio ALSA Backend"; 43 41 longDescription = '' 44 42 Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
+1 -3
pkgs/tools/filesystems/squashfuse/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, autoreconfHook, libtool, fuse, 2 2 pkg-config, lz4, xz, zlib, lzo, zstd }: 3 3 4 - with lib; 5 - 6 4 stdenv.mkDerivation rec { 7 5 8 6 pname = "squashfuse"; ··· 22 20 description = "FUSE filesystem to mount squashfs archives"; 23 21 homepage = "https://github.com/vasi/squashfuse"; 24 22 maintainers = [ ]; 25 - platforms = platforms.unix; 23 + platforms = lib.platforms.unix; 26 24 license = "BSD-2-Clause"; 27 25 }; 28 26 }
+4 -6
pkgs/tools/graphics/gifsicle/default.nix
··· 3 3 , static ? stdenv.hostPlatform.isStatic 4 4 }: 5 5 6 - with lib; 7 - 8 6 stdenv.mkDerivation rec { 9 7 pname = "gifsicle"; 10 8 version = "1.93"; ··· 14 12 sha256 = "sha256-kvZweXMr9MHaCH5q4JBSBYRuWsd3ulyqZtEqc6qUNEc="; 15 13 }; 16 14 17 - buildInputs = optionals gifview [ xorgproto libXt libX11 ]; 15 + buildInputs = lib.optionals gifview [ xorgproto libXt libX11 ]; 18 16 19 - configureFlags = optional (!gifview) "--disable-gifview"; 17 + configureFlags = lib.optional (!gifview) "--disable-gifview"; 20 18 21 - LDFLAGS = optionalString static "-static"; 19 + LDFLAGS = lib.optionalString static "-static"; 22 20 23 21 doCheck = true; 24 22 checkPhase = '' ··· 29 27 description = "Command-line tool for creating, editing, and getting information about GIF images and animations"; 30 28 homepage = "https://www.lcdf.org/gifsicle/"; 31 29 license = lib.licenses.gpl2; 32 - platforms = platforms.all; 30 + platforms = lib.platforms.all; 33 31 maintainers = with lib.maintainers; [ zimbatm ]; 34 32 }; 35 33 }
+2 -4
pkgs/tools/graphics/ldgallery/viewer/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, pkgs, pandoc, CoreServices }: 2 2 3 - with lib; 4 - 5 3 let 6 4 # Note for maintainers: 7 5 # * keep version in sync with the ldgallery compiler ··· 21 19 nodePkg = nodePackages.package.override { 22 20 src = "${sourcePkg}/viewer"; 23 21 postInstall = "npm run build"; 24 - buildInputs = optionals stdenv.isDarwin [ CoreServices ]; 22 + buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; 25 23 }; 26 24 27 25 in 28 26 29 27 # making sure that the source and the node package are in sync 30 - assert versions.majorMinor nodePkg.version == removePrefix "v" sourcePkg.rev; 28 + assert lib.versions.majorMinor nodePkg.version == lib.removePrefix "v" sourcePkg.rev; 31 29 32 30 stdenv.mkDerivation { 33 31 pname = nodePkg.packageName;
+1 -3
pkgs/tools/graphics/optipng/default.nix
··· 4 4 5 5 # This package comes with its own copy of zlib, libpng and pngxtern 6 6 7 - with lib; 8 - 9 7 stdenv.mkDerivation rec { 10 8 pname = "optipng"; 11 9 version = "0.7.7"; ··· 17 15 18 16 buildInputs = [ libpng ]; 19 17 20 - LDFLAGS = optional static "-static"; 18 + LDFLAGS = lib.optional static "-static"; 21 19 # Workaround for crash in cexcept.h. See 22 20 # https://github.com/NixOS/nixpkgs/issues/28106 23 21 preConfigure = ''
-1
pkgs/tools/graphics/pgf/default.nix
··· 1 1 { lib, stdenv, fetchurl, autoconf, automake, libtool, dos2unix, libpgf, freeimage, doxygen }: 2 2 3 - with lib; 4 3 stdenv.mkDerivation rec { 5 4 pname = "pgf"; 6 5 version = "6.14.12";
+6 -8
pkgs/tools/inputmethods/ibus/default.nix
··· 34 34 , nixosTests 35 35 }: 36 36 37 - with lib; 38 - 39 37 let 40 38 python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]); 41 39 python3BuildEnv = python3.buildEnv.override { ··· 88 86 89 87 configureFlags = [ 90 88 "--disable-memconf" 91 - (enableFeature (dconf != null) "dconf") 92 - (enableFeature (libnotify != null) "libnotify") 93 - (enableFeature withWayland "wayland") 94 - (enableFeature enableUI "ui") 89 + (lib.enableFeature (dconf != null) "dconf") 90 + (lib.enableFeature (libnotify != null) "libnotify") 91 + (lib.enableFeature withWayland "wayland") 92 + (lib.enableFeature enableUI "ui") 95 93 "--enable-gtk4" 96 94 "--enable-install-tests" 97 95 "--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji" ··· 133 131 isocodes 134 132 json-glib 135 133 libnotify 136 - ] ++ optionals withWayland [ 134 + ] ++ lib.optionals withWayland [ 137 135 libxkbcommon 138 136 wayland 139 137 ]; ··· 165 163 }; 166 164 }; 167 165 168 - meta = { 166 + meta = with lib; { 169 167 homepage = "https://github.com/ibus/ibus"; 170 168 description = "Intelligent Input Bus, input method framework"; 171 169 license = licenses.lgpl21Plus;
+20 -22
pkgs/tools/inputmethods/uim/default.nix
··· 18 18 , withMisc ? false, libeb ? null 19 19 }: 20 20 21 - with lib; 22 - 23 21 assert withGtk2 -> gtk2 != null; 24 22 assert withGtk3 -> gtk3 != null; 25 23 ··· 59 57 buildInputs = [ 60 58 ncurses m17n_lib m17n_db expat 61 59 ] 62 - ++ optional withAnthy anthy 63 - ++ optional withGtk2 gtk2 64 - ++ optional withGtk3 gtk3 65 - ++ optional withQt4 qt4 66 - ++ optionals withQt5 [ qt5.qtbase.bin qt5.qtbase.dev ] 67 - ++ optional withLibnotify libnotify 68 - ++ optional withSqlite sqlite 69 - ++ optionals withNetworking [ 60 + ++ lib.optional withAnthy anthy 61 + ++ lib.optional withGtk2 gtk2 62 + ++ lib.optional withGtk3 gtk3 63 + ++ lib.optional withQt4 qt4 64 + ++ lib.optionals withQt5 [ qt5.qtbase.bin qt5.qtbase.dev ] 65 + ++ lib.optional withLibnotify libnotify 66 + ++ lib.optional withSqlite sqlite 67 + ++ lib.optionals withNetworking [ 70 68 curl openssl 71 69 ] 72 - ++ optional withFFI libffi 73 - ++ optional withMisc libeb; 70 + ++ lib.optional withFFI libffi 71 + ++ lib.optional withMisc libeb; 74 72 75 73 prePatch = '' 76 74 patchShebangs *.sh */*.sh */*/*.sh ··· 113 111 "--with-xft" 114 112 "--with-expat=${expat.dev}" 115 113 ] 116 - ++ optional withAnthy "--with-anthy-utf8" 117 - ++ optional withGtk2 "--with-gtk2" 118 - ++ optional withGtk3 "--with-gtk3" 119 - ++ optionals withQt4 [ 114 + ++ lib.optional withAnthy "--with-anthy-utf8" 115 + ++ lib.optional withGtk2 "--with-gtk2" 116 + ++ lib.optional withGtk3 "--with-gtk3" 117 + ++ lib.optionals withQt4 [ 120 118 "--with-qt4" 121 119 "--with-qt4-immodule" 122 120 ] 123 - ++ optionals withQt5 [ 121 + ++ lib.optionals withQt5 [ 124 122 "--with-qt5" 125 123 "--with-qt5-immodule" 126 124 ] 127 - ++ optional withLibnotify "--enable-notify=libnotify" 128 - ++ optional withSqlite "--with-sqlite3" 129 - ++ optionals withNetworking [ 125 + ++ lib.optional withLibnotify "--enable-notify=libnotify" 126 + ++ lib.optional withSqlite "--with-sqlite3" 127 + ++ lib.optionals withNetworking [ 130 128 "--with-curl" 131 129 "--with-openssl-dir=${openssl.dev}" 132 130 ] 133 - ++ optional withFFI "--with-ffi" 134 - ++ optional withMisc "--with-eb"; 131 + ++ lib.optional withFFI "--with-ffi" 132 + ++ lib.optional withMisc "--with-eb"; 135 133 136 134 # TODO: things in `./configure --help`, but not in nixpkgs 137 135 #--with-canna Use Canna [default=no]
+1 -3
pkgs/tools/misc/catimg/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, cmake } : 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "catimg"; 7 5 version = "2.7.0"; ··· 15 13 16 14 nativeBuildInputs = [ cmake ]; 17 15 18 - meta = { 16 + meta = with lib; { 19 17 license = licenses.mit; 20 18 homepage = "https://github.com/posva/catimg"; 21 19 description = "Insanely fast image printing in your terminal";
+1 -3
pkgs/tools/misc/desktop-file-utils/default.nix
··· 1 1 { lib, stdenv, fetchurl, pkg-config, meson, ninja, glib, libintl }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "desktop-file-utils"; 7 5 version = "0.26"; ··· 21 19 22 20 setupHook = ./setup-hook.sh; 23 21 24 - meta = { 22 + meta = with lib; { 25 23 homepage = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"; 26 24 description = "Command line utilities for working with .desktop files"; 27 25 platforms = platforms.linux ++ platforms.darwin;
+8 -9
pkgs/tools/misc/grub/2.0x.nix
··· 13 13 , kbdcompSupport ? false, ckbcomp 14 14 }: 15 15 16 - with lib; 17 16 let 18 17 pcSystems = { 19 18 i686-linux.target = "i386"; ··· 40 39 riscv64-linux.target = "riscv64"; 41 40 }; 42 41 43 - canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild); 44 - inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); 42 + canEfi = lib.any (system: stdenv.hostPlatform.system == system) (lib.mapAttrsToList (name: _: name) efiSystemsBuild); 43 + inPCSystems = lib.any (system: stdenv.hostPlatform.system == system) (lib.mapAttrsToList (name: _: name) pcSystems); 45 44 46 45 version = "2.06"; 47 46 ··· 330 329 depsBuildBuild = [ buildPackages.stdenv.cc ]; 331 330 nativeBuildInputs = [ bison flex python3 pkg-config gettext freetype autoreconfHook ]; 332 331 buildInputs = [ ncurses libusb-compat-0_1 freetype lvm2 fuse libtool bash ] 333 - ++ optional doCheck qemu 334 - ++ optional zfsSupport zfs; 332 + ++ lib.optional doCheck qemu 333 + ++ lib.optional zfsSupport zfs; 335 334 336 335 strictDeps = true; 337 336 ··· 369 368 370 369 configureFlags = [ 371 370 "--enable-grub-mount" # dep of os-prober 372 - ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 371 + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 373 372 # grub doesn't do cross-compilation as usual and tries to use unprefixed 374 373 # tools to target the host. Provide toolchain information explicitly for 375 374 # cross builds. ··· 380 379 "TARGET_OBJCOPY=${stdenv.cc.targetPrefix}objcopy" 381 380 "TARGET_RANLIB=${stdenv.cc.targetPrefix}ranlib" 382 381 "TARGET_STRIP=${stdenv.cc.targetPrefix}strip" 383 - ] ++ optional zfsSupport "--enable-libzfs" 384 - ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ] 385 - ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"]; 382 + ] ++ lib.optional zfsSupport "--enable-libzfs" 383 + ++ lib.optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ] 384 + ++ lib.optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"]; 386 385 387 386 # save target that grub is compiled for 388 387 grubTarget = if efiSupport
-1
pkgs/tools/misc/grub/pvgrub_image/default.nix
··· 1 1 { lib, stdenv, grub2_xen }: 2 2 3 - with lib; 4 3 let 5 4 efiSystemsBuild = { 6 5 i686-linux.target = "i386";
+2 -3
pkgs/tools/misc/grub/trusted.nix
··· 18 18 , for_HP_laptop ? false 19 19 }: 20 20 21 - with lib; 22 21 let 23 22 pcSystems = { 24 23 i686-linux.target = "i386"; 25 24 x86_64-linux.target = "i386"; 26 25 }; 27 26 28 - inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems); 27 + inPCSystems = lib.any (system: stdenv.hostPlatform.system == system) (lib.mapAttrsToList (name: _: name) pcSystems); 29 28 30 29 version = if for_HP_laptop then "1.2.1" else "1.2.0"; 31 30 ··· 59 58 60 59 nativeBuildInputs = [ autogen flex bison python2 autoconf automake ]; 61 60 buildInputs = [ ncurses libusb-compat-0_1 freetype gettext lvm2 ] 62 - ++ optional doCheck qemu; 61 + ++ lib.optional doCheck qemu; 63 62 64 63 hardeningDisable = [ "stackprotector" "pic" ]; 65 64
+1 -3
pkgs/tools/misc/hexd/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "hexd"; 7 5 version = "1.1.0"; ··· 15 13 16 14 makeFlags = [ "PREFIX=$(out)" ]; 17 15 18 - meta = { 16 + meta = with lib; { 19 17 description = "Colourful, human-friendly hexdump tool"; 20 18 homepage = "https://github.com/FireyFly/hexd"; 21 19 maintainers = [ maintainers.FireyFly ];
+2 -4
pkgs/tools/misc/logstash/6.x.nix
··· 7 7 , jre 8 8 }: 9 9 10 - with lib; 11 - 12 10 let this = stdenv.mkDerivation rec { 13 11 version = elk6Version; 14 - pname = "logstash${optionalString (!enableUnfree) "-oss"}"; 12 + pname = "logstash${lib.optionalString (!enableUnfree) "-oss"}"; 15 13 16 14 src = fetchurl { 17 15 url = "https://artifacts.elastic.co/downloads/logstash/${pname}-${version}.tar.gz"; ··· 63 61 maintainers = with maintainers; [ wjlroe offline basvandijk ]; 64 62 }; 65 63 passthru.tests = 66 - optionalAttrs (!enableUnfree) ( 64 + lib.optionalAttrs (!enableUnfree) ( 67 65 assert this.drvPath == nixosTests.elk.ELK-6.elkPackages.logstash.drvPath; 68 66 { 69 67 elk = nixosTests.elk.ELK-6;
+5 -7
pkgs/tools/misc/logstash/7.x.nix
··· 9 9 , jre 10 10 }: 11 11 12 - with lib; 13 - 14 12 let 15 - info = splitString "-" stdenv.hostPlatform.system; 16 - arch = elemAt info 0; 17 - plat = elemAt info 1; 13 + info = lib.splitString "-" stdenv.hostPlatform.system; 14 + arch = lib.elemAt info 0; 15 + plat = lib.elemAt info 1; 18 16 shas = 19 17 if enableUnfree 20 18 then { ··· 29 27 }; 30 28 this = stdenv.mkDerivation rec { 31 29 version = elk7Version; 32 - pname = "logstash${optionalString (!enableUnfree) "-oss"}"; 30 + pname = "logstash${lib.optionalString (!enableUnfree) "-oss"}"; 33 31 34 32 35 33 src = fetchurl { ··· 79 77 maintainers = with maintainers; [ wjlroe offline basvandijk ]; 80 78 }; 81 79 passthru.tests = 82 - optionalAttrs (config.allowUnfree && enableUnfree) ( 80 + lib.optionalAttrs (config.allowUnfree && enableUnfree) ( 83 81 assert this.drvPath == nixosTests.elk.unfree.ELK-7.elkPackages.logstash.drvPath; 84 82 { 85 83 elk = nixosTests.elk.unfree.ELK-7;
+2 -3
pkgs/tools/misc/moreutils/default.nix
··· 11 11 , darwin 12 12 }: 13 13 14 - with lib; 15 14 stdenv.mkDerivation rec { 16 15 pname = "moreutils"; 17 16 version = "0.67"; ··· 28 27 29 28 strictDeps = true; 30 29 nativeBuildInputs = [ makeWrapper perl libxml2 libxslt docbook-xsl docbook_xml_dtd_44 ]; 31 - buildInputs = optional stdenv.isDarwin darwin.cctools; 30 + buildInputs = lib.optional stdenv.isDarwin darwin.cctools; 32 31 33 32 propagatedBuildInputs = with perlPackages; [ perl IPCRun TimeDate TimeDuration ]; 34 33 ··· 40 39 wrapProgram $out/bin/ts --prefix PERL5LIB : $PERL5LIB 41 40 ''; 42 41 43 - meta = { 42 + meta = with lib; { 44 43 description = "Growing collection of the unix tools that nobody thought to write long ago when unix was young"; 45 44 homepage = "https://joeyh.name/code/moreutils/"; 46 45 maintainers = with maintainers; [ koral pSub ];
+1 -3
pkgs/tools/misc/pixd/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "pixd"; 7 5 version = "1.0.0"; ··· 15 13 16 14 makeFlags = [ "PREFIX=$(out)" ]; 17 15 18 - meta = { 16 + meta = with lib; { 19 17 description = "Colourful visualization tool for binary files"; 20 18 homepage = "https://github.com/FireyFly/pixd"; 21 19 maintainers = [ maintainers.FireyFly ];
+1 -2
pkgs/tools/misc/rmlint/default.nix
··· 20 20 21 21 assert withGui -> !stdenv.isDarwin; 22 22 23 - with lib; 24 23 stdenv.mkDerivation rec { 25 24 pname = "rmlint"; 26 25 version = "2.10.1"; ··· 78 77 gappsWrapperArgs+=(--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${python3.pkgs.pygobject3}):$(toPythonPath ${python3.pkgs.pycairo})") 79 78 ''; 80 79 81 - meta = { 80 + meta = with lib; { 82 81 description = "Extremely fast tool to remove duplicates and other lint from your filesystem"; 83 82 homepage = "https://rmlint.readthedocs.org"; 84 83 platforms = platforms.unix;
+10 -11
pkgs/tools/networking/dnsmasq/default.nix
··· 5 5 , nixosTests 6 6 }: 7 7 8 - with lib; 9 8 let 10 - copts = concatStringsSep " " ([ 9 + copts = lib.concatStringsSep " " ([ 11 10 "-DHAVE_IDN" 12 11 "-DHAVE_DNSSEC" 13 - ] ++ optionals dbusSupport [ 12 + ] ++ lib.optionals dbusSupport [ 14 13 "-DHAVE_DBUS" 15 - ] ++ optionals stdenv.isLinux [ 14 + ] ++ lib.optionals stdenv.isLinux [ 16 15 "-DHAVE_CONNTRACK" 17 16 ]); 18 17 in ··· 43 42 44 43 hardeningEnable = [ "pie" ]; 45 44 46 - postBuild = optionalString stdenv.isLinux '' 45 + postBuild = lib.optionalString stdenv.isLinux '' 47 46 make -C contrib/lease-tools 48 47 ''; 49 48 ··· 51 50 # module can create it in Nix-land? 52 51 postInstall = '' 53 52 install -Dm644 trust-anchors.conf $out/share/dnsmasq/trust-anchors.conf 54 - '' + optionalString stdenv.isDarwin '' 53 + '' + lib.optionalString stdenv.isDarwin '' 55 54 install -Dm644 contrib/MacOSX-launchd/uk.org.thekelleys.dnsmasq.plist \ 56 55 $out/Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist 57 56 substituteInPlace $out/Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist \ 58 57 --replace "/usr/local/sbin" "$out/bin" 59 - '' + optionalString stdenv.isLinux '' 58 + '' + lib.optionalString stdenv.isLinux '' 60 59 install -Dm755 contrib/lease-tools/dhcp_lease_time $out/bin/dhcp_lease_time 61 60 install -Dm755 contrib/lease-tools/dhcp_release $out/bin/dhcp_release 62 61 install -Dm755 contrib/lease-tools/dhcp_release6 $out/bin/dhcp_release6 63 62 64 - '' + optionalString dbusSupport '' 63 + '' + lib.optionalString dbusSupport '' 65 64 install -Dm644 dbus/dnsmasq.conf $out/share/dbus-1/system.d/dnsmasq.conf 66 65 mkdir -p $out/share/dbus-1/system-services 67 66 cat <<END > $out/share/dbus-1/system-services/uk.org.thekelleys.dnsmasq.service ··· 75 74 76 75 nativeBuildInputs = [ pkg-config ]; 77 76 buildInputs = [ nettle libidn ] 78 - ++ optionals dbusSupport [ dbus ] 79 - ++ optionals stdenv.isLinux [ libnetfilter_conntrack ]; 77 + ++ lib.optionals dbusSupport [ dbus ] 78 + ++ lib.optionals stdenv.isLinux [ libnetfilter_conntrack ]; 80 79 81 80 passthru.tests = { 82 81 prometheus-exporter = nixosTests.prometheus-exporters.dnsmasq; ··· 87 86 kubernetes-dns-multi = nixosTests.kubernetes.dns-multi-node; 88 87 }; 89 88 90 - meta = { 89 + meta = with lib; { 91 90 description = "An integrated DNS, DHCP and TFTP server for small networks"; 92 91 homepage = "https://www.thekelleys.org.uk/dnsmasq/doc.html"; 93 92 license = licenses.gpl2;
+1 -3
pkgs/tools/networking/flannel/default.nix
··· 1 1 { lib, buildGoModule, fetchFromGitHub, nixosTests }: 2 2 3 - with lib; 4 - 5 3 buildGoModule rec { 6 4 pname = "flannel"; 7 5 version = "0.20.2"; ··· 23 21 24 22 passthru.tests = { inherit (nixosTests) flannel; }; 25 23 26 - meta = { 24 + meta = with lib; { 27 25 description = "Network fabric for containers, designed for Kubernetes"; 28 26 license = licenses.asl20; 29 27 homepage = "https://github.com/flannel-io/flannel";
-2
pkgs/tools/networking/logmein-hamachi/default.nix
··· 1 1 { lib, stdenv, fetchurl }: 2 2 3 - with lib; 4 - 5 3 let 6 4 arch = 7 5 if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
+2 -4
pkgs/tools/networking/ndjbdns/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, autoreconfHook, systemd, pkg-config }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation { 6 4 version = "1.06"; 7 5 pname = "ndjbdns"; ··· 15 13 16 14 nativeBuildInputs = [ autoreconfHook pkg-config ]; 17 15 buildInputs = [ ] 18 - ++ optional stdenv.isLinux systemd; 16 + ++ lib.optional stdenv.isLinux systemd; 19 17 20 - meta = { 18 + meta = with lib; { 21 19 description = "A brand new release of the Djbdns"; 22 20 longDescription = '' 23 21 Djbdns is a fully‐fledged Domain Name System(DNS), originally written by the eminent author of qmail, Dr. D J Bernstein.
+2 -4
pkgs/tools/networking/ngrok/default.nix
··· 1 1 { lib, stdenv, fetchurl }: 2 2 3 - with lib; 4 - 5 3 let versions = lib.importJSON ./versions.json; 6 4 arch = if stdenv.isi686 then "386" 7 5 else if stdenv.isx86_64 then "amd64" ··· 37 35 # Stripping causes SEGFAULT on x86_64-darwin 38 36 dontStrip = true; 39 37 40 - meta = { 38 + meta = with lib; { 41 39 description = "Allows you to expose a web server running on your local machine to the internet"; 42 40 homepage = "https://ngrok.com/"; 43 - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 41 + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 44 42 license = licenses.unfree; 45 43 platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 46 44 maintainers = with maintainers; [ bobvanderlinden brodes ];
+12 -13
pkgs/tools/networking/openssh/common.nix
··· 30 30 , linkOpenssl ? true 31 31 }: 32 32 33 - with lib; 34 33 stdenv.mkDerivation rec { 35 34 inherit pname version src; 36 35 ··· 57 56 # This is not the same as the libkrb5 from the inputs! pkgs.libkrb5 is 58 57 # needed here to access krb5-config in order to cross compile. See: 59 58 # https://github.com/NixOS/nixpkgs/pull/107606 60 - ++ optional withKerberos pkgs.libkrb5 59 + ++ lib.optional withKerberos pkgs.libkrb5 61 60 ++ extraNativeBuildInputs; 62 61 buildInputs = [ zlib openssl libedit ] 63 - ++ optional withFIDO libfido2 64 - ++ optional withKerberos libkrb5 65 - ++ optional stdenv.isLinux pam; 62 + ++ lib.optional withFIDO libfido2 63 + ++ lib.optional withKerberos libkrb5 64 + ++ lib.optional stdenv.isLinux pam; 66 65 67 66 preConfigure = '' 68 67 # Setting LD causes `configure' and `make' to disagree about which linker ··· 80 79 "--with-libedit=yes" 81 80 "--disable-strip" 82 81 (if stdenv.isLinux then "--with-pam" else "--without-pam") 83 - ] ++ optional (etcDir != null) "--sysconfdir=${etcDir}" 84 - ++ optional withFIDO "--with-security-key-builtin=yes" 85 - ++ optional withKerberos (assert libkrb5 != null; "--with-kerberos5=${libkrb5}") 86 - ++ optional stdenv.isDarwin "--disable-libutil" 87 - ++ optional (!linkOpenssl) "--without-openssl" 82 + ] ++ lib.optional (etcDir != null) "--sysconfdir=${etcDir}" 83 + ++ lib.optional withFIDO "--with-security-key-builtin=yes" 84 + ++ lib.optional withKerberos (assert libkrb5 != null; "--with-kerberos5=${libkrb5}") 85 + ++ lib.optional stdenv.isDarwin "--disable-libutil" 86 + ++ lib.optional (!linkOpenssl) "--without-openssl" 88 87 ++ extraConfigureFlags; 89 88 90 89 ${if stdenv.hostPlatform.isStatic then "NIX_LDFLAGS" else null}= [ "-laudit" ] ++ lib.optionals withKerberos [ "-lkeyutils" ]; ··· 97 96 98 97 doCheck = true; 99 98 enableParallelChecking = false; 100 - nativeCheckInputs = optional (!stdenv.isDarwin) hostname; 99 + nativeCheckInputs = lib.optional (!stdenv.isDarwin) hostname; 101 100 preCheck = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' 102 101 # construct a dummy HOME 103 102 export HOME=$(realpath ../dummy-home) ··· 145 144 # integration tests hard to get working on darwin with its shaky 146 145 # sandbox 147 146 # t-exec tests fail on musl 148 - checkTarget = optional (!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "t-exec" 147 + checkTarget = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "t-exec" 149 148 # other tests are less demanding of the environment 150 149 ++ [ "unit" "file-tests" "interop-tests" ]; 151 150 ··· 165 164 borgbackup-integration = nixosTests.borgbackup; 166 165 }; 167 166 168 - meta = { 167 + meta = with lib; { 169 168 description = "An implementation of the SSH protocol${extraDesc}"; 170 169 homepage = "https://www.openssh.com/"; 171 170 changelog = "https://www.openssh.com/releasenotes.html";
+1 -3
pkgs/tools/networking/snabb/default.nix
··· 3 3 , fetchFromGitHub 4 4 }: 5 5 6 - with lib; 7 - 8 6 stdenv.mkDerivation rec { 9 7 pname = "snabb"; 10 8 version = "2022.10"; ··· 21 19 cp src/snabb $out/bin 22 20 ''; 23 21 24 - meta = { 22 + meta = with lib; { 25 23 homepage = "https://github.com/SnabbCo/snabbswitch"; 26 24 description = "Simple and fast packet networking toolkit"; 27 25 longDescription = ''
+13 -15
pkgs/tools/networking/strongswan/default.nix
··· 14 14 # strongswan curl plugin may break. 15 15 # See https://wiki.strongswan.org/projects/strongswan/wiki/Curl for more info. 16 16 17 - with lib; 18 - 19 17 stdenv.mkDerivation rec { 20 18 pname = "strongswan"; 21 19 version = "5.9.8"; # Make sure to also update <nixpkgs/nixos/modules/services/networking/strongswan-swanctl/swanctl-params.nix> when upgrading! ··· 32 30 nativeBuildInputs = [ pkg-config autoreconfHook perl gperf bison flex ]; 33 31 buildInputs = 34 32 [ curl gmp python3 ldns unbound openssl pcsclite ] 35 - ++ optionals enableTNC [ trousers sqlite libxml2 ] 36 - ++ optionals stdenv.isLinux [ systemd.dev pam iptables ] 37 - ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ SystemConfiguration ]) 38 - ++ optionals enableNetworkManager [ networkmanager glib ]; 33 + ++ lib.optionals enableTNC [ trousers sqlite libxml2 ] 34 + ++ lib.optionals stdenv.isLinux [ systemd.dev pam iptables ] 35 + ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ SystemConfiguration ]) 36 + ++ lib.optionals enableNetworkManager [ networkmanager glib ]; 39 37 40 38 patches = [ 41 39 ./ext_auth-path.patch ··· 43 41 ./updown-path.patch 44 42 ]; 45 43 46 - postPatch = optionalString stdenv.isLinux '' 44 + postPatch = lib.optionalString stdenv.isLinux '' 47 45 # glibc-2.26 reorganized internal includes 48 46 sed '1i#include <stdint.h>' -i src/libstrongswan/utils/utils/memory.h 49 47 ··· 62 60 "--enable-pkcs11" "--enable-eap-sim-pcsc" "--enable-dnscert" "--enable-unbound" 63 61 "--enable-chapoly" 64 62 "--enable-curl" ] 65 - ++ optionals stdenv.isLinux [ 63 + ++ lib.optionals stdenv.isLinux [ 66 64 "--enable-farp" "--enable-dhcp" 67 65 "--enable-systemd" "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" 68 66 "--enable-xauth-pam" 69 67 "--enable-forecast" 70 68 "--enable-connmark" 71 69 "--enable-af-alg" ] 72 - ++ optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ] 73 - ++ optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock" 74 - ++ optionals enableTNC [ 70 + ++ lib.optionals stdenv.isx86_64 [ "--enable-aesni" "--enable-rdrand" ] 71 + ++ lib.optional (stdenv.hostPlatform.system == "i686-linux") "--enable-padlock" 72 + ++ lib.optionals enableTNC [ 75 73 "--disable-gmp" "--disable-aes" "--disable-md5" "--disable-sha1" "--disable-sha2" "--disable-fips-prf" 76 74 "--enable-eap-tnc" "--enable-eap-ttls" "--enable-eap-dynamic" "--enable-tnccs-20" 77 75 "--enable-tnc-imc" "--enable-imc-os" "--enable-imc-attestation" ··· 80 78 "--with-tss=trousers" 81 79 "--enable-aikgen" 82 80 "--enable-sqlite" ] 83 - ++ optionals enableNetworkManager [ 81 + ++ lib.optionals enableNetworkManager [ 84 82 "--enable-nm" 85 83 "--with-nm-ca-dir=/etc/ssl/certs" ] 86 84 # Taken from: https://wiki.strongswan.org/projects/strongswan/wiki/MacOSX 87 - ++ optionals stdenv.isDarwin [ 85 + ++ lib.optionals stdenv.isDarwin [ 88 86 "--disable-systemd" 89 87 "--disable-xauth-pam" 90 88 "--disable-kernel-netlink" ··· 100 98 echo "include /etc/ipsec.secrets" >> $out/etc/ipsec.secrets 101 99 ''; 102 100 103 - NIX_LDFLAGS = optionalString stdenv.cc.isGNU "-lgcc_s" ; 101 + NIX_LDFLAGS = lib.optionalString stdenv.cc.isGNU "-lgcc_s" ; 104 102 105 103 passthru.tests = { inherit (nixosTests) strongswan-swanctl; }; 106 104 107 - meta = { 105 + meta = with lib; { 108 106 description = "OpenSource IPsec-based VPN Solution"; 109 107 homepage = "https://www.strongswan.org"; 110 108 license = licenses.gpl2Plus;
+3 -5
pkgs/tools/package-management/nix-serve/default.nix
··· 8 8 , nixosTests 9 9 }: 10 10 11 - with lib; 12 - 13 11 let 14 12 rev = "e4675e38ab54942e351c7686e40fabec822120b9"; 15 13 sha256 = "1wm24p6pkxl1d7hrvf4ph6mwzawvqi22c60z9xzndn5xfyr4v0yr"; ··· 17 15 18 16 stdenv.mkDerivation { 19 17 pname = "nix-serve"; 20 - version = "0.2-${substring 0 7 rev}"; 18 + version = "0.2-${lib.substring 0 7 rev}"; 21 19 22 20 src = fetchFromGitHub { 23 21 owner = "edolstra"; ··· 33 31 install -Dm0755 nix-serve.psgi $out/libexec/nix-serve/nix-serve.psgi 34 32 35 33 makeWrapper ${perl.withPackages(p: [ p.DBDSQLite p.Plack p.Starman nix.perl-bindings ])}/bin/starman $out/bin/nix-serve \ 36 - --prefix PATH : "${makeBinPath [ bzip2 nix ]}" \ 34 + --prefix PATH : "${lib.makeBinPath [ bzip2 nix ]}" \ 37 35 --add-flags $out/libexec/nix-serve/nix-serve.psgi 38 36 ''; 39 37 ··· 42 40 nix-serve-ssh = nixosTests.nix-serve-ssh; 43 41 }; 44 42 45 - meta = { 43 + meta = with lib; { 46 44 homepage = "https://github.com/edolstra/nix-serve"; 47 45 description = "A utility for sharing a Nix store as a binary cache"; 48 46 maintainers = [ maintainers.eelco ];
-2
pkgs/tools/security/afl/qemu.nix
··· 2 2 , texinfo, libuuid, flex, bison, pixman, autoconf 3 3 }: 4 4 5 - with lib; 6 - 7 5 let 8 6 cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user" 9 7 else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user"
-2
pkgs/tools/security/aflplusplus/qemu.nix
··· 2 2 , texinfo, libuuid, flex, bison, pixman, autoconf 3 3 }: 4 4 5 - with lib; 6 - 7 5 let 8 6 qemuName = "qemu-3.1.0"; 9 7 cpuTarget = if stdenv.targetPlatform.system == "x86_64-linux" then "x86_64-linux-user"
+2 -4
pkgs/tools/security/b2sum/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, openmp ? null }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation (finalAttrs: { 6 4 pname = "b2sum"; 7 5 version = "20190724"; ··· 24 22 25 23 buildInputs = [ openmp ]; 26 24 27 - buildFlags = [ (optional (openmp == null) "NO_OPENMP=1") ]; 25 + buildFlags = [ (lib.optional (openmp == null) "NO_OPENMP=1") ]; 28 26 installFlags = [ "PREFIX=$(out)" ]; 29 27 30 - meta = { 28 + meta = with lib; { 31 29 description = "The b2sum utility is similar to the md5sum or shasum utilities but for BLAKE2"; 32 30 homepage = "https://blake2.net"; 33 31 license = with licenses; [ asl20 cc0 openssl ];
+1 -3
pkgs/tools/security/john/default.nix
··· 2 2 , gcc, python3Packages, perl, perlPackages, makeWrapper, fetchpatch 3 3 }: 4 4 5 - with lib; 6 - 7 5 stdenv.mkDerivation rec { 8 6 pname = "john"; 9 7 version = "1.9.0-jumbo-1"; ··· 83 81 done 84 82 ''; 85 83 86 - meta = { 84 + meta = with lib; { 87 85 description = "John the Ripper password cracker"; 88 86 license = licenses.gpl2Plus; 89 87 homepage = "https://github.com/openwall/john/";
+1 -3
pkgs/tools/security/modsecurity/default.nix
··· 3 3 , luaSupport ? false, lua5, perl 4 4 }: 5 5 6 - with lib; 7 - 8 6 let luaValue = if luaSupport then lua5 else "no"; 9 7 optional = lib.optional; 10 8 in ··· 49 47 cp -R * $nginx 50 48 ''; 51 49 52 - meta = { 50 + meta = with lib; { 53 51 description = "Open source, cross-platform web application firewall (WAF)"; 54 52 license = licenses.asl20; 55 53 homepage = "https://www.modsecurity.org/";
+4 -6
pkgs/tools/security/nmap/default.nix
··· 6 6 , withLua ? true 7 7 }: 8 8 9 - with lib; 10 - 11 9 stdenv.mkDerivation rec { 12 10 pname = "nmap"; 13 11 version = "7.93"; ··· 18 16 }; 19 17 20 18 patches = [ ./zenmap.patch ] 21 - ++ optionals stdenv.cc.isClang [( 19 + ++ lib.optionals stdenv.cc.isClang [( 22 20 # Fixes a compile error due an ambiguous reference to bind(2) in 23 21 # nping/EchoServer.cc, which is otherwise resolved to std::bind. 24 22 # https://github.com/nmap/nmap/pull/1363 ··· 29 27 } 30 28 )]; 31 29 32 - prePatch = optionalString stdenv.isDarwin '' 30 + prePatch = lib.optionalString stdenv.isDarwin '' 33 31 substituteInPlace libz/configure \ 34 32 --replace /usr/bin/libtool ar \ 35 33 --replace 'AR="libtool"' 'AR="ar"' \ ··· 43 41 "--without-zenmap" 44 42 ]; 45 43 46 - makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 44 + makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 47 45 "AR=${stdenv.cc.bintools.targetPrefix}ar" 48 46 "RANLIB=${stdenv.cc.bintools.targetPrefix}ranlib" 49 47 "CC=${stdenv.cc.targetPrefix}gcc" ··· 56 54 57 55 doCheck = false; # fails 3 tests, probably needs the net 58 56 59 - meta = { 57 + meta = with lib; { 60 58 description = "A free and open source utility for network discovery and security auditing"; 61 59 homepage = "http://www.nmap.org"; 62 60 license = licenses.gpl2;
+2 -4
pkgs/tools/security/pass/default.nix
··· 11 11 , tombPluginSupport ? false 12 12 }: 13 13 14 - with lib; 15 - 16 14 assert x11Support -> xclip != null; 17 15 assert waylandSupport -> wl-clipboard != null; 18 16 ··· 35 33 name = "pass"; 36 34 paths = selected; 37 35 nativeBuildInputs = [ makeWrapper ]; 38 - buildInputs = concatMap (x: x.buildInputs) selected; 36 + buildInputs = lib.concatMap (x: x.buildInputs) selected; 39 37 40 38 postBuild = '' 41 39 files=$(find $out/bin/ -type f -exec readlink -f {} \;) ··· 79 77 # dependencies (s.el) here. The user has to do this themselves. 80 78 mkdir -p "$out/share/emacs/site-lisp" 81 79 cp "contrib/emacs/password-store.el" "$out/share/emacs/site-lisp/" 82 - '' + optionalString dmenuSupport '' 80 + '' + lib.optionalString dmenuSupport '' 83 81 cp "contrib/dmenu/passmenu" "$out/bin/" 84 82 ''; 85 83
+2 -4
pkgs/tools/security/tcpcrypt/default.nix
··· 3 3 , libcap, libpcap, libnfnetlink, libnetfilter_conntrack, libnetfilter_queue 4 4 }: 5 5 6 - with lib; 7 - 8 6 stdenv.mkDerivation rec { 9 7 pname = "tcpcrypt"; 10 8 version = "0.5"; ··· 21 19 outputs = [ "bin" "dev" "out" ]; 22 20 nativeBuildInputs = [ autoreconfHook ]; 23 21 buildInputs = [ openssl libpcap ] 24 - ++ optionals stdenv.isLinux [ libcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ]; 22 + ++ lib.optionals stdenv.isLinux [ libcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ]; 25 23 26 24 enableParallelBuilding = true; 27 25 28 - meta = { 26 + meta = with lib; { 29 27 broken = stdenv.isDarwin; 30 28 homepage = "http://tcpcrypt.org/"; 31 29 description = "Fast TCP encryption";
+2 -4
pkgs/tools/security/tor/update.nix
··· 10 10 , nix 11 11 }: 12 12 13 - with lib; 14 - 15 13 let 16 14 downloadPageUrl = "https://dist.torproject.org"; 17 15 ··· 28 26 29 27 set -eu -o pipefail 30 28 31 - export PATH=${makeBinPath [ 29 + export PATH=${lib.makeBinPath [ 32 30 common-updater-scripts 33 31 coreutils 34 32 curl ··· 63 61 export GNUPGHOME=$PWD/gnupg 64 62 mkdir -m 700 -p "$GNUPGHOME" 65 63 66 - gpg --batch --recv-keys ${concatStringsSep " " (map (x: "'${x}'") signingKeys)} 64 + gpg --batch --recv-keys ${lib.concatStringsSep " " (map (x: "'${x}'") signingKeys)} 67 65 gpg --batch --verify "$sigFile" "$checksumFile" 68 66 69 67 sha256sum -c "$checksumFile"
+18 -20
pkgs/tools/system/netdata/default.nix
··· 14 14 , withDebug ? false 15 15 }: 16 16 17 - with lib; 18 - 19 17 let 20 18 go-d-plugin = callPackage ./go.d.plugin.nix {}; 21 19 in stdenv.mkDerivation rec { ··· 34 32 35 33 nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper protobuf ]; 36 34 buildInputs = [ curl jemalloc libuv zlib ] 37 - ++ optionals stdenv.isDarwin [ CoreFoundation IOKit libossp_uuid ] 38 - ++ optionals (!stdenv.isDarwin) [ libcap libuuid ] 39 - ++ optionals withCups [ cups ] 40 - ++ optionals withDBengine [ lz4 ] 41 - ++ optionals withIpmi [ freeipmi ] 42 - ++ optionals withNetfilter [ libmnl libnetfilter_acct ] 43 - ++ optionals withCloud [ json_c ] 44 - ++ optionals withConnPubSub [ google-cloud-cpp grpc ] 45 - ++ optionals withConnPrometheus [ snappy ] 46 - ++ optionals (withCloud || withConnPrometheus) [ protobuf ] 47 - ++ optionals withSsl [ openssl ]; 35 + ++ lib.optionals stdenv.isDarwin [ CoreFoundation IOKit libossp_uuid ] 36 + ++ lib.optionals (!stdenv.isDarwin) [ libcap libuuid ] 37 + ++ lib.optionals withCups [ cups ] 38 + ++ lib.optionals withDBengine [ lz4 ] 39 + ++ lib.optionals withIpmi [ freeipmi ] 40 + ++ lib.optionals withNetfilter [ libmnl libnetfilter_acct ] 41 + ++ lib.optionals withCloud [ json_c ] 42 + ++ lib.optionals withConnPubSub [ google-cloud-cpp grpc ] 43 + ++ lib.optionals withConnPrometheus [ snappy ] 44 + ++ lib.optionals (withCloud || withConnPrometheus) [ protobuf ] 45 + ++ lib.optionals withSsl [ openssl ]; 48 46 49 47 patches = [ 50 48 # required to prevent plugins from relying on /etc ··· 68 66 # We pick zlib.dev as a simple canary package with pkg-config input. 69 67 disallowedReferences = [ zlib.dev ]; 70 68 71 - NIX_CFLAGS_COMPILE = optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; 69 + NIX_CFLAGS_COMPILE = lib.optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; 72 70 73 71 postInstall = '' 74 72 ln -s ${go-d-plugin}/lib/netdata/conf.d/* $out/lib/netdata/conf.d 75 73 ln -s ${go-d-plugin}/bin/godplugin $out/libexec/netdata/plugins.d/go.d.plugin 76 - '' + optionalString (!stdenv.isDarwin) '' 74 + '' + lib.optionalString (!stdenv.isDarwin) '' 77 75 # rename this plugin so netdata will look for setuid wrapper 78 76 mv $out/libexec/netdata/plugins.d/apps.plugin \ 79 77 $out/libexec/netdata/plugins.d/apps.plugin.org ··· 83 81 $out/libexec/netdata/plugins.d/perf.plugin.org 84 82 mv $out/libexec/netdata/plugins.d/slabinfo.plugin \ 85 83 $out/libexec/netdata/plugins.d/slabinfo.plugin.org 86 - ${optionalString withIpmi '' 84 + ${lib.optionalString withIpmi '' 87 85 mv $out/libexec/netdata/plugins.d/freeipmi.plugin \ 88 86 $out/libexec/netdata/plugins.d/freeipmi.plugin.org 89 87 ''} 90 88 ''; 91 89 92 - preConfigure = optionalString (!stdenv.isDarwin) '' 90 + preConfigure = lib.optionalString (!stdenv.isDarwin) '' 93 91 substituteInPlace collectors/python.d.plugin/python_modules/third_party/lm_sensors.py \ 94 92 --replace 'ctypes.util.find_library("sensors")' '"${lm_sensors.out}/lib/libsensors${stdenv.hostPlatform.extensions.sharedLibrary}"' 95 93 ''; ··· 99 97 "--sysconfdir=/etc" 100 98 "--disable-ebpf" 101 99 "--with-jemalloc=${jemalloc}" 102 - ] ++ optionals (!withDBengine) [ 100 + ] ++ lib.optionals (!withDBengine) [ 103 101 "--disable-dbengine" 104 - ] ++ optionals (!withCloud) [ 102 + ] ++ lib.optionals (!withCloud) [ 105 103 "--disable-cloud" 106 104 ]; 107 105 ··· 116 114 tests.netdata = nixosTests.netdata; 117 115 }; 118 116 119 - meta = { 117 + meta = with lib; { 120 118 broken = stdenv.isDarwin || stdenv.buildPlatform != stdenv.hostPlatform; 121 119 description = "Real-time performance monitoring tool"; 122 120 homepage = "https://www.netdata.cloud/";
+1 -3
pkgs/tools/system/socklog/default.nix
··· 1 1 { lib, stdenv, fetchurl }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "socklog"; 7 5 version = "2.1.0"; ··· 49 47 50 48 doCheck = true; 51 49 52 - meta = { 50 + meta = with lib; { 53 51 broken = stdenv.isDarwin; 54 52 description = "System and kernel logging services"; 55 53 homepage = "http://smarden.org/socklog/";
+1 -3
pkgs/tools/text/ledger2beancount/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages, beancount }: 2 2 3 - with lib; 4 - 5 3 let 6 4 perlDeps = with perlPackages; [ 7 5 DateCalc ··· 44 42 --set PERL5LIB "${perlPackages.makeFullPerlPath perlDeps}" 45 43 ''; 46 44 47 - meta = { 45 + meta = with lib; { 48 46 description = "Ledger to Beancount text-based converter"; 49 47 longDescription = '' 50 48 A script to automatically convert Ledger-based textual ledgers to Beancount ones.
+7 -8
pkgs/tools/video/rtmpdump/default.nix
··· 12 12 13 13 assert (gnutlsSupport || opensslSupport); 14 14 15 - with lib; 16 15 stdenv.mkDerivation { 17 16 pname = "rtmpdump"; 18 17 version = "unstable-2021-02-19"; ··· 36 35 "prefix=$(out)" 37 36 "CROSS_COMPILE=${stdenv.cc.targetPrefix}" 38 37 ] 39 - ++ optional gnutlsSupport "CRYPTO=GNUTLS" 40 - ++ optional opensslSupport "CRYPTO=OPENSSL" 41 - ++ optional stdenv.isDarwin "SYS=darwin" 42 - ++ optional stdenv.cc.isClang "CC=clang"; 38 + ++ lib.optional gnutlsSupport "CRYPTO=GNUTLS" 39 + ++ lib.optional opensslSupport "CRYPTO=OPENSSL" 40 + ++ lib.optional stdenv.isDarwin "SYS=darwin" 41 + ++ lib.optional stdenv.cc.isClang "CC=clang"; 43 42 44 43 propagatedBuildInputs = [ zlib ] 45 - ++ optionals gnutlsSupport [ gnutls nettle ] 46 - ++ optional opensslSupport openssl; 44 + ++ lib.optionals gnutlsSupport [ gnutls nettle ] 45 + ++ lib.optional opensslSupport openssl; 47 46 48 47 outputs = [ "out" "dev" ]; 49 48 50 49 separateDebugInfo = true; 51 50 52 - meta = { 51 + meta = with lib; { 53 52 description = "Toolkit for RTMP streams"; 54 53 homepage = "https://rtmpdump.mplayerhq.hu/"; 55 54 license = licenses.gpl2;