diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md index a95b600a420..e12db53ee33 100644 --- a/doc/contributing/coding-conventions.chapter.md +++ b/doc/contributing/coding-conventions.chapter.md @@ -513,3 +513,73 @@ If you do need to do create this sort of patch file, one way to do so is with gi ```ShellSession $ git diff > nixpkgs/pkgs/the/package/0001-changes.patch ``` + +## Package tests {#sec-package-tests} + +Tests are important to ensure quality and make reviews and automatic updates easy. + +Nix package tests are a lightweight alternative to [NixOS module tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests). They can be used to create simple integration tests for packages while the module tests are used to test services or programs with a graphical user interface on a NixOS VM. Unittests that are included in the source code of a package should be executed in the `checkPhase`. + +### Writing package tests {#ssec-package-tests-writing} + +This is an example using the `phoronix-test-suite` package with the current best practices. + +Add the tests in `passthru.tests` to the package definition like this: + +```nix +{ stdenv, lib, fetchurl, callPackage }: + +stdenv.mkDerivation { + … + + passthru.tests = { + simple-execution = callPackage ./tests.nix { }; + }; + + meta = { … }; +} +``` + +Create `tests.nix` in the package directory: + +```nix +{ runCommand, phoronix-test-suite }: + +let + inherit (phoronix-test-suite) pname version; +in + +runCommand "${pname}-tests" { meta.timeout = 3; } + '' + # automatic initial setup to prevent interactive questions + ${phoronix-test-suite}/bin/phoronix-test-suite enterprise-setup >/dev/null + # get version of installed program and compare with package version + if [[ `${phoronix-test-suite}/bin/phoronix-test-suite version` != *"${version}"* ]]; then + echo "Error: program version does not match package version" + exit 1 + fi + # run dummy command + ${phoronix-test-suite}/bin/phoronix-test-suite dummy_module.dummy-command >/dev/null + # needed for Nix to register the command as successful + touch $out + '' +``` + +### Running package tests {#ssec-package-tests-running} + +You can run these tests with: + +```ShellSession +$ cd path/to/nixpkgs +$ nix-build -A phoronix-test-suite.tests +``` + +### Examples of package tests {#ssec-package-tests-examples} + +Here are examples of package tests: + +- [Jasmin compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix) +- [Lobster compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/lobster/test-can-run-hello-world.nix) +- [Spacy annotation test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/spacy/annotation-test/default.nix) +- [Libtorch test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/libtorch/test/default.nix) +- [Multiple tests for nanopb](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/nanopb/default.nix) diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index 434e2d2429b..95369ff7ee4 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -477,47 +477,49 @@ in in '' # copy custom configuration and generate a random secret key if needed ${optionalString (cfg.useWizard == false) '' - cp -f ${configFile} ${runConfig} + function gitea_setup { + cp -f ${configFile} ${runConfig} - if [ ! -e ${secretKey} ]; then - ${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey} - fi + if [ ! -e ${secretKey} ]; then + ${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey} + fi - # Migrate LFS_JWT_SECRET filename - if [[ -e ${oldLfsJwtSecret} && ! -e ${lfsJwtSecret} ]]; then - mv ${oldLfsJwtSecret} ${lfsJwtSecret} - fi + # Migrate LFS_JWT_SECRET filename + if [[ -e ${oldLfsJwtSecret} && ! -e ${lfsJwtSecret} ]]; then + mv ${oldLfsJwtSecret} ${lfsJwtSecret} + fi - if [ ! -e ${oauth2JwtSecret} ]; then - ${gitea}/bin/gitea generate secret JWT_SECRET > ${oauth2JwtSecret} - fi + if [ ! -e ${oauth2JwtSecret} ]; then + ${gitea}/bin/gitea generate secret JWT_SECRET > ${oauth2JwtSecret} + fi - if [ ! -e ${lfsJwtSecret} ]; then - ${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${lfsJwtSecret} - fi + if [ ! -e ${lfsJwtSecret} ]; then + ${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${lfsJwtSecret} + fi - if [ ! -e ${internalToken} ]; then - ${gitea}/bin/gitea generate secret INTERNAL_TOKEN > ${internalToken} - fi + if [ ! -e ${internalToken} ]; then + ${gitea}/bin/gitea generate secret INTERNAL_TOKEN > ${internalToken} + fi - SECRETKEY="$(head -n1 ${secretKey})" - DBPASS="$(head -n1 ${cfg.database.passwordFile})" - OAUTH2JWTSECRET="$(head -n1 ${oauth2JwtSecret})" - LFSJWTSECRET="$(head -n1 ${lfsJwtSecret})" - INTERNALTOKEN="$(head -n1 ${internalToken})" - ${if (cfg.mailerPasswordFile == null) then '' - MAILERPASSWORD="#mailerpass#" - '' else '' - MAILERPASSWORD="$(head -n1 ${cfg.mailerPasswordFile} || :)" - ''} - sed -e "s,#secretkey#,$SECRETKEY,g" \ - -e "s,#dbpass#,$DBPASS,g" \ - -e "s,#oauth2jwtsecret#,$OAUTH2JWTSECRET,g" \ - -e "s,#lfsjwtsecret#,$LFSJWTSECRET,g" \ - -e "s,#internaltoken#,$INTERNALTOKEN,g" \ - -e "s,#mailerpass#,$MAILERPASSWORD,g" \ - -i ${runConfig} - chmod 640 ${runConfig} ${secretKey} ${oauth2JwtSecret} ${lfsJwtSecret} ${internalToken} + SECRETKEY="$(head -n1 ${secretKey})" + DBPASS="$(head -n1 ${cfg.database.passwordFile})" + OAUTH2JWTSECRET="$(head -n1 ${oauth2JwtSecret})" + LFSJWTSECRET="$(head -n1 ${lfsJwtSecret})" + INTERNALTOKEN="$(head -n1 ${internalToken})" + ${if (cfg.mailerPasswordFile == null) then '' + MAILERPASSWORD="#mailerpass#" + '' else '' + MAILERPASSWORD="$(head -n1 ${cfg.mailerPasswordFile} || :)" + ''} + sed -e "s,#secretkey#,$SECRETKEY,g" \ + -e "s,#dbpass#,$DBPASS,g" \ + -e "s,#oauth2jwtsecret#,$OAUTH2JWTSECRET,g" \ + -e "s,#lfsjwtsecret#,$LFSJWTSECRET,g" \ + -e "s,#internaltoken#,$INTERNALTOKEN,g" \ + -e "s,#mailerpass#,$MAILERPASSWORD,g" \ + -i ${runConfig} + } + (umask 027; gitea_setup) ''} # update all hooks' binary paths diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 16d7bf7dd16..32159e3ebd2 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -242,12 +242,12 @@ in clion = buildClion rec { name = "clion-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "C/C++ IDE. New. Intelligent. Cross-platform"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz"; - sha256 = "1qq2k14pf2qy93y1xchlv08vvx99zcml8bdcx3h6jnjz6d7gz0px"; /* updated by script */ + sha256 = "0xzlkf3gq6fcb0q9mcj8k39880l8h21pb1lz0xl2dqj8cfwpws9h"; /* updated by script */ }; wmClass = "jetbrains-clion"; update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml @@ -255,12 +255,12 @@ in datagrip = buildDataGrip rec { name = "datagrip-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "Your Swiss Army Knife for Databases and SQL"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/datagrip/${name}.tar.gz"; - sha256 = "11am11lkrhgfianr1apkkl4mn8gcsf6p1vz47y7lz4rfm05ac4gj"; /* updated by script */ + sha256 = "0smg0qbk3mnm2543w0nlvnyvbwmprf0p3z2spwrmcmfagv50crrx"; /* updated by script */ }; wmClass = "jetbrains-datagrip"; update-channel = "DataGrip RELEASE"; @@ -268,12 +268,12 @@ in goland = buildGoland rec { name = "goland-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "Up and Coming Go IDE"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/go/${name}.tar.gz"; - sha256 = "1hxid7k5b26hiwwdxbvhi1fzhlrvm1xsd5gb0vj0g5zw658y2lzz"; /* updated by script */ + sha256 = "02fyrq4px9w34amincgjgm6maxpxn445j5h4nfbskx7z428ynx25"; /* updated by script */ }; wmClass = "jetbrains-goland"; update-channel = "GoLand RELEASE"; @@ -281,12 +281,12 @@ in idea-community = buildIdea rec { name = "idea-community-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "Integrated Development Environment (IDE) by Jetbrains, community edition"; license = lib.licenses.asl20; src = fetchurl { url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz"; - sha256 = "1d7m39rzdgh2fyx50rpifqfsdmvfpi04hjp52pl76m35gyb5hsvs"; /* updated by script */ + sha256 = "1say19p7kgx4b2ccs9bv61phllzhl8gmrd1fp1a5cnagya7vl1c5"; /* updated by script */ }; wmClass = "jetbrains-idea-ce"; update-channel = "IntelliJ IDEA RELEASE"; @@ -294,12 +294,12 @@ in idea-ultimate = buildIdea rec { name = "idea-ultimate-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz"; - sha256 = "062kaph42xs5hc01sbmry4cm7nkyjks43qr5m7pbj5a2bgd7zzgx"; /* updated by script */ + sha256 = "19zi4njz79z8gi458kz1m0sia79y3rhbayix4rmh93mwfc0npkii"; /* updated by script */ }; wmClass = "jetbrains-idea"; update-channel = "IntelliJ IDEA RELEASE"; @@ -320,12 +320,12 @@ in phpstorm = buildPhpStorm rec { name = "phpstorm-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.2"; /* updated by script */ description = "Professional IDE for Web and PHP developers"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz"; - sha256 = "052m7mqa1s548my0gda9y2mysi2ijq27c9b3bskrwqsf1pm5ry63"; /* updated by script */ + sha256 = "02s75fqd9hfh302zha4jw6qynpgm9nkrlq7s78nk3fc3d3hw8v5y"; /* updated by script */ }; wmClass = "jetbrains-phpstorm"; update-channel = "PhpStorm RELEASE"; @@ -333,12 +333,12 @@ in pycharm-community = buildPycharm rec { name = "pycharm-community-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "PyCharm Community Edition"; license = lib.licenses.asl20; src = fetchurl { url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "1iiglh7s2zm37kj6hzlzxb1jnzh2p0j1f2zzhg3nqyrrakfbyq3h"; /* updated by script */ + sha256 = "04bs9sz872b0h1zzax23irvj6q5wxnzp6fl4f177j94kh4116cqh"; /* updated by script */ }; wmClass = "jetbrains-pycharm-ce"; update-channel = "PyCharm RELEASE"; @@ -346,12 +346,12 @@ in pycharm-professional = buildPycharm rec { name = "pycharm-professional-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "PyCharm Professional Edition"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "1n3b4mdygzal7w88gwka5wh5jp09bh2zmm4n5rz9s7hr2srz71mz"; /* updated by script */ + sha256 = "0wc9j7nilakmm7scf7a71zb3k9vixgih05ni3n3pp4iznvwb3nxg"; /* updated by script */ }; wmClass = "jetbrains-pycharm"; update-channel = "PyCharm RELEASE"; @@ -359,12 +359,12 @@ in rider = buildRider rec { name = "rider-${version}"; - version = "2021.1.1"; /* updated by script */ + version = "2021.1.2"; /* updated by script */ description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz"; - sha256 = "00kdbsjw9hmq7x94pjscslv0b412g8l0jbvyi7jiyay8xc6wiaaj"; /* updated by script */ + sha256 = "1a28pi18j0cb2wxhw1vnfg9gqsgf2kyfg0hl4xgqp50gzv7i3aam"; /* updated by script */ }; wmClass = "jetbrains-rider"; update-channel = "Rider RELEASE"; @@ -372,12 +372,12 @@ in ruby-mine = buildRubyMine rec { name = "ruby-mine-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "The Most Intelligent Ruby and Rails IDE"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz"; - sha256 = "12mkb51x1w5wbx436pfnfzcad10qd53y43n0p4l2zg9yx985gm7v"; /* updated by script */ + sha256 = "05sfjf5523idsl7byc7400r4xqv1d65gpmkh5x0lbgf1k3bx2wlm"; /* updated by script */ }; wmClass = "jetbrains-rubymine"; update-channel = "RubyMine RELEASE"; @@ -385,12 +385,12 @@ in webstorm = buildWebStorm rec { name = "webstorm-${version}"; - version = "2021.1"; /* updated by script */ + version = "2021.1.1"; /* updated by script */ description = "Professional IDE for Web and JavaScript development"; license = lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz"; - sha256 = "15i521qj2b0y1viqr0xx815ckpq359j6nars4xxq8xvy7cg729yc"; /* updated by script */ + sha256 = "1hici40qsxj2fw29g68i6hr1vhr0h7xrlhkialy74ah53wi7myz1"; /* updated by script */ }; wmClass = "jetbrains-webstorm"; update-channel = "WebStorm RELEASE"; diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index 93b89e9031e..ffba1096d1d 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -33,6 +33,7 @@ , nspr , nss , pango +, pipewire , pciutils , libheimdal , libpulseaudio @@ -126,6 +127,7 @@ stdenv.mkDerivation { nspr nss pango + pipewire pciutils libheimdal libpulseaudio diff --git a/pkgs/applications/networking/instant-messengers/seren/default.nix b/pkgs/applications/networking/instant-messengers/seren/default.nix new file mode 100644 index 00000000000..63cefbd2ffd --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/seren/default.nix @@ -0,0 +1,37 @@ +{ lib +, stdenv +, fetchurl +, alsaLib +, libopus +, libogg +, gmp +, ncurses +}: + +stdenv.mkDerivation rec { + pname = "seren"; + version = "0.0.21"; + + buildInputs = [ alsaLib libopus libogg gmp ncurses ]; + + src = fetchurl { + url = "http://holdenc.altervista.org/seren/downloads/${pname}-${version}.tar.gz"; + sha256 = "sha256-adI365McrJkvTexvnWjMzpHcJkLY3S/uWfE8u4yuqho="; + }; + + meta = with lib; { + description = "A simple ncurses VoIP program based on the Opus codec"; + longDescription = '' + Seren is a simple VoIP program based on the Opus codec + that allows you to create a voice conference from the terminal, with up to 10 + participants, without having to register accounts, exchange emails, or add + people to contact lists. All you need to join an existing conference is the + host name or IP address of one of the participants. + ''; + homepage = "http://holdenc.altervista.org/seren/"; + changelog = "http://holdenc.altervista.org/seren/"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ matthewcroughan nixinator ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/networking/p2p/gnunet/default.nix b/pkgs/applications/networking/p2p/gnunet/default.nix index af290fc1cc5..61ff1642978 100644 --- a/pkgs/applications/networking/p2p/gnunet/default.nix +++ b/pkgs/applications/networking/p2p/gnunet/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "gnunet"; - version = "0.14.0"; + version = "0.14.1"; src = fetchurl { url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz"; - sha256 = "sha256-2u9gO9Mu0dM1yixcaqOnZcDfGcp69dc5CH5tkl6vRas="; + sha256 = "1hhqv994akymf4s593mc1wpsjy6hccd0zbdim3qmc1y3f32hacja"; }; enableParallelBuilding = true; diff --git a/pkgs/applications/networking/p2p/gnunet/gtk.nix b/pkgs/applications/networking/p2p/gnunet/gtk.nix index 2532671bc25..3711d5a3c1e 100644 --- a/pkgs/applications/networking/p2p/gnunet/gtk.nix +++ b/pkgs/applications/networking/p2p/gnunet/gtk.nix @@ -5,6 +5,7 @@ , gtk3 , libextractor , libgcrypt +, libsodium , libxml2 , pkg-config , wrapGAppsHook @@ -12,11 +13,11 @@ stdenv.mkDerivation rec { pname = "gnunet-gtk"; - version = "0.13.1"; + version = "0.14.0"; src = fetchurl { url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz"; - sha256 = "1zdzgq16h77w6ybwg3lqjsjr965np6iqvncqvkbj07glqd4wss0j"; + sha256 = "18rc7mb45y17d5nrlpf2p4ixp7ir67gcgjf4hlj4r95ic5zi54wa"; }; nativeBuildInputs= [ @@ -31,15 +32,16 @@ stdenv.mkDerivation rec { gtk3 libextractor libgcrypt + libsodium libxml2 ]; + configureFlags = [ "--with-gnunet=${gnunet}" ]; + patchPhase = "patchShebangs pixmaps/icon-theme-installer"; meta = gnunet.meta // { description = "GNUnet GTK User Interface"; homepage = "https://git.gnunet.org/gnunet-gtk.git"; - # configure: error: compiling gnunet-gtk requires GNUnet core headers - broken = true; }; } diff --git a/pkgs/applications/science/robotics/sumorobot-manager/default.nix b/pkgs/applications/science/robotics/sumorobot-manager/default.nix index 0b4b807a481..c0f619b9592 100644 --- a/pkgs/applications/science/robotics/sumorobot-manager/default.nix +++ b/pkgs/applications/science/robotics/sumorobot-manager/default.nix @@ -1,22 +1,22 @@ -{ lib, stdenv, python3, qt5, fetchFromGitHub, wrapPython, pyqt5, pyserial }: +{ lib, stdenv, python3, qt5, fetchFromGitHub, wrapPython, pyqt5, pyserial, dos2unix }: stdenv.mkDerivation rec { pname = "sumorobot-manager"; - version = "0.9.0"; + version = "1.0.0"; src = fetchFromGitHub { owner = "robokoding"; repo = pname; rev = "v${version}"; - sha256 = "03zhb54c259a66hsahmv2ajbzwcjnfjj050wbjhw51zqzxinlgqr"; + sha256 = "07snhwmqqp52vdgr66vx50zxx0nmpmns5cdjgh50hzlhji2z1fl9"; }; buildInputs = [ python3 ]; pythonPath = [ - pyqt5 pyserial + pyqt5.dev pyserial ]; - nativeBuildInputs = [ wrapPython qt5.wrapQtAppsHook ]; + nativeBuildInputs = [ wrapPython qt5.wrapQtAppsHook dos2unix ]; buildPhase = "true"; @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { cp -r main.py lib res $out/opt/sumorobot-manager chmod -R 644 $out/opt/sumorobot-manager/lib/* mkdir $out/bin + dos2unix $out/opt/sumorobot-manager/main.py makeQtWrapper $out/opt/sumorobot-manager/main.py $out/bin/sumorobot-manager \ --run "cd $out/opt/sumorobot-manager" ''; diff --git a/pkgs/applications/virtualization/charliecloud/default.nix b/pkgs/applications/virtualization/charliecloud/default.nix index 3e9029cce0a..f6d7ce3d619 100644 --- a/pkgs/applications/virtualization/charliecloud/default.nix +++ b/pkgs/applications/virtualization/charliecloud/default.nix @@ -1,15 +1,15 @@ -{ lib, stdenv, fetchFromGitHub, python3, python3Packages, docker, autoreconfHook, coreutils, makeWrapper, gnused, gnutar, gzip, findutils, sudo, nixosTests }: +{ lib, stdenv, fetchFromGitHub, python3, docker, autoreconfHook, coreutils, makeWrapper, gnused, gnutar, gzip, findutils, sudo, nixosTests }: stdenv.mkDerivation rec { - version = "0.22"; + version = "0.23"; pname = "charliecloud"; src = fetchFromGitHub { owner = "hpc"; repo = "charliecloud"; rev = "v${version}"; - sha256 = "sha256-+9u7WRKAJ9F70+I68xNRck5Q22XzgLKTCnjGbIcsyW8="; + sha256 = "sha256-JQNidKqJROFVm+O1exTDon1fwU91zONqgKJIpe9gspY="; }; nativeBuildInputs = [ autoreconfHook makeWrapper ]; diff --git a/pkgs/data/icons/papirus-icon-theme/default.nix b/pkgs/data/icons/papirus-icon-theme/default.nix index ff18baf75f4..bd9ab1bb77b 100644 --- a/pkgs/data/icons/papirus-icon-theme/default.nix +++ b/pkgs/data/icons/papirus-icon-theme/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "papirus-icon-theme"; - version = "20210401"; + version = "20210501"; src = fetchFromGitHub { owner = "PapirusDevelopmentTeam"; repo = pname; rev = version; - sha256 = "sha256-t0zoeIpj+0QVH1wmbEIJdqzEDOGzpclePv+bcZgtnwo="; + sha256 = "sha256-3KH0oLeCev7WuoIOh4KBTiHTn2/aQlVrW5dpO+LSRT4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/interpreters/j/default.nix b/pkgs/development/interpreters/j/default.nix index 8875a9cf55e..e41d71ef960 100644 --- a/pkgs/development/interpreters/j/default.nix +++ b/pkgs/development/interpreters/j/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "j"; - version = "901"; - jtype = "release-f"; + version = "902"; + jtype = "release-b"; src = fetchFromGitHub { owner = "jsoftware"; repo = "jsource"; rev = "j${version}-${jtype}"; - sha256 = "1776021m0j1aanzwg60by83n53pw7i6afd5wplfzczwk8bywax4p"; + sha256 = "0j67vgikqflwjqacsdicasvyv1k54s2c8vjgwmf0ix7l41p4xqz0"; name = "jsource"; }; diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 9dd5150f17d..cb2c0e79dd5 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -3,13 +3,13 @@ }: stdenv.mkDerivation rec { - version = "1.37.0"; # N.B: if you change this, change pythonPackages.grpcio-tools to a matching version too + version = "1.37.1"; # N.B: if you change this, change pythonPackages.grpcio-tools to a matching version too pname = "grpc"; src = fetchFromGitHub { owner = "grpc"; repo = "grpc"; rev = "v${version}"; - sha256 = "0q3hcnq351j0qm0gsbaxbsnz1gd9w3bk4cazkvq4l2lfmmiw7z56"; + sha256 = "0mjlz2cax5v37g7xnrbf5px88bm7xzl4a5pds112yk096d7wmxm5"; fetchSubmodules = true; }; patches = [ diff --git a/pkgs/development/libraries/netcdf-cxx4/default.nix b/pkgs/development/libraries/netcdf-cxx4/default.nix index b594a672140..494f4bf7157 100644 --- a/pkgs/development/libraries/netcdf-cxx4/default.nix +++ b/pkgs/development/libraries/netcdf-cxx4/default.nix @@ -1,15 +1,22 @@ -{ lib, stdenv, fetchurl, netcdf, hdf5, curl }: +{ lib, stdenv, fetchzip, netcdf, hdf5, curl, cmake, ninja }: stdenv.mkDerivation rec { pname = "netcdf-cxx4"; - version = "4.3.0"; + version = "4.3.1"; - src = fetchurl { + src = fetchzip { url = "https://github.com/Unidata/netcdf-cxx4/archive/v${version}.tar.gz"; - sha256 = "13zi8cbk18gggx1c12a580wdsbl714lw68a1wg7c86x0sybirni5"; + sha256 = "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"; }; + preConfigure = '' + cmakeFlags+="-Dabs_top_srcdir=$(readlink -f ./)" + ''; + + nativeBuildInputs = [ cmake ninja ]; buildInputs = [ netcdf hdf5 curl ]; + doCheck = true; + enableParallelChecking = false; meta = { description = "C++ API to manipulate netcdf files"; diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index 481836a4e11..87b5835aa9e 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -18,7 +18,7 @@ let # this derivation. However, we should ensure on version bumps # that the CUDA toolkit for `passthru.tests` is still # up-to-date. - version = "1.8.0"; + version = "1.8.1"; device = if cudaSupport then "cuda" else "cpu"; srcs = import ./binary-hashes.nix version; unavailable = throw "libtorch is not available for this platform"; diff --git a/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix b/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix index 208e0b7adab..ec4522a7559 100644 --- a/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix +++ b/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix @@ -1,14 +1,14 @@ version: { x86_64-darwin-cpu = { url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-${version}.zip"; - hash = "sha256-V1lbztMB09wyWjdiJrwVwJ00DT8Kihy/TC2cKmdBLIE="; + hash = "sha256-FYgnd5zlycjCYnP5bZcjpMdGYXrRERwhFFBYo/SJgzs="; }; x86_64-linux-cpu = { url = "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${version}%2Bcpu.zip"; - hash = "sha256-xBaNyI7eiQnSArHMITonrQQLZnZCZK/SWKOTWnxzdpc="; + hash = "sha256-xneCcVrY25Whgbs/kPbwdS1Lc0e6RxsDRpA5lHTZigc="; }; x86_64-linux-cuda = { url = "https://download.pytorch.org/libtorch/cu111/libtorch-cxx11-abi-shared-with-deps-${version}%2Bcu111.zip"; - hash = "sha256-uQ7ptOuzowJ0JSPIvJHyNotBfpsqAnxpMDLq7Vl6L00="; + hash = "sha256-VW+TW00nD49GBztCyxHE4dTyy81aN/kfYE3hKQOIm50="; }; } diff --git a/pkgs/development/libraries/science/math/libtorch/test/default.nix b/pkgs/development/libraries/science/math/libtorch/test/default.nix index 60f9b5ad884..eaea649d434 100644 --- a/pkgs/development/libraries/science/math/libtorch/test/default.nix +++ b/pkgs/development/libraries/science/math/libtorch/test/default.nix @@ -42,8 +42,9 @@ in stdenv.mkDerivation { touch $out ''; - checkPhase = '' + checkPhase = lib.optionalString cudaSupport '' LD_LIBRARY_PATH=${cudaStub}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \ - ./test + '' + '' + ./test ''; } diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix index 2f4ee5de8d2..0ad0b960ee4 100644 --- a/pkgs/development/python-modules/grpcio-tools/default.nix +++ b/pkgs/development/python-modules/grpcio-tools/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "grpcio-tools"; - version = "1.37.0"; + version = "1.37.1"; src = fetchPypi { inherit pname version; - sha256 = "3ec510c1b6bfc32effc639acf9a055e72dab7a7b6757bf72f2132790d6a7cf1c"; + sha256 = "d775fb07cc6561174d6c86d11727a156c4ade969f7bf5edf623ffe2a428bee4e"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix index b776a784c8e..daab437c979 100644 --- a/pkgs/development/python-modules/python-language-server/default.nix +++ b/pkgs/development/python-modules/python-language-server/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27 +{ lib, buildPythonPackage, fetchFromGitHub, pythonAtLeast, pythonOlder, isPy27 , backports_functools_lru_cache ? null, configparser ? null, futures ? null, future, jedi, pluggy, python-jsonrpc-server, flake8 , pytestCheckHook, mock, pytestcov, coverage, setuptools, ujson, flaky , # Allow building a limited set of providers, e.g. ["pycodestyle"]. @@ -22,6 +22,8 @@ in buildPythonPackage rec { pname = "python-language-server"; version = "0.36.2"; + # https://github.com/palantir/python-language-server/issues/896#issuecomment-752790868 + disabled = pythonAtLeast "3.9"; src = fetchFromGitHub { owner = "palantir"; diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix index 1ea172ae137..db807bda0a7 100644 --- a/pkgs/development/tools/vagrant/default.nix +++ b/pkgs/development/tools/vagrant/default.nix @@ -5,9 +5,9 @@ let # NOTE: bumping the version and updating the hash is insufficient; # you must use bundix to generate a new gemset.nix in the Vagrant source. - version = "2.2.15"; + version = "2.2.16"; url = "https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz"; - sha256 = "sha256-mMnHJtXLfkZ5O0UF89kHsqBnPg9uQ5l8IYoL5TMMyD8="; + sha256 = "sha256-qzxguxKy2pFv0HMZKEnytdPyJPlf6/NTghIkfEzeKNY="; deps = bundlerEnv rec { name = "${pname}-${version}"; diff --git a/pkgs/development/tools/vagrant/gemset.nix b/pkgs/development/tools/vagrant/gemset.nix index 89555490492..27ebf31c32c 100644 --- a/pkgs/development/tools/vagrant/gemset.nix +++ b/pkgs/development/tools/vagrant/gemset.nix @@ -64,10 +64,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1759s0rz6qgsw86dds1z4jzb3fvizqsk11j5q6z7lc5n404w6i23"; + sha256 = "19g5nvkycnkzqq4mqn1zjznq9adrlv2jz0dr9w10cbn42hhqpiz7"; type = "gem"; }; - version = "0.79.0"; + version = "0.81.0"; }; ffi = { groups = ["default"]; @@ -274,10 +274,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "14mhzrhs2j43vj36i1qq4z29nd860shrslfik015f4kf1jiaqcrw"; + sha256 = "1rmm9ym3qxysrmvgnrad28llnzj6wj9ljir8zaw9myas7m8vhvsq"; type = "gem"; }; - version = "0.2.5"; + version = "0.2.6"; }; rubyntlm = { groups = ["default"]; diff --git a/pkgs/os-specific/linux/lxcfs/default.nix b/pkgs/os-specific/linux/lxcfs/default.nix index bcc86b72de0..440e81266c8 100644 --- a/pkgs/os-specific/linux/lxcfs/default.nix +++ b/pkgs/os-specific/linux/lxcfs/default.nix @@ -5,13 +5,13 @@ with lib; stdenv.mkDerivation rec { pname = "lxcfs"; - version = "4.0.7"; + version = "4.0.8"; src = fetchFromGitHub { owner = "lxc"; repo = "lxcfs"; rev = "lxcfs-${version}"; - sha256 = "sha256-gC1Q+kG/oKfYvuHVKstpRWfL/thsemULrimPrV/eeaI="; + sha256 = "sha256-8Tack2gM3AU3coGXs5hEbAaBCo5ss1sGUFFEjZDn5Lg="; }; nativeBuildInputs = [ pkg-config help2man autoreconfHook makeWrapper ]; diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index 579ce383319..ad704ca792b 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -26,11 +26,11 @@ in stdenv.mkDerivation rec { pname = "postfix"; - version = "3.5.10"; + version = "3.6.0"; src = fetchurl { url = "ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/${pname}-${version}.tar.gz"; - sha256 = "sha256-W7TX1y11ErWPOjFCbcvTlP01TgpD3iHaiUZrBXoCKPg="; + sha256 = "sha256-d0YolNdnHWPL5fwnM/lBCIUVptZxCLnxgIt9rjfoPC4="; }; nativeBuildInputs = [ makeWrapper m4 ]; diff --git a/pkgs/tools/inputmethods/kime/default.nix b/pkgs/tools/inputmethods/kime/default.nix index e550f7c35d9..8566143f680 100644 --- a/pkgs/tools/inputmethods/kime/default.nix +++ b/pkgs/tools/inputmethods/kime/default.nix @@ -16,18 +16,18 @@ let in stdenv.mkDerivation rec { pname = "kime"; - version = "2.5.2"; + version = "2.5.3"; src = fetchFromGitHub { owner = "Riey"; repo = pname; rev = "v${version}"; - sha256 = "10zd4yrqxzxf4nj3b5bsblcmlbqssxqq9pac0misa1g61jdbszj8"; + sha256 = "1kjw22hy2x90dc7xfm252v1pdr9x13mpm92rcgfy8zbkiqq242bl"; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; - sha256 = "1bimi7020m7v287bh7via7zm9m7y13d13kqpd772xmpdbwrj8nrl"; + sha256 = "05kb9vnifaw01qw5cmdh4wzcf50szb0y00085wx41m8h4f28hfbk"; }; # Replace autostart path diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index 29ce5b23faa..20f25187285 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchgit, flex, bison, python3, autoconf, automake, gnulib, libtool , gettext, ncurses, libusb-compat-0_1, freetype, qemu, lvm2, unifont, pkg-config -, pkgsBuildBuild +, buildPackages , nixosTests , fuse # only needed for grub-mount , runtimeShell @@ -64,7 +64,8 @@ stdenv.mkDerivation rec { echo 'echo "Compile grub2 with { kbdcompSupport = true; } to enable support for this command."' >> util/grub-kbdcomp.in ''; - nativeBuildInputs = [ bison flex python3 pkg-config autoconf automake gettext ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ bison flex python3 pkg-config autoconf automake gettext freetype ]; buildInputs = [ ncurses libusb-compat-0_1 freetype lvm2 fuse libtool ] ++ optional doCheck qemu ++ optional zfsSupport zfs; @@ -105,9 +106,18 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-grub-mount" # dep of os-prober - "BUILD_CC=${pkgsBuildBuild.stdenv.cc}/bin/cc" - ] - ++ optional zfsSupport "--enable-libzfs" + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + # grub doesn't do cross-compilation as usual and tries to use unprefixed + # tools to target the host. Provide toolchain information explicitly for + # cross builds. + # + # Ref: # https://github.com/buildroot/buildroot/blob/master/boot/grub2/grub2.mk#L108 + "TARGET_CC=${stdenv.cc.targetPrefix}cc" + "TARGET_NM=${stdenv.cc.targetPrefix}nm" + "TARGET_OBJCOPY=${stdenv.cc.targetPrefix}objcopy" + "TARGET_RANLIB=${stdenv.cc.targetPrefix}ranlib" + "TARGET_STRIP=${stdenv.cc.targetPrefix}strip" + ] ++ optional zfsSupport "--enable-libzfs" ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ] ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"]; diff --git a/pkgs/tools/misc/neofetch/default.nix b/pkgs/tools/misc/neofetch/default.nix index d9287003084..68cebca4bc3 100644 --- a/pkgs/tools/misc/neofetch/default.nix +++ b/pkgs/tools/misc/neofetch/default.nix @@ -34,5 +34,6 @@ stdenvNoCC.mkDerivation rec { license = licenses.mit; platforms = platforms.all; maintainers = with maintainers; [ alibabzo konimex ]; + mainProgram = "neofetch"; }; } diff --git a/pkgs/tools/misc/starship/default.nix b/pkgs/tools/misc/starship/default.nix index 1e3eae78701..40913193163 100644 --- a/pkgs/tools/misc/starship/default.nix +++ b/pkgs/tools/misc/starship/default.nix @@ -11,13 +11,13 @@ rustPlatform.buildRustPackage rec { pname = "starship"; - version = "0.52.1"; + version = "0.53.0"; src = fetchFromGitHub { owner = "starship"; repo = pname; rev = "v${version}"; - sha256 = "sha256-BX+NUF7mgZyrloj3h9YcG2r6ZZWO20hXQYbBvaK34JQ="; + sha256 = "sha256-g4w14fktJB8TItgm3nSgG+lpdXdNTpX52J+FsIbU+YY="; }; nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ pkg-config ]; @@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec { done ''; - cargoSha256 = "sha256-8xqbPkdIVfAkeG1WZFq56N0rcF+uh2FeMKzz4FgMFYs="; + cargoSha256 = "sha256-9wpr1gs9EehmFzCW2kKDx+LKoDUC27fmhjpcH/fIcyY="; preCheck = '' HOME=$TMPDIR diff --git a/pkgs/tools/system/facter/default.nix b/pkgs/tools/system/facter/default.nix index 906ca618e46..d1d18809a5b 100644 --- a/pkgs/tools/system/facter/default.nix +++ b/pkgs/tools/system/facter/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { pname = "facter"; - version = "3.14.16"; + version = "3.14.17"; src = fetchFromGitHub { - sha256 = "sha256-VZIeyLJBlh5/r0EHinSiPiQyCNUBFBYjDZ6nTVnZBbE="; + sha256 = "sha256-RvsUt1DyN8Xr+Xtz84mbKlDwxLewgK6qklYVdQHu6q0="; rev = version; repo = pname; owner = "puppetlabs"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d629da4fc51..bc0f32a92f0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11582,6 +11582,8 @@ in gputils = null; }; + seren = callPackage ../applications/networking/instant-messengers/seren { }; + serialdv = callPackage ../development/libraries/serialdv { }; serpent = callPackage ../development/compilers/serpent { }; @@ -11844,7 +11846,9 @@ in io = callPackage ../development/interpreters/io { }; - j = callPackage ../development/interpreters/j {}; + j = callPackage ../development/interpreters/j { + stdenv = clangStdenv; + }; janet = callPackage ../development/interpreters/janet {};