1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

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

This commit is contained in:
Shawn8901 2023-01-21 23:06:40 +01:00
parent 66ed9c811e
commit 3866fa44a7
31 changed files with 145 additions and 198 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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)" ];

View file

@ -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 ];
};
}

View file

@ -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

View file

@ -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;
};
}

View file

@ -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=";
};

View file

@ -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)";

View file

@ -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" ];
};

View file

@ -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 ];

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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 [
] ++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
@ -70,11 +69,11 @@ 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;
meta = {
meta = with lib; {
description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol";
longDescription= ''
The Elements blockchain platform is a collection of feature experiments and extensions to the

View file

@ -9,10 +9,8 @@
, fmt
}:
with lib;
mkDerivation rec {
pname = "litecoin" + optionalString (!withGui) "d";
pname = "litecoin" + lib.optionalString (!withGui) "d";
version = "0.21.2.1";
src = fetchFromGitHub {
@ -25,11 +23,11 @@ mkDerivation rec {
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ openssl db48 boost zlib zeromq fmt
miniupnpc glib protobuf util-linux libevent ]
++ optionals stdenv.isDarwin [ AppKit ]
++ optionals withGui [ qtbase qttools qrencode ];
++ lib.optionals stdenv.isDarwin [ AppKit ]
++ lib.optionals withGui [ qtbase qttools qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
++ optionals withGui [
++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ];
@ -40,7 +38,7 @@ mkDerivation rec {
./src/test/test_litecoin
'';
meta = {
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm";
longDescription= ''

View file

@ -14,8 +14,6 @@
, python3
}:
with lib;
stdenv.mkDerivation rec {
pname = "particl-core";
version = "23.0.3.0";
@ -33,7 +31,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--disable-bench"
"--with-boost-libdir=${boost.out}/lib"
] ++ optionals (!doCheck) [
] ++ lib.optionals (!doCheck) [
"--enable-tests=no"
];
@ -42,7 +40,7 @@ stdenv.mkDerivation rec {
preCheck = "patchShebangs test";
enableParallelBuilding = true;
meta = {
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
description = "Privacy-Focused Marketplace & Decentralized Application Platform";
longDescription = ''

View file

@ -16,13 +16,11 @@
, wrapQtAppsHook ? null
}:
with lib;
stdenv.mkDerivation rec {
pname = "vertcoin";
version = "0.18.0";
name = pname + toString (optional (!withGui) "d") + "-" + version;
name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
src = fetchFromGitHub {
owner = pname + "-project";
@ -35,7 +33,7 @@ stdenv.mkDerivation rec {
autoreconfHook
pkg-config
hexdump
] ++ optionals withGui [
] ++ lib.optionals withGui [
wrapQtAppsHook
];
@ -46,7 +44,7 @@ stdenv.mkDerivation rec {
db4
zeromq
gmp
] ++ optionals withGui [
] ++ lib.optionals withGui [
qtbase
qttools
protobuf
@ -56,12 +54,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 = "A digital currency with mining decentralisation and ASIC resistance as a key focus";
homepage = "https://vertcoin.org/";
license = licenses.mit;

View file

@ -2,7 +2,6 @@
, readline, libsodium, rapidjson
}:
with lib;
stdenv.mkDerivation rec {
pname = "wownero";
version = "0.8.0.1";
@ -41,7 +40,7 @@ stdenv.mkDerivation rec {
"-DMANUAL_SUBMODULES=ON"
];
meta = {
meta = with lib; {
description = ''
A privacy-centric memecoin that was fairly launched on April 1, 2018 with
no pre-mine, stealth-mine or ICO

View file

@ -30,8 +30,6 @@
, yelp-tools
}:
with lib;
stdenv.mkDerivation rec {
pname = "lightdm";
version = "1.32.0";
@ -69,7 +67,7 @@ stdenv.mkDerivation rec {
libxklavier
pam
polkit
] ++ optional withQt5 qtbase;
] ++ lib.optional withQt5 qtbase;
patches = [
# Adds option to disable writing dmrc files
@ -96,7 +94,7 @@ stdenv.mkDerivation rec {
"--sysconfdir=/etc"
"--disable-tests"
"--disable-dmrc"
] ++ optional withQt5 "--enable-liblightdm-qt5";
] ++ lib.optional withQt5 "--enable-liblightdm-qt5";
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
@ -120,7 +118,7 @@ stdenv.mkDerivation rec {
};
meta = {
meta = with lib; {
homepage = "https://github.com/canonical/lightdm";
description = "A cross-desktop display manager";
platforms = platforms.linux;

View file

@ -2,8 +2,6 @@
, contribPlugins ? false, hunspell, gamin, boost, wrapGAppsHook
}:
with lib;
stdenv.mkDerivation rec {
name = "${pname}-${lib.optionalString contribPlugins "full-"}${version}";
version = "20.03";
@ -16,7 +14,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config file zip wrapGAppsHook ];
buildInputs = [ wxGTK31 gtk3 ]
++ optionals contribPlugins [ hunspell gamin boost ];
++ lib.optionals contribPlugins [ hunspell gamin boost ];
enableParallelBuilding = true;
patches = [
./writable-projects.patch
@ -56,16 +54,16 @@ stdenv.mkDerivation rec {
})
];
preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file";
postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
configureFlags = [ "--enable-pch=no" ] ++ optionals contribPlugins [
("--with-contrib-plugins" + optionalString stdenv.isDarwin "=all,-FileManager,-NassiShneiderman")
postConfigure = lib.optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
configureFlags = [ "--enable-pch=no" ] ++ lib.optionals contribPlugins [
("--with-contrib-plugins" + lib.optionalString stdenv.isDarwin "=all,-FileManager,-NassiShneiderman")
"--with-boost-libdir=${boost}/lib"
];
postInstall = optionalString stdenv.isDarwin ''
postInstall = lib.optionalString stdenv.isDarwin ''
ln -s $out/lib/codeblocks/plugins $out/share/codeblocks/plugins
'';
meta = {
meta = with lib; {
maintainers = [ maintainers.linquize ];
platforms = platforms.all;
description = "The open source, cross platform, free C, C++ and Fortran IDE";

View file

@ -1,7 +1,5 @@
{ lib, stdenv, fetchurl, makeWrapper, pkg-config, gtk3, librsvg }:
with lib;
stdenv.mkDerivation rec {
pname = "howl";
version = "0.6";
@ -27,7 +25,7 @@ stdenv.mkDerivation rec {
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
'';
meta = {
meta = with lib; {
homepage = "https://howl.io/";
description = "A general purpose, fast and lightweight editor with a keyboard-centric minimalistic user interface";
license = licenses.mit;

View file

@ -11,15 +11,13 @@
, vmopts ? null
}:
with lib;
let
platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ];
ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ];
inherit (stdenv.hostPlatform) system;
versions = builtins.fromJSON (readFile (./versions.json));
versions = builtins.fromJSON (lib.readFile (./versions.json));
versionKey = if stdenv.isLinux then "linux" else system;
products = versions.${versionKey} or (throw "Unsupported system: ${system}");
@ -42,11 +40,11 @@ let
maintainers = with maintainers; [ edwtjo mic92 ];
};
}).overrideAttrs (attrs: {
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ lib.optionals (stdenv.isLinux) [
autoPatchelfHook
patchelf
];
buildInputs = (attrs.buildInputs or []) ++ optionals (stdenv.isLinux) [
buildInputs = (attrs.buildInputs or []) ++ lib.optionals (stdenv.isLinux) [
python3
stdenv.cc.cc
libdbusmenu
@ -54,7 +52,7 @@ let
expat
];
dontAutoPatchelf = true;
postFixup = (attrs.postFixup or "") + optionalString (stdenv.isLinux) ''
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
(
cd $out/clion
# bundled cmake does not find libc
@ -217,7 +215,7 @@ let
'';
maintainers = with maintainers; [ ];
};
}).overrideAttrs (finalAttrs: previousAttrs: optionalAttrs cythonSpeedup {
}).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs cythonSpeedup {
buildInputs = with python3.pkgs; [ python3 setuptools ];
preInstall = ''
echo "compiling cython debug speedups"

View file

@ -5,10 +5,8 @@
{ pname, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
with lib;
let loName = toLower productShort;
hiName = toUpper productShort;
let loName = lib.toLower productShort;
hiName = lib.toUpper productShort;
vmoptsName = loName
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
+ ".vmoptions";
@ -29,7 +27,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
startupWMClass = wmClass;
};
vmoptsFile = optionalString (vmopts != null) (writeText vmoptsName vmopts);
vmoptsFile = lib.optionalString (vmopts != null) (writeText vmoptsName vmopts);
nativeBuildInputs = [ makeWrapper patchelf unzip ];

View file

@ -3,13 +3,11 @@
libXdmcp, libxkbcommon, libpthreadstubs, wrapGAppsHook, aspellDicts, gtkmm3,
coreutils, glibc, dbus, openssl, libxml2, gnumake, ctags }:
with lib;
stdenv.mkDerivation rec {
pname = "juicipp";
version = "1.2.3";
meta = {
meta = with lib; {
homepage = "https://github.com/cppit/jucipp";
description = "A lightweight, platform independent C++-IDE with support for C++11, C++14, and experimental C++17 features depending on libclang version";
license = licenses.mit;

View file

@ -1,7 +1,5 @@
{ lib, stdenv, fetchFromGitHub }:
with lib;
stdenv.mkDerivation rec {
pname = "kakoune-unwrapped";
version = "2022.10.31";
@ -33,7 +31,7 @@ stdenv.mkDerivation rec {
ln -s --relative "$autoload_target" autoload
'';
meta = {
meta = with lib; {
homepage = "http://kakoune.org/";
description = "A vim inspired text editor";
license = licenses.publicDomain;

View file

@ -4,8 +4,6 @@
assert enableNls -> (gettext != null);
with lib;
let
nixSyntaxHighlight = fetchFromGitHub {
owner = "seitz";
@ -23,7 +21,7 @@ in stdenv.mkDerivation rec {
sha256 = "V7p1Hpt1GfD23e5QUgLjh8dd3kQMH3qhuTEMw4FAaDY=";
};
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
nativeBuildInputs = [ texinfo ] ++ lib.optional enableNls gettext;
buildInputs = [ ncurses ];
outputs = [ "out" "info" ];
@ -71,7 +69,7 @@ in stdenv.mkDerivation rec {
'';
};
meta = {
meta = with lib; {
homepage = "https://www.nano-editor.org/";
description = "A small, user-friendly console text editor";
license = licenses.gpl3Plus;

View file

@ -5,8 +5,6 @@
, python3Packages
, callPackage
}:
with lib;
neovim:
let
@ -32,7 +30,7 @@ let
}@args:
let
wrapperArgsStr = if isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs;
wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs;
# If configure != {}, we can't generate the rplugin.vim file with e.g
# NVIM_SYSTEM_RPLUGIN_MANIFEST *and* NVIM_RPLUGIN_MANIFEST env vars set in
@ -43,7 +41,7 @@ let
finalMakeWrapperArgs =
[ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim" ]
++ [ "--set" "NVIM_SYSTEM_RPLUGIN_MANIFEST" "${placeholder "out"}/rplugin.vim" ]
++ optionals wrapRc [ "--add-flags" "-u ${writeText "init.vim" neovimRcContent}" ]
++ lib.optionals wrapRc [ "--add-flags" "-u ${writeText "init.vim" neovimRcContent}" ]
;
in
assert withPython2 -> throw "Python2 support has been removed from the neovim wrapper, please remove withPython2 and python2Env.";
@ -57,22 +55,22 @@ let
substitute ${neovim}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \
--replace 'Name=Neovim' 'Name=Neovim wrapper'
''
+ optionalString withPython3 ''
+ lib.optionalString withPython3 ''
makeWrapper ${python3Env.interpreter} $out/bin/nvim-python3 --unset PYTHONPATH
''
+ optionalString (rubyEnv != null) ''
+ lib.optionalString (rubyEnv != null) ''
ln -s ${rubyEnv}/bin/neovim-ruby-host $out/bin/nvim-ruby
''
+ optionalString withNodeJs ''
+ lib.optionalString withNodeJs ''
ln -s ${nodePackages.neovim}/bin/neovim-node-host $out/bin/nvim-node
''
+ optionalString vimAlias ''
+ lib.optionalString vimAlias ''
ln -s $out/bin/nvim $out/bin/vim
''
+ optionalString viAlias ''
+ lib.optionalString viAlias ''
ln -s $out/bin/nvim $out/bin/vi
''
+ optionalString (manifestRc != null) (let
+ lib.optionalString (manifestRc != null) (let
manifestWrapperArgs =
[ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim-wrapper" ];
in ''

View file

@ -206,7 +206,7 @@ in
homepage = "https://www.rstudio.com/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ ciil cfhammill ];
mainProgram = "rstudio" + optionalString server "-server";
mainProgram = "rstudio" + lib.optionalString server "-server";
platforms = platforms.linux;
};

View file

@ -7,8 +7,6 @@
, desktop-file-utils, xprop, xsel
}:
with lib;
let
# https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually
libs = [
@ -118,12 +116,12 @@ in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtens
# which will break when copying over the files.
mv dotnet_modules/vsls-agent{,-wrapped}
makeWrapper $PWD/dotnet_modules/vsls-agent{-wrapped,} \
--prefix LD_LIBRARY_PATH : "${makeLibraryPath libs}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libs}" \
--set LD_PRELOAD $PWD/dotnet_modules/noop-syslog.so \
--set DOTNET_ROOT ${dotnet-sdk_3}
'';
meta = {
meta = with lib; {
description = "Live Share lets you achieve greater confidence at speed by streamlining collaborative editing, debugging, and more in real-time during development";
homepage = "https://aka.ms/vsls-docs";
license = licenses.unfree;