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/audio | |
parent | 66ed9c811ea3f2a49443b8788b07244d9d982348 (diff) |
treewide: remove global with lib; in pkgs/{audio,blockchain,editors}
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r-- | pkgs/applications/audio/asunder/default.nix | 18 | ||||
-rw-r--r-- | pkgs/applications/audio/carla/default.nix | 10 | ||||
-rw-r--r-- | pkgs/applications/audio/cmus/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/audio/crip/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/audio/fmit/default.nix | 16 | ||||
-rw-r--r-- | pkgs/applications/audio/goattracker/default.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/audio/musescore/darwin.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/audio/ncmpc/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/audio/renoise/default.nix | 6 |
9 files changed, 38 insertions, 55 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" ]; }; |