diff options
Diffstat (limited to 'pkgs')
20 files changed, 221 insertions, 89 deletions
diff --git a/pkgs/applications/science/biology/EZminc/default.nix b/pkgs/applications/science/biology/EZminc/default.nix index 978615fa4592c..7502a4ffd2abf 100644 --- a/pkgs/applications/science/biology/EZminc/default.nix +++ b/pkgs/applications/science/biology/EZminc/default.nix @@ -1,18 +1,18 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, libminc, bicpl, itk, fftwFloat, gsl }: +{ stdenv, fetchFromGitHub, cmake, pkgconfig, libminc, bicpl, itk4, fftwFloat, gsl }: stdenv.mkDerivation rec { pname = "EZminc"; - name = "${pname}-unstable-2019-07-25"; + name = "${pname}-unstable-2019-03-12"; src = fetchFromGitHub { owner = "BIC-MNI"; repo = pname; - rev = "9591edd5389a5bda2c1f606816c7cdb35c065adf"; - sha256 = "02k87qbpx0f48l2lbcjmlqx82py684z3sfi29va5icfg3hjd6j7b"; + rev = "5e3333ee356f914d34d66d33ea8df809c7f7fa51"; + sha256 = "0wy8cppf5xpgfqvgb3mqs1cjh81n6qzkk6zxv29wvng8nar9wsy4"; }; nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ itk libminc bicpl fftwFloat gsl ]; + buildInputs = [ itk4 libminc bicpl fftwFloat gsl ]; cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEZMINC_BUILD_TOOLS=TRUE" diff --git a/pkgs/applications/version-management/git-and-tools/cgit/default.nix b/pkgs/applications/version-management/git-and-tools/cgit/default.nix index 121a6cf64ea11..8debc642b4573 100644 --- a/pkgs/applications/version-management/git-and-tools/cgit/default.nix +++ b/pkgs/applications/version-management/git-and-tools/cgit/default.nix @@ -1,35 +1,27 @@ -{ stdenv, fetchurl, fetchpatch, openssl, zlib, asciidoc, libxml2, libxslt +{ stdenv, fetchurl, openssl, zlib, asciidoc, libxml2, libxslt , docbook_xsl, pkgconfig, luajit , coreutils, gnused, groff, docutils -, gzip, bzip2, xz +, gzip, bzip2, lzip, xz, zstd , python, wrapPython, pygments, markdown }: stdenv.mkDerivation rec { pname = "cgit"; - version = "1.2.1"; + version = "1.2.3"; src = fetchurl { url = "https://git.zx2c4.com/cgit/snapshot/${pname}-${version}.tar.xz"; - sha256 = "1gw2j5xc5qdx2hwiwkr8h6kgya7v9d9ff9j32ga1dys0cca7qm1w"; + sha256 = "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"; }; # cgit is tightly coupled with git and needs a git source tree to build. # IMPORTANT: Remember to check which git version cgit needs on every version # bump (look for "GIT_VER" in the top-level Makefile). gitSrc = fetchurl { - url = "mirror://kernel/software/scm/git/git-2.18.0.tar.xz"; - sha256 = "14hfwfkrci829a9316hnvkglnqqw1p03cw9k56p4fcb078wbwh4b"; + url = "mirror://kernel/software/scm/git/git-2.25.1.tar.xz"; + sha256 = "09lzwa183nblr6l8ib35g2xrjf9wm9yhk3szfvyzkwivdv69c9r2"; }; - patches = [ - (fetchpatch { - name = "prevent-dos-limit-path-length.patch"; - url = "https://git.zx2c4.com/cgit/patch/?id=54c407a74a35d4ee9ffae94cc5bc9096c9f7f54a"; - sha256 = "1qlbpqsc293lmc9hzwf1j4jr5qlv8cm1r249v3yij5s4wki1595j"; - }) - ]; - nativeBuildInputs = [ pkgconfig ] ++ [ python wrapPython ]; buildInputs = [ openssl zlib asciidoc libxml2 libxslt docbook_xsl luajit @@ -39,7 +31,9 @@ stdenv.mkDerivation rec { postPatch = '' sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \ -e 's|"bzip2"|"${bzip2.bin}/bin/bzip2"|' \ + -e 's|"lzip"|"${lzip}/bin/lzip"|' \ -e 's|"xz"|"${xz.bin}/bin/xz"|' \ + -e 's|"zstd"|"${zstd}/bin/zstd"|' \ -i ui-snapshot.c substituteInPlace filters/html-converters/man2html \ diff --git a/pkgs/desktops/gnome-3/extensions/arc-menu/default.nix b/pkgs/desktops/gnome-3/extensions/arc-menu/default.nix index db1741e72bb56..7bd31f587f675 100644 --- a/pkgs/desktops/gnome-3/extensions/arc-menu/default.nix +++ b/pkgs/desktops/gnome-3/extensions/arc-menu/default.nix @@ -24,6 +24,8 @@ stdenv.mkDerivation rec { makeFlags = [ "INSTALLBASE=${placeholder "out"}/share/gnome-shell/extensions" ]; + uuid = "arc-menu@linxgem33.com"; + meta = with stdenv.lib; { description = "Gnome shell extension designed to replace the standard menu found in Gnome 3"; license = licenses.gpl2Plus; diff --git a/pkgs/desktops/gnome-3/extensions/dash-to-dock/default.nix b/pkgs/desktops/gnome-3/extensions/dash-to-dock/default.nix index 3784f10990012..5a546bd157944 100644 --- a/pkgs/desktops/gnome-3/extensions/dash-to-dock/default.nix +++ b/pkgs/desktops/gnome-3/extensions/dash-to-dock/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { "INSTALLBASE=${placeholder "out"}/share/gnome-shell/extensions" ]; + uuid = "dash-to-dock@micxgx.gmail.com"; + meta = with stdenv.lib; { description = "A dock for the Gnome Shell"; homepage = "https://micheleg.github.io/dash-to-dock/"; diff --git a/pkgs/desktops/gnome-3/extensions/dash-to-panel/default.nix b/pkgs/desktops/gnome-3/extensions/dash-to-panel/default.nix index 84662505a374b..e97b34460d078 100644 --- a/pkgs/desktops/gnome-3/extensions/dash-to-panel/default.nix +++ b/pkgs/desktops/gnome-3/extensions/dash-to-panel/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { makeFlags = [ "INSTALLBASE=$(out)/share/gnome-shell/extensions" ]; + uuid = "dash-to-panel@jderose9.github.com"; + meta = with stdenv.lib; { description = "An icon taskbar for Gnome Shell"; license = licenses.gpl2; diff --git a/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix b/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix index baaca39a4c4f0..db113924ae607 100644 --- a/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix +++ b/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix @@ -73,6 +73,8 @@ stdenv.mkDerivation rec { done ''; + uuid = "gsconnect@andyholmes.github.io"; + meta = with stdenv.lib; { description = "KDE Connect implementation for Gnome Shell"; homepage = "https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki"; diff --git a/pkgs/desktops/gnome-3/extensions/no-title-bar/default.nix b/pkgs/desktops/gnome-3/extensions/no-title-bar/default.nix index c876b22c12c1d..25ef7ddf82790 100644 --- a/pkgs/desktops/gnome-3/extensions/no-title-bar/default.nix +++ b/pkgs/desktops/gnome-3/extensions/no-title-bar/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { makeFlags = [ "INSTALLBASE=$(out)/share/gnome-shell/extensions" ]; + uuid = "no-title-bar@franglais125.gmail.com"; + meta = with stdenv.lib; { description = "Integrates maximized windows with the top panel"; homepage = "https://github.com/franglais125/no-title-bar"; diff --git a/pkgs/desktops/gnome-3/extensions/pidgin-im-integration/default.nix b/pkgs/desktops/gnome-3/extensions/pidgin-im-integration/default.nix index dbc65044c1bc9..e13941ee04553 100644 --- a/pkgs/desktops/gnome-3/extensions/pidgin-im-integration/default.nix +++ b/pkgs/desktops/gnome-3/extensions/pidgin-im-integration/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { mv *.js metadata.json dbus.xml schemas locale "$extensions_dir" ''; + uuid = "pidgin@muffinmad"; + meta = with stdenv.lib; { homepage = "https://github.com/muffinmad/pidgin-im-gnome-shell-extension"; description = "Make Pidgin IM conversations appear in the Gnome Shell message tray"; diff --git a/pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix b/pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix index 6a1c87abf93dd..860a77d2856b1 100644 --- a/pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix +++ b/pkgs/desktops/gnome-3/extensions/topicons-plus/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { makeFlags = [ "INSTALL_PATH=$(out)/share/gnome-shell/extensions" ]; + uuid = "TopIcons@phocean.net"; + meta = with stdenv.lib; { description = "Brings all icons back to the top panel, so that it's easier to keep track of apps running in the backround"; license = licenses.gpl2; diff --git a/pkgs/development/libraries/itk/default.nix b/pkgs/development/libraries/itk/default.nix index d745ff438ceeb..6c0298c0f71c5 100644 --- a/pkgs/development/libraries/itk/default.nix +++ b/pkgs/development/libraries/itk/default.nix @@ -1,14 +1,15 @@ -{ stdenv, fetchFromGitHub, cmake, libX11, libuuid, xz, vtk, darwin }: +{ stdenv, fetchFromGitHub, cmake, makeWrapper +, pkgconfig, libX11, libuuid, xz, vtk, Cocoa }: stdenv.mkDerivation rec { pname = "itk"; - version = "5.0.1"; + version = "5.1.0"; src = fetchFromGitHub { owner = "InsightSoftwareConsortium"; repo = "ITK"; rev = "v${version}"; - sha256 = "0dcjsn5frjnrphfgw8alnd2ahrvicpx2a2ngb5ixaa9anaicz9z1"; + sha256 = "0rvkp00xj1js60021jv2ydyl74wvbyb205gm9d7hf8gy2q456hgl"; }; cmakeFlags = [ @@ -23,12 +24,16 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - nativeBuildInputs = [ cmake xz ]; - buildInputs = [ libX11 libuuid vtk ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; + nativeBuildInputs = [ cmake xz makeWrapper ]; + buildInputs = [ libX11 libuuid vtk ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ]; + + postInstall = '' + wrapProgram "$out/bin/h5c++" --prefix PATH ":" "${pkgconfig}/bin" + ''; meta = { description = "Insight Segmentation and Registration Toolkit"; - homepage = "http://www.itk.org/"; + homepage = "https://www.itk.org/"; license = stdenv.lib.licenses.asl20; maintainers = with stdenv.lib.maintainers; [viric]; }; diff --git a/pkgs/development/libraries/pxlib/default.nix b/pkgs/development/libraries/pxlib/default.nix new file mode 100644 index 0000000000000..2624c718d274e --- /dev/null +++ b/pkgs/development/libraries/pxlib/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, intltool }: + +stdenv.mkDerivation rec { + pname = "pxlib"; + version = "0.6.8"; + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + sha256 = "1yafwz4z5h30hqvk51wpgbjlmq9f2z2znvfim87ydrfrqfjmi6sz"; + }; + + nativeBuildInputs = [ intltool ]; + + meta = with stdenv.lib; { + description = "Library to read and write Paradox files"; + homepage = "http://pxlib.sourceforge.net/"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.winpat ]; + }; +} diff --git a/pkgs/development/libraries/science/biology/elastix/default.nix b/pkgs/development/libraries/science/biology/elastix/default.nix index e5565aae29b1f..4d98b12928f5f 100644 --- a/pkgs/development/libraries/science/biology/elastix/default.nix +++ b/pkgs/development/libraries/science/biology/elastix/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, itk, python3 }: +{ stdenv, fetchFromGitHub, fetchpatch, cmake, itk, python3 }: stdenv.mkDerivation rec { pname = "elastix"; @@ -11,10 +11,24 @@ stdenv.mkDerivation rec { sha256 = "1zrl7rz4lwsx88b2shnl985f3a97lmp4ksbd437h9y0hfjq8l0lj"; }; + patches = [ + (fetchpatch { + name = "itk-5.1-compat.patch"; + url = "https://github.com/SuperElastix/elastix/commit/402e9a26f22f805b8f2db00c00e59f75fa1783ad.patch"; + sha256 = "1il6gc1lgy78i0w6gkkppr61nh6g0yjspbfk19hcz20778m5jhz9"; + }) + (fetchpatch { + name = "fix-osx-build.patch"; + url = "https://github.com/SuperElastix/elastix/commit/52e1dc3928046f9fbb85d4b2ecd0d5175fa9695d.patch"; + sha256 = "1hf7kgx1jv497pf0x5wj79sy1wncxcvhrkix9w086lcr8zwxvn9q"; + }) + ]; + + nativeBuildInputs = [ cmake python3 ]; buildInputs = [ itk ]; - doCheck = true; + doCheck = !stdenv.isDarwin; # usual dynamic linker issues preCheck = " export LD_LIBRARY_PATH=$(pwd)/bin @@ -24,7 +38,7 @@ stdenv.mkDerivation rec { homepage = "http://elastix.isi.uu.nl/"; description = "Image registration toolkit based on ITK"; maintainers = with maintainers; [ bcdarwin ]; - platforms = platforms.linux; + platforms = platforms.x86_64; # libitkpng linker issues with ITK 5.1 license = licenses.asl20; }; } diff --git a/pkgs/development/libraries/simpleitk/default.nix b/pkgs/development/libraries/simpleitk/default.nix index d6708b0dfed86..445a8bc5f21d6 100644 --- a/pkgs/development/libraries/simpleitk/default.nix +++ b/pkgs/development/libraries/simpleitk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, git, swig, lua, itk, tcl, tk }: +{ stdenv, fetchFromGitHub, cmake, git, swig, lua, itk4, tcl, tk }: stdenv.mkDerivation rec { pname = "simpleitk"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake git swig ]; - buildInputs = [ lua itk ]; + buildInputs = [ lua itk4 ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_CXX_FLAGS='-Wno-attributes'" ]; diff --git a/pkgs/development/libraries/vtk/default.nix b/pkgs/development/libraries/vtk/default.nix index 6a7e26c753cd0..1cc706f4eb73e 100644 --- a/pkgs/development/libraries/vtk/default.nix +++ b/pkgs/development/libraries/vtk/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { ++ optional enablePython [ "-DVTK_WRAP_PYTHON:BOOL=ON" ]; postPatch = stdenv.lib.optionalString stdenv.isDarwin '' - sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-7.0|' ./Parallel/Core/CMakeLists.txt + sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-${majorVersion}|' ./Parallel/Core/CMakeLists.txt sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/' ./ThirdParty/libxml2/vtklibxml2/xmlschemas.c sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c ''; diff --git a/pkgs/development/python-modules/flask-wtf/default.nix b/pkgs/development/python-modules/flask-wtf/default.nix index 962555d492dd4..060f592b2cff6 100644 --- a/pkgs/development/python-modules/flask-wtf/default.nix +++ b/pkgs/development/python-modules/flask-wtf/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "Flask-WTF"; - version = "0.14.2"; + version = "0.14.3"; src = fetchPypi { inherit pname version; - sha256 = "0dncc5as2k61b28k8kal5yh3prmv7zya1jz7kvci7ximzmfda52x"; + sha256 = "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"; }; propagatedBuildInputs = [ flask wtforms nose ]; diff --git a/pkgs/development/python-modules/ignite/default.nix b/pkgs/development/python-modules/ignite/default.nix index cd682072707d1..785ec5814918c 100644 --- a/pkgs/development/python-modules/ignite/default.nix +++ b/pkgs/development/python-modules/ignite/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchFromGitHub , pytest +, matplotlib , mock , pytorch , pynvml @@ -11,23 +12,23 @@ buildPythonPackage rec { pname = "ignite"; - version = "0.2.1"; + version = "0.3.0"; src = fetchFromGitHub { owner = "pytorch"; repo = pname; rev = "v${version}"; - sha256 = "15k6dd11yxn4923llcpmw4srl1by5ljhh7aw5pnkn4n4qpywh6cm"; + sha256 = "0i863kxi1r1hspj19lhn6r8256vdazjcyvis0s33fgzrf7kxi08x"; }; - checkInputs = [ pytest mock ]; + checkInputs = [ pytest matplotlib mock ]; + propagatedBuildInputs = [ pytorch scikitlearn tqdm pynvml ]; + # Some packages are not in NixPkgs; other tests try to build distributed + # models, which doesn't work in the sandbox. checkPhase = '' - pytest -k 'not visdom and not tensorboard and not mlflow and not polyaxon' tests/ + pytest -k 'not visdom and not tensorboard and not mlflow and not polyaxon and not conftest and not engines and not distrib_' tests/ ''; - # these packages are not currently in nixpkgs - - propagatedBuildInputs = [ pytorch scikitlearn tqdm pynvml ]; meta = with lib; { description = "High-level training library for PyTorch"; diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix index a0a4aadfe58b5..2318738411f45 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/pytorch/default.nix @@ -1,23 +1,25 @@ -{ stdenv, fetchurl, fetchgit, buildPythonPackage, python, pythonOlder, +{ stdenv, lib, fetchFromGitHub, fetchpatch, buildPythonPackage, python, cudaSupport ? false, cudatoolkit ? null, cudnn ? null, nccl ? null, magma ? null, - mklSupport ? false, mkl ? null, + mklDnnSupport ? true, useSystemNccl ? true, openMPISupport ? false, openmpi ? null, - buildNamedTensor ? false, - buildBinaries ? false, + buildDocs ? false, cudaArchList ? null, - fetchFromGitHub, lib, numpy, pyyaml, cffi, click, typing, cmake, hypothesis, numactl, + numpy, pyyaml, cffi, click, typing, cmake, oneDNN, hypothesis, numactl, psutil, linkFarm, symlinkJoin, + # virtual pkg that consistently instantiates blas across nixpkgs + # See https://github.com/NixOS/nixpkgs/pull/83888 + blas, + # ninja (https://ninja-build.org) must be available to run C++ extensions tests, ninja, # dependencies for torch.utils.tensorboard - tensorboardSupport ? true, pillow, six, future, tensorflow-tensorboard, + pillow, six, future, tensorflow-tensorboard, protobuf, utillinux, which, isPy3k }: assert !openMPISupport || openmpi != null; -assert !tensorboardSupport || tensorflow-tensorboard != null; # assert that everything needed for cuda is present and that the correct cuda versions are used assert !cudaSupport || cudatoolkit != null; @@ -28,17 +30,11 @@ assert !cudaSupport || (let majorIs = lib.versions.major cudatoolkit.version; let hasDependency = dep: pkg: lib.lists.any (inp: inp == dep) pkg.buildInputs; matchesCudatoolkit = hasDependency cudatoolkit; - matchesMkl = hasDependency mkl; in # confirm that cudatoolkits are sync'd across dependencies assert !(openMPISupport && cudaSupport) || matchesCudatoolkit openmpi; assert !cudaSupport || matchesCudatoolkit magma; -# confirm that mkl is sync'd across dependencies -assert !mklSupport || mkl != null; -assert !(mklSupport && cudaSupport) || matchesMkl magma; -assert !mklSupport || (numpy.blasImplementation == "mkl" && numpy.blas == mkl); - let cudatoolkit_joined = symlinkJoin { name = "${cudatoolkit.name}-unsplit"; @@ -108,7 +104,7 @@ let "LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH "; in buildPythonPackage rec { - version = "1.2.0"; + version = "1.4.1"; pname = "pytorch"; disabled = !isPy3k; @@ -122,11 +118,9 @@ in buildPythonPackage rec { repo = "pytorch"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "1biyq2p48chakf2xw7hazzqmr5ps1nx475ql8vkmxjg5zaa071cz"; + sha256 = "1aa1il4f98pswfj20cv27yfb91l1jcq4515i7mvq7sh5647yzwms"; }; - dontUseCmakeConfigure = true; - preConfigure = lib.optionalString cudaSupport '' export TORCH_CUDA_ARCH_LIST="${lib.strings.concatStringsSep ";" final_cudaArchList}" export CC=${cudatoolkit.cc}/bin/gcc CXX=${cudatoolkit.cc}/bin/g++ @@ -134,6 +128,44 @@ in buildPythonPackage rec { export CUDNN_INCLUDE_DIR=${cudnn}/include ''; + patches = [ + # Prevents a race condition which would be introduced by pull 30333. + # See https://github.com/pytorch/pytorch/issues/32277 + # Can be removed >1.5.0. + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/30332.patch"; + sha256 = "1v9dwbhz3rdxcx6sz8y8j9n3bj6nqs78b1r8yg89yc15n6l4cqx2"; + }) + + # Fixes errors with gcc-9 compilation. Cherry-picked on advice from ezyang. + # See https://github.com/pytorch/pytorch/issues/32277 + # Can be removed >1.5.0. + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/30333.patch"; + sha256 = "139413fl37h2fnil0cv99a67mqqnsh02k74b92by1qyr6pcfyg3q"; + }) + ]; + + # Use pytorch's custom configurations + dontUseCmakeConfigure = true; + + BUILD_NAMEDTENSOR = true; + BUILD_DOCS = buildDocs; + + USE_MKL = blas.implementation == "mkl"; + + # Unlike MKL, MKLDNN is FOSS, so we enable support for it by default. Note + # that this was renamed to dnnl and then renamed again to oneDNN upstream, but + # pytorch still calls it by the old name mkldnn. + USE_MKLDNN = mklDnnSupport; + USE_MKLDNN_CBLAS = mklDnnSupport; + + preBuild = '' + export MAX_JOBS=$NIX_BUILD_CORES + ${python.interpreter} setup.py build --cmake-only + ${cmake}/bin/cmake build + ''; + preFixup = '' function join_by { local IFS="$1"; shift; echo "$*"; } function strip2 { @@ -155,8 +187,7 @@ in buildPythonPackage rec { PYTORCH_BUILD_VERSION = version; PYTORCH_BUILD_NUMBER = 0; - BUILD_NAMEDTENSOR = buildNamedTensor; # experimental feature - USE_SYSTEM_NCCL=true; # don't build pytorch's third_party NCCL + USE_SYSTEM_NCCL=useSystemNccl; # don't build pytorch's third_party NCCL # Suppress a weird warning in mkl-dnn, part of ideep in pytorch # (upstream seems to have fixed this in the wrong place?) @@ -165,7 +196,7 @@ in buildPythonPackage rec { # # Also of interest: pytorch ignores CXXFLAGS uses CFLAGS for both C and C++: # https://github.com/pytorch/pytorch/blob/v1.2.0/setup.py#L17 - NIX_CFLAGS_COMPILE = lib.optionals (numpy.blas == mkl) [ "-Wno-error=array-bounds" ]; + NIX_CFLAGS_COMPILE = lib.optionals (blas.implementation == "mkl") [ "-Wno-error=array-bounds" ]; nativeBuildInputs = [ cmake @@ -174,9 +205,8 @@ in buildPythonPackage rec { ninja ] ++ lib.optionals cudaSupport [ cudatoolkit_joined ]; - buildInputs = [ - numpy.blas - ] ++ lib.optionals cudaSupport [ cudnn magma nccl ] + buildInputs = [ blas blas.provider oneDNN ] + ++ lib.optionals cudaSupport [ cudnn magma nccl ] ++ lib.optionals stdenv.isLinux [ numactl ]; propagatedBuildInputs = [ @@ -184,23 +214,37 @@ in buildPythonPackage rec { click numpy pyyaml - ] ++ lib.optionals openMPISupport [ openmpi ] - ++ lib.optional (pythonOlder "3.5") typing - ++ lib.optionals tensorboardSupport [pillow six future tensorflow-tensorboard]; + # the following are required for tensorboard support + pillow six future tensorflow-tensorboard protobuf + ] ++ lib.optionals openMPISupport [ openmpi ]; - checkInputs = [ hypothesis ninja ]; + checkInputs = [ hypothesis ninja psutil ]; - doCheck = false; # tests take a long time for channel release, so doCheck should be overridden only when developing - checkPhase = "${cudaStubEnv}python test/run_test.py" - + " --exclude utils" # utils requires git, which is not allowed in the check phase + # Tests take a long time and may be flaky, so just sanity-check imports + doCheck = false; + pythonImportsCheck = [ + "torch" + ]; + + checkPhase = with lib.versions; with lib.strings; concatStringsSep " " [ + cudaStubEnv + "${python.interpreter} test/run_test.py" + "--exclude" + (concatStringsSep " " [ + "utils" # utils requires git, which is not allowed in the check phase - # Other tests which have been disabled in previous nix derivations of pytorch. - # --exclude dataloader sparse torch utils thd_distributed distributed cpp_extensions - ; + # "dataloader" # psutils correctly finds and triggers multiprocessing, but is too sandboxed to run -- resulting in numerous errors + # ^^^^^^^^^^^^ NOTE: while test_dataloader does return errors, these are acceptable errors and do not interfere with the build + + # tensorboard has acceptable failures for pytorch 1.3.x due to dependencies on tensorboard-plugins + (optionalString (majorMinor version == "1.3" ) "tensorboard") + ]) + ]; postInstall = '' mkdir $dev cp -r $out/${python.sitePackages}/torch/lib $dev/lib cp -r $out/${python.sitePackages}/torch/include $dev/include + cp -r $out/${python.sitePackages}/torch/share $dev/share ''; postFixup = stdenv.lib.optionalString stdenv.isDarwin '' @@ -233,6 +277,6 @@ in buildPythonPackage rec { homepage = "https://pytorch.org/"; license = lib.licenses.bsd3; platforms = with lib.platforms; linux ++ lib.optionals (!cudaSupport) darwin; - maintainers = with lib.maintainers; [ teh thoughtpolice stites tscholak ]; # tscholak esp. for darwin-related builds + maintainers = with lib.maintainers; [ teh thoughtpolice tscholak ]; # tscholak esp. for darwin-related builds }; } diff --git a/pkgs/development/tools/pxview/default.nix b/pkgs/development/tools/pxview/default.nix new file mode 100644 index 0000000000000..6b11071b6fa3b --- /dev/null +++ b/pkgs/development/tools/pxview/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, pkgconfig, perl, perlPackages, pxlib }: + +stdenv.mkDerivation rec { + pname = "pxview"; + version = "0.2.5"; + src = fetchurl { + url = "mirror://sourceforge/pxlib/${pname}_${version}.orig.tar.gz"; + sha256 = "1kpdqs6lvnyj02v9fbz1s427yqhgrxp7zw63rzfgiwd4iqp75139"; + }; + + buildInputs = [ pxlib perl ] ++ (with perlPackages; [ libxml_perl ]); + nativeBuildInputs = [ pkgconfig ]; + + configureFlags = [ "--with-pxlib=${pxlib.out}" ]; + + # https://sourceforge.net/p/pxlib/bugs/12/ + LDFLAGS = "-lm"; + hardeningDisable = [ "format" ]; + + meta = with stdenv.lib; { + description = "Program to convert Paradox databases"; + homepage = "http://pxlib.sourceforge.net/pxview/"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.winpat ]; + }; +} diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix index fa7574767d882..f02fec85a5b10 100644 --- a/pkgs/tools/filesystems/glusterfs/default.nix +++ b/pkgs/tools/filesystems/glusterfs/default.nix @@ -73,19 +73,25 @@ stdenv.mkDerivation postPatch = '' sed -e '/chmod u+s/d' -i contrib/fuse-util/Makefile.am + substituteInPlace libglusterfs/src/glusterfs/lvm-defaults.h \ + --replace '/sbin/' '${lvm2}/bin/' + substituteInPlace libglusterfs/src/glusterfs/compat.h \ + --replace '/bin/umount' '${utillinux}/bin/umount' + substituteInPlace contrib/fuse-lib/mount-gluster-compat.h \ + --replace '/bin/mount' '${utillinux}/bin/mount' ''; - # Note that the VERSION file is something that is present in release tarballs - # but not in git tags (at least not as of writing in v3.10.1). - # That's why we have to create it. - # Without this, gluster (at least 3.10.1) will fail very late and cryptically, - # for example when setting up geo-replication, with a message like - # Staging of operation 'Volume Geo-replication Create' failed on localhost : Unable to fetch master volume details. Please check the master cluster and master volume. - # What happens here is that the gverify.sh script tries to compare the versions, - # but fails when the version is empty. - # See upstream GlusterFS bug https://bugzilla.redhat.com/show_bug.cgi?id=1452705 - preConfigure = '' - echo "v${s.version}" > VERSION + # Note that the VERSION file is something that is present in release tarballs + # but not in git tags (at least not as of writing in v3.10.1). + # That's why we have to create it. + # Without this, gluster (at least 3.10.1) will fail very late and cryptically, + # for example when setting up geo-replication, with a message like + # Staging of operation 'Volume Geo-replication Create' failed on localhost : Unable to fetch master volume details. Please check the master cluster and master volume. + # What happens here is that the gverify.sh script tries to compare the versions, + # but fails when the version is empty. + # See upstream GlusterFS bug https://bugzilla.redhat.com/show_bug.cgi?id=1452705 + preConfigure = '' + echo "v${s.version}" > VERSION ./autogen.sh export PYTHON=${python3}/bin/python ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38a9d613f5a3c..661bc75daaa48 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12304,7 +12304,7 @@ in itk4 = callPackage ../development/libraries/itk/4.x.nix { stdenv = gcc8Stdenv; }; itk = callPackage ../development/libraries/itk { - stdenv = gcc8Stdenv; + inherit (darwin.apple_sdk.frameworks) Cocoa; }; jasper = callPackage ../development/libraries/jasper { }; @@ -14438,7 +14438,10 @@ in simp_le = callPackage ../tools/admin/simp_le { }; - simpleitk = callPackage ../development/libraries/simpleitk { lua = lua51Packages.lua; }; + simpleitk = callPackage ../development/libraries/simpleitk { + lua = lua51Packages.lua; + stdenv = gcc8Stdenv; + }; sfml = callPackage ../development/libraries/sfml { inherit (darwin.apple_sdk.frameworks) IOKit Foundation AppKit OpenAL; @@ -14869,7 +14872,7 @@ in vte_290 = callPackage ../development/libraries/vte/2.90.nix { }; vtk = callPackage ../development/libraries/vtk { - stdenv = gcc8Stdenv; + stdenv = if stdenv.isDarwin then stdenv else gcc8Stdenv; inherit (darwin) libobjc; inherit (darwin.apple_sdk.libs) xpc; inherit (darwin.apple_sdk.frameworks) Cocoa CoreServices DiskArbitration @@ -24354,7 +24357,7 @@ in est-sfs = callPackage ../applications/science/biology/est-sfs { }; - ezminc = callPackage ../applications/science/biology/EZminc { }; + ezminc = callPackage ../applications/science/biology/EZminc { stdenv = gcc8Stdenv; }; exonerate = callPackage ../applications/science/biology/exonerate { }; @@ -26489,6 +26492,10 @@ in kcli = callPackage ../development/tools/kcli {}; + pxlib = callPackage ../development/libraries/pxlib {}; + + pxview = callPackage ../development/tools/pxview {}; + unstick = callPackage ../os-specific/linux/unstick {}; quartus-prime-lite = callPackage ../applications/editors/quartus-prime {}; |