From 6230936be276cd02e1e21e22ad0845582d098399 Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 1 Apr 2021 19:47:27 +0200 Subject: [PATCH 01/37] nixos/gitlab: Add options to control puma worker and threads numbers --- nixos/modules/services/misc/gitlab.nix | 64 +++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index f86653f3ead..c2b8cbfbd76 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -652,6 +652,62 @@ in { description = "Extra configuration to merge into shell-config.yml"; }; + puma.workers = mkOption { + type = types.int; + default = 2; + apply = x: builtins.toString x; + description = '' + The number of worker processes Puma should spawn. This + controls the amount of parallel Ruby code can be + executed. GitLab recommends Number of CPU cores - + 1, but at least two. + + + + Each worker consumes quite a bit of memory, so + be careful when increasing this. + + + ''; + }; + + puma.threadsMin = mkOption { + type = types.int; + default = 0; + apply = x: builtins.toString x; + description = '' + The minimum number of threads Puma should use per + worker. + + + + Each thread consumes memory and contributes to Global VM + Lock contention, so be careful when increasing this. + + + ''; + }; + + puma.threadsMax = mkOption { + type = types.int; + default = 4; + apply = x: builtins.toString x; + description = '' + The maximum number of threads Puma should use per + worker. This limits how many threads Puma will automatically + spawn in response to requests. In contrast to workers, + threads will never be able to run Ruby code in parallel, but + give higher IO parallelism. + + + + Each thread consumes memory and contributes to Global VM + Lock contention, so be careful when increasing this. + + + ''; + }; + extraConfig = mkOption { type = types.attrs; default = {}; @@ -1145,7 +1201,13 @@ in { TimeoutSec = "infinity"; Restart = "on-failure"; WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab"; - ExecStart = "${cfg.packages.gitlab.rubyEnv}/bin/puma -C ${cfg.statePath}/config/puma.rb -e production"; + ExecStart = concatStringsSep " " [ + "${cfg.packages.gitlab.rubyEnv}/bin/puma" + "-e production" + "-C ${cfg.statePath}/config/puma.rb" + "-w ${cfg.puma.workers}" + "-t ${cfg.puma.threadsMin}:${cfg.puma.threadsMax}" + ]; }; }; From 306fc0648b99682219049c95e2182f2c668f61e6 Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 8 Apr 2021 19:01:22 +0200 Subject: [PATCH 02/37] nixos/gitlab: Add Sidekiq MemoryKiller support Restart sidekiq automatically when it consumes too much memory. See https://docs.gitlab.com/ee/administration/operations/sidekiq_memory_killer.html for details. --- nixos/modules/services/misc/gitlab.nix | 53 +++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index c2b8cbfbd76..1240b3e6929 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -708,6 +708,49 @@ in { ''; }; + sidekiq.memoryKiller.enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether the Sidekiq MemoryKiller should be turned + on. MemoryKiller kills Sidekiq when its memory consumption + exceeds a certain limit. + + See + for details. + ''; + }; + + sidekiq.memoryKiller.maxMemory = mkOption { + type = types.int; + default = 2000; + apply = x: builtins.toString (x * 1024); + description = '' + The maximum amount of memory, in MiB, a Sidekiq worker is + allowed to consume before being killed. + ''; + }; + + sidekiq.memoryKiller.graceTime = mkOption { + type = types.int; + default = 900; + apply = x: builtins.toString x; + description = '' + The time MemoryKiller waits after noticing excessive memory + consumption before killing Sidekiq. + ''; + }; + + sidekiq.memoryKiller.shutdownWait = mkOption { + type = types.int; + default = 30; + apply = x: builtins.toString x; + description = '' + The time allowed for all jobs to finish before Sidekiq is + killed forcefully. + ''; + }; + extraConfig = mkOption { type = types.attrs; default = {}; @@ -1049,7 +1092,11 @@ in { ] ++ optional (cfg.databaseHost == "") "postgresql.service"; wantedBy = [ "gitlab.target" ]; partOf = [ "gitlab.target" ]; - environment = gitlabEnv; + environment = gitlabEnv // (optionalAttrs cfg.sidekiq.memoryKiller.enable { + SIDEKIQ_MEMORY_KILLER_MAX_RSS = cfg.sidekiq.memoryKiller.maxMemory; + SIDEKIQ_MEMORY_KILLER_GRACE_TIME = cfg.sidekiq.memoryKiller.graceTime; + SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT = cfg.sidekiq.memoryKiller.shutdownWait; + }); path = with pkgs; [ postgresqlPackage git @@ -1061,13 +1108,15 @@ in { # Needed for GitLab project imports gnutar gzip + + procps # Sidekiq MemoryKiller ]; serviceConfig = { Type = "simple"; User = cfg.user; Group = cfg.group; TimeoutSec = "infinity"; - Restart = "on-failure"; + Restart = "always"; WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab"; ExecStart="${cfg.packages.gitlab.rubyEnv}/bin/sidekiq -C \"${cfg.packages.gitlab}/share/gitlab/config/sidekiq_queues.yml\" -e production"; }; From 6389170b3927556ca3f2404b6525f2f57948419d Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 8 Apr 2021 19:03:44 +0200 Subject: [PATCH 03/37] nixos/gitlab: Set MALLOC_ARENA_MAX to "2" This should reduce memory fragmentation drastically and is recommended by both the Puma and the Sidekiq author. It's also the default value for Ruby deployments on Heroku. --- nixos/modules/services/misc/gitlab.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 1240b3e6929..fbd5d0185b0 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -155,6 +155,7 @@ let GITLAB_REDIS_CONFIG_FILE = pkgs.writeText "redis.yml" (builtins.toJSON redisConfig); prometheus_multiproc_dir = "/run/gitlab"; RAILS_ENV = "production"; + MALLOC_ARENA_MAX = "2"; }; gitlab-rake = pkgs.stdenv.mkDerivation { From fbb8dbdac682296e6435e73c7568b3363f6eb0af Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Thu, 15 Apr 2021 21:21:50 +0200 Subject: [PATCH 04/37] fuse: fix mount.fuse -o setuid=... when mounting a fuse fs by fstab on can write: /nix/store/sdlflj/bin/somefuseexe#argument /mountpoint fuse setuid=someuser mount is run by root, and setuid is a way to tell mount.fuse to run somefuseexe as someuser instead. Under the hood, mount.fuse uses su. The problem is that mount is run by systemd in a seemingly very empty environment not containing /run/current-system/sw/bin nor /run/wrappers/bin in $PATH, so mount fails with "su command not found". We now patch the command to run su with an absolute path. man mount.fuse3 indicates that this option is reserved to root (or with enough capabilities) so not using /run/wrappers/bin/su is thus correct. It has the very small advantage of possibly working on non nixos. --- pkgs/os-specific/linux/fuse/common.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/fuse/common.nix b/pkgs/os-specific/linux/fuse/common.nix index 053ea34c82e..cb4412609ff 100644 --- a/pkgs/os-specific/linux/fuse/common.nix +++ b/pkgs/os-specific/linux/fuse/common.nix @@ -1,7 +1,7 @@ { version, sha256Hash }: { lib, stdenv, fetchFromGitHub, fetchpatch -, fusePackages, util-linux, gettext +, fusePackages, util-linux, gettext, shadow , meson, ninja, pkg-config , autoreconfHook , python3Packages, which @@ -54,13 +54,14 @@ in stdenv.mkDerivation rec { # $PATH, so it should also work on non-NixOS systems. export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\"" - sed -e 's@/bin/@${util-linux}/bin/@g' -i lib/mount_util.c + substituteInPlace lib/mount_util.c --replace "/bin/" "${util-linux}/bin/" '' + (if isFuse3 then '' # The configure phase will delete these files (temporary workaround for # ./fuse3-install_man.patch) install -D -m444 doc/fusermount3.1 $out/share/man/man1/fusermount3.1 install -D -m444 doc/mount.fuse3.8 $out/share/man/man8/mount.fuse3.8 '' else '' + substituteInPlace util/mount.fuse.c --replace '"su"' '"${shadow.su}/bin/su"' sed -e 's@CONFIG_RPATH=/usr/share/gettext/config.rpath@CONFIG_RPATH=${gettext}/share/gettext/config.rpath@' -i makeconf.sh ./makeconf.sh ''); From f99ab79b94477cd74a1a8a0439f67d9f53c1b8e4 Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Tue, 27 Apr 2021 11:44:03 +0200 Subject: [PATCH 05/37] maintainers: add Valentin Boettcher --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ee12b1a24db..163106a08f2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3991,6 +3991,16 @@ githubId = 19825977; name = "Hiren Shah"; }; + hiro98 = { + email = "hiro@protagon.space"; + github = "vale981"; + githubId = 4025991; + name = "Valentin Boettcher"; + keys = [{ + longkeyid = "rsa2048/0xC22D4DE4D7B32D19"; + fingerprint = "45A9 9917 578C D629 9F5F B5B4 C22D 4DE4 D7B3 2D19"; + }]; + }; hjones2199 = { email = "hjones2199@gmail.com"; github = "hjones2199"; From b235179807f5e898468e77de7416f5ba3e9c0db8 Mon Sep 17 00:00:00 2001 From: netcrns Date: Mon, 26 Apr 2021 18:41:59 +0200 Subject: [PATCH 06/37] maintainers: add netcrns --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 68ed8a02c3e..5e420023d07 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6979,6 +6979,12 @@ githubId = 628342; name = "Tim Steinbach"; }; + netcrns = { + email = "jason.wing@gmx.de"; + github = "netcrns"; + githubId = 34162313; + name = "Jason Wing"; + }; netixx = { email = "dev.espinetfrancois@gmail.com"; github = "netixx"; From f2a5083dc7f970ad124d296225a3a51bc0495628 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Apr 2021 14:22:18 +0200 Subject: [PATCH 07/37] fastd: fix build on aarch64 --- pkgs/tools/networking/fastd/default.nix | 38 ++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/fastd/default.nix b/pkgs/tools/networking/fastd/default.nix index ed7bb0b01d3..af75641a5b9 100644 --- a/pkgs/tools/networking/fastd/default.nix +++ b/pkgs/tools/networking/fastd/default.nix @@ -1,5 +1,16 @@ -{ lib, stdenv, fetchFromGitHub, bison, meson, ninja, pkg-config -, libuecc, libsodium, libcap, json_c, openssl }: +{ lib +, stdenv +, fetchFromGitHub +, bison +, meson +, ninja +, pkg-config +, libuecc +, libsodium +, libcap +, json_c +, openssl +}: stdenv.mkDerivation rec { pname = "fastd"; @@ -12,8 +23,27 @@ stdenv.mkDerivation rec { sha256 = "1p4k50dk8byrghbr0fwmgwps8df6rlkgcd603r14i71m5g27z5gw"; }; - nativeBuildInputs = [ pkg-config bison meson ninja ]; - buildInputs = [ libuecc libsodium libcap json_c openssl ]; + nativeBuildInputs = [ + bison + meson + ninja + pkg-config + ]; + + buildInputs = [ + json_c + libcap + libsodium + libuecc + openssl + ]; + + # some options are only available on x86 + mesonFlags = lib.optionals (!stdenv.isx86_64 && !stdenv.isi686) [ + "-Dcipher_salsa20_xmm=disabled" + "-Dcipher_salsa2012_xmm=disabled" + "-Dmac_ghash_pclmulqdq=disabled" + ]; enableParallelBuilding = true; From b7387c5cf4618fb9642ac1da3a4a182659addd91 Mon Sep 17 00:00:00 2001 From: blargg Date: Tue, 20 Apr 2021 19:12:28 -0700 Subject: [PATCH 08/37] yadm: 2.5.0 -> 3.1.0 Updated completions to pull from the new location. Switch to using the install helpers. Update license, gpl3 -> gpl3Plus. --- .../version-management/yadm/default.nix | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/version-management/yadm/default.nix b/pkgs/applications/version-management/yadm/default.nix index b75af94af56..fc8bee5fcb7 100644 --- a/pkgs/applications/version-management/yadm/default.nix +++ b/pkgs/applications/version-management/yadm/default.nix @@ -1,17 +1,18 @@ -{ lib, stdenv, fetchFromGitHub, git, gnupg }: +{ lib, stdenv, fetchFromGitHub, git, gnupg, installShellFiles }: -let version = "2.5.0"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "yadm"; - inherit version; + version = "3.1.0"; buildInputs = [ git gnupg ]; + nativeBuildInputs = [ installShellFiles ]; + src = fetchFromGitHub { owner = "TheLocehiliosan"; repo = "yadm"; rev = version; - sha256 = "128qlx8mp7h5ifapqqgsj3fwghn3q6x6ya0y33h5r7gnassd3njr"; + sha256 = "0ga0p28nvqilswa07bzi93adk7wx6d5pgxlacr9wl9v1h6cds92s"; }; dontConfigure = true; @@ -20,12 +21,16 @@ stdenv.mkDerivation { installPhase = '' runHook preInstall install -Dt $out/bin yadm - install -Dt $out/share/man/man1 yadm.1 - install -D completion/yadm.zsh_completion $out/share/zsh/site-functions/_yadm - install -D completion/yadm.bash_completion $out/share/bash-completion/completions/yadm.bash runHook postInstall ''; + postInstall = '' + installManPage yadm.1 + installShellCompletion --cmd yadm \ + --zsh completion/zsh/_yadm \ + --bash completion/bash/yadm + ''; + meta = { homepage = "https://github.com/TheLocehiliosan/yadm"; description = "Yet Another Dotfiles Manager"; @@ -35,7 +40,7 @@ stdenv.mkDerivation { * Provides a way to use alternate files on a specific OS or host. * Supplies a method of encrypting confidential data so it can safely be stored in your repository. ''; - license = lib.licenses.gpl3; + license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ abathur ]; platforms = lib.platforms.unix; }; From 9b2ec3bc7244bab24d268a9f6b13691ececf4e78 Mon Sep 17 00:00:00 2001 From: Andrey Kuznetsov Date: Mon, 26 Apr 2021 12:42:59 +0300 Subject: [PATCH 09/37] ffsend: fix build on darwin --- pkgs/tools/misc/ffsend/default.nix | 5 +++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/ffsend/default.nix b/pkgs/tools/misc/ffsend/default.nix index ff1c4c7b892..75e1084e0bd 100644 --- a/pkgs/tools/misc/ffsend/default.nix +++ b/pkgs/tools/misc/ffsend/default.nix @@ -1,5 +1,6 @@ { lib, stdenv, fetchFromGitLab, rustPlatform, cmake, pkg-config, openssl -, darwin, installShellFiles +, installShellFiles +, CoreFoundation, CoreServices, Security, AppKit, libiconv , x11Support ? stdenv.isLinux || stdenv.hostPlatform.isBSD , xclip ? null, xsel ? null @@ -29,7 +30,7 @@ buildRustPackage rec { nativeBuildInputs = [ cmake pkg-config installShellFiles ]; buildInputs = - if stdenv.isDarwin then (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices Security AppKit ]) + if stdenv.isDarwin then [ libiconv CoreFoundation CoreServices Security AppKit ] else [ openssl ]; preBuild = lib.optionalString (x11Support && usesX11) ( diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30b49b3f71f..d5be7a9defb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4451,7 +4451,9 @@ in ferm = callPackage ../tools/networking/ferm { }; - ffsend = callPackage ../tools/misc/ffsend { }; + ffsend = callPackage ../tools/misc/ffsend { + inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Security AppKit; + }; fgallery = callPackage ../tools/graphics/fgallery { }; From 9a991af2db1dc11e9f00f24a89e984a7b0e4e849 Mon Sep 17 00:00:00 2001 From: Sebastian Neubauer Date: Thu, 22 Apr 2021 11:54:59 +0200 Subject: [PATCH 10/37] amdvlk: 2021.Q1.6 -> 2021.Q2.2 --- pkgs/development/libraries/amdvlk/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/amdvlk/default.nix b/pkgs/development/libraries/amdvlk/default.nix index 1d0256f3b27..5693a5968b6 100644 --- a/pkgs/development/libraries/amdvlk/default.nix +++ b/pkgs/development/libraries/amdvlk/default.nix @@ -21,13 +21,13 @@ let in stdenv.mkDerivation rec { pname = "amdvlk"; - version = "2021.Q1.6"; + version = "2021.Q2.2"; src = fetchRepoProject { name = "${pname}-src"; manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git"; rev = "refs/tags/v-${version}"; - sha256 = "FSQ/bYlvdw0Ih3Yl329o8Gizw0YcZTLtiI222Ju4M8w="; + sha256 = "4k9ZkBxJGuNUO44F9D+u54eUREl5/8zxjxhaShhzGv0="; }; buildInputs = [ @@ -70,12 +70,8 @@ in stdenv.mkDerivation rec { installPhase = '' install -Dm755 -t $out/lib icd/amdvlk${suffix}.so - install -Dm644 -t $out/share/vulkan/icd.d ../drivers/AMDVLK/json/Redhat/amd_icd${suffix}.json - - substituteInPlace $out/share/vulkan/icd.d/amd_icd${suffix}.json --replace \ - "/usr/lib64" "$out/lib" - substituteInPlace $out/share/vulkan/icd.d/amd_icd${suffix}.json --replace \ - "/usr/lib" "$out/lib" + install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json + install -Dm644 -t $out/share/vulkan/implicit_layer.d icd/amd_icd${suffix}.json patchelf --set-rpath "$rpath" $out/lib/amdvlk${suffix}.so ''; From d0fec23e2c2ab3c155be231c549947b7651c7f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20S=C3=A1nchez=20Mu=C3=B1oz?= Date: Wed, 28 Apr 2021 13:51:34 +0200 Subject: [PATCH 11/37] pythonPackages.pyface: fix build --- pkgs/development/python-modules/pyface/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyface/default.nix b/pkgs/development/python-modules/pyface/default.nix index 7ad1fb41526..3a29fd79f77 100644 --- a/pkgs/development/python-modules/pyface/default.nix +++ b/pkgs/development/python-modules/pyface/default.nix @@ -1,5 +1,5 @@ { lib, fetchPypi, buildPythonPackage -, setuptools, six, traits +, importlib-metadata, importlib-resources, six, traits }: buildPythonPackage rec { @@ -11,10 +11,12 @@ buildPythonPackage rec { sha256 = "a7031ec4cfff034affc822e47ff5e6c1a0272e576d79465cdbbe25f721740322"; }; - propagatedBuildInputs = [ setuptools six traits ]; + propagatedBuildInputs = [ importlib-metadata importlib-resources six traits ]; doCheck = false; # Needs X server + pythonImportsCheck = [ "pyface" ]; + meta = with lib; { description = "Traits-capable windowing framework"; homepage = "https://github.com/enthought/pyface"; From d4c9e08bfed47c13e97f3ad41a25385ec063fe63 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 28 Apr 2021 12:38:03 +0000 Subject: [PATCH 12/37] gitlab-pages: 1.35.0 -> 1.38.0 --- pkgs/servers/http/gitlab-pages/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/gitlab-pages/default.nix b/pkgs/servers/http/gitlab-pages/default.nix index 920a3299929..0f1372742bc 100644 --- a/pkgs/servers/http/gitlab-pages/default.nix +++ b/pkgs/servers/http/gitlab-pages/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "gitlab-pages"; - version = "1.35.0"; + version = "1.38.0"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "gitlab-pages"; rev = "v${version}"; - sha256 = "sha256-5AkzbOutBXy59XvMwfyH6A8ETwjP2QokG/Rz31/nCpk="; + sha256 = "sha256-QaqZGTkNAzQEqlwccAWPDP91BSc9vRDEsCBca/lEXW4="; }; - vendorSha256 = "sha256-g8FDWpZmbZSkJAzoEiI8/JZLTTgG7uJ4sS35axaEXLY="; + vendorSha256 = "sha256-uuwuiGQWLIQ5UJuCKDBEvCPo2+AXtJ54ARK431qiakc="; subPackages = [ "." ]; doCheck = false; # Broken From 117315c7954db50a93ad21dbd8a41058ac73983e Mon Sep 17 00:00:00 2001 From: Valentin Boettcher Date: Tue, 27 Apr 2021 11:44:39 +0200 Subject: [PATCH 13/37] roswell: init at 21.01.14.108 --- pkgs/development/tools/roswell/default.nix | 38 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/tools/roswell/default.nix diff --git a/pkgs/development/tools/roswell/default.nix b/pkgs/development/tools/roswell/default.nix new file mode 100644 index 00000000000..98445ea875a --- /dev/null +++ b/pkgs/development/tools/roswell/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchFromGitHub, curl, autoconf, automake, makeWrapper, sbcl }: + +stdenv.mkDerivation rec { + pname = "roswell"; + version = "21.01.14.108"; + + src = fetchFromGitHub { + owner = "roswell"; + repo = pname; + rev = "v${version}"; + sha256 = "1hj9q3ig7naky3pb3jkl9yjc9xkg0k7js3glxicv0aqffx9hkp3p"; + }; + + preConfigure = '' + sh bootstrap + ''; + + configureFlags = [ "--prefix=${placeholder "out"}" ]; + + postInstall = '' + wrapProgram $out/bin/ros \ + --add-flags 'lisp=sbcl-bin/system sbcl-bin.version=system' \ + --prefix PATH : ${lib.makeBinPath [ sbcl ]} --argv0 ros + ''; + + nativeBuildInputs = [ autoconf automake makeWrapper ]; + + buildInputs = [ sbcl curl ]; + + meta = with lib; { + description = "Roswell is a Lisp implementation installer/manager, launcher, and much more"; + license = licenses.mit; + maintainers = with maintainers; [ hiro98 ]; + platforms = platforms.linux; + homepage = "https://github.com/roswell/roswell"; + mainProgram = "ros"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2d6636416ee..3b6f05e0e33 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11496,6 +11496,8 @@ in sbcl_2_1_2 = callPackage ../development/compilers/sbcl/2.1.2.nix {}; sbcl = sbcl_2_1_2; + roswell = callPackage ../development/tools/roswell/default.nix { }; + scala_2_10 = callPackage ../development/compilers/scala/2.x.nix { majorVersion = "2.10"; jre = jdk8; }; scala_2_11 = callPackage ../development/compilers/scala/2.x.nix { majorVersion = "2.11"; jre = jdk8; }; scala_2_12 = callPackage ../development/compilers/scala/2.x.nix { majorVersion = "2.12"; jre = jdk8; }; From ae241196390e8a96de4b52d8734e892f6269c004 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Wed, 28 Apr 2021 17:42:22 +0200 Subject: [PATCH 14/37] gitlab-pages: enable tests --- pkgs/servers/http/gitlab-pages/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/servers/http/gitlab-pages/default.nix b/pkgs/servers/http/gitlab-pages/default.nix index 0f1372742bc..bd8d21fc1ef 100644 --- a/pkgs/servers/http/gitlab-pages/default.nix +++ b/pkgs/servers/http/gitlab-pages/default.nix @@ -13,7 +13,6 @@ buildGoModule rec { vendorSha256 = "sha256-uuwuiGQWLIQ5UJuCKDBEvCPo2+AXtJ54ARK431qiakc="; subPackages = [ "." ]; - doCheck = false; # Broken meta = with lib; { description = "Daemon used to serve static websites for GitLab users"; From a3c00f232b48182fc81e3f4cd91fedb970660498 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Wed, 28 Apr 2021 17:42:45 +0200 Subject: [PATCH 15/37] gitlab-pages: add myself as maintainer and add meta.changelog --- pkgs/servers/http/gitlab-pages/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/http/gitlab-pages/default.nix b/pkgs/servers/http/gitlab-pages/default.nix index bd8d21fc1ef..33c556fb54a 100644 --- a/pkgs/servers/http/gitlab-pages/default.nix +++ b/pkgs/servers/http/gitlab-pages/default.nix @@ -17,7 +17,8 @@ buildGoModule rec { meta = with lib; { description = "Daemon used to serve static websites for GitLab users"; homepage = "https://gitlab.com/gitlab-org/gitlab-pages"; + changelog = "https://gitlab.com/gitlab-org/gitlab-pages/-/blob/v${version}/CHANGELOG.md"; license = licenses.mit; - maintainers = with maintainers; [ das_j ]; + maintainers = with maintainers; [ ajs124 das_j ]; }; } From 25cd84fd1941adc3f18999ea5d322f6150a5eefa Mon Sep 17 00:00:00 2001 From: netcrns Date: Mon, 26 Apr 2021 17:28:43 +0200 Subject: [PATCH 16/37] movine: init at 0.11.0 movine: make meta.description a one-liner movine: make build on darwin work --- .../tools/database/movine/default.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/tools/database/movine/default.nix diff --git a/pkgs/development/tools/database/movine/default.nix b/pkgs/development/tools/database/movine/default.nix new file mode 100644 index 00000000000..fd5debcb9a2 --- /dev/null +++ b/pkgs/development/tools/database/movine/default.nix @@ -0,0 +1,54 @@ +{ rustPlatform +, fetchFromGitHub +, lib +, stdenv +, pkg-config +, postgresql +, sqlite +, openssl +, Security +, libiconv +}: + +rustPlatform.buildRustPackage rec { + pname = "movine"; + version = "0.11.0"; + + src = fetchFromGitHub { + owner = "byronwasti"; + repo = pname; + rev = "v${version}"; + sha256 = "0rms8np8zd23xzrd5avhp2q1ndhdc8f49lfwpff9h0slw4rnzfnj"; + }; + + cargoSha256 = "sha256-4ghfenwmauR4Ft9n7dvBflwIMXPdFq1vh6FpIegHnZk="; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ postgresql sqlite ] ++ ( + if !stdenv.isDarwin then [ openssl ] else [ Security libiconv ] + ); + + meta = with lib; { + description = "A migration manager written in Rust, that attempts to be smart yet minimal"; + homepage = "https://github.com/byronwasti/movine"; + license = licenses.mit; + longDescription = '' + Movine is a simple database migration manager that aims to be compatible + with real-world migration work. Many migration managers get confused + with complicated development strategies for migrations. Oftentimes + migration managers do not warn you if the SQL saved in git differs from + what was actually run on the database. Movine solves this issue by + keeping track of the unique hashes for the up.sql and + down.sql for each migration, and provides tools for + fixing issues. This allows users to easily keep track of whether their + local migration history matches the one on the database. + + This project is currently in early stages. + + Movine does not aim to be an ORM. + Consider diesel instead if + you want an ORM. + ''; + maintainers = with maintainers; [ netcrns ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cdf28b9782c..3775a43862c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16499,6 +16499,10 @@ in mono-addins = callPackage ../development/libraries/mono-addins { }; + movine = callPackage ../development/tools/database/movine { + inherit (darwin.apple_sdk.frameworks) Security; + }; + movit = callPackage ../development/libraries/movit { }; mosquitto = callPackage ../servers/mqtt/mosquitto { }; From a325753d1c359bbf51756fbdb35ba10cffab6110 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 29 Apr 2021 14:02:17 +0000 Subject: [PATCH 17/37] kodiPackages.inputstream-adaptive: 2.6.13 -> 2.6.14 --- .../video/kodi-packages/inputstream-adaptive/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi-packages/inputstream-adaptive/default.nix b/pkgs/applications/video/kodi-packages/inputstream-adaptive/default.nix index b2a9fc33255..62ebe39788f 100644 --- a/pkgs/applications/video/kodi-packages/inputstream-adaptive/default.nix +++ b/pkgs/applications/video/kodi-packages/inputstream-adaptive/default.nix @@ -2,13 +2,13 @@ buildKodiBinaryAddon rec { pname = "inputstream-adaptive"; namespace = "inputstream.adaptive"; - version = "2.6.13"; + version = "2.6.14"; src = fetchFromGitHub { owner = "xbmc"; repo = "inputstream.adaptive"; rev = "${version}-${rel}"; - sha256 = "1xvinmwyx7mai84i8c394dqw86zb6ib9wnxjmv7zpky6x64lvv10"; + sha256 = "sha256-5hYB9J4syY+2XOTdg9h7xLk8MMEG88EETIgkUmz4KOU="; }; extraNativeBuildInputs = [ gtest ]; From b00ff610d5672f5c9a503dc51f02fb16d9f929a5 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 29 Apr 2021 20:13:28 +0000 Subject: [PATCH 18/37] kubernetes-helm: 3.5.3 -> 3.5.4 --- pkgs/applications/networking/cluster/helm/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/helm/default.nix b/pkgs/applications/networking/cluster/helm/default.nix index 501956ec938..0508830918f 100644 --- a/pkgs/applications/networking/cluster/helm/default.nix +++ b/pkgs/applications/networking/cluster/helm/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "helm"; - version = "3.5.3"; + version = "3.5.4"; src = fetchFromGitHub { owner = "helm"; repo = "helm"; rev = "v${version}"; - sha256 = "sha256-7xO07JDy6ujWlDF+5Xd3myRQ8ajTppCXz9fNe4yizVw="; + sha256 = "sha256-u8GJVOubPlIG88TFG5+OvbovMz4Q595wWo2YCwuTgG8="; }; - vendorSha256 = "sha256-lpEoUgABtJczwShNdvD+zYAPDFTJqILSei2YY6mQ2mw="; + vendorSha256 = "sha256-zdZxGiwgx8c0zt9tQebJi7k/LNNYjhNInsVeBbxPsgE="; doCheck = false; From 07484adf1169fa7822fae1d9359f2b6f01b604ea Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 29 Apr 2021 20:46:01 +0000 Subject: [PATCH 19/37] libgpiod: 1.6.2 -> 1.6.3 --- pkgs/development/libraries/libgpiod/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libgpiod/default.nix b/pkgs/development/libraries/libgpiod/default.nix index 8f6d9fcab5e..ccf1c470364 100644 --- a/pkgs/development/libraries/libgpiod/default.nix +++ b/pkgs/development/libraries/libgpiod/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "libgpiod"; - version = "1.6.2"; + version = "1.6.3"; src = fetchurl { url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz"; - sha256 = "1k8mxkzvd6y9aawxghddrjkldzskhb6607qhbwjfl9f945ns87qa"; + sha256 = "sha256-60RgcL4URP19MtMrvKU8Lzu7CiEZPbhhmM9gULeihEE="; }; patches = [ From 352bc1f2699fcaae0fec21eaa792d18593494b4b Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Wed, 28 Apr 2021 17:51:32 +0300 Subject: [PATCH 20/37] =?UTF-8?q?josm:=2017702=20=E2=86=92=2017833?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/misc/josm/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/misc/josm/default.nix b/pkgs/applications/misc/josm/default.nix index badda6b17ee..aa1ef4f8eff 100644 --- a/pkgs/applications/misc/josm/default.nix +++ b/pkgs/applications/misc/josm/default.nix @@ -1,24 +1,26 @@ -{ lib, stdenv, fetchurl, fetchsvn, makeWrapper, unzip, jre, libXxf86vm }: +{ lib, stdenv, fetchurl, fetchsvn, makeWrapper, unzip, jre, libXxf86vm +, extraJavaOpts ? "-Djosm.restart=true -Djava.net.useSystemProxies=true" +}: let pname = "josm"; - version = "17702"; + version = "17833"; srcs = { jar = fetchurl { url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar"; - sha256 = "1p7p0jd87sxrs5n0r82apkilx0phgmjw7vpdg8qrr5msda4rsmpk"; + sha256 = "sha256-i3seRVfCLXNvUkWAAPZK0XloRHuXWCNp1tqnVr7CQ7Y="; }; macosx = fetchurl { url = "https://josm.openstreetmap.de/download/macosx/josm-macos-${version}-java16.zip"; - sha256 = "0r17cphxm852ykb8mkil29rr7sb0bj5w69qd5wz8zf2f9djk9npk"; + sha256 = "sha256-PM/wNXqtEwalhorWHqVHWsaiGv60SFrHXZrb1Mw/QqQ="; }; pkg = fetchsvn { url = "https://josm.openstreetmap.de/svn/trunk/native/linux/tested"; rev = version; - sha256 = "1b7dryvakph8znh2ahgywch66l4bl5rmgsr79axnz1xi12g8ac12"; + sha256 = "sha256-IjCFngixh2+7SifrV3Ohi1BjIOP+QSWg/QjeqbbP7aw="; }; }; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { inherit pname version; dontUnpack = true; @@ -36,8 +38,7 @@ stdenv.mkDerivation { # Add libXxf86vm to path because it is needed by at least Kendzi3D plugin makeWrapper ${jre}/bin/java $out/bin/josm \ - --add-flags "-Djosm.restart=true -Djava.net.useSystemProxies=true" \ - --add-flags "-jar $out/share/josm/josm.jar" \ + --add-flags "${extraJavaOpts} -jar $out/share/josm/josm.jar" \ --prefix LD_LIBRARY_PATH ":" '${libXxf86vm}/lib' ''; From 5a1acaeb4cd354c1460205c30a233d4f313a43e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 25 Apr 2021 21:02:59 +0200 Subject: [PATCH 21/37] rizin: 0.2.0 -> 0.2.1 --- pkgs/development/tools/analysis/rizin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/rizin/default.nix b/pkgs/development/tools/analysis/rizin/default.nix index 20184ac53a1..4e9543ef371 100644 --- a/pkgs/development/tools/analysis/rizin/default.nix +++ b/pkgs/development/tools/analysis/rizin/default.nix @@ -23,11 +23,11 @@ stdenv.mkDerivation rec { pname = "rizin"; - version = "0.2.0"; + version = "0.2.1"; src = fetchurl { url = "https://github.com/rizinorg/rizin/releases/download/v${version}/rizin-src-v${version}.tar.xz"; - sha256 = "sha256-CGHeo247syha+rVtiAQz0XkEYK9p4DHTnLK2FhBOvE8="; + sha256 = "sha256-lxVsPI+qLenZ0pelvxtHlQ6fhWdQeqoEEHrUGZ5Rdmg="; }; mesonFlags = [ From 9d38355a4af55fa74a775511d2166bc7e438ac54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 25 Apr 2021 21:04:07 +0200 Subject: [PATCH 22/37] cutter: 2.0.1 -> 2.0.2 --- pkgs/development/tools/analysis/rizin/cutter.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/rizin/cutter.nix b/pkgs/development/tools/analysis/rizin/cutter.nix index a4c2d0d45c1..c1d8ab99063 100644 --- a/pkgs/development/tools/analysis/rizin/cutter.nix +++ b/pkgs/development/tools/analysis/rizin/cutter.nix @@ -11,13 +11,13 @@ mkDerivation rec { pname = "cutter"; - version = "2.0.1"; + version = "2.0.2"; src = fetchFromGitHub { owner = "rizinorg"; repo = "cutter"; rev = "v${version}"; - sha256 = "sha256-IQCJOUgefSdMSa27E6I/CL35Kx5pHq/u+5Q0FHUAR1E="; + sha256 = "sha256-CVVUXx6wt9vH3B7NrrlRGnOIrhXQPjV7GmX3O+KtMSM="; fetchSubmodules = true; }; From ebb59d3b11712586df8a02e1e8287e31ee92b29b Mon Sep 17 00:00:00 2001 From: Timothy Klim Date: Fri, 30 Apr 2021 19:45:48 +0700 Subject: [PATCH 23/37] nvidia-x11: 460.27.04 -> 465.27 --- pkgs/os-specific/linux/nvidia-x11/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 7d83d68e73c..765118be119 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -36,10 +36,10 @@ rec { else legacy_390; beta = generic { - version = "460.27.04"; - sha256_64bit = "plTqtc5QZQwM0f3MeMZV0N5XOiuSXCCDklL/qyy8HM8="; - settingsSha256 = "hU9J0VSrLXs7N14zq6U5LbBLZXEIyTfih/Bj6eFcMf0="; - persistencedSha256 = "PmqhoPskqhJe2FxMrQh9zX1BWQCR2kkfDwvA89+XALA="; + version = "465.27"; + sha256_64bit = "fmn/qFve5qqqa26n4dsoOwGZ+ash5Bon3JBI8kncMXE="; + settingsSha256 = "3BFLCx0dcrQY4Mv1joMsiVPwTPyufgsNT5pFgp1Mk/A="; + persistencedSha256 = "HtoFGTiBnAeQyRTOMlve5poaQh63LHRD+DHJxZO+c90="; }; # Vulkan developer beta driver From c9d89c2f55abdcbdd54c4bec532c1aba7c312f16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Gr=C3=A4fenstein?= Date: Fri, 30 Apr 2021 14:51:18 +0200 Subject: [PATCH 24/37] google-chrome-dev: fix error on startup Fix `[..]/crashpad_handler: No such file or directory`. --- pkgs/applications/networking/browsers/google-chrome/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/google-chrome/default.nix b/pkgs/applications/networking/browsers/google-chrome/default.nix index b242e8a7726..36d97b5a87c 100644 --- a/pkgs/applications/networking/browsers/google-chrome/default.nix +++ b/pkgs/applications/networking/browsers/google-chrome/default.nix @@ -146,7 +146,7 @@ in stdenv.mkDerivation { --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \ --add-flags ${escapeShellArg commandLineArgs} - for elf in $out/share/google/$appname/{chrome,chrome-sandbox,nacl_helper}; do + for elf in $out/share/google/$appname/{chrome,chrome-sandbox,crashpad_handler,nacl_helper}; do patchelf --set-rpath $rpath $elf patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $elf done From 5b971598f0a928185d0d9b4f3bc4ffe024a62fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Tue, 27 Apr 2021 10:34:36 -0300 Subject: [PATCH 25/37] python3Packages.pytest-sanic: mark as broken with sanic >= 21.3.0 pytest-sanic is incompatible with the current version of Sanic, see sanic-org/sanic#2095 and yunstanford/pytest-sanic#50. While it is broken, we also need it to run Sanic's tests (for which case it works just fine). --- pkgs/development/python-modules/pytest-sanic/default.nix | 4 ++++ pkgs/top-level/python-packages.nix | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/pytest-sanic/default.nix b/pkgs/development/python-modules/pytest-sanic/default.nix index 84330cfd62e..ae1c56f95b7 100644 --- a/pkgs/development/python-modules/pytest-sanic/default.nix +++ b/pkgs/development/python-modules/pytest-sanic/default.nix @@ -46,5 +46,9 @@ buildPythonPackage rec { homepage = "https://github.com/yunstanford/pytest-sanic/"; license = licenses.asl20; maintainers = [ maintainers.costrouc ]; + # pytest-sanic is incompatible with Sanic 21.3, see + # https://github.com/sanic-org/sanic/issues/2095 and + # https://github.com/yunstanford/pytest-sanic/issues/50. + broken = lib.versionAtLeast sanic.version "21.3.0"; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 10c07d8d4b4..9c418635522 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7195,6 +7195,14 @@ in { samsungtvws = callPackage ../development/python-modules/samsungtvws { }; + sanic = callPackage ../development/python-modules/sanic { + # pytest-sanic is doing ok for the sole purpose of testing Sanic. + pytest-sanic = self.pytest-sanic.overridePythonAttrs (oldAttrs: { + doCheck = false; + meta.broken = false; + }); + }; + sanic-auth = callPackage ../development/python-modules/sanic-auth { }; sanic = callPackage ../development/python-modules/sanic { }; From 550bb02269300f2c3611f9a3cefefa38a9fb9a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Tue, 27 Apr 2021 10:28:30 -0300 Subject: [PATCH 26/37] python3Packages.sanic-routing: init at 0.6.2 --- .../python-modules/sanic-routing/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/sanic-routing/default.nix diff --git a/pkgs/development/python-modules/sanic-routing/default.nix b/pkgs/development/python-modules/sanic-routing/default.nix new file mode 100644 index 00000000000..76eb72dc708 --- /dev/null +++ b/pkgs/development/python-modules/sanic-routing/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pytest-asyncio +}: + +buildPythonPackage rec { + pname = "sanic-routing"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "sanic-org"; + repo = "sanic-routing"; + rev = "v${version}"; + hash = "sha256-ZMl8PB9E401pUfUJ4tW7nBx1TgPQQtx9erVni3zP+lo="; + }; + + checkInputs = [ pytestCheckHook pytest-asyncio ]; + pythonImportsCheck = [ "sanic_routing" ]; + + meta = with lib; { + description = "Core routing component for the Sanic web framework"; + homepage = "https://github.com/sanic-org/sanic-routing"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9c418635522..1128faed290 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7205,7 +7205,7 @@ in { sanic-auth = callPackage ../development/python-modules/sanic-auth { }; - sanic = callPackage ../development/python-modules/sanic { }; + sanic-routing = callPackage ../development/python-modules/sanic-routing { }; sapi-python-client = callPackage ../development/python-modules/sapi-python-client { }; From 192b28a75f5bc29378af96784c996d65288bd16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Tue, 27 Apr 2021 10:50:24 -0300 Subject: [PATCH 27/37] python3Packages.sanic-testing: init at 0.3.1 --- .../python-modules/sanic-testing/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/sanic-testing/default.nix diff --git a/pkgs/development/python-modules/sanic-testing/default.nix b/pkgs/development/python-modules/sanic-testing/default.nix new file mode 100644 index 00000000000..fa1dfc6870b --- /dev/null +++ b/pkgs/development/python-modules/sanic-testing/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, httpcore +, httpx +, pytest-asyncio +, sanic +, websockets +}: + +buildPythonPackage rec { + pname = "sanic-testing"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "sanic-org"; + repo = "sanic-testing"; + rev = "v${version}"; + hash = "sha256-hBAq+/BKs0a01M89Nb8HaClqxB+W5PTfjVzef/m9SWs="; + }; + + propagatedBuildInputs = [ httpx sanic websockets httpcore ]; + + # `sanic` is explicitly set to null when building `sanic` itself + # to prevent infinite recursion. In that case we skip running + # the package at all. + doCheck = sanic != null; + dontUsePythonImportsCheck = sanic == null; + + checkInputs = [ pytestCheckHook pytest-asyncio ]; + pythonImportsCheck = [ "sanic_testing" ]; + + meta = with lib; { + description = "Core testing clients for the Sanic web framework"; + homepage = "https://github.com/sanic-org/sanic-testing"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1128faed290..65faa170d6f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7207,6 +7207,8 @@ in { sanic-routing = callPackage ../development/python-modules/sanic-routing { }; + sanic-testing = callPackage ../development/python-modules/sanic-testing { }; + sapi-python-client = callPackage ../development/python-modules/sapi-python-client { }; sarge = callPackage ../development/python-modules/sarge { }; From bd815d21219840d1aa688083179323ad0161fff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Tue, 27 Apr 2021 10:31:42 -0300 Subject: [PATCH 28/37] python3Packages.sanic: 21.3.2 -> 21.3.4 While we're at it, revise the dependencies lists; there's been a couple of break-ups with 21.3.0. --- .../python-modules/sanic/default.nix | 34 ++++++++++--------- pkgs/top-level/python-packages.nix | 3 ++ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index e5995ed0b1e..31dcc86e0bc 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -1,42 +1,44 @@ { lib, buildPythonPackage, fetchPypi, doCheck ? true -, aiofiles, httptools, httpx, multidict, ujson, uvloop, websockets -, pytestCheckHook, beautifulsoup4, gunicorn, httpcore, uvicorn -, pytest-asyncio, pytest-benchmark, pytest-dependency, pytest-sanic, pytest-sugar, pytestcov +, aiofiles, httptools, multidict, sanic-routing, ujson, uvloop, websockets +, pytestCheckHook, beautifulsoup4, gunicorn, uvicorn, sanic-testing +, pytest-benchmark, pytest-sanic, pytest-sugar, pytestcov }: buildPythonPackage rec { pname = "sanic"; - version = "21.3.2"; + version = "21.3.4"; src = fetchPypi { inherit pname version; - sha256 = "84a04c5f12bf321bed3942597787f1854d15c18f157aebd7ced8c851ccc49e08"; + sha256 = "1cbd12b9138b3ca69656286b0be91fff02b826e8cb72dd76a2ca8c5eb1288d8e"; }; postPatch = '' + # Loosen dependency requirements. substituteInPlace setup.py \ - --replace '"multidict==5.0.0"' '"multidict"' \ - --replace '"httpx==0.15.4"' '"httpx"' \ - --replace '"httpcore==0.3.0"' '"httpcore"' \ - --replace '"pytest==5.2.1"' '"pytest"' + --replace '"pytest==5.2.1"' '"pytest"' \ + --replace '"gunicorn==20.0.4"' '"gunicorn"' \ + --replace '"pytest-sanic",' "" + # Patch a request headers test to allow brotli encoding + # (we build httpx with brotli support, upstream doesn't). + substituteInPlace tests/test_headers.py \ + --replace "deflate\r\n" "deflate, br\r\n" ''; propagatedBuildInputs = [ - aiofiles httptools httpx multidict ujson uvloop websockets + sanic-routing httptools uvloop ujson aiofiles websockets multidict ]; checkInputs = [ - pytestCheckHook beautifulsoup4 gunicorn httpcore uvicorn - pytest-asyncio pytest-benchmark pytest-dependency pytest-sanic pytest-sugar pytestcov + sanic-testing gunicorn pytestcov beautifulsoup4 pytest-sanic pytest-sugar + pytest-benchmark pytestCheckHook uvicorn ]; inherit doCheck; disabledTests = [ "test_gunicorn" # No "examples" directory in pypi distribution. - "test_logo" # Fails to filter out "DEBUG asyncio:selector_events.py:59 Using selector: EpollSelector" "test_zero_downtime" # No "examples.delayed_response.app" module in pypi distribution. - "test_reloader_live" # OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 42104) ]; __darwinAllowLocalNetworking = true; @@ -45,8 +47,8 @@ buildPythonPackage rec { meta = with lib; { description = "A microframework based on uvloop, httptools, and learnings of flask"; - homepage = "https://github.com/channelcat/sanic/"; + homepage = "https://github.com/sanic-org/sanic/"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc AluisioASG ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 65faa170d6f..90f766ed459 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7201,6 +7201,9 @@ in { doCheck = false; meta.broken = false; }); + # Don't pass any `sanic` to avoid dependency loops. `sanic-testing` + # has special logic to disable tests when this is the case. + sanic-testing = self.sanic-testing.override { sanic = null; }; }; sanic-auth = callPackage ../development/python-modules/sanic-auth { }; From c9f15449788304ea881b67b10df4243bf93aa905 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 30 Apr 2021 15:02:09 +0200 Subject: [PATCH 29/37] sof-firmware: 1.6 -> 1.7 (#121181) --- .../linux/firmware/sof-firmware/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/sof-firmware/default.nix b/pkgs/os-specific/linux/firmware/sof-firmware/default.nix index b474c48e341..5ee39c5bf33 100644 --- a/pkgs/os-specific/linux/firmware/sof-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/sof-firmware/default.nix @@ -3,29 +3,28 @@ with lib; stdenv.mkDerivation rec { pname = "sof-firmware"; - version = "1.6"; + version = "1.7"; src = fetchFromGitHub { owner = "thesofproject"; repo = "sof-bin"; - rev = "cbdec6963b2c2d58b0080955d3c11b96ff4c92f0"; - sha256 = "0la2pw1zpv50cywiqcfb00cxqvjc73drxwjchyzi54l508817nxh"; + rev = "v${version}"; + sha256 = "sha256-Z0Z4HLsIIuW8E1kFNhAECmzj1HkJVfbEw13B8V7PZLk="; }; - phases = [ "unpackPhase" "installPhase" ]; + dontFixup = true; # binaries must not be stripped or patchelfed installPhase = '' - mkdir -p $out/lib/firmware - - patchShebangs go.sh - ROOT=$out SOF_VERSION=v${version} ./go.sh + mkdir -p $out/lib/firmware/intel/ + cp -a sof-v${version} $out/lib/firmware/intel/sof + cp -a sof-tplg-v${version} $out/lib/firmware/intel/sof-tplg ''; meta = with lib; { description = "Sound Open Firmware"; homepage = "https://www.sofproject.org/"; license = with licenses; [ bsd3 isc ]; - maintainers = with maintainers; [ lblasc evenbrenden ]; + maintainers = with maintainers; [ lblasc evenbrenden hmenke ]; platforms = with platforms; linux; }; } From 4263479d3e02a47584d489b48b3bd39efd1337c7 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 16 Apr 2021 15:12:15 +0200 Subject: [PATCH 30/37] cage: 0.1.2.1 -> 0.1.3 --- pkgs/applications/window-managers/cage/default.nix | 9 ++------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/window-managers/cage/default.nix b/pkgs/applications/window-managers/cage/default.nix index 103be0e53d7..1632ae027c0 100644 --- a/pkgs/applications/window-managers/cage/default.nix +++ b/pkgs/applications/window-managers/cage/default.nix @@ -8,20 +8,15 @@ stdenv.mkDerivation rec { pname = "cage"; - version = "0.1.2.1"; + version = "0.1.3"; src = fetchFromGitHub { owner = "Hjdskes"; repo = "cage"; rev = "v${version}"; - sha256 = "1i4rm3dpmk7gkl6hfs6a7vwz76ba7yqcdp63nlrdbnq81m9cy2am"; + sha256 = "0ixl45g0m8b75gvbjm3gf5qg0yplspgs0xpm2619wn5sygc47sb1"; }; - postPatch = '' - substituteInPlace meson.build --replace \ - "0.1.2" "${version}" - ''; - nativeBuildInputs = [ meson ninja pkg-config wayland scdoc makeWrapper ]; buildInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51658440cad..0a491914c27 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22317,9 +22317,7 @@ in caerbannog = callPackage ../applications/misc/caerbannog { }; - cage = callPackage ../applications/window-managers/cage { - wlroots = wlroots_0_12; - }; + cage = callPackage ../applications/window-managers/cage { }; calf = callPackage ../applications/audio/calf { inherit (gnome2) libglade; From 28b8cff301f356a7a24be1b6203f6a2e3a814e7d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 30 Apr 2021 15:34:54 +0200 Subject: [PATCH 31/37] nixos/tests/cage: Fix the test with wlroots 0.13 See #119615 for more details. The aarch64-linux test failed with "qemu-system-aarch64: Virtio VGA not available" so I've restricted the test to x86_64-linux (the virtio paravirtualized 3D graphics driver is likely only available on very few platforms). --- nixos/tests/all-tests.nix | 2 +- nixos/tests/cage.nix | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 3aefa82301c..2347673cef1 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -47,7 +47,7 @@ in buildkite-agents = handleTest ./buildkite-agents.nix {}; caddy = handleTest ./caddy.nix {}; cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {}; - cage = handleTest ./cage.nix {}; + cage = handleTestOn ["x86_64-linux"] ./cage.nix {}; cagebreak = handleTest ./cagebreak.nix {}; calibre-web = handleTest ./calibre-web.nix {}; cassandra_2_1 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_2_1; }; diff --git a/nixos/tests/cage.nix b/nixos/tests/cage.nix index 69cc76d315f..53476c2fbe8 100644 --- a/nixos/tests/cage.nix +++ b/nixos/tests/cage.nix @@ -25,6 +25,11 @@ import ./make-test-python.nix ({ pkgs, ...} : testScript = { nodes, ... }: let user = nodes.machine.config.users.users.alice; in '' + # Need to switch to a different VGA card / GPU driver because Cage segfaults with the default one (std): + # machine # [ 14.355893] .cage-wrapped[736]: segfault at 20 ip 00007f035fa0d8c7 sp 00007ffce9e4a2f0 error 4 in libwlroots.so.8[7f035fa07000+5a000] + # machine # [ 14.358108] Code: 4f a8 ff ff eb aa 0f 1f 44 00 00 c3 0f 1f 80 00 00 00 00 41 54 49 89 f4 55 31 ed 53 48 89 fb 48 8d 7f 18 48 8d 83 b8 00 00 00 <80> 7f 08 00 75 0d 48 83 3f 00 0f 85 91 00 00 00 48 89 fd 48 83 c7 + os.environ["QEMU_OPTS"] = "-vga virtio" + with subtest("Wait for cage to boot up"): start_all() machine.wait_for_file("/run/user/${toString user.uid}/wayland-0.lock") From 98822ee896a3a5aeb5c6747da0ea40f86d5ac167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Fri, 23 Apr 2021 15:18:07 -0300 Subject: [PATCH 32/37] python3Packages.json-logging: init at 1.3.0 --- .../python-modules/json-logging/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/json-logging/default.nix diff --git a/pkgs/development/python-modules/json-logging/default.nix b/pkgs/development/python-modules/json-logging/default.nix new file mode 100644 index 00000000000..3d34cb2475a --- /dev/null +++ b/pkgs/development/python-modules/json-logging/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, pytestCheckHook +, wheel +, flask +, sanic +, fastapi +, uvicorn +, requests +}: + +buildPythonPackage rec { + pname = "json-logging"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "bobbui"; + repo = "json-logging-python"; + rev = version; + hash = "sha256-0eIhOi30r3ApyVkiBdTQps5tNj7rI+q8TjNWxTnhtMQ="; + }; + patches = [ + # Fix tests picking up test modules instead of real packages. + (fetchpatch { + url = "https://github.com/bobbui/json-logging-python/commit/6fdb64deb42fe48b0b12bda0442fd5ac5f03107f.patch"; + sha256 = "sha256-BLfARsw2FdvY22NCaFfdFgL9wTmEZyVIi3CQpB5qU0Y="; + }) + ]; + + # - Quart is not packaged for Nixpkgs. + # - FastAPI is broken, see #112701 and tiangolo/fastapi#2335. + checkInputs = [ wheel flask /*quart*/ sanic /*fastapi*/ uvicorn requests pytestCheckHook ]; + disabledTests = [ "quart" "fastapi" ]; + disabledTestPaths = [ "tests/test_fastapi.py" ]; + # Tests spawn servers and try to connect to them. + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Python library to emit logs in JSON format"; + longDescription = '' + Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as ELK, EFK, AWS Cloudwatch, GCP Stackdriver. + ''; + homepage = "https://github.com/bobbui/json-logging-python"; + license = licenses.asl20; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 90f766ed459..dc54e6ae5fc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3443,6 +3443,8 @@ in { jsonlines = callPackage ../development/python-modules/jsonlines { }; + json-logging = callPackage ../development/python-modules/json-logging { }; + jsonmerge = callPackage ../development/python-modules/jsonmerge { }; json-merge-patch = callPackage ../development/python-modules/json-merge-patch { }; From 0463f91e04abbe37e7a7ea46e970357529aba324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= <1904165+AluisioASG@users.noreply.github.com> Date: Fri, 30 Apr 2021 11:40:24 -0300 Subject: [PATCH 33/37] python3Packages.sanic-auth: fix tests (#121279) After #120881, packages using Sanic's `app.test_client` or `app.asgi_client` need to depend on `sanic-testing` as well. --- pkgs/development/python-modules/sanic-auth/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sanic-auth/default.nix b/pkgs/development/python-modules/sanic-auth/default.nix index c78b6f13d15..38d73d461c2 100644 --- a/pkgs/development/python-modules/sanic-auth/default.nix +++ b/pkgs/development/python-modules/sanic-auth/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, sanic, pytestCheckHook }: +{ lib, buildPythonPackage, fetchPypi, sanic, sanic-testing, pytestCheckHook }: buildPythonPackage rec { pname = "Sanic-Auth"; @@ -11,7 +11,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ sanic ]; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ pytestCheckHook sanic-testing ]; pythonImportsCheck = [ "sanic_auth" ]; From 932ec5518e854d4388827ea45f65284766da0317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Fri, 23 Apr 2021 16:16:43 -0300 Subject: [PATCH 34/37] python3Packages.pytest-console-scripts: init at 1.2.0 Thanks to @kvas-it for cutting a release with the patches needed to make tests work. --- .../pytest-console-scripts/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-console-scripts/default.nix diff --git a/pkgs/development/python-modules/pytest-console-scripts/default.nix b/pkgs/development/python-modules/pytest-console-scripts/default.nix new file mode 100644 index 00000000000..aaecd191e93 --- /dev/null +++ b/pkgs/development/python-modules/pytest-console-scripts/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, python +, mock +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "pytest-console-scripts"; + version = "1.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "4a2138d7d567bc581fe081b6a5975849a2a36b3925cb0f066d2380103e13741c"; + }; + postPatch = '' + # setuptools-scm is pinned to <6 because it dropped Python 3.5 + # support. That's not something that affects us. + substituteInPlace setup.py --replace "'setuptools_scm<6'" "'setuptools_scm'" + # Patch the shebang of a script generated during test. + substituteInPlace tests/test_run_scripts.py --replace "#!/usr/bin/env python" "#!${python.interpreter}" + ''; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + nativeBuildInputs = [ setuptools-scm ]; + + checkInputs = [ mock pytestCheckHook ]; + + meta = with lib; { + description = "Pytest plugin for testing console scripts"; + longDescription = '' + Pytest-console-scripts is a pytest plugin for running python scripts from within tests. + It's quite similar to subprocess.run(), but it also has an in-process mode, where the scripts are executed by the interpreter that's running pytest (using some amount of sandboxing). + ''; + homepage = "https://github.com/kvas-it/pytest-console-scripts"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dc54e6ae5fc..ec7afc633ea 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6261,6 +6261,8 @@ in { pytest-click = callPackage ../development/python-modules/pytest-click { }; + pytest-console-scripts = callPackage ../development/python-modules/pytest-console-scripts { }; + pytest-cov = self.pytestcov; # self 2021-01-04 pytestcov = callPackage ../development/python-modules/pytest-cov { }; From 093ab98c80be3db7b81a6ac569c6fa5e70081226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Fri, 23 Apr 2021 16:18:38 -0300 Subject: [PATCH 35/37] dyndnsc: 0.5.1 -> 0.6.1 --- pkgs/applications/networking/dyndns/dyndnsc/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/dyndns/dyndnsc/default.nix b/pkgs/applications/networking/dyndns/dyndnsc/default.nix index 65d46305741..66b1d2639d6 100644 --- a/pkgs/applications/networking/dyndns/dyndnsc/default.nix +++ b/pkgs/applications/networking/dyndns/dyndnsc/default.nix @@ -2,11 +2,11 @@ python3Packages.buildPythonApplication rec { pname = "dyndnsc"; - version = "0.5.1"; + version = "0.6.1"; src = python3Packages.fetchPypi { inherit pname version; - hash = "sha256-Sy6U0XhIQ9mPmznmWKqoyqE34vaE84fwlivouaF7Dd0="; + sha256 = "13078d29eea2f9a4ca01f05676c3309ead5e341dab047e0d51c46f23d4b7fbb4"; }; postPatch = '' @@ -19,9 +19,10 @@ python3Packages.buildPythonApplication rec { dnspython netifaces requests + json-logging setuptools ]; - checkInputs = with python3Packages; [ bottle pytestCheckHook ]; + checkInputs = with python3Packages; [ bottle mock pytest-console-scripts pytestCheckHook ]; disabledTests = [ # dnswanip connects to an external server to discover the From 903e23ad362ed19e95eaf7765af719db551dfbbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Fri, 30 Apr 2021 17:50:01 +0200 Subject: [PATCH 36/37] firefox-esr: use latest Rust Firefox ESR 78.x used to have a problem with Rust >= 1.46, but it works with latest Rust now! --- .../networking/browsers/firefox/common.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 24195e578bd..0b79da754f8 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -9,7 +9,7 @@ , hunspell, libevent, libstartup_notification , libvpx_1_8 , icu67, libpng, jemalloc, glib, pciutils -, autoconf213, which, gnused, rustPackages, rustPackages_1_45 +, autoconf213, which, gnused, rustPackages , rust-cbindgen, nodejs, nasm, fetchpatch , gnum4 , debugBuild ? false @@ -90,19 +90,13 @@ let then "/Applications/${binaryNameCapitalized}.app/Contents/MacOS" else "/bin"; - # 78 ESR won't build with rustc 1.47 - inherit (if lib.versionAtLeast ffversion "82" then rustPackages else rustPackages_1_45) - rustc cargo; + inherit (rustPackages) rustc cargo; # Darwin's stdenv provides the default llvmPackages version, match that since # clang LTO on Darwin is broken so the stdenv is not being changed. - # Target the LLVM version that rustc -Vv reports it is built with for LTO. - # rustPackages_1_45 -> LLVM 10, rustPackages -> LLVM 11 llvmPackages = if stdenv.isDarwin then buildPackages.llvmPackages - else if lib.versionAtLeast rustc.llvm.version "11" - then buildPackages.llvmPackages_11 - else buildPackages.llvmPackages_10; + else buildPackages.llvmPackages_11; # When LTO for Darwin is fixed, the following will need updating as lld # doesn't work on it. For now it is fine since ltoSupport implies no Darwin. From 7ee53c0c4fe28f81095298893c8c2fd4e7bc2886 Mon Sep 17 00:00:00 2001 From: Konstantin Alekseev Date: Wed, 28 Apr 2021 18:38:29 +0300 Subject: [PATCH 37/37] python2Packages.importlib-resources: use version 3.3.1 for python2 --- .../python-modules/importlib-resources/2.nix | 38 +++++++++++++++++++ .../importlib-resources/default.nix | 11 +++--- pkgs/top-level/python2-packages.nix | 2 + 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/python-modules/importlib-resources/2.nix diff --git a/pkgs/development/python-modules/importlib-resources/2.nix b/pkgs/development/python-modules/importlib-resources/2.nix new file mode 100644 index 00000000000..1034c311130 --- /dev/null +++ b/pkgs/development/python-modules/importlib-resources/2.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +, importlib-metadata +, typing +, singledispatch +, python +}: + +buildPythonPackage rec { + pname = "importlib-resources"; + version = "3.3.1"; + + src = fetchPypi { + pname = "importlib_resources"; + inherit version; + sha256 = "0ed250dbd291947d1a298e89f39afcc477d5a6624770503034b72588601bcc05"; + }; + + nativeBuildInputs = [ setuptools-scm ]; + propagatedBuildInputs = [ + importlib-metadata + singledispatch + typing + ]; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + meta = with lib; { + description = "Read resources from Python packages"; + homepage = "https://importlib-resources.readthedocs.io/"; + license = licenses.asl20; + maintainers = [ ]; + }; +} diff --git a/pkgs/development/python-modules/importlib-resources/default.nix b/pkgs/development/python-modules/importlib-resources/default.nix index cd8fec1e54e..2388fb1b26d 100644 --- a/pkgs/development/python-modules/importlib-resources/default.nix +++ b/pkgs/development/python-modules/importlib-resources/default.nix @@ -1,8 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, setuptools_scm -, toml +, setuptools-scm , importlib-metadata , typing ? null , singledispatch ? null @@ -11,15 +10,16 @@ }: buildPythonPackage rec { - pname = "importlib_resources"; + pname = "importlib-resources"; version = "5.1.2"; src = fetchPypi { - inherit pname version; + pname = "importlib_resources"; + inherit version; sha256 = "642586fc4740bd1cad7690f836b3321309402b20b332529f25617ff18e8e1370"; }; - nativeBuildInputs = [ setuptools_scm toml ]; + nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ importlib-metadata ] ++ lib.optional (pythonOlder "3.4") singledispatch @@ -34,5 +34,6 @@ buildPythonPackage rec { description = "Read resources from Python packages"; homepage = "https://importlib-resources.readthedocs.io/"; license = licenses.asl20; + maintainers = [ ]; }; } diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index 915c2edec70..81bdcdb93db 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -178,6 +178,8 @@ with self; with super; { importlib-metadata = callPackage ../development/python-modules/importlib-metadata/2.nix { }; + importlib-resources = callPackage ../development/python-modules/importlib-resources/2.nix { }; + ipaddr = callPackage ../development/python-modules/ipaddr { }; ipykernel = callPackage ../development/python-modules/ipykernel/4.nix { };