diff options
author | Shawn8901 <shawn8901@googlemail.com> | 2023-01-21 23:06:40 +0100 |
---|---|---|
committer | Shawn8901 <shawn8901@googlemail.com> | 2023-01-21 23:11:12 +0100 |
commit | 3866fa44a7f9fae7c83e53e7eea295e1f9212055 (patch) | |
tree | 516a1bc6c163a49132c65fb1a193757b103706b4 /pkgs/applications | |
parent | 66ed9c811ea3f2a49443b8788b07244d9d982348 (diff) |
treewide: remove global with lib; in pkgs/{audio,blockchain,editors}
Diffstat (limited to 'pkgs/applications')
31 files changed, 145 insertions, 198 deletions
diff --git a/pkgs/applications/audio/asunder/default.nix b/pkgs/applications/audio/asunder/default.nix index c3cba87e300c..d6efada90763 100644 --- a/pkgs/applications/audio/asunder/default.nix +++ b/pkgs/applications/audio/asunder/default.nix @@ -9,8 +9,6 @@ #, aacSupport ? false, TODO: neroAacEnc }: -with lib; - stdenv.mkDerivation rec { version = "2.9.7"; pname = "asunder"; @@ -23,20 +21,20 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2 libcddb ]; runtimeDeps = - optional mp3Support lame ++ - optional oggSupport vorbis-tools ++ - optional flacSupport flac ++ - optional opusSupport opusTools ++ - optional wavpackSupport wavpack ++ - optional monkeysAudioSupport monkeysAudio ++ + lib.optional mp3Support lame ++ + lib.optional oggSupport vorbis-tools ++ + lib.optional flacSupport flac ++ + lib.optional opusSupport opusTools ++ + lib.optional wavpackSupport wavpack ++ + lib.optional monkeysAudioSupport monkeysAudio ++ [ cdparanoia ]; postInstall = '' wrapProgram "$out/bin/asunder" \ - --prefix PATH : "${makeBinPath runtimeDeps}" + --prefix PATH : "${lib.makeBinPath runtimeDeps}" ''; - meta = { + meta = with lib; { description = "A graphical Audio CD ripper and encoder for Linux"; homepage = "http://littlesvr.ca/asunder/index.php"; license = licenses.gpl2; diff --git a/pkgs/applications/audio/carla/default.nix b/pkgs/applications/audio/carla/default.nix index 82259d563ce9..70ef1ebdf644 100644 --- a/pkgs/applications/audio/carla/default.nix +++ b/pkgs/applications/audio/carla/default.nix @@ -5,8 +5,6 @@ withGtk2 ? true, gtk2 ? null, withGtk3 ? true, gtk3 ? null }: -with lib; - assert withFrontend -> python3Packages ? pyqt5; assert withQt -> qtbase != null; assert withQt -> wrapQtAppsHook != null; @@ -30,13 +28,13 @@ stdenv.mkDerivation rec { pythonPath = with python3Packages; [ rdflib pyliblo - ] ++ optional withFrontend pyqt5; + ] ++ lib.optional withFrontend pyqt5; buildInputs = [ file liblo alsa-lib fluidsynth jack2 libpulseaudio libsndfile - ] ++ optional withQt qtbase - ++ optional withGtk2 gtk2 - ++ optional withGtk3 gtk3; + ] ++ lib.optional withQt qtbase + ++ lib.optional withGtk2 gtk2 + ++ lib.optional withGtk3 gtk3; propagatedBuildInputs = pythonPath; diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix index 66c172ff01d8..61ff53aa1d75 100644 --- a/pkgs/applications/audio/cmus/default.nix +++ b/pkgs/applications/audio/cmus/default.nix @@ -39,8 +39,6 @@ #, vtxSupport ? true, libayemu ? null }: -with lib; - assert samplerateSupport -> jackSupport; # vorbis and tremor are mutually exclusive @@ -113,16 +111,16 @@ stdenv.mkDerivation rec { patches = [ ./option-debugging.patch ]; - configurePhase = "./configure " + concatStringsSep " " ([ + configurePhase = "./configure " + lib.concatStringsSep " " ([ "prefix=$out" "CONFIG_WAV=y" - ] ++ concatMap (a: a.flags) opts); + ] ++ lib.concatMap (a: a.flags) opts); nativeBuildInputs = [ pkg-config ]; buildInputs = [ ncurses ] ++ lib.optional stdenv.cc.isClang clangGCC ++ lib.optionals stdenv.isDarwin [ libiconv CoreAudio AudioUnit VideoToolbox ] - ++ flatten (concatMap (a: a.deps) opts); + ++ lib.flatten (lib.concatMap (a: a.deps) opts); makeFlags = [ "LD=$(CC)" ]; diff --git a/pkgs/applications/audio/crip/default.nix b/pkgs/applications/audio/crip/default.nix index d41ebed09606..f837ad6603e3 100644 --- a/pkgs/applications/audio/crip/default.nix +++ b/pkgs/applications/audio/crip/default.nix @@ -16,8 +16,6 @@ , which }: -with lib; - stdenv.mkDerivation rec { pname = "crip"; version = "3.9"; @@ -29,7 +27,7 @@ stdenv.mkDerivation rec { buildInputs = [ perlPackages.perl perlPackages.CDDB_get ]; nativeBuildInputs = [ makeWrapper ]; - toolDeps = makeBinPath [ + toolDeps = lib.makeBinPath [ cdparanoia coreutils eject @@ -46,7 +44,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin/ - for script in ${escapeShellArgs scripts}; do + for script in ${lib.escapeShellArgs scripts}; do cp $script $out/bin/ substituteInPlace $out/bin/$script \ @@ -63,6 +61,6 @@ stdenv.mkDerivation rec { description = "Terminal-based ripper/encoder/tagger tool for creating Ogg Vorbis/FLAC files"; license = lib.licenses.gpl1Only; platforms = lib.platforms.linux; - maintainers = [ maintainers.endgame ]; + maintainers = [ lib.maintainers.endgame ]; }; } diff --git a/pkgs/applications/audio/fmit/default.nix b/pkgs/applications/audio/fmit/default.nix index 7e376c89d36a..7fcfeb32fd3a 100644 --- a/pkgs/applications/audio/fmit/default.nix +++ b/pkgs/applications/audio/fmit/default.nix @@ -7,8 +7,6 @@ assert alsaSupport -> alsa-lib != null; assert jackSupport -> libjack2 != null; assert portaudioSupport -> portaudio != null; -with lib; - mkDerivation rec { pname = "fmit"; version = "1.2.14"; @@ -22,9 +20,9 @@ mkDerivation rec { nativeBuildInputs = [ qmake itstool wrapQtAppsHook ]; buildInputs = [ fftw qtbase qtmultimedia ] - ++ optionals alsaSupport [ alsa-lib ] - ++ optionals jackSupport [ libjack2 ] - ++ optionals portaudioSupport [ portaudio ]; + ++ lib.optionals alsaSupport [ alsa-lib ] + ++ lib.optionals jackSupport [ libjack2 ] + ++ lib.optionals portaudioSupport [ portaudio ]; postPatch = '' substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}' @@ -32,13 +30,13 @@ mkDerivation rec { preConfigure = '' qmakeFlags="$qmakeFlags \ - CONFIG+=${optionalString alsaSupport "acs_alsa"} \ - CONFIG+=${optionalString jackSupport "acs_jack"} \ - CONFIG+=${optionalString portaudioSupport "acs_portaudio"} \ + CONFIG+=${lib.optionalString alsaSupport "acs_alsa"} \ + CONFIG+=${lib.optionalString jackSupport "acs_jack"} \ + CONFIG+=${lib.optionalString portaudioSupport "acs_portaudio"} \ PREFIXSHORTCUT=$out" ''; - meta = { + meta = with lib; { description = "Free Musical Instrument Tuner"; longDescription = '' FMIT is a graphical utility for tuning musical instruments, with error diff --git a/pkgs/applications/audio/goattracker/default.nix b/pkgs/applications/audio/goattracker/default.nix index 1fb848ae1eda..b85aa4c0df76 100644 --- a/pkgs/applications/audio/goattracker/default.nix +++ b/pkgs/applications/audio/goattracker/default.nix @@ -8,12 +8,11 @@ , isStereo ? false }: -with lib; let - pname = "goattracker" + optionalString isStereo "-stereo"; + pname = "goattracker" + lib.optionalString isStereo "-stereo"; desktopItem = makeDesktopItem { name = pname; - desktopName = "GoatTracker 2" + optionalString isStereo " Stereo"; + desktopName = "GoatTracker 2" + lib.optionalString isStereo " Stereo"; genericName = "Music Tracker"; exec = if isStereo then "gt2stereo" @@ -30,7 +29,7 @@ in stdenv.mkDerivation rec { else "2.76"; # normal src = fetchurl { - url = "mirror://sourceforge/goattracker2/GoatTracker_${version}${optionalString isStereo "_Stereo"}.zip"; + url = "mirror://sourceforge/goattracker2/GoatTracker_${version}${lib.optionalString isStereo "_Stereo"}.zip"; sha256 = if isStereo then "1hiig2d152sv9kazwz33i56x1c54h5sh21ipkqnp6qlnwj8x1ksy" # stereo else "0d7a3han4jw4bwiba3j87racswaajgl3pj4sb5lawdqdxicv3dn1"; # normal @@ -63,11 +62,11 @@ in stdenv.mkDerivation rec { meta = { description = "A crossplatform music editor for creating Commodore 64 music. Uses reSID library by Dag Lem and supports alternatively HardSID & CatWeasel devices" - + optionalString isStereo " - Stereo version"; + + lib.optionalString isStereo " - Stereo version"; homepage = "https://cadaver.github.io/tools.html"; downloadPage = "https://sourceforge.net/projects/goattracker2/"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ fgaz ]; - platforms = platforms.all; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ fgaz ]; + platforms = lib.platforms.all; }; } diff --git a/pkgs/applications/audio/musescore/darwin.nix b/pkgs/applications/audio/musescore/darwin.nix index add56f99d9b3..88b5d3b74c15 100644 --- a/pkgs/applications/audio/musescore/darwin.nix +++ b/pkgs/applications/audio/musescore/darwin.nix @@ -5,17 +5,15 @@ let appName = "MuseScore ${builtins.head versionComponents}"; in -with lib; - stdenv.mkDerivation rec { pname = "musescore-darwin"; - version = concatStringsSep "." versionComponents; + version = lib.concatStringsSep "." versionComponents; # The disk image contains the .app and a symlink to /Applications. sourceRoot = "${appName}.app"; src = fetchurl { - url = "https://github.com/musescore/MuseScore/releases/download/v${concatStringsSep "." (take 3 versionComponents)}/MuseScore-${version}.dmg"; + url = "https://github.com/musescore/MuseScore/releases/download/v${lib.concatStringsSep "." (lib.take 3 versionComponents)}/MuseScore-${version}.dmg"; sha256 = "sha256-lHckfhTTrDzaGwlbnZ5w0O1gMPbRmrmgATIGMY517l0="; }; diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix index 739d0c3c499e..870691ae1c3f 100644 --- a/pkgs/applications/audio/ncmpc/default.nix +++ b/pkgs/applications/audio/ncmpc/default.nix @@ -12,8 +12,6 @@ , pcreSupport ? false, pcre ? null }: -with lib; - assert pcreSupport -> pcre != null; stdenv.mkDerivation rec { @@ -28,13 +26,13 @@ stdenv.mkDerivation rec { }; buildInputs = [ glib ncurses libmpdclient boost ] - ++ optional pcreSupport pcre; + ++ lib.optional pcreSupport pcre; nativeBuildInputs = [ meson ninja pkg-config gettext ]; mesonFlags = [ "-Dlirc=disabled" "-Ddocumentation=disabled" - ] ++ optional (!pcreSupport) "-Dregex=disabled"; + ] ++ lib.optional (!pcreSupport) "-Dregex=disabled"; meta = with lib; { description = "Curses-based interface for MPD (music player daemon)"; diff --git a/pkgs/applications/audio/renoise/default.nix b/pkgs/applications/audio/renoise/default.nix index 1be3f53dce5f..44dbff6077bc 100644 --- a/pkgs/applications/audio/renoise/default.nix +++ b/pkgs/applications/audio/renoise/default.nix @@ -1,15 +1,13 @@ { lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsa-lib , mpg123, releasePath ? null }: -with lib; - # To use the full release version: # 1) Sign into https://backstage.renoise.com and download the release version to some stable location. # 2) Override the releasePath attribute to point to the location of the newly downloaded bundle. # Note: Renoise creates an individual build for each license which screws somewhat with the # use of functions like requireFile as the hash will be different for every user. let - urlVersion = replaceStrings [ "." ] [ "_" ]; + urlVersion = lib.replaceStrings [ "." ] [ "_" ]; in stdenv.mkDerivation rec { @@ -80,7 +78,7 @@ stdenv.mkDerivation rec { description = "Modern tracker-based DAW"; homepage = "https://www.renoise.com/"; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - license = licenses.unfree; + license = lib.licenses.unfree; maintainers = []; platforms = [ "x86_64-linux" ]; }; diff --git a/pkgs/applications/blockchains/bitcoin-knots/default.nix b/pkgs/applications/blockchains/bitcoin-knots/default.nix index ae64247a8be2..d1e419425570 100644 --- a/pkgs/applications/blockchains/bitcoin-knots/default.nix +++ b/pkgs/applications/blockchains/bitcoin-knots/default.nix @@ -23,7 +23,6 @@ , withWallet ? true }: -with lib; stdenv.mkDerivation rec { pname = if withGui then "bitcoin-knots" else "bitcoind-knots"; version = "23.0.knots20220529"; @@ -35,24 +34,24 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ optionals stdenv.isLinux [ util-linux ] - ++ optionals stdenv.isDarwin [ hexdump ] - ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] - ++ optionals withGui [ wrapQtAppsHook ]; + ++ lib.optionals stdenv.isLinux [ util-linux ] + ++ lib.optionals stdenv.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] - ++ optionals withWallet [ db48 sqlite ] - ++ optionals withGui [ qrencode qtbase qttools ]; + ++ lib.optionals withWallet [ db48 sqlite ] + ++ lib.optionals withGui [ qrencode qtbase qttools ]; configureFlags = [ "--with-boost-libdir=${boost.out}/lib" "--disable-bench" - ] ++ optionals (!doCheck) [ + ] ++ lib.optionals (!doCheck) [ "--disable-tests" "--disable-gui-tests" - ] ++ optionals (!withWallet) [ + ] ++ lib.optionals (!withWallet) [ "--disable-wallet" - ] ++ optionals withGui [ + ] ++ lib.optionals withGui [ "--with-gui=qt5" "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ]; @@ -65,7 +64,7 @@ stdenv.mkDerivation rec { [ "LC_ALL=en_US.UTF-8" ] # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. # See also https://github.com/NixOS/nixpkgs/issues/24256 - ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; + ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; enableParallelBuilding = true; @@ -73,7 +72,7 @@ stdenv.mkDerivation rec { smoke-test = nixosTests.bitcoind-knots; }; - meta = { + meta = with lib; { description = "A derivative of Bitcoin Core with a collection of improvements"; homepage = "https://bitcoinknots.org/"; maintainers = with maintainers; [ prusnak mmahut ]; diff --git a/pkgs/applications/blockchains/bitcoin-unlimited/default.nix b/pkgs/applications/blockchains/bitcoin-unlimited/default.nix index d019c3f02d6d..3fbf9615f7db 100644 --- a/pkgs/applications/blockchains/bitcoin-unlimited/default.nix +++ b/pkgs/applications/blockchains/bitcoin-unlimited/default.nix @@ -3,10 +3,8 @@ , withGui, wrapQtAppsHook ? null, qtbase ? null, qttools ? null , Foundation, ApplicationServices, AppKit }: -with lib; - stdenv.mkDerivation rec { - pname = "bitcoin" + optionalString (!withGui) "d" + "-unlimited"; + pname = "bitcoin" + lib.optionalString (!withGui) "d" + "-unlimited"; version = "1.10.0.0"; src = fetchFromGitLab { @@ -17,19 +15,19 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config autoreconfHook python3 ] - ++ optionals withGui [ wrapQtAppsHook qttools ]; + ++ lib.optionals withGui [ wrapQtAppsHook qttools ]; buildInputs = [ openssl db48 boost zlib miniupnpc util-linux protobuf libevent ] - ++ optionals withGui [ qtbase qttools qrencode ] - ++ optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ]; + ++ lib.optionals withGui [ qtbase qttools qrencode ] + ++ lib.optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ]; configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ] - ++ optionals withGui [ "--with-gui=qt5" + ++ lib.optionals withGui [ "--with-gui=qt5" "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ]; enableParallelBuilding = true; - meta = { + meta = with lib; { description = "Peer-to-peer electronic cash system (Unlimited client)"; longDescription= '' Bitcoin is a free open source peer-to-peer electronic cash system that is diff --git a/pkgs/applications/blockchains/bitcoin/default.nix b/pkgs/applications/blockchains/bitcoin/default.nix index de5ce51d0654..98483391973d 100644 --- a/pkgs/applications/blockchains/bitcoin/default.nix +++ b/pkgs/applications/blockchains/bitcoin/default.nix @@ -23,7 +23,6 @@ , withWallet ? true }: -with lib; let desktop = fetchurl { # c2e5f3e is the last commit when the debian/bitcoin-qt.desktop file was changed @@ -45,16 +44,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ optionals stdenv.isLinux [ util-linux ] - ++ optionals stdenv.isDarwin [ hexdump ] - ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] - ++ optionals withGui [ wrapQtAppsHook ]; + ++ lib.optionals stdenv.isLinux [ util-linux ] + ++ lib.optionals stdenv.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] - ++ optionals withWallet [ db48 sqlite ] - ++ optionals withGui [ qrencode qtbase qttools ]; + ++ lib.optionals withWallet [ db48 sqlite ] + ++ lib.optionals withGui [ qrencode qtbase qttools ]; - postInstall = optionalString withGui '' + postInstall = lib.optionalString withGui '' install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin" install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png @@ -63,12 +62,12 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-boost-libdir=${boost.out}/lib" "--disable-bench" - ] ++ optionals (!doCheck) [ + ] ++ lib.optionals (!doCheck) [ "--disable-tests" "--disable-gui-tests" - ] ++ optionals (!withWallet) [ + ] ++ lib.optionals (!withWallet) [ "--disable-wallet" - ] ++ optionals withGui [ + ] ++ lib.optionals withGui [ "--with-gui=qt5" "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ]; @@ -81,7 +80,7 @@ stdenv.mkDerivation rec { [ "LC_ALL=en_US.UTF-8" ] # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. # See also https://github.com/NixOS/nixpkgs/issues/24256 - ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; + ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; enableParallelBuilding = true; @@ -89,7 +88,7 @@ stdenv.mkDerivation rec { smoke-test = nixosTests.bitcoind; }; - meta = { + meta = with lib; { description = "Peer-to-peer electronic cash system"; longDescription = '' Bitcoin is a free open source peer-to-peer electronic cash system that is diff --git a/pkgs/applications/blockchains/btcdeb/default.nix b/pkgs/applications/blockchains/btcdeb/default.nix index 4f8a08333a86..f4c00d00858e 100644 --- a/pkgs/applications/blockchains/btcdeb/default.nix +++ b/pkgs/applications/blockchains/btcdeb/default.nix @@ -5,7 +5,6 @@ , openssl }: -with lib; stdenv.mkDerivation rec { pname = "btcdeb"; version = "unstable-2022-04-03"; @@ -20,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ openssl ]; - meta = { + meta = with lib; { description = "Bitcoin Script Debugger"; homepage = "https://github.com/bitcoin-core/btcdeb"; license = licenses.mit; diff --git a/pkgs/applications/blockchains/digibyte/default.nix b/pkgs/applications/blockchains/digibyte/default.nix index 90e84db3638e..4e563d21fa22 100644 --- a/pkgs/applications/blockchains/digibyte/default.nix +++ b/pkgs/applications/blockchains/digibyte/default.nix @@ -15,13 +15,11 @@ , wrapQtAppsHook ? null }: -with lib; - stdenv.mkDerivation rec { pname = "digibyte"; version = "7.17.3"; - name = pname + toString (optional (!withGui) "d") + "-" + version; + name = pname + toString (lib.optional (!withGui) "d") + "-" + version; src = fetchFromGitHub { owner = "digibyte-core"; @@ -34,7 +32,7 @@ stdenv.mkDerivation rec { autoreconfHook pkg-config hexdump - ] ++ optionals withGui [ + ] ++ lib.optionals withGui [ wrapQtAppsHook ]; @@ -44,7 +42,7 @@ stdenv.mkDerivation rec { libevent db4 zeromq - ] ++ optionals withGui [ + ] ++ lib.optionals withGui [ qtbase qttools protobuf @@ -54,12 +52,12 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-boost-libdir=${boost.out}/lib" - ] ++ optionals withGui [ + ] ++ lib.optionals withGui [ "--with-gui=qt5" "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ]; - meta = { + meta = with lib; { description = "DigiByte (DGB) is a rapidly growing decentralized, global blockchain"; homepage = "https://digibyte.io/"; license = licenses.mit; diff --git a/pkgs/applications/blockchains/dogecoin/default.nix b/pkgs/applications/blockchains/dogecoin/default.nix index 6b6cfaa2398d..421c2fe667e0 100644 --- a/pkgs/applications/blockchains/dogecoin/default.nix +++ b/pkgs/applications/blockchains/dogecoin/default.nix @@ -6,9 +6,8 @@ , withGui, withUpnp ? true, withUtils ? true, withWallet ? true , withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }: -with lib; stdenv.mkDerivation rec { - pname = "dogecoin" + optionalString (!withGui) "d"; + pname = "dogecoin" + lib.optionalString (!withGui) "d"; version = "1.14.6"; src = fetchFromGitHub { @@ -18,32 +17,32 @@ stdenv.mkDerivation rec { sha256 = "sha256-PmbmmA2Mq07dwB3cI7A9c/ewtu0I+sWvQT39Yekm/sU="; }; - preConfigure = optionalString withGui '' - export LRELEASE=${getDev qttools}/bin/lrelease + preConfigure = lib.optionalString withGui '' + export LRELEASE=${lib.getDev qttools}/bin/lrelease ''; nativeBuildInputs = [ pkg-config autoreconfHook util-linux ] - ++ optionals withGui [ wrapQtAppsHook qttools ]; + ++ lib.optionals withGui [ wrapQtAppsHook qttools ]; buildInputs = [ openssl protobuf boost zlib libevent ] - ++ optionals withGui [ qtbase qrencode ] - ++ optionals withUpnp [ miniupnpc ] - ++ optionals withWallet [ db5 ] - ++ optionals withZmq [ zeromq ] - ++ optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals withGui [ qtbase qrencode ] + ++ lib.optionals withUpnp [ miniupnpc ] + ++ lib.optionals withWallet [ db5 ] + ++ lib.optionals withZmq [ zeromq ] + ++ lib.optionals stdenv.isDarwin [ Cocoa ]; configureFlags = [ "--with-incompatible-bdb" "--with-boost-libdir=${boost.out}/lib" - ] ++ optionals (!withGui) [ "--with-gui=no" ] - ++ optionals (!withUpnp) [ "--without-miniupnpc" ] - ++ optionals (!withUtils) [ "--without-utils" ] - ++ optionals (!withWallet) [ "--disable-wallet" ] - ++ optionals (!withZmq) [ "--disable-zmq" ]; + ] ++ lib.optionals (!withGui) [ "--with-gui=no" ] + ++ lib.optionals (!withUpnp) [ "--without-miniupnpc" ] + ++ lib.optionals (!withUtils) [ "--without-utils" ] + ++ lib.optionals (!withWallet) [ "--disable-wallet" ] + ++ lib.optionals (!withZmq) [ "--disable-zmq" ]; enableParallelBuilding = true; - meta = { + meta = with lib; { description = "Wow, such coin, much shiba, very rich"; longDescription = '' Dogecoin is a decentralized, peer-to-peer digital currency that diff --git a/pkgs/applications/blockchains/elements/default.nix b/pkgs/applications/blockchains/elements/default.nix index 0ffaa4c83c01..a39cbc341e89 100644 --- a/pkgs/applications/blockchains/elements/default.nix +++ b/pkgs/applications/blockchains/elements/default.nix @@ -22,7 +22,6 @@ , withWallet ? true }: -with lib; stdenv.mkDerivation rec { pname = if withGui then "elements" else "elementsd"; version = "22.0.2"; @@ -36,24 +35,24 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ optionals stdenv.isLinux [ util-linux ] - ++ optionals stdenv.isDarwin [ hexdump ] - ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] - ++ optionals withGui [ wrapQtAppsHook ]; + ++ lib.optionals stdenv.isLinux [ util-linux ] + ++ lib.optionals stdenv.isDarwin [ hexdump ] + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ lib.optionals withGui [ wrapQtAppsHook ]; buildInputs = [ boost libevent miniupnpc zeromq zlib ] - ++ optionals withWallet [ db48 sqlite ] - ++ optionals withGui [ qrencode qtbase qttools ]; + ++ lib.optionals withWallet [ db48 sqlite ] + ++ lib.optionals withGui [ qrencode qtbase qttools ]; configureFlags = [ "--with-boost-libdir=${boost.out}/lib" "--disable-bench" - ] ++ optionals (!doCheck) [ + ] ++ lib.optionals (!doCheck) [ "--disable-tests" "--disable-gui-tests" - ] ++ optionals (!withWallet) [ + ] ++ lib.optionals (!withWallet) [ "--disable-wallet" - ] ++ optionals withGui [ + ] ++ |