Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #56026 from oxij/tree/move-defaults-to-package-files-half-cuda

all-packages.nix: move defaults to package files continues^2

authored by

Michael Raskin and committed by
GitHub
446520bb 5fc8559f

+45 -69
+2 -2
pkgs/applications/misc/blender/default.nix
··· 1 - { stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew 1 + { config, stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew 2 2 , ilmbase, libXi, libX11, libXext, libXrender 3 3 , libjpeg, libpng, libsamplerate, libsndfile 4 4 , libtiff, libGLU_combined, openal, opencolorio, openexr, openimageio, openjpeg_1, pythonPackages 5 5 , zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd 6 6 , jackaudioSupport ? false, libjack2 7 - , cudaSupport ? false, cudatoolkit 7 + , cudaSupport ? config.cudaSupport or false, cudatoolkit 8 8 , colladaSupport ? true, opencollada 9 9 , enableNumpy ? false, makeWrapper 10 10 }:
+3 -3
pkgs/applications/science/math/caffe/default.nix
··· 1 - { stdenv, lib, runCommand 1 + { config, stdenv, lib, runCommand 2 2 , fetchFromGitHub 3 3 , fetchurl 4 4 , cmake ··· 13 13 , Accelerate, CoreGraphics, CoreVideo 14 14 , lmdbSupport ? true, lmdb 15 15 , leveldbSupport ? true, leveldb, snappy 16 - , cudaSupport ? stdenv.isLinux, cudatoolkit 17 - , cudnnSupport ? false, cudnn ? null 16 + , cudaSupport ? config.cudaSupport or false, cudatoolkit 17 + , cudnnSupport ? cudaSupport, cudnn ? null 18 18 , ncclSupport ? false, nccl ? null 19 19 , pythonSupport ? false, python ? null, numpy ? null 20 20 , substituteAll
+3 -3
pkgs/applications/science/math/cntk/default.nix
··· 1 - { lib, stdenv, fetchgit, fetchFromGitHub, cmake 1 + { config, lib, stdenv, fetchgit, fetchFromGitHub, cmake 2 2 , openblas, opencv3, libzip, boost, protobuf, openmpi 3 3 , onebitSGDSupport ? false 4 - , cudaSupport ? false, cudatoolkit, nvidia_x11 5 - , cudnnSupport ? false, cudnn 4 + , cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11 5 + , cudnnSupport ? cudaSupport, cudnn 6 6 }: 7 7 8 8 assert cudnnSupport -> cudaSupport;
+3 -3
pkgs/applications/science/math/mxnet/default.nix
··· 1 - { stdenv, lib, fetchurl, bash, cmake 1 + { config, stdenv, lib, fetchurl, bash, cmake 2 2 , opencv, gtest, openblas, liblapack, perl 3 - , cudaSupport ? false, cudatoolkit, nvidia_x11 4 - , cudnnSupport ? false, cudnn 3 + , cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11 4 + , cudnnSupport ? cudaSupport, cudnn 5 5 }: 6 6 7 7 assert cudnnSupport -> cudaSupport;
+1 -1
pkgs/applications/window-managers/xmonad/log-applet/default.nix
··· 1 1 { stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, glib, dbus-glib 2 - , desktopSupport, xorg 2 + , desktopSupport ? "gnomeflashback", xorg 3 3 , gtk2 4 4 , gtk3, gnome3, mate 5 5 , libxfce4util, xfce4-panel
+4 -2
pkgs/development/compilers/gnu-smalltalk/default.nix
··· 1 - { stdenv, fetchurl, pkgconfig, libtool, zip, libffi, libsigsegv, readline, gmp, 2 - gnutls, gnome2, cairo, SDL, sqlite, emacsSupport ? false, emacs ? null }: 1 + { config, stdenv, fetchurl, pkgconfig, libtool 2 + , zip, libffi, libsigsegv, readline, gmp 3 + , gnutls, gnome2, cairo, SDL, sqlite 4 + , emacsSupport ? config.emacsSupport or false, emacs ? null }: 3 5 4 6 assert emacsSupport -> (emacs != null); 5 7
+4 -2
pkgs/development/libraries/cairo/default.nix
··· 1 - { stdenv, fetchurl, pkgconfig, libiconv 1 + { config, stdenv, fetchurl, pkgconfig, libiconv 2 2 , libintl, expat, zlib, libpng, pixman, fontconfig, freetype, xorg 3 3 , gobjectSupport ? true, glib 4 4 , xcbSupport ? true # no longer experimental since 1.12 5 - , glSupport ? true, libGL ? null # libGLU_combined is no longer a big dependency 5 + , libGLSupported 6 + , glSupport ? config.cairo.gl or (libGLSupported && stdenv.isLinux && !stdenv.isAarch32 && !stdenv.isMips) 7 + , libGL ? null # libGLU_combined is no longer a big dependency 6 8 , pdfSupport ? true 7 9 , darwin 8 10 }:
+2 -2
pkgs/development/libraries/gtk+/2.x.nix
··· 1 - { stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xorg 1 + { config, stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xorg 2 2 , gdk_pixbuf, xlibsWrapper, gobject-introspection 3 3 , xineramaSupport ? stdenv.isLinux 4 - , cupsSupport ? true, cups ? null 4 + , cupsSupport ? config.gtk2.cups or stdenv.isLinux, cups ? null 5 5 , gdktarget ? if stdenv.isDarwin then "quartz" else "x11" 6 6 , AppKit, Cocoa 7 7 , fetchpatch
+2 -2
pkgs/development/libraries/libtensorflow/default.nix
··· 1 - { stdenv 1 + { config, stdenv 2 2 , fetchurl 3 3 , patchelf 4 - , cudaSupport ? false, symlinkJoin, cudatoolkit, cudnn, nvidia_x11 4 + , cudaSupport ? config.cudaSupport or false, symlinkJoin, cudatoolkit, cudnn, nvidia_x11 5 5 }: 6 6 with stdenv.lib; 7 7 let
+2 -2
pkgs/development/libraries/opensubdiv/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, pkgconfig, xorg, libGLU 1 + { config, lib, stdenv, fetchFromGitHub, cmake, pkgconfig, xorg, libGLU 2 2 , libGL, glew, ocl-icd, python3 3 - , cudaSupport ? false, cudatoolkit 3 + , cudaSupport ? config.cudaSupport or false, cudatoolkit 4 4 , darwin 5 5 }: 6 6
+2 -2
pkgs/development/libraries/xgboost/default.nix
··· 1 - { stdenv, lib, fetchgit, cmake 2 - , cudaSupport ? false, cudatoolkit 1 + { config, stdenv, lib, fetchgit, cmake 2 + , cudaSupport ? config.cudaSupport or false, cudatoolkit 3 3 , ncclSupport ? false, nccl 4 4 , llvmPackages 5 5 }:
+6 -7
pkgs/os-specific/linux/pcmciautils/default.nix
··· 1 - { stdenv, fetchurl 1 + { config, lib, stdenv, fetchurl 2 2 , yacc, flex 3 3 , sysfsutils, kmod, udev 4 - , firmware # Special pcmcia cards. 5 - , config # Special hardware (map memory & port & irq) 6 - , lib # used to generate postInstall script. 7 - }: 4 + , firmware ? config.pcmciaUtils.firmware or [] # Special pcmcia cards. 5 + , configOpts ? config.pcmciaUtils.config or null # Special hardware (map memory & port & irq) 6 + }: # used to generate postInstall script. 8 7 9 8 # FIXME: should add an option to choose between hotplug and udev. 10 9 stdenv.mkDerivation rec { ··· 28 27 " src/{startup.c,pcmcia-check-broken-cis.c} # fix-color */ 29 28 '' 30 29 + (if firmware == [] then ''sed -i "s,STARTUP = true,STARTUP = false," Makefile'' else "") 31 - + (if config == null then "" else '' 32 - ln -sf ${config} ./config/config.opts'') 30 + + (if configOpts == null then "" else '' 31 + ln -sf ${configOpts} ./config/config.opts'') 33 32 ; 34 33 35 34 makeFlags = "LEX=flex";
+11 -38
pkgs/top-level/all-packages.nix
··· 936 936 tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { }; 937 937 938 938 libtensorflow = callPackage ../development/libraries/libtensorflow { 939 - cudaSupport = config.cudaSupport or false; 940 939 inherit (linuxPackages) nvidia_x11; 941 940 cudatoolkit = cudatoolkit_9_0; 942 941 cudnn = cudnn_cudatoolkit_9_0; ··· 6962 6961 inherit (gnome2) libart_lgpl; 6963 6962 }); 6964 6963 6965 - gnu-smalltalk = callPackage ../development/compilers/gnu-smalltalk { 6966 - emacsSupport = config.emacsSupport or false; 6967 - }; 6964 + gnu-smalltalk = callPackage ../development/compilers/gnu-smalltalk { }; 6968 6965 6969 6966 gccgo = gccgo6; 6970 6967 gccgo6 = wrapCC (gcc6.cc.override { ··· 10188 10185 10189 10186 pixman = callPackage ../development/libraries/pixman { }; 10190 10187 10191 - cairo = callPackage ../development/libraries/cairo { 10192 - glSupport = config.cairo.gl or (stdenv.isLinux && 10193 - !stdenv.isAarch32 && !stdenv.isMips); 10194 - }; 10195 - 10188 + cairo = callPackage ../development/libraries/cairo { }; 10196 10189 10197 10190 cairomm = callPackage ../development/libraries/cairomm { }; 10198 10191 ··· 10220 10213 elementary-cmake-modules = callPackage ../development/libraries/elementary-cmake-modules { }; 10221 10214 10222 10215 gtk2 = callPackage ../development/libraries/gtk+/2.x.nix { 10223 - cupsSupport = config.gtk2.cups or stdenv.isLinux; 10224 10216 inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; 10225 10217 }; 10226 10218 ··· 11944 11936 openssl-chacha = callPackage ../development/libraries/openssl/chacha.nix { }; 11945 11937 11946 11938 opensubdiv = callPackage ../development/libraries/opensubdiv { 11947 - cudaSupport = config.cudaSupport or false; 11948 11939 cmake = cmake_2_8; 11949 11940 }; 11950 11941 ··· 13084 13075 13085 13076 xalanc = callPackage ../development/libraries/xalanc {}; 13086 13077 13087 - xgboost = callPackage ../development/libraries/xgboost { 13088 - cudaSupport = config.cudaSupport or false; 13089 - }; 13078 + xgboost = callPackage ../development/libraries/xgboost { }; 13090 13079 13091 13080 xgeometry-select = callPackage ../tools/X11/xgeometry-select { }; 13092 13081 ··· 15113 15102 15114 15103 pax-utils = callPackage ../os-specific/linux/pax-utils { }; 15115 15104 15116 - pcmciaUtils = callPackage ../os-specific/linux/pcmciautils { 15117 - firmware = config.pcmciaUtils.firmware or []; 15118 - config = config.pcmciaUtils.config or null; 15119 - }; 15105 + pcmciaUtils = callPackage ../os-specific/linux/pcmciautils { }; 15120 15106 15121 15107 pcstat = callPackage ../tools/system/pcstat { }; 15122 15108 ··· 16303 16289 bleachbit = callPackage ../applications/misc/bleachbit { }; 16304 16290 16305 16291 blender = callPackage ../applications/misc/blender { 16306 - cudaSupport = config.cudaSupport or false; 16307 16292 pythonPackages = python35Packages; 16308 16293 stdenv = overrideCC stdenv gcc6; 16309 16294 }; ··· 20311 20296 }; 20312 20297 20313 20298 xmonad_log_applet = callPackage ../applications/window-managers/xmonad/log-applet { 20314 - desktopSupport = "gnomeflashback"; 20315 20299 inherit (xfce) libxfce4util xfce4-panel; 20316 20300 }; 20317 20301 20318 20302 xmonad_log_applet_mate = xmonad_log_applet.override { 20319 20303 desktopSupport = "mate"; 20320 - inherit (xfce) libxfce4util xfce4-panel; 20321 20304 }; 20322 20305 20323 20306 xmonad_log_applet_xfce = xmonad_log_applet.override { 20324 20307 desktopSupport = "xfce4"; 20325 - inherit (xfce) libxfce4util xfce4-panel; 20326 20308 }; 20327 20309 20328 20310 xmpp-client = callPackage ../applications/networking/instant-messengers/xmpp-client { }; ··· 22014 21996 22015 21997 ### SCIENCE / MATH 22016 21998 22017 - caffe = callPackage ../applications/science/math/caffe rec { 22018 - cudaSupport = config.caffe.cudaSupport or config.cudaSupport or false; 22019 - cudnnSupport = cudaSupport; 22020 - # Used only for image loading. 22021 - opencv3 = opencv3WithoutCuda; 21999 + caffe = callPackage ../applications/science/math/caffe ({ 22000 + opencv3 = opencv3WithoutCuda; # Used only for image loading. 22022 22001 inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo; 22023 - }; 22002 + } // (config.caffe or {})); 22024 22003 22025 22004 caffe2 = callPackage ../development/libraries/science/math/caffe2 (rec { 22026 22005 inherit (python36Packages) python future six numpy pydot; 22027 22006 protobuf = protobuf3_1; 22028 22007 python-protobuf = python36Packages.protobuf.override { inherit protobuf; }; 22029 - # Used only for image loading. 22030 - opencv3 = opencv3WithoutCuda; 22008 + opencv3 = opencv3WithoutCuda; # Used only for image loading. 22031 22009 }); 22032 22010 22033 - cntk = callPackage ../applications/science/math/cntk rec { 22034 - cudaSupport = pkgs.config.cudaSupport or false; 22035 - cudnnSupport = cudaSupport; 22011 + cntk = callPackage ../applications/science/math/cntk { 22036 22012 inherit (linuxPackages) nvidia_x11; 22037 - # Used only for image loading. 22038 - opencv3 = opencv3WithoutCuda; 22013 + opencv3 = opencv3WithoutCuda; # Used only for image loading. 22039 22014 }; 22040 22015 22041 22016 ecm = callPackage ../applications/science/math/ecm { }; ··· 22066 22041 sbcl = null; 22067 22042 }; 22068 22043 22069 - mxnet = callPackage ../applications/science/math/mxnet rec { 22070 - cudaSupport = config.cudaSupport or false; 22071 - cudnnSupport = cudaSupport; 22044 + mxnet = callPackage ../applications/science/math/mxnet { 22072 22045 inherit (linuxPackages) nvidia_x11; 22073 22046 }; 22074 22047