Skip to content

Commit

Permalink
Merge pull request #56088 from oxij/tree/move-defaults-to-package-tri…
Browse files Browse the repository at this point in the history
…vial-leftovers

all-packages.nix: move defaults to package files continues^3
  • Loading branch information
7c6f434c authored Feb 20, 2019
2 parents ef8963c + e856228 commit 828759f
Show file tree
Hide file tree
Showing 30 changed files with 113 additions and 158 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/audio/openmpt123/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, zlib, pkgconfig, mpg123, libogg, libvorbis, portaudio, libsndfile, flac
, usePulseAudio ? false, libpulseaudio }:
{ config, stdenv, fetchurl, zlib, pkgconfig, mpg123, libogg, libvorbis, portaudio, libsndfile, flac
, usePulseAudio ? config.pulseaudio or false, libpulseaudio }:

let
version = "0.4.1";
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/graphics/ahoviewer/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, libconfig,
gtkmm2, glibmm, libxml2, libsecret, curl, libzip,
librsvg, gst_all_1, autoreconfHook, makeWrapper,
useUnrar ? false, unrar
{ config, stdenv, fetchFromGitHub, pkgconfig, libconfig
, gtkmm2, glibmm, libxml2, libsecret, curl, libzip
, librsvg, gst_all_1, autoreconfHook, makeWrapper
, useUnrar ? config.ahoviewer.useUnrar or false, unrar
}:

assert useUnrar -> unrar != null;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/audio/sox/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchurl
{ config, lib, stdenv, fetchurl
, enableAlsa ? true, alsaLib ? null
, enableLibao ? true, libao ? null
, enableLame ? false, lame ? null
, enableLame ? config.sox.enableLame or false, lame ? null
, enableLibmad ? true, libmad ? null
, enableLibogg ? true, libogg ? null, libvorbis ? null
, enableFLAC ? true, flac ? null
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/misc/zathura/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ pkgs, useMupdf ? true, synctexSupport ? true }:
{ config, pkgs
, useMupdf ? config.zathura.useMupdf or true
, synctexSupport ? true }:

let
callPackage = pkgs.newScope self;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchurl, stdenv, wrapGAppsHook, autoreconfHook
{ config, fetchurl, stdenv, wrapGAppsHook, autoreconfHook
, curl, dbus, dbus-glib, enchant, gtk2, gnutls, gnupg, gpgme, hicolor-icon-theme
, libarchive, libcanberra-gtk2, libetpan, libnotify, libsoup, libxml2, networkmanager
, openldap, perl, pkgconfig, poppler, python, shared-mime-info, webkitgtk24x-gtk2
Expand All @@ -10,7 +10,7 @@
# gdata requires libgdata
# geolocation requires libchamplain
, enableLdap ? false
, enableNetworkManager ? false
, enableNetworkManager ? config.networking.networkmanager.enable or false
, enablePgp ? true
, enablePluginArchive ? false
, enablePluginFancy ? false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ stdenv
{ config, stdenv
, callPackage
, lib
, fetchurl
, unzip
, licenseAccepted ? false
, licenseAccepted ? config.sc2-headless.accept_license or false
}:

if !licenseAccepted then throw ''
Expand Down
54 changes: 27 additions & 27 deletions pkgs/applications/video/mpv/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ stdenv, fetchurl, fetchFromGitHub, makeWrapper
{ config, stdenv, fetchurl, fetchFromGitHub, makeWrapper
, docutils, perl, pkgconfig, python3, which, ffmpeg_4
, freefont_ttf, freetype, libass, libpthreadstubs, mujs
, lua, libuchardet, libiconv ? null, darwin

, waylandSupport ? false
, waylandSupport ? stdenv.isLinux
, wayland ? null
, wayland-protocols ? null
, libxkbcommon ? null
Expand All @@ -24,30 +24,30 @@
, vulkan-headers ? null
, vulkan-loader ? null

, alsaSupport ? true, alsaLib ? null
, bluraySupport ? true, libbluray ? null
, bs2bSupport ? true, libbs2b ? null
, cacaSupport ? true, libcaca ? null
, cmsSupport ? true, lcms2 ? null
, drmSupport ? true, libdrm ? null
, dvdnavSupport ? true, libdvdnav ? null
, dvdreadSupport ? true, libdvdread ? null
, libpngSupport ? true, libpng ? null
, pulseSupport ? true, libpulseaudio ? null
, rubberbandSupport ? true, rubberband ? null
, screenSaverSupport ? true, libXScrnSaver ? null
, sdl2Support ? true, SDL2 ? null
, speexSupport ? true, speex ? null
, theoraSupport ? true, libtheora ? null
, vaapiSupport ? true, libva ? null
, vdpauSupport ? true, libvdpau ? null
, xineramaSupport ? true, libXinerama ? null
, xvSupport ? true, libXv ? null
, youtubeSupport ? true, youtube-dl ? null
, archiveSupport ? false, libarchive ? null
, jackaudioSupport ? false, libjack2 ? null
, openalSupport ? false, openalSoft ? null
, vapoursynthSupport ? false, vapoursynth ? null
, alsaSupport ? stdenv.isLinux, alsaLib ? null
, bluraySupport ? true, libbluray ? null
, bs2bSupport ? true, libbs2b ? null
, cacaSupport ? true, libcaca ? null
, cmsSupport ? true, lcms2 ? null
, drmSupport ? stdenv.isLinux, libdrm ? null
, dvdnavSupport ? stdenv.isLinux, libdvdnav ? null
, dvdreadSupport ? stdenv.isLinux, libdvdread ? null
, libpngSupport ? true, libpng ? null
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
, rubberbandSupport ? stdenv.isLinux, rubberband ? null
, screenSaverSupport ? true, libXScrnSaver ? null
, sdl2Support ? true, SDL2 ? null
, speexSupport ? true, speex ? null
, theoraSupport ? true, libtheora ? null
, vaapiSupport ? stdenv.isLinux, libva ? null
, vdpauSupport ? true, libvdpau ? null
, xineramaSupport ? stdenv.isLinux, libXinerama ? null
, xvSupport ? stdenv.isLinux, libXv ? null
, youtubeSupport ? true, youtube-dl ? null
, archiveSupport ? false, libarchive ? null
, jackaudioSupport ? false, libjack2 ? null
, openalSupport ? false, openalSoft ? null
, vapoursynthSupport ? false, vapoursynth ? null
}:

with stdenv.lib;
Expand Down Expand Up @@ -92,7 +92,7 @@ let
"http://www.freehackers.org/~tnagy/release/waf-${wafVersion}" ];
sha256 = "0j7sbn3w6bgslvwwh5v9527w3gi2sd08kskrgxamx693y0b0i3ia";
};
luaEnv = lua.withPackages(ps: with ps; [ luasocket]);
luaEnv = lua.withPackages(ps: with ps; [ luasocket ]);

in stdenv.mkDerivation rec {
name = "mpv-${version}";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/video/obs-studio/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv
{ config, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
Expand Down Expand Up @@ -26,9 +26,9 @@
, swig
, python3

, alsaSupport ? false
, alsaSupport ? stdenv.isLinux
, alsaLib
, pulseaudioSupport ? false
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
, libpulseaudio
}:

Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/fetchsvn/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{stdenvNoCC, subversion, glibcLocales, sshSupport ? false, openssh ? null}:
{stdenvNoCC, subversion, glibcLocales, sshSupport ? true, openssh ? null}:
{url, rev ? "HEAD", md5 ? "", sha256 ? ""
, ignoreExternals ? false, ignoreKeywords ? false, name ? null
, preferLocalBuild ? true }:
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/coreclr/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv
{ config, stdenv
, fetchFromGitHub
, fetchpatch
, which
Expand All @@ -14,7 +14,7 @@
, liburcu
, libuuid
, libkrb5
, debug ? false
, debug ? config.coreclr.debug or false
}:

stdenv.mkDerivation rec {
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
, installjdk ? true
, pluginSupport ? true
, installjce ? false
, licenseAccepted ? false
, config
, licenseAccepted ? config.oraclejdk.accept_license or false
, glib
, libxml2
, libav_0_8
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/libraries/gnutls-kdh/generic.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
, guileBindings, guile, perl, gmp, autogen, libidn, p11-kit, unbound, libiconv
{ config, lib, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
, perl, gmp, autogen, libidn, p11-kit, unbound, libiconv
, guileBindings ? config.gnutls.guile or false, guile
, tpmSupport ? true, trousers, nettools, gperftools, gperf, gettext, automake
, yacc, texinfo

Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/libraries/gnutls/generic.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
, guileBindings, guile, perl, gmp, autogen, libidn, p11-kit, libiconv
{ config, lib, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
, perl, gmp, autogen, libidn, p11-kit, libiconv
, guileBindings ? config.gnutls.guile or false, guile
, tpmSupport ? false, trousers, which, nettools, libunistring
, unbound, dns-root-data, gettext

Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/libiodbc/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv, fetchurl, pkgconfig, gtk2, Carbon, useGTK ? false }:
{ config, stdenv, fetchurl, pkgconfig, gtk2, Carbon
, useGTK ? config.libiodbc.gtk or false }:

stdenv.mkDerivation rec {
name = "libiodbc-3.52.12";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/opencv/3.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
, enablePNG ? true, libpng
, enableTIFF ? true, libtiff
, enableWebP ? true, libwebp
, enableEXR ? (!stdenv.isDarwin), openexr, ilmbase
, enableEXR ? !stdenv.isDarwin, openexr, ilmbase
, enableJPEG2K ? true, jasper
, enableEigen ? true, eigen
, enableOpenblas ? true, openblas
, enableContrib ? true

, enableCuda ? (config.cudaSupport or false), cudatoolkit
, enableCuda ? config.cudaSupport or false, cudatoolkit

, enableUnfree ? false
, enableIpp ? false
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/opencv/4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
, enablePNG ? true, libpng
, enableTIFF ? true, libtiff
, enableWebP ? true, libwebp
, enableEXR ? (!stdenv.isDarwin), openexr, ilmbase
, enableEXR ? !stdenv.isDarwin, openexr, ilmbase
, enableJPEG2K ? true, jasper
, enableEigen ? true, eigen
, enableOpenblas ? true, openblas
, enableContrib ? true

, enableCuda ? (config.cudaSupport or false), cudatoolkit
, enableCuda ? config.cudaSupport or false, cudatoolkit

, enableUnfree ? false
, enableIpp ? false
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/qt-3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
, cursorSupport ? true, libXcursor ? null
, threadSupport ? true
, mysqlSupport ? false, mysql ? null
, openglSupport ? false, libGLU_combined ? null, libXmu ? null
, libGLSupported
, openglSupport ? libGLSupported, libGLU_combined ? null, libXmu ? null
, xlibsWrapper, xorgproto, zlib, libjpeg, libpng, which
}:

Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/wxwidgets/2.8/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm, xorgproto
, gstreamer, gst-plugins-base, GConf, libX11, cairo
, withMesa ? true, libGLU ? null, libGL ? null
, libGLSupported
, withMesa ? libGLSupported, libGLU ? null, libGL ? null
, compat24 ? false, compat26 ? true, unicode ? true,
}:

Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/wxwidgets/2.9/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm, xorgproto
, gstreamer, gst-plugins-base, GConf, setfile
, withMesa ? true, libGLU ? null, libGL ? null
, libGLSupported
, withMesa ? libGLSupported, libGLU ? null, libGL ? null
, compat24 ? false, compat26 ? true, unicode ? true
, Carbon ? null, Cocoa ? null, Kernel ? null, QuickTime ? null, AGL ? null
}:
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/wxwidgets/3.0/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{ stdenv, fetchFromGitHub, fetchurl, fetchpatch, pkgconfig
, gtk2, gtk3, libXinerama, libSM, libXxf86vm
, xorgproto, gstreamer, gst-plugins-base, GConf, setfile
, withMesa ? true, libGLU ? null, libGL ? null
, libGLSupported
, withMesa ? libGLSupported, libGLU ? null, libGL ? null
, compat24 ? false, compat26 ? true, unicode ? true
, withGtk2 ? true
, withWebKit ? false, webkitgtk24x-gtk2 ? null, webkitgtk ? null
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/mobile/androidenv/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs ? import <nixpkgs> {}
{ config, pkgs ? import <nixpkgs> {}
, pkgs_i686 ? import <nixpkgs> { system = "i686-linux"; }
, licenseAccepted ? false
, licenseAccepted ? config.android_sdk.accept_license or false
}:

rec {
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/tools/analysis/radare2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
, python3 ? null
, ruby ? null
, lua ? null
, useX11, rubyBindings, pythonBindings, luaBindings
, useX11 ? false
, rubyBindings ? false
, pythonBindings ? false
, luaBindings ? false
}:

assert useX11 -> (gtk2 != null && vte != null && gtkdialog != null);
Expand Down
8 changes: 5 additions & 3 deletions pkgs/games/steam/chrootenv.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{ stdenv, lib, writeScript, buildFHSUserEnv, steam, glxinfo-i686
{ config, stdenv, lib, writeScript, buildFHSUserEnv, steam, glxinfo-i686
, steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null
, withJava ? false
, withPrimus ? false
, extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs
, extraProfile ? "" # string to append to profile
, nativeOnly ? false
, runtimeOnly ? false

# DEPRECATED
, withJava ? config.steam.java or false
, withPrimus ? config.steam.primus or false
}:

let
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/conky/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake
{ config, stdenv, fetchFromGitHub, pkgconfig, cmake

# dependencies
, glib, libXinerama
Expand Down Expand Up @@ -27,7 +27,7 @@

, wirelessSupport ? true , wirelesstools ? null
, nvidiaSupport ? false , libXNVCtrl ? null
, pulseSupport ? false , libpulseaudio ? null
, pulseSupport ? config.pulseaudio or false, libpulseaudio ? null

, curlSupport ? true , curl ? null
, rssSupport ? curlSupport
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/guvcview/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, intltool, pkgconfig
{ config, stdenv, fetchurl, intltool, pkgconfig
, gtk3, portaudio, SDL2, ffmpeg, udev, libusb1, libv4l, alsaLib, gsl
, pulseaudioSupport ? true, libpulseaudio ? null }:
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null }:

assert pulseaudioSupport -> libpulseaudio != null;

Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/lxcfs/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, help2man, fuse
, enableDebugBuild ? false }:
{ config, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, help2man, fuse
, enableDebugBuild ? config.lxcfs.enableDebugBuild or false }:

with stdenv.lib;
stdenv.mkDerivation rec {
Expand Down
6 changes: 3 additions & 3 deletions pkgs/servers/dns/bind/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl
{ config, stdenv, lib, fetchurl
, perl
, libcap, libtool, libxml2, openssl
, enablePython ? false, python3 ? null
, enablePython ? config.bind.enablePython or false, python3 ? null
, enableSeccomp ? false, libseccomp ? null, buildPackages
}:

Expand All @@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libtool libxml2 openssl ]
++ lib.optional stdenv.isLinux libcap
++ lib.optional enableSeccomp libseccomp
++ lib.optional enablePython python3;
++ lib.optional enablePython (python3.withPackages (ps: with ps; [ ply ]));

STD_CDEFINES = [ "-DDIG_SIGCHASE=1" ]; # support +sigchase

Expand Down
4 changes: 2 additions & 2 deletions pkgs/servers/plex/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, rpmextract, glibc
{ config, stdenv, fetchurl, rpmextract, glibc
, dataDir ? "/var/lib/plex" # Plex's data directory must be baked into the package due to symlinks.
, enablePlexPass ? false
, enablePlexPass ? config.plex.enablePlexPass or false
}:

let
Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/bluetooth/blueman/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, intltool, pkgconfig, python3Packages, bluez, gtk3
{ config, stdenv, lib, fetchurl, intltool, pkgconfig, python3Packages, bluez, gtk3
, obex_data_server, xdg_utils, libnotify, dnsmasq, dhcp
, hicolor-icon-theme, librsvg, wrapGAppsHook, gobject-introspection
, withPulseAudio ? true, libpulseaudio }:
, withPulseAudio ? config.pulseaudio or stdenv.isLinux, libpulseaudio }:

let
pythonPackages = python3Packages;
Expand Down
Loading

0 comments on commit 828759f

Please sign in to comment.