diff --git a/nixos/modules/programs/command-not-found/command-not-found.pl b/nixos/modules/programs/command-not-found/command-not-found.pl index 63c4925d433..7515dd975c3 100644 --- a/nixos/modules/programs/command-not-found/command-not-found.pl +++ b/nixos/modules/programs/command-not-found/command-not-found.pl @@ -36,7 +36,7 @@ EOF exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV)); } else { print STDERR <{package}\n" foreach @$res; } diff --git a/pkgs/applications/editors/joe/default.nix b/pkgs/applications/editors/joe/default.nix index bb227512387..9470c7940d6 100644 --- a/pkgs/applications/editors/joe/default.nix +++ b/pkgs/applications/editors/joe/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchurl } : stdenv.mkDerivation rec { - version = "4.6"; pname = "joe"; + version = "4.6"; src = fetchurl { url = "mirror://sourceforge/joe-editor/${pname}-${version}.tar.gz"; @@ -11,8 +11,36 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "A full featured terminal-based screen editor"; + longDescription = '' + JOE (Joe's Own Editor) is a full featured terminal-based screen editor + which is distributed under the GNU General Public License (GPL). JOE has + been around since 1988 and comes standard with many Linux distributions. + + JOE is being maintained by its original author Joseph Allen, plus all of + the people who send bug reports, feature suggestions and patches to the + project web site. JOE is hosted by SourceForge.net and its source code is + controlled under Mercurial. + + JOE is a blending of MicroPro's venerable microcomputer word processor + WordStar and Richard Stallman's famous LISP based text editor GNU-EMACS + (but it does not use code from either program): most of the basic editing + keys are the same as in WordStar as is the overall feel of the editor. JOE + also has some of the key bindings and many of the powerful features of + EMACS. + + JOE is written in C and its only dependency is libc. This makes JOE very + easy to build (just "configure" and "make install"), making it feasible to + include on small systems and recovery disks. The compiled binary is about + 300K in x86. Note that JOE can use either the termcap or terminfo terminal + capabilities databases (or a built-in termcap entry for ANSI + terminals). The choice is controlled by a "configure" option. If terminfo + is used, a library is required to access the database (on some systems + this library is ncurses, but JOE does not use curses to control the + terminal - it has its own code for this). + ''; homepage = "https://joe-editor.sourceforge.io"; - license = licenses.gpl2; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.unix; }; } diff --git a/pkgs/applications/networking/cluster/nomad/0.11.nix b/pkgs/applications/networking/cluster/nomad/0.11.nix index 2fd7c0403a3..58bdb694eed 100644 --- a/pkgs/applications/networking/cluster/nomad/0.11.nix +++ b/pkgs/applications/networking/cluster/nomad/0.11.nix @@ -1,7 +1,11 @@ -{ callPackage, buildGoPackage }: +{ callPackage +, buildGoPackage +, nvidia_x11 +, nvidiaGpuSupport +}: callPackage ./generic.nix { - inherit buildGoPackage; + inherit buildGoPackage nvidia_x11 nvidiaGpuSupport; version = "0.11.8"; sha256 = "1dhh07bifr02jh2lls8fv1d9ra67ymgh8qxqvpvm0cd0qdd469z1"; } diff --git a/pkgs/applications/networking/cluster/nomad/0.12.nix b/pkgs/applications/networking/cluster/nomad/0.12.nix index 0120887957a..b6e053e757d 100644 --- a/pkgs/applications/networking/cluster/nomad/0.12.nix +++ b/pkgs/applications/networking/cluster/nomad/0.12.nix @@ -1,7 +1,11 @@ -{ callPackage, buildGoPackage }: +{ callPackage +, buildGoPackage +, nvidia_x11 +, nvidiaGpuSupport +}: callPackage ./generic.nix { - inherit buildGoPackage; + inherit buildGoPackage nvidia_x11 nvidiaGpuSupport; version = "0.12.9"; sha256 = "1a0ig6pb0z3qp7zk4jgz3h241bifmjlyqsfikyy3sxdnzj7yha27"; } diff --git a/pkgs/applications/networking/cluster/nomad/1.0.nix b/pkgs/applications/networking/cluster/nomad/1.0.nix index 4b0b6240019..0b7b7c12d1a 100644 --- a/pkgs/applications/networking/cluster/nomad/1.0.nix +++ b/pkgs/applications/networking/cluster/nomad/1.0.nix @@ -1,7 +1,11 @@ -{ callPackage, buildGoPackage }: +{ callPackage +, buildGoPackage +, nvidia_x11 +, nvidiaGpuSupport +}: callPackage ./generic.nix { - inherit buildGoPackage; + inherit buildGoPackage nvidia_x11 nvidiaGpuSupport; version = "1.0.1"; sha256 = "07k81csyxhgc7bgn297zlqyvc55qb5fmiavi7dk81rdpg5m2zjvv"; } diff --git a/pkgs/applications/networking/cluster/nomad/generic.nix b/pkgs/applications/networking/cluster/nomad/generic.nix index 0bfdb0b27f6..dc22ab41d8b 100644 --- a/pkgs/applications/networking/cluster/nomad/generic.nix +++ b/pkgs/applications/networking/cluster/nomad/generic.nix @@ -1,4 +1,12 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, version, sha256 }: +{ lib +, buildGoPackage +, fetchFromGitHub +, version +, sha256 +, nvidiaGpuSupport +, patchelf +, nvidia_x11 +}: buildGoPackage rec { pname = "nomad"; @@ -14,23 +22,33 @@ buildGoPackage rec { inherit rev sha256; }; + nativeBuildInputs = lib.optionals nvidiaGpuSupport [ + patchelf + ]; + # ui: # Nomad release commits include the compiled version of the UI, but the file # is only included if we build with the ui tag. - # nonvidia: - # We disable Nvidia GPU scheduling on Linux, as it doesn't work there: - # Ref: https://github.com/hashicorp/nomad/issues/5535 - preBuild = let - tags = ["ui"] - ++ stdenv.lib.optional stdenv.isLinux "nonvidia"; - tagsString = stdenv.lib.concatStringsSep " " tags; - in '' - export buildFlagsArray=( - -tags="${tagsString}" - ) - ''; + preBuild = + let + tags = [ "ui" ] ++ lib.optional (!nvidiaGpuSupport) "nonvidia"; + tagsString = lib.concatStringsSep " " tags; + in + '' + export buildFlagsArray=( + -tags="${tagsString}" + ) + ''; - meta = with stdenv.lib; { + # The dependency on NVML isn't explicit. We have to make it so otherwise the + # binary will not know where to look for the relevant symbols. + postFixup = lib.optionalString nvidiaGpuSupport '' + for bin in $out/bin/*; do + patchelf --add-needed "${nvidia_x11}/lib/libnvidia-ml.so" "$bin" + done + ''; + + meta = with lib; { homepage = "https://www.nomadproject.io/"; description = "A Distributed, Highly Available, Datacenter-Aware Scheduler"; platforms = platforms.unix; diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index e09f83a056c..05740979b8a 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1547,4 +1547,9 @@ self: super: { # https://github.com/Gabriel439/Haskell-Nix-Derivation-Library/pull/10 nix-derivation = doJailbreak super.nix-derivation; + # Break out of overspecified constraint on QuickCheck. + # Fixed by https://github.com/haskell-servant/servant/commit/08579ca0039410e04d6c36c975ddc20165819db6 + servant-client = doJailbreak super.servant-client; + servant-client-core = doJailbreak super.servant-client-core; + } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super diff --git a/pkgs/development/ocaml-modules/csv/default.nix b/pkgs/development/ocaml-modules/csv/default.nix index 2d017b9a916..60496ad28da 100644 --- a/pkgs/development/ocaml-modules/csv/default.nix +++ b/pkgs/development/ocaml-modules/csv/default.nix @@ -4,6 +4,8 @@ buildDunePackage rec { pname = "csv"; version = "2.4"; + useDune2 = true; + src = fetchurl { url = "https://github.com/Chris00/ocaml-${pname}/releases/download/${version}/csv-${version}.tbz"; sha256 = "13m9n8mdss6jfbiw7d5bybxn4n85vmg4zw7dc968qrgjfy0w9zhk"; diff --git a/pkgs/development/ocaml-modules/csv/lwt.nix b/pkgs/development/ocaml-modules/csv/lwt.nix index 2fa9296d7e4..b0f771209aa 100644 --- a/pkgs/development/ocaml-modules/csv/lwt.nix +++ b/pkgs/development/ocaml-modules/csv/lwt.nix @@ -6,7 +6,7 @@ else buildDunePackage { pname = "csv-lwt"; - inherit (csv) src version meta; + inherit (csv) src version useDune2 meta; propagatedBuildInputs = [ csv ocaml_lwt ]; diff --git a/pkgs/development/ocaml-modules/ppx_blob/default.nix b/pkgs/development/ocaml-modules/ppx_blob/default.nix index a64ff9cbef2..ac96e56d04e 100644 --- a/pkgs/development/ocaml-modules/ppx_blob/default.nix +++ b/pkgs/development/ocaml-modules/ppx_blob/default.nix @@ -1,18 +1,18 @@ -{ lib, fetchurl, buildDunePackage, ocaml, alcotest, ocaml-migrate-parsetree }: +{ lib, fetchurl, buildDunePackage, ocaml, alcotest, ppxlib }: buildDunePackage rec { pname = "ppx_blob"; - version = "0.7.1"; + version = "0.7.2"; useDune2 = true; src = fetchurl { url = "https://github.com/johnwhitington/${pname}/releases/download/${version}/ppx_blob-${version}.tbz"; - sha256 = "0m616ri6kmawflphiwm6j4djds27v0fjvi8xjz1fq5ydc1sq8d0l"; + sha256 = "00haz1cmplk3j9ysh6j656zrldy60585fmlndmfhpd5332mxrfdw"; }; checkInputs = [ alcotest ]; - buildInputs = [ ocaml-migrate-parsetree ]; + propagatedBuildInputs = [ ppxlib ]; doCheck = lib.versionAtLeast ocaml.version "4.05"; meta = with lib; { diff --git a/pkgs/development/python-modules/pydicom/default.nix b/pkgs/development/python-modules/pydicom/default.nix index 24186c09dcd..450a6a3c049 100644 --- a/pkgs/development/python-modules/pydicom/default.nix +++ b/pkgs/development/python-modules/pydicom/default.nix @@ -1,29 +1,55 @@ { stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , isPy27 -, pytest , pytestrunner , pytestCheckHook , numpy , pillow }: -buildPythonPackage rec { - version = "2.1.1"; +let pname = "pydicom"; - disabled = isPy27; + version = "2.1.2"; - src = fetchPypi { - inherit pname version; - sha256 = "72a11086f6a277c1529a552583fde73e03256a912173f15e9bc256e5b28f28f1"; + src = fetchFromGitHub { + owner = "${pname}"; + repo = "${pname}"; + rev = "v${version}"; + sha256 = "sha256-iExy+mUs1uqs/u9N6btlqyP6/TvoPVsuOuzs56zZAS8="; }; + # Pydicom needs pydicom-data to run some tests. If these files are downloaded + # before the package creation, it'll try to download during the checkPhase. + test_data = fetchFromGitHub { + owner = "${pname}"; + repo = "${pname}-data"; + rev = "bbb723879690bb77e077a6d57657930998e92bd5"; + sha256 = "sha256-dCI1temvpNWiWJYVfQZKy/YJ4ad5B0e9hEKHJnEeqzk="; + }; + +in +buildPythonPackage { + inherit pname version src; + disabled = isPy27; + propagatedBuildInputs = [ numpy pillow ]; - checkInputs = [ pytest pytestrunner pytestCheckHook ]; - disabledTests = [ "test_invalid_bit_depth_raises" ]; - # harmless failure; see https://github.com/pydicom/pydicom/issues/1119 + checkInputs = [ pytestrunner pytestCheckHook ]; + + # Setting $HOME to prevent pytest to try to create a folder inside + # /homeless-shelter which is read-only. + # Linking pydicom-data dicom files to $HOME/.pydicom/data + preCheck = '' + export HOME=$TMP/test-home + mkdir -p $HOME/.pydicom/ + ln -s ${test_data}/data_store/data $HOME/.pydicom/data + ''; + + # This test try to remove a dicom inside $HOME/.pydicom/data/ and download it again. + disabledTests = [ + "test_fetch_data_files" + ]; meta = with stdenv.lib; { homepage = "https://pydicom.github.io"; diff --git a/pkgs/development/tools/sourcetrail/python.nix b/pkgs/development/tools/sourcetrail/python.nix index 113abb77d61..8ec9c9a2297 100644 --- a/pkgs/development/tools/sourcetrail/python.nix +++ b/pkgs/development/tools/sourcetrail/python.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "CoatiSoftware"; repo = pname; rev = version; - sha256 = "05hlpd3am029pv1wi6mys3q0ggp64axmg8bdf1fabl9cl9jffscq"; + sha256 = "01jaigxigq6dvfwq018gn9qw7i6p4jm0y71lqzschfv9vwf6ga45"; fetchSubmodules = true; }; @@ -64,5 +64,7 @@ stdenv.mkDerivation rec { description = "Python indexer for Sourcetrail"; homepage = "https://github.com/CoatiSoftware/SourcetrailPythonIndexer"; license = licenses.gpl3; + broken = stdenv.isDarwin; + # https://github.com/NixOS/nixpkgs/pull/107533#issuecomment-751063675 }; } diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix index 56c76289e85..eab6d88a0b7 100644 --- a/pkgs/shells/zsh/default.nix +++ b/pkgs/shells/zsh/default.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation { "--with-tcsetpgrp" "--enable-pcre" "--enable-zprofile=${placeholder "out"}/etc/zprofile" + "--disable-site-fndir" ]; # the zsh/zpty module is not available on hydra diff --git a/pkgs/tools/backup/duplicity/default.nix b/pkgs/tools/backup/duplicity/default.nix index c29af7b2fd4..712d1d6f86e 100644 --- a/pkgs/tools/backup/duplicity/default.nix +++ b/pkgs/tools/backup/duplicity/default.nix @@ -49,6 +49,7 @@ pythonPackages.buildPythonApplication rec { propagatedBuildInputs = with pythonPackages; [ b2sdk boto + boto3 cffi cryptography ecdsa diff --git a/pkgs/tools/misc/hdf4/default.nix b/pkgs/tools/misc/hdf4/default.nix index b15eba8b7bc..a1aff857527 100644 --- a/pkgs/tools/misc/hdf4/default.nix +++ b/pkgs/tools/misc/hdf4/default.nix @@ -4,6 +4,7 @@ , fixDarwinDylibNames , cmake , libjpeg +, libtirpc , zlib , szip ? null }: @@ -16,6 +17,30 @@ stdenv.mkDerivation rec { sha256 = "04nbgfxyj5jg4d6sr28162cxbfwqgv0sa7vz1ayzvm8wbbpkbq5x"; }; + patches = [ + # Note that the PPC, SPARC and s390 patches are only needed so the aarch64 patch applies cleanly + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-ppc.patch"; + sha256 = "0dbbfpsvvqzy9zyfv38gd81zzc44gxjib9sd8scxqnkkqprj6jq0"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-4.2.4-sparc.patch"; + sha256 = "0ip4prcjpa404clm87ib7l71605mws54x9492n9pbz5yb51r9aqh"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-s390.patch"; + sha256 = "0aiqbr4s1l19y3r3y4wjd5fkv9cfc8rlr4apbh1p0d57wyvqa7i3"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-arm.patch"; + sha256 = "157k1avvkpf3x89m1fv4a1kgab6k3jv74rskazrmjivgzav4qaw3"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-aarch64.patch"; + sha256 = "112svcsilk16ybbsi8ywnxfl2p1v44zh3rfn4ijnl8z08vfqrvvs"; + }) + ]; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optionals stdenv.isDarwin [ @@ -24,11 +49,19 @@ stdenv.mkDerivation rec { buildInputs = [ libjpeg + libtirpc szip zlib ]; - preConfigure = stdenv.lib.optionalString (szip != null) "export SZIP_INSTALL=${szip}"; + preConfigure = '' + # Make tirpc discovery work with CMAKE_PREFIX_PATH + substituteInPlace config/cmake/FindXDR.cmake \ + --replace 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")' \ + 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATH_SUFFIXES include/tirpc)' + '' + stdenv.lib.optionalString (szip != null) '' + export SZIP_INSTALL=${szip} + ''; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix index 87b26f223bc..beb6f0e708b 100644 --- a/pkgs/tools/misc/ipxe/default.nix +++ b/pkgs/tools/misc/ipxe/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { pname = "ipxe"; - version = "1.20.1"; + version = "1.21.1"; nativeBuildInputs = [ perl cdrkit syslinux xz openssl gnu-efi mtools ]; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { owner = "ipxe"; repo = "ipxe"; rev = "v${version}"; - sha256 = "0w7h7y97gj9nqvbmsg1zp6zj5mpbbpckqbbx7bpp6k3ahy5fk8zp"; + sha256 = "1pkf1n1c0rdlzfls8fvjvi1sd9xjd9ijqlyz3wigr70ijcv6x8i9"; }; # not possible due to assembler code diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 68249614267..898eb4c7bf4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6129,12 +6129,18 @@ in # with different versions we pin Go for all versions. nomad_0_11 = callPackage ../applications/networking/cluster/nomad/0.11.nix { buildGoPackage = buildGo114Package; + inherit (linuxPackages) nvidia_x11; + nvidiaGpuSupport = config.cudaSupport or (!stdenv.isLinux); }; nomad_0_12 = callPackage ../applications/networking/cluster/nomad/0.12.nix { buildGoPackage = buildGo114Package; + inherit (linuxPackages) nvidia_x11; + nvidiaGpuSupport = config.cudaSupport or (!stdenv.isLinux); }; nomad_1_0 = callPackage ../applications/networking/cluster/nomad/1.0.nix { buildGoPackage = buildGo115Package; + inherit (linuxPackages) nvidia_x11; + nvidiaGpuSupport = config.cudaSupport or (!stdenv.isLinux); }; notable = callPackage ../applications/misc/notable { }; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 2a62a337817..e5d0f60ee5d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -916,10 +916,7 @@ let pprint = callPackage ../development/ocaml-modules/pprint { }; - ppx_blob = - if lib.versionAtLeast ocaml.version "4.02" - then callPackage ../development/ocaml-modules/ppx_blob {} - else null; + ppx_blob = callPackage ../development/ocaml-modules/ppx_blob { }; ppx_cstruct = callPackage ../development/ocaml-modules/cstruct/ppx.nix {};