treewide: remove global with lib; in pkgs/{audio,blockchain,editors}

+145 -198
+8 -10
pkgs/applications/audio/asunder/default.nix
··· 9 9 #, aacSupport ? false, TODO: neroAacEnc 10 10 }: 11 11 12 - with lib; 13 - 14 12 stdenv.mkDerivation rec { 15 13 version = "2.9.7"; 16 14 pname = "asunder"; ··· 23 21 buildInputs = [ gtk2 libcddb ]; 24 22 25 23 runtimeDeps = 26 - optional mp3Support lame ++ 27 - optional oggSupport vorbis-tools ++ 28 - optional flacSupport flac ++ 29 - optional opusSupport opusTools ++ 30 - optional wavpackSupport wavpack ++ 31 - optional monkeysAudioSupport monkeysAudio ++ 24 + lib.optional mp3Support lame ++ 25 + lib.optional oggSupport vorbis-tools ++ 26 + lib.optional flacSupport flac ++ 27 + lib.optional opusSupport opusTools ++ 28 + lib.optional wavpackSupport wavpack ++ 29 + lib.optional monkeysAudioSupport monkeysAudio ++ 32 30 [ cdparanoia ]; 33 31 34 32 postInstall = '' 35 33 wrapProgram "$out/bin/asunder" \ 36 - --prefix PATH : "${makeBinPath runtimeDeps}" 34 + --prefix PATH : "${lib.makeBinPath runtimeDeps}" 37 35 ''; 38 36 39 - meta = { 37 + meta = with lib; { 40 38 description = "A graphical Audio CD ripper and encoder for Linux"; 41 39 homepage = "http://littlesvr.ca/asunder/index.php"; 42 40 license = licenses.gpl2;
+4 -6
pkgs/applications/audio/carla/default.nix
··· 5 5 withGtk2 ? true, gtk2 ? null, 6 6 withGtk3 ? true, gtk3 ? null }: 7 7 8 - with lib; 9 - 10 8 assert withFrontend -> python3Packages ? pyqt5; 11 9 assert withQt -> qtbase != null; 12 10 assert withQt -> wrapQtAppsHook != null; ··· 30 28 31 29 pythonPath = with python3Packages; [ 32 30 rdflib pyliblo 33 - ] ++ optional withFrontend pyqt5; 31 + ] ++ lib.optional withFrontend pyqt5; 34 32 35 33 buildInputs = [ 36 34 file liblo alsa-lib fluidsynth jack2 libpulseaudio libsndfile 37 - ] ++ optional withQt qtbase 38 - ++ optional withGtk2 gtk2 39 - ++ optional withGtk3 gtk3; 35 + ] ++ lib.optional withQt qtbase 36 + ++ lib.optional withGtk2 gtk2 37 + ++ lib.optional withGtk3 gtk3; 40 38 41 39 propagatedBuildInputs = pythonPath; 42 40
+3 -5
pkgs/applications/audio/cmus/default.nix
··· 39 39 #, vtxSupport ? true, libayemu ? null 40 40 }: 41 41 42 - with lib; 43 - 44 42 assert samplerateSupport -> jackSupport; 45 43 46 44 # vorbis and tremor are mutually exclusive ··· 113 111 114 112 patches = [ ./option-debugging.patch ]; 115 113 116 - configurePhase = "./configure " + concatStringsSep " " ([ 114 + configurePhase = "./configure " + lib.concatStringsSep " " ([ 117 115 "prefix=$out" 118 116 "CONFIG_WAV=y" 119 - ] ++ concatMap (a: a.flags) opts); 117 + ] ++ lib.concatMap (a: a.flags) opts); 120 118 121 119 nativeBuildInputs = [ pkg-config ]; 122 120 buildInputs = [ ncurses ] 123 121 ++ lib.optional stdenv.cc.isClang clangGCC 124 122 ++ lib.optionals stdenv.isDarwin [ libiconv CoreAudio AudioUnit VideoToolbox ] 125 - ++ flatten (concatMap (a: a.deps) opts); 123 + ++ lib.flatten (lib.concatMap (a: a.deps) opts); 126 124 127 125 makeFlags = [ "LD=$(CC)" ]; 128 126
+3 -5
pkgs/applications/audio/crip/default.nix
··· 16 16 , which 17 17 }: 18 18 19 - with lib; 20 - 21 19 stdenv.mkDerivation rec { 22 20 pname = "crip"; 23 21 version = "3.9"; ··· 29 27 buildInputs = [ perlPackages.perl perlPackages.CDDB_get ]; 30 28 nativeBuildInputs = [ makeWrapper ]; 31 29 32 - toolDeps = makeBinPath [ 30 + toolDeps = lib.makeBinPath [ 33 31 cdparanoia 34 32 coreutils 35 33 eject ··· 46 44 installPhase = '' 47 45 mkdir -p $out/bin/ 48 46 49 - for script in ${escapeShellArgs scripts}; do 47 + for script in ${lib.escapeShellArgs scripts}; do 50 48 cp $script $out/bin/ 51 49 52 50 substituteInPlace $out/bin/$script \ ··· 63 61 description = "Terminal-based ripper/encoder/tagger tool for creating Ogg Vorbis/FLAC files"; 64 62 license = lib.licenses.gpl1Only; 65 63 platforms = lib.platforms.linux; 66 - maintainers = [ maintainers.endgame ]; 64 + maintainers = [ lib.maintainers.endgame ]; 67 65 }; 68 66 }
+7 -9
pkgs/applications/audio/fmit/default.nix
··· 7 7 assert jackSupport -> libjack2 != null; 8 8 assert portaudioSupport -> portaudio != null; 9 9 10 - with lib; 11 - 12 10 mkDerivation rec { 13 11 pname = "fmit"; 14 12 version = "1.2.14"; ··· 22 20 23 21 nativeBuildInputs = [ qmake itstool wrapQtAppsHook ]; 24 22 buildInputs = [ fftw qtbase qtmultimedia ] 25 - ++ optionals alsaSupport [ alsa-lib ] 26 - ++ optionals jackSupport [ libjack2 ] 27 - ++ optionals portaudioSupport [ portaudio ]; 23 + ++ lib.optionals alsaSupport [ alsa-lib ] 24 + ++ lib.optionals jackSupport [ libjack2 ] 25 + ++ lib.optionals portaudioSupport [ portaudio ]; 28 26 29 27 postPatch = '' 30 28 substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}' ··· 32 30 33 31 preConfigure = '' 34 32 qmakeFlags="$qmakeFlags \ 35 - CONFIG+=${optionalString alsaSupport "acs_alsa"} \ 36 - CONFIG+=${optionalString jackSupport "acs_jack"} \ 37 - CONFIG+=${optionalString portaudioSupport "acs_portaudio"} \ 33 + CONFIG+=${lib.optionalString alsaSupport "acs_alsa"} \ 34 + CONFIG+=${lib.optionalString jackSupport "acs_jack"} \ 35 + CONFIG+=${lib.optionalString portaudioSupport "acs_portaudio"} \ 38 36 PREFIXSHORTCUT=$out" 39 37 ''; 40 38 41 - meta = { 39 + meta = with lib; { 42 40 description = "Free Musical Instrument Tuner"; 43 41 longDescription = '' 44 42 FMIT is a graphical utility for tuning musical instruments, with error
+7 -8
pkgs/applications/audio/goattracker/default.nix
··· 8 8 , isStereo ? false 9 9 }: 10 10 11 - with lib; 12 11 let 13 - pname = "goattracker" + optionalString isStereo "-stereo"; 12 + pname = "goattracker" + lib.optionalString isStereo "-stereo"; 14 13 desktopItem = makeDesktopItem { 15 14 name = pname; 16 - desktopName = "GoatTracker 2" + optionalString isStereo " Stereo"; 15 + desktopName = "GoatTracker 2" + lib.optionalString isStereo " Stereo"; 17 16 genericName = "Music Tracker"; 18 17 exec = if isStereo 19 18 then "gt2stereo" ··· 30 29 else "2.76"; # normal 31 30 32 31 src = fetchurl { 33 - url = "mirror://sourceforge/goattracker2/GoatTracker_${version}${optionalString isStereo "_Stereo"}.zip"; 32 + url = "mirror://sourceforge/goattracker2/GoatTracker_${version}${lib.optionalString isStereo "_Stereo"}.zip"; 34 33 sha256 = if isStereo 35 34 then "1hiig2d152sv9kazwz33i56x1c54h5sh21ipkqnp6qlnwj8x1ksy" # stereo 36 35 else "0d7a3han4jw4bwiba3j87racswaajgl3pj4sb5lawdqdxicv3dn1"; # normal ··· 63 62 64 63 meta = { 65 64 description = "A crossplatform music editor for creating Commodore 64 music. Uses reSID library by Dag Lem and supports alternatively HardSID & CatWeasel devices" 66 - + optionalString isStereo " - Stereo version"; 65 + + lib.optionalString isStereo " - Stereo version"; 67 66 homepage = "https://cadaver.github.io/tools.html"; 68 67 downloadPage = "https://sourceforge.net/projects/goattracker2/"; 69 - license = licenses.gpl2Plus; 70 - maintainers = with maintainers; [ fgaz ]; 71 - platforms = platforms.all; 68 + license = lib.licenses.gpl2Plus; 69 + maintainers = with lib.maintainers; [ fgaz ]; 70 + platforms = lib.platforms.all; 72 71 }; 73 72 }
+2 -4
pkgs/applications/audio/musescore/darwin.nix
··· 5 5 appName = "MuseScore ${builtins.head versionComponents}"; 6 6 in 7 7 8 - with lib; 9 - 10 8 stdenv.mkDerivation rec { 11 9 pname = "musescore-darwin"; 12 - version = concatStringsSep "." versionComponents; 10 + version = lib.concatStringsSep "." versionComponents; 13 11 14 12 # The disk image contains the .app and a symlink to /Applications. 15 13 sourceRoot = "${appName}.app"; 16 14 17 15 src = fetchurl { 18 - url = "https://github.com/musescore/MuseScore/releases/download/v${concatStringsSep "." (take 3 versionComponents)}/MuseScore-${version}.dmg"; 16 + url = "https://github.com/musescore/MuseScore/releases/download/v${lib.concatStringsSep "." (lib.take 3 versionComponents)}/MuseScore-${version}.dmg"; 19 17 sha256 = "sha256-lHckfhTTrDzaGwlbnZ5w0O1gMPbRmrmgATIGMY517l0="; 20 18 }; 21 19
+2 -4
pkgs/applications/audio/ncmpc/default.nix
··· 12 12 , pcreSupport ? false, pcre ? null 13 13 }: 14 14 15 - with lib; 16 - 17 15 assert pcreSupport -> pcre != null; 18 16 19 17 stdenv.mkDerivation rec { ··· 28 26 }; 29 27 30 28 buildInputs = [ glib ncurses libmpdclient boost ] 31 - ++ optional pcreSupport pcre; 29 + ++ lib.optional pcreSupport pcre; 32 30 nativeBuildInputs = [ meson ninja pkg-config gettext ]; 33 31 34 32 mesonFlags = [ 35 33 "-Dlirc=disabled" 36 34 "-Ddocumentation=disabled" 37 - ] ++ optional (!pcreSupport) "-Dregex=disabled"; 35 + ] ++ lib.optional (!pcreSupport) "-Dregex=disabled"; 38 36 39 37 meta = with lib; { 40 38 description = "Curses-based interface for MPD (music player daemon)";
+2 -4
pkgs/applications/audio/renoise/default.nix
··· 1 1 { lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsa-lib 2 2 , mpg123, releasePath ? null }: 3 3 4 - with lib; 5 - 6 4 # To use the full release version: 7 5 # 1) Sign into https://backstage.renoise.com and download the release version to some stable location. 8 6 # 2) Override the releasePath attribute to point to the location of the newly downloaded bundle. 9 7 # Note: Renoise creates an individual build for each license which screws somewhat with the 10 8 # use of functions like requireFile as the hash will be different for every user. 11 9 let 12 - urlVersion = replaceStrings [ "." ] [ "_" ]; 10 + urlVersion = lib.replaceStrings [ "." ] [ "_" ]; 13 11 in 14 12 15 13 stdenv.mkDerivation rec { ··· 80 78 description = "Modern tracker-based DAW"; 81 79 homepage = "https://www.renoise.com/"; 82 80 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 83 - license = licenses.unfree; 81 + license = lib.licenses.unfree; 84 82 maintainers = []; 85 83 platforms = [ "x86_64-linux" ]; 86 84 };
+11 -12
pkgs/applications/blockchains/bitcoin-knots/default.nix
··· 23 23 , withWallet ? true 24 24 }: 25 25 26 - with lib; 27 26 stdenv.mkDerivation rec { 28 27 pname = if withGui then "bitcoin-knots" else "bitcoind-knots"; 29 28 version = "23.0.knots20220529"; ··· 35 34 36 35 nativeBuildInputs = 37 36 [ autoreconfHook pkg-config ] 38 - ++ optionals stdenv.isLinux [ util-linux ] 39 - ++ optionals stdenv.isDarwin [ hexdump ] 40 - ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] 41 - ++ optionals withGui [ wrapQtAppsHook ]; 37 + ++ lib.optionals stdenv.isLinux [ util-linux ] 38 + ++ lib.optionals stdenv.isDarwin [ hexdump ] 39 + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] 40 + ++ lib.optionals withGui [ wrapQtAppsHook ]; 42 41 43 42 buildInputs = [ boost libevent miniupnpc zeromq zlib ] 44 - ++ optionals withWallet [ db48 sqlite ] 45 - ++ optionals withGui [ qrencode qtbase qttools ]; 43 + ++ lib.optionals withWallet [ db48 sqlite ] 44 + ++ lib.optionals withGui [ qrencode qtbase qttools ]; 46 45 47 46 configureFlags = [ 48 47 "--with-boost-libdir=${boost.out}/lib" 49 48 "--disable-bench" 50 - ] ++ optionals (!doCheck) [ 49 + ] ++ lib.optionals (!doCheck) [ 51 50 "--disable-tests" 52 51 "--disable-gui-tests" 53 - ] ++ optionals (!withWallet) [ 52 + ] ++ lib.optionals (!withWallet) [ 54 53 "--disable-wallet" 55 - ] ++ optionals withGui [ 54 + ] ++ lib.optionals withGui [ 56 55 "--with-gui=qt5" 57 56 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" 58 57 ]; ··· 65 64 [ "LC_ALL=en_US.UTF-8" ] 66 65 # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. 67 66 # See also https://github.com/NixOS/nixpkgs/issues/24256 68 - ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; 67 + ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; 69 68 70 69 enableParallelBuilding = true; 71 70 ··· 73 72 smoke-test = nixosTests.bitcoind-knots; 74 73 }; 75 74 76 - meta = { 75 + meta = with lib; { 77 76 description = "A derivative of Bitcoin Core with a collection of improvements"; 78 77 homepage = "https://bitcoinknots.org/"; 79 78 maintainers = with maintainers; [ prusnak mmahut ];
+6 -8
pkgs/applications/blockchains/bitcoin-unlimited/default.nix
··· 3 3 , withGui, wrapQtAppsHook ? null, qtbase ? null, qttools ? null 4 4 , Foundation, ApplicationServices, AppKit }: 5 5 6 - with lib; 7 - 8 6 stdenv.mkDerivation rec { 9 - pname = "bitcoin" + optionalString (!withGui) "d" + "-unlimited"; 7 + pname = "bitcoin" + lib.optionalString (!withGui) "d" + "-unlimited"; 10 8 version = "1.10.0.0"; 11 9 12 10 src = fetchFromGitLab { ··· 17 15 }; 18 16 19 17 nativeBuildInputs = [ pkg-config autoreconfHook python3 ] 20 - ++ optionals withGui [ wrapQtAppsHook qttools ]; 18 + ++ lib.optionals withGui [ wrapQtAppsHook qttools ]; 21 19 buildInputs = [ openssl db48 boost zlib 22 20 miniupnpc util-linux protobuf libevent ] 23 - ++ optionals withGui [ qtbase qttools qrencode ] 24 - ++ optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ]; 21 + ++ lib.optionals withGui [ qtbase qttools qrencode ] 22 + ++ lib.optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ]; 25 23 26 24 configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ] 27 - ++ optionals withGui [ "--with-gui=qt5" 25 + ++ lib.optionals withGui [ "--with-gui=qt5" 28 26 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" 29 27 ]; 30 28 enableParallelBuilding = true; 31 29 32 - meta = { 30 + meta = with lib; { 33 31 description = "Peer-to-peer electronic cash system (Unlimited client)"; 34 32 longDescription= '' 35 33 Bitcoin is a free open source peer-to-peer electronic cash system that is
+12 -13
pkgs/applications/blockchains/bitcoin/default.nix
··· 23 23 , withWallet ? true 24 24 }: 25 25 26 - with lib; 27 26 let 28 27 desktop = fetchurl { 29 28 # c2e5f3e is the last commit when the debian/bitcoin-qt.desktop file was changed ··· 45 44 46 45 nativeBuildInputs = 47 46 [ autoreconfHook pkg-config ] 48 - ++ optionals stdenv.isLinux [ util-linux ] 49 - ++ optionals stdenv.isDarwin [ hexdump ] 50 - ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] 51 - ++ optionals withGui [ wrapQtAppsHook ]; 47 + ++ lib.optionals stdenv.isLinux [ util-linux ] 48 + ++ lib.optionals stdenv.isDarwin [ hexdump ] 49 + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] 50 + ++ lib.optionals withGui [ wrapQtAppsHook ]; 52 51 53 52 buildInputs = [ boost libevent miniupnpc zeromq zlib ] 54 - ++ optionals withWallet [ db48 sqlite ] 55 - ++ optionals withGui [ qrencode qtbase qttools ]; 53 + ++ lib.optionals withWallet [ db48 sqlite ] 54 + ++ lib.optionals withGui [ qrencode qtbase qttools ]; 56 55 57 - postInstall = optionalString withGui '' 56 + postInstall = lib.optionalString withGui '' 58 57 install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop 59 58 substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin" 60 59 install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png ··· 63 62 configureFlags = [ 64 63 "--with-boost-libdir=${boost.out}/lib" 65 64 "--disable-bench" 66 - ] ++ optionals (!doCheck) [ 65 + ] ++ lib.optionals (!doCheck) [ 67 66 "--disable-tests" 68 67 "--disable-gui-tests" 69 - ] ++ optionals (!withWallet) [ 68 + ] ++ lib.optionals (!withWallet) [ 70 69 "--disable-wallet" 71 - ] ++ optionals withGui [ 70 + ] ++ lib.optionals withGui [ 72 71 "--with-gui=qt5" 73 72 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" 74 73 ]; ··· 81 80 [ "LC_ALL=en_US.UTF-8" ] 82 81 # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. 83 82 # See also https://github.com/NixOS/nixpkgs/issues/24256 84 - ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; 83 + ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; 85 84 86 85 enableParallelBuilding = true; 87 86 ··· 89 88 smoke-test = nixosTests.bitcoind; 90 89 }; 91 90 92 - meta = { 91 + meta = with lib; { 93 92 description = "Peer-to-peer electronic cash system"; 94 93 longDescription = '' 95 94 Bitcoin is a free open source peer-to-peer electronic cash system that is
+1 -2
pkgs/applications/blockchains/btcdeb/default.nix
··· 5 5 , openssl 6 6 }: 7 7 8 - with lib; 9 8 stdenv.mkDerivation rec { 10 9 pname = "btcdeb"; 11 10 version = "unstable-2022-04-03"; ··· 20 19 nativeBuildInputs = [ pkg-config autoreconfHook ]; 21 20 buildInputs = [ openssl ]; 22 21 23 - meta = { 22 + meta = with lib; { 24 23 description = "Bitcoin Script Debugger"; 25 24 homepage = "https://github.com/bitcoin-core/btcdeb"; 26 25 license = licenses.mit;
+5 -7
pkgs/applications/blockchains/digibyte/default.nix
··· 15 15 , wrapQtAppsHook ? null 16 16 }: 17 17 18 - with lib; 19 - 20 18 stdenv.mkDerivation rec { 21 19 pname = "digibyte"; 22 20 version = "7.17.3"; 23 21 24 - name = pname + toString (optional (!withGui) "d") + "-" + version; 22 + name = pname + toString (lib.optional (!withGui) "d") + "-" + version; 25 23 26 24 src = fetchFromGitHub { 27 25 owner = "digibyte-core"; ··· 34 32 autoreconfHook 35 33 pkg-config 36 34 hexdump 37 - ] ++ optionals withGui [ 35 + ] ++ lib.optionals withGui [ 38 36 wrapQtAppsHook 39 37 ]; 40 38 ··· 44 42 libevent 45 43 db4 46 44 zeromq 47 - ] ++ optionals withGui [ 45 + ] ++ lib.optionals withGui [ 48 46 qtbase 49 47 qttools 50 48 protobuf ··· 54 52 55 53 configureFlags = [ 56 54 "--with-boost-libdir=${boost.out}/lib" 57 - ] ++ optionals withGui [ 55 + ] ++ lib.optionals withGui [ 58 56 "--with-gui=qt5" 59 57 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" 60 58 ]; 61 59 62 - meta = { 60 + meta = with lib; { 63 61 description = "DigiByte (DGB) is a rapidly growing decentralized, global blockchain"; 64 62 homepage = "https://digibyte.io/"; 65 63 license = licenses.mit;
+15 -16
pkgs/applications/blockchains/dogecoin/default.nix
··· 6 6 , withGui, withUpnp ? true, withUtils ? true, withWallet ? true 7 7 , withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }: 8 8 9 - with lib; 10 9 stdenv.mkDerivation rec { 11 - pname = "dogecoin" + optionalString (!withGui) "d"; 10 + pname = "dogecoin" + lib.optionalString (!withGui) "d"; 12 11 version = "1.14.6"; 13 12 14 13 src = fetchFromGitHub { ··· 18 17 sha256 = "sha256-PmbmmA2Mq07dwB3cI7A9c/ewtu0I+sWvQT39Yekm/sU="; 19 18 }; 20 19 21 - preConfigure = optionalString withGui '' 22 - export LRELEASE=${getDev qttools}/bin/lrelease 20 + preConfigure = lib.optionalString withGui '' 21 + export LRELEASE=${lib.getDev qttools}/bin/lrelease 23 22 ''; 24 23 25 24 nativeBuildInputs = [ pkg-config autoreconfHook util-linux ] 26 - ++ optionals withGui [ wrapQtAppsHook qttools ]; 25 + ++ lib.optionals withGui [ wrapQtAppsHook qttools ]; 27 26 28 27 buildInputs = [ openssl protobuf boost zlib libevent ] 29 - ++ optionals withGui [ qtbase qrencode ] 30 - ++ optionals withUpnp [ miniupnpc ] 31 - ++ optionals withWallet [ db5 ] 32 - ++ optionals withZmq [ zeromq ] 33 - ++ optionals stdenv.isDarwin [ Cocoa ]; 28 + ++ lib.optionals withGui [ qtbase qrencode ] 29 + ++ lib.optionals withUpnp [ miniupnpc ] 30 + ++ lib.optionals withWallet [ db5 ] 31 + ++ lib.optionals withZmq [ zeromq ] 32 + ++ lib.optionals stdenv.isDarwin [ Cocoa ]; 34 33 35 34 configureFlags = [ 36 35 "--with-incompatible-bdb" 37 36 "--with-boost-libdir=${boost.out}/lib" 38 - ] ++ optionals (!withGui) [ "--with-gui=no" ] 39 - ++ optionals (!withUpnp) [ "--without-miniupnpc" ] 40 - ++ optionals (!withUtils) [ "--without-utils" ] 41 - ++ optionals (!withWallet) [ "--disable-wallet" ] 42 - ++ optionals (!withZmq) [ "--disable-zmq" ]; 37 + ] ++ lib.optionals (!withGui) [ "--with-gui=no" ] 38 + ++ lib.optionals (!withUpnp) [ "--without-miniupnpc" ] 39 + ++ lib.optionals (!withUtils) [ "--without-utils" ] 40 + ++ lib.optionals (!withWallet) [ "--disable-wallet" ] 41 + ++ lib.optionals (!withZmq) [ "--disable-zmq" ]; 43 42 44 43 enableParallelBuilding = true; 45 44 46 - meta = { 45 + meta = with lib; { 47 46 description = "Wow, such coin, much shiba, very rich"; 48 47 longDescription = '' 49 48 Dogecoin is a decentralized, peer-to-peer digital currency that
+11 -12
pkgs/applications/blockchains/elements/default.nix
··· 22 22 , withWallet ? true 23 23 }: 24 24 25 - with lib; 26 25 stdenv.mkDerivation rec { 27 26 pname = if withGui then "elements" else "elementsd"; 28 27 version = "22.0.2"; ··· 36 35 37 36 nativeBuildInputs = 38 37 [ autoreconfHook pkg-config ] 39 - ++ optionals stdenv.isLinux [ util-linux ] 40 - ++ optionals stdenv.isDarwin [ hexdump ] 41 - ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] 42 - ++ optionals withGui [ wrapQtAppsHook ]; 38 + ++ lib.optionals stdenv.isLinux [ util-linux ] 39 + ++ lib.optionals stdenv.isDarwin [ hexdump ] 40 + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] 41 + ++ lib.optionals withGui [ wrapQtAppsHook ]; 43 42 44 43 buildInputs = [ boost libevent miniupnpc zeromq zlib ] 45 - ++ optionals withWallet [ db48 sqlite ] 46 - ++ optionals withGui [ qrencode qtbase qttools ]; 44 + ++ lib.optionals withWallet [ db48 sqlite ] 45 + ++ lib.optionals withGui [ qrencode qtbase qttools ]; 47 46 48 47 configureFlags = [ 49 48 "--with-boost-libdir=${boost.out}/lib" 50 49 "--disable-bench" 51 - ] ++ optionals (!doCheck) [ 50 + ] ++ lib.optionals (!doCheck) [ 52 51 "--disable-tests" 53 52 "--disable-gui-tests" 54 - ] ++ optionals (!withWallet) [ 53 + ] ++ lib.optionals (!withWallet) [ 55 54 "--disable-wallet" 56 - ] ++ optionals withGui [ 55 + ] ++ lib.optionals withGui [ 57 56 "--with-gui=qt5" 58 57 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" 59 58 ]; ··· 70 69 [ "LC_ALL=en_US.UTF-8" ] 71 70 # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. 72 71 # See also https://github.com/NixOS/nixpkgs/issues/24256 73 - ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; 72 + ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; 74 73 75 74 enableParallelBuilding = true; 76 75 77 - meta = { 76 + meta = with lib; { 78 77 description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol"; 79 78 longDescription= '' 80 79 The Elements blockchain platform is a collection of feature experiments and extensions to the
+5 -7
pkgs/applications/blockchains/litecoin/default.nix
··· 9 9 , fmt 10 10 }: 11 11 12 - with lib; 13 - 14 12 mkDerivation rec { 15 - pname = "litecoin" + optionalString (!withGui) "d"; 13 + pname = "litecoin" + lib.optionalString (!withGui) "d"; 16 14 version = "0.21.2.1"; 17 15 18 16 src = fetchFromGitHub { ··· 25 23 nativeBuildInputs = [ pkg-config autoreconfHook ]; 26 24 buildInputs = [ openssl db48 boost zlib zeromq fmt 27 25 miniupnpc glib protobuf util-linux libevent ] 28 - ++ optionals stdenv.isDarwin [ AppKit ] 29 - ++ optionals withGui [ qtbase qttools qrencode ]; 26 + ++ lib.optionals stdenv.isDarwin [ AppKit ] 27 + ++ lib.optionals withGui [ qtbase qttools qrencode ]; 30 28 31 29 configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ] 32 - ++ optionals withGui [ 30 + ++ lib.optionals withGui [ 33 31 "--with-gui=qt5" 34 32 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ]; 35 33 ··· 40 38 ./src/test/test_litecoin 41 39 ''; 42 40 43 - meta = { 41 + meta = with lib; { 44 42 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; 45 43 description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm"; 46 44 longDescription= ''
+2 -4
pkgs/applications/blockchains/particl-core/default.nix
··· 14 14 , python3 15 15 }: 16 16 17 - with lib; 18 - 19 17 stdenv.mkDerivation rec { 20 18 pname = "particl-core"; 21 19 version = "23.0.3.0"; ··· 33 31 configureFlags = [ 34 32 "--disable-bench" 35 33 "--with-boost-libdir=${boost.out}/lib" 36 - ] ++ optionals (!doCheck) [ 34 + ] ++ lib.optionals (!doCheck) [ 37 35 "--enable-tests=no" 38 36 ]; 39 37 ··· 42 40 preCheck = "patchShebangs test"; 43 41 enableParallelBuilding = true; 44 42 45 - meta = { 43 + meta = with lib; { 46 44 broken = (stdenv.isLinux && stdenv.isAarch64); 47 45 description = "Privacy-Focused Marketplace & Decentralized Application Platform"; 48 46 longDescription = ''
+5 -7
pkgs/applications/blockchains/vertcoin/default.nix
··· 16 16 , wrapQtAppsHook ? null 17 17 }: 18 18 19 - with lib; 20 - 21 19 stdenv.mkDerivation rec { 22 20 pname = "vertcoin"; 23 21 version = "0.18.0"; 24 22 25 - name = pname + toString (optional (!withGui) "d") + "-" + version; 23 + name = pname + toString (lib.optional (!withGui) "d") + "-" + version; 26 24 27 25 src = fetchFromGitHub { 28 26 owner = pname + "-project"; ··· 35 33 autoreconfHook 36 34 pkg-config 37 35 hexdump 38 - ] ++ optionals withGui [ 36 + ] ++ lib.optionals withGui [ 39 37 wrapQtAppsHook 40 38 ]; 41 39 ··· 46 44 db4 47 45 zeromq 48 46 gmp 49 - ] ++ optionals withGui [ 47 + ] ++ lib.optionals withGui [ 50 48 qtbase 51 49 qttools 52 50 protobuf ··· 56 54 57 55 configureFlags = [ 58 56 "--with-boost-libdir=${boost.out}/lib" 59 - ] ++ optionals withGui [ 57 + ] ++ lib.optionals withGui [ 60 58 "--with-gui=qt5" 61 59 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" 62 60 ]; 63 61 64 - meta = { 62 + meta = with lib; { 65 63 description = "A digital currency with mining decentralisation and ASIC resistance as a key focus"; 66 64 homepage = "https://vertcoin.org/"; 67 65 license = licenses.mit;
+1 -2
pkgs/applications/blockchains/wownero/default.nix
··· 2 2 , readline, libsodium, rapidjson 3 3 }: 4 4 5 - with lib; 6 5 stdenv.mkDerivation rec { 7 6 pname = "wownero"; 8 7 version = "0.8.0.1"; ··· 41 40 "-DMANUAL_SUBMODULES=ON" 42 41 ]; 43 42 44 - meta = { 43 + meta = with lib; { 45 44 description = '' 46 45 A privacy-centric memecoin that was fairly launched on April 1, 2018 with 47 46 no pre-mine, stealth-mine or ICO
+3 -5
pkgs/applications/display-managers/lightdm/default.nix
··· 30 30 , yelp-tools 31 31 }: 32 32 33 - with lib; 34 - 35 33 stdenv.mkDerivation rec { 36 34 pname = "lightdm"; 37 35 version = "1.32.0"; ··· 69 67 libxklavier 70 68 pam 71 69 polkit 72 - ] ++ optional withQt5 qtbase; 70 + ] ++ lib.optional withQt5 qtbase; 73 71 74 72 patches = [ 75 73 # Adds option to disable writing dmrc files ··· 96 94 "--sysconfdir=/etc" 97 95 "--disable-tests" 98 96 "--disable-dmrc" 99 - ] ++ optional withQt5 "--enable-liblightdm-qt5"; 97 + ] ++ lib.optional withQt5 "--enable-liblightdm-qt5"; 100 98 101 99 installFlags = [ 102 100 "sysconfdir=${placeholder "out"}/etc" ··· 120 118 }; 121 119 122 120 123 - meta = { 121 + meta = with lib; { 124 122 homepage = "https://github.com/canonical/lightdm"; 125 123 description = "A cross-desktop display manager"; 126 124 platforms = platforms.linux;
+6 -8
pkgs/applications/editors/codeblocks/default.nix
··· 2 2 , contribPlugins ? false, hunspell, gamin, boost, wrapGAppsHook 3 3 }: 4 4 5 - with lib; 6 - 7 5 stdenv.mkDerivation rec { 8 6 name = "${pname}-${lib.optionalString contribPlugins "full-"}${version}"; 9 7 version = "20.03"; ··· 16 14 17 15 nativeBuildInputs = [ pkg-config file zip wrapGAppsHook ]; 18 16 buildInputs = [ wxGTK31 gtk3 ] 19 - ++ optionals contribPlugins [ hunspell gamin boost ]; 17 + ++ lib.optionals contribPlugins [ hunspell gamin boost ]; 20 18 enableParallelBuilding = true; 21 19 patches = [ 22 20 ./writable-projects.patch ··· 56 54 }) 57 55 ]; 58 56 preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file"; 59 - postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig"; 60 - configureFlags = [ "--enable-pch=no" ] ++ optionals contribPlugins [ 61 - ("--with-contrib-plugins" + optionalString stdenv.isDarwin "=all,-FileManager,-NassiShneiderman") 57 + postConfigure = lib.optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig"; 58 + configureFlags = [ "--enable-pch=no" ] ++ lib.optionals contribPlugins [ 59 + ("--with-contrib-plugins" + lib.optionalString stdenv.isDarwin "=all,-FileManager,-NassiShneiderman") 62 60 "--with-boost-libdir=${boost}/lib" 63 61 ]; 64 - postInstall = optionalString stdenv.isDarwin '' 62 + postInstall = lib.optionalString stdenv.isDarwin '' 65 63 ln -s $out/lib/codeblocks/plugins $out/share/codeblocks/plugins 66 64 ''; 67 65 68 - meta = { 66 + meta = with lib; { 69 67 maintainers = [ maintainers.linquize ]; 70 68 platforms = platforms.all; 71 69 description = "The open source, cross platform, free C, C++ and Fortran IDE";
+1 -3
pkgs/applications/editors/howl/default.nix
··· 1 1 { lib, stdenv, fetchurl, makeWrapper, pkg-config, gtk3, librsvg }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "howl"; 7 5 version = "0.6"; ··· 27 25 --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" 28 26 ''; 29 27 30 - meta = { 28 + meta = with lib; { 31 29 homepage = "https://howl.io/"; 32 30 description = "A general purpose, fast and lightweight editor with a keyboard-centric minimalistic user interface"; 33 31 license = licenses.mit;
+5 -7
pkgs/applications/editors/jetbrains/default.nix
··· 11 11 , vmopts ? null 12 12 }: 13 13 14 - with lib; 15 - 16 14 let 17 15 platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ]; 18 16 ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ]; 19 17 20 18 inherit (stdenv.hostPlatform) system; 21 19 22 - versions = builtins.fromJSON (readFile (./versions.json)); 20 + versions = builtins.fromJSON (lib.readFile (./versions.json)); 23 21 versionKey = if stdenv.isLinux then "linux" else system; 24 22 products = versions.${versionKey} or (throw "Unsupported system: ${system}"); 25 23 ··· 42 40 maintainers = with maintainers; [ edwtjo mic92 ]; 43 41 }; 44 42 }).overrideAttrs (attrs: { 45 - nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [ 43 + nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ lib.optionals (stdenv.isLinux) [ 46 44 autoPatchelfHook 47 45 patchelf 48 46 ]; 49 - buildInputs = (attrs.buildInputs or []) ++ optionals (stdenv.isLinux) [ 47 + buildInputs = (attrs.buildInputs or []) ++ lib.optionals (stdenv.isLinux) [ 50 48 python3 51 49 stdenv.cc.cc 52 50 libdbusmenu ··· 54 52 expat 55 53 ]; 56 54 dontAutoPatchelf = true; 57 - postFixup = (attrs.postFixup or "") + optionalString (stdenv.isLinux) '' 55 + postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) '' 58 56 ( 59 57 cd $out/clion 60 58 # bundled cmake does not find libc ··· 217 215 ''; 218 216 maintainers = with maintainers; [ ]; 219 217 }; 220 - }).overrideAttrs (finalAttrs: previousAttrs: optionalAttrs cythonSpeedup { 218 + }).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs cythonSpeedup { 221 219 buildInputs = with python3.pkgs; [ python3 setuptools ]; 222 220 preInstall = '' 223 221 echo "compiling cython debug speedups"
+3 -5
pkgs/applications/editors/jetbrains/linux.nix
··· 5 5 6 6 { pname, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args: 7 7 8 - with lib; 9 - 10 - let loName = toLower productShort; 11 - hiName = toUpper productShort; 8 + let loName = lib.toLower productShort; 9 + hiName = lib.toUpper productShort; 12 10 vmoptsName = loName 13 11 + lib.optionalString stdenv.hostPlatform.is64bit "64" 14 12 + ".vmoptions"; ··· 29 27 startupWMClass = wmClass; 30 28 }; 31 29 32 - vmoptsFile = optionalString (vmopts != null) (writeText vmoptsName vmopts); 30 + vmoptsFile = lib.optionalString (vmopts != null) (writeText vmoptsName vmopts); 33 31 34 32 nativeBuildInputs = [ makeWrapper patchelf unzip ]; 35 33
+1 -3
pkgs/applications/editors/jucipp/default.nix
··· 3 3 libXdmcp, libxkbcommon, libpthreadstubs, wrapGAppsHook, aspellDicts, gtkmm3, 4 4 coreutils, glibc, dbus, openssl, libxml2, gnumake, ctags }: 5 5 6 - with lib; 7 - 8 6 stdenv.mkDerivation rec { 9 7 pname = "juicipp"; 10 8 version = "1.2.3"; 11 9 12 - meta = { 10 + meta = with lib; { 13 11 homepage = "https://github.com/cppit/jucipp"; 14 12 description = "A lightweight, platform independent C++-IDE with support for C++11, C++14, and experimental C++17 features depending on libclang version"; 15 13 license = licenses.mit;
+1 -3
pkgs/applications/editors/kakoune/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub }: 2 2 3 - with lib; 4 - 5 3 stdenv.mkDerivation rec { 6 4 pname = "kakoune-unwrapped"; 7 5 version = "2022.10.31"; ··· 33 31 ln -s --relative "$autoload_target" autoload 34 32 ''; 35 33 36 - meta = { 34 + meta = with lib; { 37 35 homepage = "http://kakoune.org/"; 38 36 description = "A vim inspired text editor"; 39 37 license = licenses.publicDomain;
+2 -4
pkgs/applications/editors/nano/default.nix
··· 4 4 5 5 assert enableNls -> (gettext != null); 6 6 7 - with lib; 8 - 9 7 let 10 8 nixSyntaxHighlight = fetchFromGitHub { 11 9 owner = "seitz"; ··· 23 21 sha256 = "V7p1Hpt1GfD23e5QUgLjh8dd3kQMH3qhuTEMw4FAaDY="; 24 22 }; 25 23 26 - nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext; 24 + nativeBuildInputs = [ texinfo ] ++ lib.optional enableNls gettext; 27 25 buildInputs = [ ncurses ]; 28 26 29 27 outputs = [ "out" "info" ]; ··· 71 69 ''; 72 70 }; 73 71 74 - meta = { 72 + meta = with lib; { 75 73 homepage = "https://www.nano-editor.org/"; 76 74 description = "A small, user-friendly console text editor"; 77 75 license = licenses.gpl3Plus;
+8 -10
pkgs/applications/editors/neovim/wrapper.nix
··· 5 5 , python3Packages 6 6 , callPackage 7 7 }: 8 - with lib; 9 - 10 8 neovim: 11 9 12 10 let ··· 32 30 }@args: 33 31 let 34 32 35 - wrapperArgsStr = if isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs; 33 + wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs; 36 34 37 35 # If configure != {}, we can't generate the rplugin.vim file with e.g 38 36 # NVIM_SYSTEM_RPLUGIN_MANIFEST *and* NVIM_RPLUGIN_MANIFEST env vars set in ··· 43 41 finalMakeWrapperArgs = 44 42 [ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim" ] 45 43 ++ [ "--set" "NVIM_SYSTEM_RPLUGIN_MANIFEST" "${placeholder "out"}/rplugin.vim" ] 46 - ++ optionals wrapRc [ "--add-flags" "-u ${writeText "init.vim" neovimRcContent}" ] 44 + ++ lib.optionals wrapRc [ "--add-flags" "-u ${writeText "init.vim" neovimRcContent}" ] 47 45 ; 48 46 in 49 47 assert withPython2 -> throw "Python2 support has been removed from the neovim wrapper, please remove withPython2 and python2Env."; ··· 57 55 substitute ${neovim}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \ 58 56 --replace 'Name=Neovim' 'Name=Neovim wrapper' 59 57 '' 60 - + optionalString withPython3 '' 58 + + lib.optionalString withPython3 '' 61 59 makeWrapper ${python3Env.interpreter} $out/bin/nvim-python3 --unset PYTHONPATH 62 60 '' 63 - + optionalString (rubyEnv != null) '' 61 + + lib.optionalString (rubyEnv != null) '' 64 62 ln -s ${rubyEnv}/bin/neovim-ruby-host $out/bin/nvim-ruby 65 63 '' 66 - + optionalString withNodeJs '' 64 + + lib.optionalString withNodeJs '' 67 65 ln -s ${nodePackages.neovim}/bin/neovim-node-host $out/bin/nvim-node 68 66 '' 69 - + optionalString vimAlias '' 67 + + lib.optionalString vimAlias '' 70 68 ln -s $out/bin/nvim $out/bin/vim 71 69 '' 72 - + optionalString viAlias '' 70 + + lib.optionalString viAlias '' 73 71 ln -s $out/bin/nvim $out/bin/vi 74 72 '' 75 - + optionalString (manifestRc != null) (let 73 + + lib.optionalString (manifestRc != null) (let 76 74 manifestWrapperArgs = 77 75 [ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim-wrapper" ]; 78 76 in ''
+1 -1
pkgs/applications/editors/rstudio/default.nix
··· 206 206 homepage = "https://www.rstudio.com/"; 207 207 license = licenses.agpl3Only; 208 208 maintainers = with maintainers; [ ciil cfhammill ]; 209 - mainProgram = "rstudio" + optionalString server "-server"; 209 + mainProgram = "rstudio" + lib.optionalString server "-server"; 210 210 platforms = platforms.linux; 211 211 }; 212 212
+2 -4
pkgs/applications/editors/vscode/extensions/ms-vsliveshare-vsliveshare/default.nix
··· 7 7 , desktop-file-utils, xprop, xsel 8 8 }: 9 9 10 - with lib; 11 - 12 10 let 13 11 # https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually 14 12 libs = [ ··· 118 116 # which will break when copying over the files. 119 117 mv dotnet_modules/vsls-agent{,-wrapped} 120 118 makeWrapper $PWD/dotnet_modules/vsls-agent{-wrapped,} \ 121 - --prefix LD_LIBRARY_PATH : "${makeLibraryPath libs}" \ 119 + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libs}" \ 122 120 --set LD_PRELOAD $PWD/dotnet_modules/noop-syslog.so \ 123 121 --set DOTNET_ROOT ${dotnet-sdk_3} 124 122 ''; 125 123 126 - meta = { 124 + meta = with lib; { 127 125 description = "Live Share lets you achieve greater confidence at speed by streamlining collaborative editing, debugging, and more in real-time during development"; 128 126 homepage = "https://aka.ms/vsls-docs"; 129 127 license = licenses.unfree;