about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--nixos/lib/make-disk-image.nix78
-rw-r--r--nixos/maintainers/scripts/cloudstack/cloudstack-image.nix1
-rw-r--r--nixos/maintainers/scripts/ec2/amazon-image.nix5
-rw-r--r--nixos/maintainers/scripts/openstack/openstack-image.nix2
-rw-r--r--nixos/modules/services/misc/jellyfin.nix6
-rw-r--r--nixos/modules/virtualisation/azure-image.nix5
-rw-r--r--nixos/modules/virtualisation/digital-ocean-image.nix5
-rw-r--r--nixos/modules/virtualisation/google-compute-image.nix5
-rw-r--r--nixos/modules/virtualisation/hyperv-image.nix5
-rw-r--r--nixos/modules/virtualisation/virtualbox-image.nix5
-rw-r--r--nixos/modules/virtualisation/vmware-image.nix5
-rw-r--r--pkgs/applications/audio/flacon/default.nix4
-rw-r--r--pkgs/applications/audio/mousai/default.nix69
-rw-r--r--pkgs/applications/editors/eclipse/default.nix48
-rw-r--r--pkgs/applications/editors/eclipse/plugins.nix24
-rw-r--r--pkgs/applications/graphics/openboard/default.nix115
-rw-r--r--pkgs/applications/misc/fme/default.nix47
-rw-r--r--pkgs/applications/misc/heimer/default.nix4
-rw-r--r--pkgs/applications/networking/cluster/fluxctl/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/chatterino2/default.nix4
-rw-r--r--pkgs/applications/networking/sniffers/wireshark/default.nix4
-rw-r--r--pkgs/applications/radio/wsjtx/default.nix10
-rw-r--r--pkgs/applications/science/geometry/tetgen/default.nix4
-rw-r--r--pkgs/applications/science/logic/alt-ergo/default.nix17
-rw-r--r--pkgs/applications/science/math/gap/default.nix31
-rw-r--r--pkgs/applications/science/math/pynac/default.nix34
-rw-r--r--pkgs/applications/science/math/sage/default.nix20
-rw-r--r--pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch92
-rw-r--r--pkgs/applications/science/math/sage/patches/dont-grep-threejs-version-from-minified-js.patch16
-rw-r--r--pkgs/applications/science/math/sage/patches/eclib-20210223-test-formatting.patch131
-rw-r--r--pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch34
-rw-r--r--pkgs/applications/science/math/sage/patches/sympy-1.7-update.patch25
-rw-r--r--pkgs/applications/science/math/sage/sage-env.nix6
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix154
-rw-r--r--pkgs/applications/science/math/sage/sage_docbuild.nix20
-rw-r--r--pkgs/applications/science/math/sage/sagedoc.nix12
-rw-r--r--pkgs/applications/science/math/sage/sagelib.nix16
-rw-r--r--pkgs/applications/science/math/sage/threejs-sage.nix18
-rw-r--r--pkgs/applications/science/math/singular/default.nix149
-rw-r--r--pkgs/applications/science/math/singular/disable-docs-for-optional-unpackaged-deps.patch112
-rw-r--r--pkgs/applications/science/math/singular/disable-vspace-on-aarch64.patch15
-rw-r--r--pkgs/applications/science/math/singular/redhat-aarch64.patch38
-rw-r--r--pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch194
-rw-r--r--pkgs/applications/version-management/subversion/CVE-2020-17525.patch15
-rw-r--r--pkgs/applications/version-management/subversion/default.nix5
-rw-r--r--pkgs/applications/video/jellyfin-media-player/default.nix8
-rw-r--r--pkgs/applications/video/simplescreenrecorder/default.nix20
-rw-r--r--pkgs/applications/video/simplescreenrecorder/fix-paths.patch22
-rw-r--r--pkgs/applications/video/streamlink/default.nix23
-rw-r--r--pkgs/applications/virtualization/docker/default.nix7
-rw-r--r--pkgs/applications/virtualization/qemu/default.nix3
-rw-r--r--pkgs/data/misc/graphs/default.nix8
-rw-r--r--pkgs/data/themes/qogir/default.nix4
-rw-r--r--pkgs/development/coq-modules/coqhammer/default.nix15
-rw-r--r--pkgs/development/libraries/aws-sdk-cpp/default.nix3
-rw-r--r--pkgs/development/libraries/cimg/default.nix14
-rw-r--r--pkgs/development/libraries/eclib/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpegthumbnailer/default.nix4
-rw-r--r--pkgs/development/libraries/flint/default.nix2
-rw-r--r--pkgs/development/libraries/ftgl/default.nix33
-rw-r--r--pkgs/development/libraries/libchewing/default.nix16
-rw-r--r--pkgs/development/libraries/mpfi/default.nix18
-rw-r--r--pkgs/development/libraries/qhull/default.nix9
-rw-r--r--pkgs/development/ocaml-modules/dtoa/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/h2/default.nix59
-rw-r--r--pkgs/development/ocaml-modules/hpack/default.nix37
-rw-r--r--pkgs/development/ocaml-modules/letsencrypt/default.nix84
-rw-r--r--pkgs/development/ocaml-modules/mirage-crypto/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/paf/default.nix82
-rw-r--r--pkgs/development/python-modules/btrfs/default.nix16
-rw-r--r--pkgs/development/python-modules/cve-bin-tool/default.nix83
-rw-r--r--pkgs/development/python-modules/karton-mwdb-reporter/default.nix2
-rw-r--r--pkgs/development/python-modules/onnx/default.nix20
-rw-r--r--pkgs/development/python-modules/pytorch/default.nix3
-rw-r--r--pkgs/development/python-modules/rpmfile/default.nix32
-rw-r--r--pkgs/development/tools/air/default.nix4
-rw-r--r--pkgs/development/tools/analysis/codeql/default.nix4
-rw-r--r--pkgs/development/tools/bazelisk/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/sbt/default.nix4
-rw-r--r--pkgs/development/tools/go-task/default.nix4
-rw-r--r--pkgs/development/tools/protoc-gen-go-grpc/default.nix29
-rw-r--r--pkgs/development/tools/protoc-gen-go-grpc/deps.nix333
-rw-r--r--pkgs/misc/vim-plugins/overrides.nix99
-rw-r--r--pkgs/os-specific/linux/kernel/linux-lqx.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-zen.nix4
-rw-r--r--pkgs/os-specific/linux/usbip/default.nix2
-rw-r--r--pkgs/servers/clickhouse/default.nix3
-rw-r--r--pkgs/servers/jellyfin/10.5.x.nix61
-rw-r--r--pkgs/servers/simple-http-server/default.nix29
-rw-r--r--pkgs/shells/fish/plugins/default.nix2
-rw-r--r--pkgs/shells/fish/plugins/forgit.nix22
-rw-r--r--pkgs/stdenv/generic/check-meta.nix1
-rw-r--r--pkgs/stdenv/generic/make-derivation.nix10
-rw-r--r--pkgs/tools/filesystems/avfs/default.nix6
-rw-r--r--pkgs/tools/filesystems/btrfs-heatmap/default.nix20
-rw-r--r--pkgs/tools/filesystems/ceph/default.nix3
-rw-r--r--pkgs/tools/filesystems/gcsfuse/default.nix4
-rw-r--r--pkgs/tools/graphics/agi/default.nix4
-rw-r--r--pkgs/tools/graphics/vips/default.nix4
-rw-r--r--pkgs/tools/misc/castty/default.nix25
-rw-r--r--pkgs/tools/misc/dialog/default.nix (renamed from pkgs/development/tools/misc/dialog/default.nix)8
-rw-r--r--pkgs/tools/misc/goreleaser/default.nix6
-rw-r--r--pkgs/tools/misc/grub/2.0x.nix2
-rw-r--r--pkgs/tools/misc/handlr/default.nix6
-rw-r--r--pkgs/tools/misc/nncp/default.nix4
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/misc/zellij/default.nix34
-rw-r--r--pkgs/tools/networking/zerotierone/default.nix14
-rw-r--r--pkgs/tools/security/gitleaks/default.nix4
-rw-r--r--pkgs/tools/security/grype/default.nix6
-rw-r--r--pkgs/tools/security/nsjail/001-fix-bison-link-error.patch30
-rw-r--r--pkgs/tools/security/nsjail/default.nix7
-rw-r--r--pkgs/tools/system/gdu/default.nix4
-rw-r--r--pkgs/tools/text/fastmod/default.nix6
-rw-r--r--pkgs/tools/text/languagetool/default.nix8
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix20
-rw-r--r--pkgs/top-level/ocaml-packages.nix8
-rw-r--r--pkgs/top-level/python-packages.nix4
120 files changed, 2275 insertions, 844 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index cfa59864b960..ee12b1a24db3 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -9867,6 +9867,12 @@
     githubId = 3105057;
     name = "Jan Beinke";
   };
+  therealansh = {
+    email = "tyagiansh23@gmail.com";
+    github = "therealansh";
+    githubId = 57180880;
+    name = "Ansh Tyagi";
+  };
   thesola10 = {
     email = "me@thesola.io";
     github = "thesola10";
diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix
index 023d0791a5c7..7d40d3b5548e 100644
--- a/nixos/lib/make-disk-image.nix
+++ b/nixos/lib/make-disk-image.nix
@@ -15,6 +15,8 @@
 
 , # size of the boot partition, is only used if partitionTableType is
   # either "efi" or "hybrid"
+  # This will be undersized slightly, as this is actually the offset of
+  # the end of the partition. Generally it will be 1MiB smaller.
   bootSize ? "256M"
 
 , # The files and directories to be placed in the target file system.
@@ -163,6 +165,8 @@ let format' = format; in let
 
   closureInfo = pkgs.closureInfo { rootPaths = [ config.system.build.toplevel channelSources ]; };
 
+  blockSize = toString (4 * 1024); # ext4fs block size (not block device sector size)
+
   prepareImage = ''
     export PATH=${binPath}
 
@@ -175,6 +179,24 @@ let format' = format; in let
       echo $(( "$1" * 512  ))
     }
 
+    # Given lines of numbers, adds them together
+    sum_lines() {
+      local acc=0
+      while read -r number; do
+        acc=$((acc+number))
+      done
+      echo "$acc"
+    }
+
+    mebibyte=$(( 1024 * 1024 ))
+
+    # Approximative percentage of reserved space in an ext4 fs over 512MiB.
+    # 0.05208587646484375
+    #  × 1000, integer part: 52
+    compute_fudge() {
+      echo $(( $1 * 52 / 1000 ))
+    }
+
     mkdir $out
 
     root="$PWD/root"
@@ -235,12 +257,53 @@ let format' = format; in let
 
     ${if diskSize == "auto" then ''
       ${if partitionTableType == "efi" || partitionTableType == "hybrid" then ''
-        additionalSpace=$(( ($(numfmt --from=iec '${additionalSpace}') + $(numfmt --from=iec '${bootSize}')) / 1000 ))
+        # Add the GPT at the end
+        gptSpace=$(( 512 * 34 * 1 ))
+        # Normally we'd need to account for alignment and things, if bootSize
+        # represented the actual size of the boot partition. But it instead
+        # represents the offset at which it ends.
+        # So we know bootSize is the reserved space in front of the partition.
+        reservedSpace=$(( gptSpace + $(numfmt --from=iec '${bootSize}') ))
+      '' else if partitionTableType == "legacy+gpt" then ''
+        # Add the GPT at the end
+        gptSpace=$(( 512 * 34 * 1 ))
+        # And include the bios_grub partition; the ext4 partition starts at 2MB exactly.
+        reservedSpace=$(( gptSpace + 2 * mebibyte ))
+      '' else if partitionTableType == "legacy" then ''
+        # Add the 1MiB aligned reserved space (includes MBR)
+        reservedSpace=$(( mebibyte ))
       '' else ''
-        additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') / 1000 ))
+        reservedSpace=0
       ''}
-      diskSize=$(( $(set -- $(du -d0 $root); echo "$1") + $additionalSpace ))
-      truncate -s "$diskSize"K $diskImage
+      additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') + reservedSpace ))
+
+      # Compute required space in filesystem blocks
+      diskUsage=$(find . ! -type d -exec 'du' '--apparent-size' '--block-size' "${blockSize}" '{}' ';' | cut -f1 | sum_lines)
+      # Each inode takes space!
+      numInodes=$(find . | wc -l)
+      # Convert to bytes, inodes take two blocks each!
+      diskUsage=$(( (diskUsage + 2 * numInodes) * ${blockSize} ))
+      # Then increase the required space to account for the reserved blocks.
+      fudge=$(compute_fudge $diskUsage)
+      requiredFilesystemSpace=$(( diskUsage + fudge ))
+
+      diskSize=$(( requiredFilesystemSpace  + additionalSpace ))
+
+      # Round up to the nearest mebibyte.
+      # This ensures whole 512 bytes sector sizes in the disk image
+      # and helps towards aligning partitions optimally.
+      if (( diskSize % mebibyte )); then
+        diskSize=$(( ( diskSize / mebibyte + 1) * mebibyte ))
+      fi
+
+      truncate -s "$diskSize" $diskImage
+
+      printf "Automatic disk size...\n"
+      printf "  Closure space use: %d bytes\n" $diskUsage
+      printf "  fudge: %d bytes\n" $fudge
+      printf "  Filesystem size needed: %d bytes\n" $requiredFilesystemSpace
+      printf "  Additional space: %d bytes\n" $additionalSpace
+      printf "  Disk image size: %d bytes\n" $diskSize
     '' else ''
       truncate -s ${toString diskSize}M $diskImage
     ''}
@@ -251,9 +314,9 @@ let format' = format; in let
       # Get start & length of the root partition in sectors to $START and $SECTORS.
       eval $(partx $diskImage -o START,SECTORS --nr ${rootPartition} --pairs)
 
-      mkfs.${fsType} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K
+      mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K
     '' else ''
-      mkfs.${fsType} -F -L ${label} $diskImage
+      mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage
     ''}
 
     echo "copying staging root to image..."
@@ -283,6 +346,9 @@ in pkgs.vmTools.runInLinuxVM (
       # Some tools assume these exist
       ln -s vda /dev/xvda
       ln -s vda /dev/sda
+      # make systemd-boot find ESP without udev
+      mkdir /dev/block
+      ln -s /dev/vda1 /dev/block/254:1
 
       mountPoint=/mnt
       mkdir $mountPoint
diff --git a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
index 37b46db059c0..005f75476e9a 100644
--- a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
+++ b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
@@ -10,7 +10,6 @@ with lib;
 
   system.build.cloudstackImage = import ../../../lib/make-disk-image.nix {
     inherit lib config pkgs;
-    diskSize = 8192;
     format = "qcow2";
     configFile = pkgs.writeText "configuration.nix"
       ''
diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix
index 0ecf07669a11..653744986d13 100644
--- a/nixos/maintainers/scripts/ec2/amazon-image.nix
+++ b/nixos/maintainers/scripts/ec2/amazon-image.nix
@@ -40,8 +40,9 @@ in {
     };
 
     sizeMB = mkOption {
-      type = types.int;
-      default = if config.ec2.hvm then 2048 else 8192;
+      type = with types; either (enum [ "auto" ]) int;
+      default = "auto";
+      example = 8192;
       description = "The size in MB of the image";
     };
 
diff --git a/nixos/maintainers/scripts/openstack/openstack-image.nix b/nixos/maintainers/scripts/openstack/openstack-image.nix
index 4c464f43f61d..3255e7f3d44d 100644
--- a/nixos/maintainers/scripts/openstack/openstack-image.nix
+++ b/nixos/maintainers/scripts/openstack/openstack-image.nix
@@ -12,8 +12,8 @@ with lib;
 
   system.build.openstackImage = import ../../../lib/make-disk-image.nix {
     inherit lib config;
+    additionalSpace = "1024M";
     pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
-    diskSize = 8192;
     format = "qcow2";
     configFile = pkgs.writeText "configuration.nix"
       ''
diff --git a/nixos/modules/services/misc/jellyfin.nix b/nixos/modules/services/misc/jellyfin.nix
index 64b774a220b6..c1b45864041b 100644
--- a/nixos/modules/services/misc/jellyfin.nix
+++ b/nixos/modules/services/misc/jellyfin.nix
@@ -18,6 +18,7 @@ in
 
       package = mkOption {
         type = types.package;
+        default = pkgs.jellyfin;
         example = literalExample "pkgs.jellyfin";
         description = ''
           Jellyfin package to use.
@@ -98,11 +99,6 @@ in
       };
     };
 
-    services.jellyfin.package = mkDefault (
-      if versionAtLeast config.system.stateVersion "20.09" then pkgs.jellyfin
-        else pkgs.jellyfin_10_5
-    );
-
     users.users = mkIf (cfg.user == "jellyfin") {
       jellyfin = {
         group = cfg.group;
diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix
index 60fed3222ef3..03dd3c051309 100644
--- a/nixos/modules/virtualisation/azure-image.nix
+++ b/nixos/modules/virtualisation/azure-image.nix
@@ -9,8 +9,9 @@ in
 
   options = {
     virtualisation.azureImage.diskSize = mkOption {
-      type = with types; int;
-      default = 2048;
+      type = with types; either (enum [ "auto" ]) int;
+      default = "auto";
+      example = 2048;
       description = ''
         Size of disk image. Unit is MB.
       '';
diff --git a/nixos/modules/virtualisation/digital-ocean-image.nix b/nixos/modules/virtualisation/digital-ocean-image.nix
index b582e235d435..0ff2ee591f24 100644
--- a/nixos/modules/virtualisation/digital-ocean-image.nix
+++ b/nixos/modules/virtualisation/digital-ocean-image.nix
@@ -10,8 +10,9 @@ in
 
   options = {
     virtualisation.digitalOceanImage.diskSize = mkOption {
-      type = with types; int;
-      default = 4096;
+      type = with types; either (enum [ "auto" ]) int;
+      default = "auto";
+      example = 4096;
       description = ''
         Size of disk image. Unit is MB.
       '';
diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix
index e2332df611aa..79c3921669ed 100644
--- a/nixos/modules/virtualisation/google-compute-image.nix
+++ b/nixos/modules/virtualisation/google-compute-image.nix
@@ -18,8 +18,9 @@ in
 
   options = {
     virtualisation.googleComputeImage.diskSize = mkOption {
-      type = with types; int;
-      default = 1536;
+      type = with types; either (enum [ "auto" ]) int;
+      default = "auto";
+      example = 1536;
       description = ''
         Size of disk image. Unit is MB.
       '';
diff --git a/nixos/modules/virtualisation/hyperv-image.nix b/nixos/modules/virtualisation/hyperv-image.nix
index fabc9113dfc4..6845d6750092 100644
--- a/nixos/modules/virtualisation/hyperv-image.nix
+++ b/nixos/modules/virtualisation/hyperv-image.nix
@@ -9,8 +9,9 @@ in {
   options = {
     hyperv = {
       baseImageSize = mkOption {
-        type = types.int;
-        default = 2048;
+        type = with types; either (enum [ "auto" ]) int;
+        default = "auto";
+        example = 2048;
         description = ''
           The size of the hyper-v base image in MiB.
         '';
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix
index fa580e8b42d6..071edda82693 100644
--- a/nixos/modules/virtualisation/virtualbox-image.nix
+++ b/nixos/modules/virtualisation/virtualbox-image.nix
@@ -11,8 +11,9 @@ in {
   options = {
     virtualbox = {
       baseImageSize = mkOption {
-        type = types.int;
-        default = 50 * 1024;
+        type = with types; either (enum [ "auto" ]) int;
+        default = "auto";
+        example = 50 * 1024;
         description = ''
           The size of the VirtualBox base image in MiB.
         '';
diff --git a/nixos/modules/virtualisation/vmware-image.nix b/nixos/modules/virtualisation/vmware-image.nix
index 9da9e145f7a9..f6cd12e2bb79 100644
--- a/nixos/modules/virtualisation/vmware-image.nix
+++ b/nixos/modules/virtualisation/vmware-image.nix
@@ -18,8 +18,9 @@ in {
   options = {
     vmware = {
       baseImageSize = mkOption {
-        type = types.int;
-        default = 2048;
+        type = with types; either (enum [ "auto" ]) int;
+        default = "auto";
+        example = 2048;
         description = ''
           The size of the VMWare base image in MiB.
         '';
diff --git a/pkgs/applications/audio/flacon/default.nix b/pkgs/applications/audio/flacon/default.nix
index a9dc7308aca2..83d9c5da8381 100644
--- a/pkgs/applications/audio/flacon/default.nix
+++ b/pkgs/applications/audio/flacon/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "flacon";
-  version = "6.1.0";
+  version = "7.0.1";
 
   src = fetchFromGitHub {
     owner = "flacon";
     repo = "flacon";
     rev = "v${version}";
-    sha256 = "04yp3aym7h70xjni9ancqv5lc4zds5a8dgw3fzgqs8k5nmh074gv";
+    sha256 = "sha256-35tARJkyhC8EisIyDCwuT/UUruzLjJRUuZysuqeNssM=";
   };
 
   nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
diff --git a/pkgs/applications/audio/mousai/default.nix b/pkgs/applications/audio/mousai/default.nix
new file mode 100644
index 000000000000..502842c7aa73
--- /dev/null
+++ b/pkgs/applications/audio/mousai/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, python3
+, fetchFromGitHub
+, appstream-glib
+, desktop-file-utils
+, gettext
+, glib
+, gobject-introspection
+, gst_all_1
+, gtk3
+, libhandy
+, librsvg
+, meson
+, ninja
+, pkg-config
+, wrapGAppsHook
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "mousai";
+  version = "0.3.1";
+
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "SeaDve";
+    repo = "Mousai";
+    rev = "v${version}";
+    sha256 = "0x57dci0prhlj79h74yh79cazn48rn0bckz5j3z4njk4fwc3fvfx";
+  };
+
+  postPatch = ''
+    patchShebangs build-aux/meson
+  '';
+
+  nativeBuildInputs = [
+    appstream-glib
+    desktop-file-utils
+    gettext
+    glib
+    gtk3
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gobject-introspection
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gtk3
+    libhandy
+    librsvg
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    pygobject3
+    requests
+  ];
+
+  meta = with lib; {
+    description = "Identify any songs in seconds";
+    homepage = "https://github.com/SeaDve/Mousai";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/applications/editors/eclipse/default.nix b/pkgs/applications/editors/eclipse/default.nix
index 2c067250309b..000726dd81aa 100644
--- a/pkgs/applications/editors/eclipse/default.nix
+++ b/pkgs/applications/editors/eclipse/default.nix
@@ -12,14 +12,14 @@ assert stdenv ? glibc;
 # find the downloads needed for new versions
 #
 # to test:
-# $ for e in cpp modeling platform sdk java committers rcp rust; do nix build -f default.nix pkgs.eclipses.eclipse-${e} -o eclipse-${e}; done
+# $ for e in cpp modeling platform sdk java jee committers rcp; do nix build -f default.nix pkgs.eclipses.eclipse-${e} -o eclipse-${e}; done
 
 let
   platform_major = "4";
-  platform_minor = "18";
-  year = "2020";
-  month = "12";
-  timestamp = "${year}${month}021800";
+  platform_minor = "19";
+  year = "2021";
+  month = "03";
+  timestamp = "${year}${month}031800";
   gtk = gtk3;
 in rec {
 
@@ -37,7 +37,7 @@ in rec {
     src =
       fetchurl {
         url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-cpp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
-        sha512 = "MR6ddNmBKyXCyVGlGPfq6K2zJRywy4I5QDXji3rh81eJQ6zkEguo+VvD75i/szg/+FbCVA09vDVV06JgL4SHwQ==";
+        sha512 = "3j0lmll0glcr9p0hf49jiaq9xr8hadsy0y58wbbkdpldj3rclxr056dkswmiw2bkypfiwrjygbli5qxyp6mz380562hc2kjwijqq476";
       };
   };
 
@@ -49,7 +49,7 @@ in rec {
     src =
       fetchurl {
         url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-modeling-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
-        sha512 = "hSi3IL+fWhlUfEJYv4LFO7WNbZpiofAgNGZbEOIBS0VpeHfJ5Y6UKMKMLfQlG3hlkAL5jg/cEJKb/ad4DxHbjQ==";
+        sha512 = "0iqz9a3ixcbmaci6lnspdnzwd2h1fcygi54hmsl89pq3d1k5scyhcl123ixi24csi782w847bn0lq00n0zwras9akmnhsflra4mw5pz";
       };
   };
 
@@ -61,7 +61,7 @@ in rec {
     src =
       fetchurl {
         url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-platform-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
-        sha512 = "cPRa7ICogpcuwzOlzSSCEcWpwpUhQuIv6lGBKuAu9mOwj7Nz0TPaWVWNqN1541uVRXVTzcWX+mwc2UBPzWUPxg==";
+        sha512 = "03v1ly7j9d9qnl3d9rl5a9kp483dz8i8v3cfnh55ksm9fk8iy2fzg6wq178ggnx2z5x9k88a4wk6n647yilh2hgc2l7926imkh2j1ly";
       };
   };
 
@@ -86,7 +86,7 @@ in rec {
     src =
       fetchurl {
         url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops${platform_major}/R-${platform_major}.${platform_minor}-${timestamp}/eclipse-SDK-${platform_major}.${platform_minor}-linux-gtk-x86_64.tar.gz";
-        sha512 = "iN6z5iSJ2bhE1IH3uJj7aiaF/nSIgIAqadvaTBpE4gkgLAXgtfraFAzgcw0zJr5m2u5mULfW45hLkmIXselniQ==";
+        sha512 = "37m91my121pch12bwpwk5svfqkm7vl07wjx4fkhpy947v5kjf36hm6x0i45swdg7f0hk72y2qz5ka15ki5jv890qy5psj6z7ax9sys7";
       };
   };
 
@@ -98,7 +98,19 @@ in rec {
     src =
       fetchurl {
         url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-java-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
-        sha512 = "HVqsWUVNNRdcaziGdNI96R9F2VMUE4nYK1VX1G3pK+srFDlkJ7+rj2sZjtWL7WcJR1XSbT03nJJzPyp01RsCvQ==";
+        sha512 = "3qrnj6krhrqc9rfwlim3v7kshwfhsi050pszw6xdfbj56mzr9whr7l76isbpxd5j0zipgfw3qrzrx379pdp899d35fv284ilvllzl4k";
+      };
+  };
+
+  ### Eclipse Java EE
+
+  eclipse-jee = buildEclipse {
+    name = "eclipse-jee-${platform_major}.${platform_minor}";
+    description = "Eclipse IDE for Enterprise Java and Web Developers";
+    src =
+      fetchurl {
+        url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-jee-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
+        sha512 = "04k4x9imabxddqlrgajn33ak8i58wcap40ll09xz23d1sxn9a8prh01s06ymgwg6ldg939srphvbz4112p8p0b1hl7m25a02qll91zv";
       };
   };
 
@@ -110,7 +122,7 @@ in rec {
     src =
       fetchurl {
         url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-committers-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
-        sha512 = "UtI4piLNRM3TsM9PzbGgsPqTkiurJ+7Q7jVra45an4YJHtfWcGTxxwUNnRzay6cHT49AjrWtVf1bovWSDXMiQA==";
+        sha512 = "2yksl3w7yr1a3h4zdpa9zf394r5c185zqxhigdv858ldg46kmr9h0l2c7shbgb16kkybcnrk4x44dhjvh60x8xw6ma05klp4lp9v5va";
       };
   };
 
@@ -122,19 +134,7 @@ in rec {
     src =
       fetchurl {
         url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-rcp-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
-        sha512 = "9DqNjSx1Ypdzpt1jIOJ9KFx8y+cG55K6bqkWTqnGjjDr4h4mWSzvGjHGUtFrKl92WRzQZKjNPxzVreDMcUkc/g==";
-      };
-  };
-
-  ### Eclipse IDE for Rust Developers
-
-  eclipse-rust = buildEclipse {
-    name = "eclipse-rust-${platform_major}.${platform_minor}";
-    description = "Eclipse IDE for Rust Developers";
-    src =
-      fetchurl {
-        url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/technology/epp/downloads/release/${year}-${month}/R/eclipse-rust-${year}-${month}-R-linux-gtk-x86_64.tar.gz";
-        sha512 = "QbaG1knCMFnVQkPeApcIamJMXPyL8zUQa0ZsTJOuTgU/fD1RiHN7/WS6ax5azzIJhpjEtj2LMU4XV+MwkzResw==";
+        sha512 = "3fhrhwbyqcys56c93s1vl9rbvn269nn5y3cb9f3n1qwgw6i97mim2zy98jl3r8cksf97jwsmqmsqclsgz9v799wcckv81dj1l628382";
       };
   };
 
diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix
index dc86ebca2146..5937311b5c93 100644
--- a/pkgs/applications/editors/eclipse/plugins.nix
+++ b/pkgs/applications/editors/eclipse/plugins.nix
@@ -248,12 +248,12 @@ rec {
   cdt = buildEclipseUpdateSite rec {
     name = "cdt-${version}";
     # find current version at https://www.eclipse.org/cdt/downloads.php
-    version = "10.1.0";
+    version = "10.2.0";
 
     src = fetchzip {
       stripRoot = false;
-      url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/10.1/${name}/${name}.zip";
-      sha256 = "1hbswcar3a5cw20mwrj82w9pvpkvvj6jrvqqf1lincva0r5sl7h8";
+      url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/10.2/${name}/${name}.zip";
+      sha256 = "1r30cbpbzw3dfcsn54p6sqip86dqhydhsppjgaz60b6z138vzx49";
     };
 
     meta = with lib; {
@@ -474,24 +474,6 @@ rec {
     };
   };
 
-  jdt = buildEclipseUpdateSite rec {
-    name = "jdt-${version}";
-    version = "4.18";
-
-    src = fetchzip {
-      stripRoot = false;
-      url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-${version}-202012021800/org.eclipse.jdt-${version}.zip";
-      sha256 = "q0O6OE2u0bdz1+nOkzXDrrOOzoEbVaXnejx4lX7uZgk=";
-    };
-
-    meta = with lib; {
-      homepage = "https://www.eclipse.org/jdt/";
-      description = "Eclipse Java development tools";
-      license = licenses.epl10;
-      platforms = platforms.all;
-    };
-  };
-
   jdt-codemining = buildEclipsePlugin rec {
     name = "jdt-codemining-${version}";
     version = "1.0.0.201806221018";
diff --git a/pkgs/applications/graphics/openboard/default.nix b/pkgs/applications/graphics/openboard/default.nix
new file mode 100644
index 000000000000..859c22192181
--- /dev/null
+++ b/pkgs/applications/graphics/openboard/default.nix
@@ -0,0 +1,115 @@
+{ mkDerivation, lib, fetchFromGitHub, copyDesktopItems, makeDesktopItem, qmake
+, qtbase, qtxmlpatterns, qttools, qtwebkit, libGL, fontconfig, openssl, poppler
+, ffmpeg, libva, alsaLib, SDL, x264, libvpx, libvorbis, libtheora, libogg
+, libopus, lame, fdk_aac, libass, quazip, libXext, libXfixes }:
+
+let
+  importer = mkDerivation rec {
+    pname = "openboard-importer";
+    version = "unstable-2016-10-08";
+
+    src = fetchFromGitHub {
+      owner = "OpenBoard-org";
+      repo = "OpenBoard-Importer";
+      rev = "47927bda021b4f7f1540b794825fb0d601875e79";
+      sha256 = "19zhgsimy0f070caikc4vrrqyc8kv2h6rl37sy3iggks8z0g98gf";
+    };
+
+    nativeBuildInputs = [ qmake ];
+
+    installPhase = ''
+      install -Dm755 OpenBoardImporter $out/bin/OpenBoardImporter
+    '';
+  };
+in mkDerivation rec {
+  pname = "openboard";
+  version = "1.6.1";
+
+  src = fetchFromGitHub {
+    owner = "OpenBoard-org";
+    repo = "OpenBoard";
+    rev = "v${version}";
+    sha256 = "sha256-OlGXGIMghil/GG6eso20+CWo/hCjarXGs6edXX9pc/M=";
+  };
+
+  postPatch = ''
+    substituteInPlace OpenBoard.pro \
+      --replace '/usr/include/quazip' '${quazip}/include/quazip5' \
+      --replace '/usr/include/poppler' '${poppler.dev}/include/poppler'
+  '';
+
+  nativeBuildInputs = [ qmake copyDesktopItems ];
+
+  buildInputs = [
+    qtbase
+    qtxmlpatterns
+    qttools
+    qtwebkit
+    libGL
+    fontconfig
+    openssl
+    poppler
+    ffmpeg
+    libva
+    alsaLib
+    SDL
+    x264
+    libvpx
+    libvorbis
+    libtheora
+    libogg
+    libopus
+    lame
+    fdk_aac
+    libass
+    quazip
+    libXext
+    libXfixes
+  ];
+
+  propagatedBuildInputs = [ importer ];
+
+  makeFlags = [ "release-install" ];
+
+  desktopItems = [
+    (makeDesktopItem {
+      name = "OpenBoard";
+      exec = "OpenBoard %f";
+      icon = "OpenBoard";
+      comment = "OpenBoard, an interactive white board application";
+      desktopName = "OpenBoard";
+      mimeType = "application/ubz";
+      categories = "Education;";
+      startupNotify = true;
+    })
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    lrelease OpenBoard.pro
+
+    # Replicated release_scripts/linux/package.sh
+    mkdir -p $out/opt/openboard/i18n
+    cp -R resources/customizations build/linux/release/product/* $out/opt/openboard/
+    cp resources/i18n/*.qm $out/opt/openboard/i18n/
+    install -m644 resources/linux/openboard-ubz.xml $out/opt/openboard/etc/
+    install -Dm644 resources/images/OpenBoard.png $out/share/icons/hicolor/64x64/apps/OpenBoard.png
+
+    runHook postInstall
+  '';
+
+  dontWrapQtApps = true;
+
+  postFixup = ''
+    makeWrapper $out/opt/openboard/OpenBoard $out/bin/OpenBoard \
+      "''${qtWrapperArgs[@]}"
+  '';
+
+  meta = with lib; {
+    description = "Interactive whiteboard application";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ fufexan ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/misc/fme/default.nix b/pkgs/applications/misc/fme/default.nix
index 52ba2927fd46..6f6a143ae8e0 100644
--- a/pkgs/applications/misc/fme/default.nix
+++ b/pkgs/applications/misc/fme/default.nix
@@ -1,33 +1,56 @@
-{ lib, stdenv, fetchurl, pkg-config, autoconf, automake, gettext
-, fluxbox, bc, gtkmm2, glibmm, libglademm, libsigcxx }:
+{ lib
+, stdenv
+, fetchurl
+, autoconf
+, automake
+, bc
+, fluxbox
+, gettext
+, glibmm
+, gtkmm2
+, libglademm
+, libsigcxx
+, pkg-config
+}:
 
 stdenv.mkDerivation rec {
-
   pname = "fme";
   version = "1.1.3";
 
   src = fetchurl {
     url = "https://github.com/rdehouss/fme/archive/v${version}.tar.gz";
-    sha256 = "d1c81a6a38c0faad02943ad65d6d0314bd205c6de841669a2efe43e4c503e63d";
+    hash = "sha256-0cgaajjA+q0ClDrWXW0DFL0gXG3oQWaaLv5D5MUD5j0=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ autoconf automake gettext fluxbox bc gtkmm2 glibmm libglademm libsigcxx ];
+  nativeBuildInputs = [
+    autoconf
+    automake
+    gettext
+    pkg-config
+  ];
+  buildInputs = [
+    bc
+    fluxbox
+    glibmm
+    gtkmm2
+    libglademm
+    libsigcxx
+  ];
 
   preConfigure = ''
     ./autogen.sh
   '';
 
   meta = with lib; {
+    homepage = "https://github.com/rdehouss/fme/";
     description = "Editor for Fluxbox menus";
     longDescription = ''
-      Fluxbox Menu Editor is a menu editor for the Window Manager Fluxbox written in C++
-      with the libraries Gtkmm, Glibmm, libglademm and gettext for internationalization.
-      Its user-friendly interface will help you to edit, delete, move (Drag and Drop)
-      a row, a submenu, etc very easily.
+      Fluxbox Menu Editor is a menu editor for the Window Manager Fluxbox
+      written in C++ with the libraries Gtkmm, Glibmm, libglademm and gettext
+      for internationalization.  Its user-friendly interface will help you to
+      edit, delete, move (Drag and Drop) a row, a submenu, etc very easily.
     '';
-    homepage = "https://github.com/rdehouss/fme/";
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     maintainers = [ maintainers.AndersonTorres ];
     platforms = platforms.linux;
   };
diff --git a/pkgs/applications/misc/heimer/default.nix b/pkgs/applications/misc/heimer/default.nix
index 9d8dc1eaa03d..5d9fb0f30d76 100644
--- a/pkgs/applications/misc/heimer/default.nix
+++ b/pkgs/applications/misc/heimer/default.nix
@@ -2,13 +2,13 @@
 
 mkDerivation rec {
   pname = "heimer";
-  version = "2.2.0";
+  version = "2.4.0";
 
   src = fetchFromGitHub {
     owner = "juzzlin";
     repo = pname;
     rev = version;
-    sha256 = "sha256-upsOmf46bCO8sVp5dBHPLUBZYZP3JyXa7H5KXbd76qo=";
+    sha256 = "sha256-5cepT9Tfr/3nYbxRAMqKSUDB+suEyojnexWxZ0i7GBw=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/applications/networking/cluster/fluxctl/default.nix b/pkgs/applications/networking/cluster/fluxctl/default.nix
index 1d02e675f9c4..fadaa94995cb 100644
--- a/pkgs/applications/networking/cluster/fluxctl/default.nix
+++ b/pkgs/applications/networking/cluster/fluxctl/default.nix
@@ -2,13 +2,13 @@
 
 buildGoModule rec {
   pname = "fluxctl";
-  version = "1.22.1";
+  version = "1.22.2";
 
   src = fetchFromGitHub {
     owner = "weaveworks";
     repo = "flux";
     rev = version;
-    sha256 = "sha256-SaDO3a50CLhgLafCdgKEfHpuHdIweSy5L/TUgEUv5CM=";
+    sha256 = "sha256-qYdVplNHyD31m4IbIeL3x3nauZLl1XquslS3WrtUXBk=";
   };
 
   vendorSha256 = "sha256-4uSw/9lI/rdDqy78jNC9eHYW/v/sMFb+sQvwYG6GZks=";
diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
index f9789cfda418..075fd5b3a20a 100644
--- a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
+++ b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
@@ -2,12 +2,12 @@
 
 mkDerivation rec {
   pname = "chatterino2";
-  version = "2.2.2";
+  version = "2.3.0";
   src = fetchFromGitHub {
     owner = "Chatterino";
     repo = pname;
     rev = "v${version}";
-    sha256 = "026cs48hmqkv7k4akbm205avj2pn3x1g7q46chwa707k9km325dz";
+    sha256 = "0x12zcrbkxn2nn0hqkj1amrxv4q032id282cajzsx7by970r1shd";
     fetchSubmodules = true;
   };
   nativeBuildInputs = [ qmake pkg-config wrapQtAppsHook ];
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index 249d58ceb606..230bb2d4fe41 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -10,7 +10,7 @@ assert withQt  -> qt5  != null;
 with lib;
 
 let
-  version = "3.4.4";
+  version = "3.4.5";
   variant = if withQt then "qt" else "cli";
 
 in stdenv.mkDerivation {
@@ -20,7 +20,7 @@ in stdenv.mkDerivation {
 
   src = fetchurl {
     url = "https://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz";
-    sha256 = "0aad3m8nh4i75dgjs68217135bzqmhmlgjklmpjh1ihmjwgd373j";
+    sha256 = "sha256-3hqv0QCh4SB8hQ0YDpfdkauNoPXra+7FRfclzbFF0zM=";
   };
 
   cmakeFlags = [
diff --git a/pkgs/applications/radio/wsjtx/default.nix b/pkgs/applications/radio/wsjtx/default.nix
index 697a28e4be9b..ae378b571068 100644
--- a/pkgs/applications/radio/wsjtx/default.nix
+++ b/pkgs/applications/radio/wsjtx/default.nix
@@ -1,15 +1,15 @@
 { lib, stdenv, fetchurl, asciidoc, asciidoctor, autoconf, automake, cmake,
   docbook_xsl, fftw, fftwFloat, gfortran, libtool, libusb1, qtbase,
-  qtmultimedia, qtserialport, qttools, texinfo, wrapQtAppsHook }:
+  qtmultimedia, qtserialport, qttools, boost, texinfo, wrapQtAppsHook }:
 
 stdenv.mkDerivation rec {
   pname = "wsjtx";
-  version = "2.2.2";
+  version = "2.3.1";
 
   # This is a "superbuild" tarball containing both wsjtx and a hamlib fork
   src = fetchurl {
     url = "http://physics.princeton.edu/pulsar/k1jt/wsjtx-${version}.tgz";
-    sha256 = "17agyrhclqyahgdwba8vi9sl7vq03sm00jlyrmjgv34a4czidg0w";
+    sha256 = "11wzh4bxp9277kbqkyrc063akkk09czgxnkpk8k07vl4s3dan3hh";
   };
 
   # Hamlib builds with autotools, wsjtx builds with cmake
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     asciidoc asciidoctor autoconf automake cmake docbook_xsl gfortran libtool
     qttools texinfo wrapQtAppsHook
   ];
-  buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport ];
+  buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport boost ];
 
   # Remove Git dependency from superbuild since sources are included
   patches = [ ./super.patch ];
@@ -36,6 +36,6 @@ stdenv.mkDerivation rec {
     # Older licenses are for the statically-linked hamlib
     license = with licenses; [ gpl3Plus gpl2Plus lgpl21Plus ];
     platforms = platforms.linux;
-    maintainers = with maintainers; [ lasandell ];
+    maintainers = with maintainers; [ lasandell numinit ];
   };
 }
diff --git a/pkgs/applications/science/geometry/tetgen/default.nix b/pkgs/applications/science/geometry/tetgen/default.nix
index c921c05c58e4..75eaa089ecfb 100644
--- a/pkgs/applications/science/geometry/tetgen/default.nix
+++ b/pkgs/applications/science/geometry/tetgen/default.nix
@@ -1,13 +1,13 @@
 {lib, stdenv, fetchurl}:
 
-let version = "1.5.1"; in
+let version = "1.6.0"; in
 stdenv.mkDerivation {
   pname = "tetgen";
   inherit version;
 
   src = fetchurl {
     url = "http://wias-berlin.de/software/tetgen/1.5/src/tetgen${version}.tar.gz";
-    sha256 = "0l5q066crs4cjj7qr0r2gnz8ajkgighngwglr1201h77lcs48sp4";
+    sha256 = "sha256-h7XmHr06Rx/E8s3XEkwrEd1mOfT+sflBpdL1EQ0Fzjk=";
   };
 
   installPhase = ''
diff --git a/pkgs/applications/science/logic/alt-ergo/default.nix b/pkgs/applications/science/logic/alt-ergo/default.nix
index dd72d148e297..963015b11d50 100644
--- a/pkgs/applications/science/logic/alt-ergo/default.nix
+++ b/pkgs/applications/science/logic/alt-ergo/default.nix
@@ -1,12 +1,14 @@
-{ fetchurl, lib, which, ocamlPackages }:
+{ fetchFromGitHub, lib, which, ocamlPackages }:
 
 let
   pname = "alt-ergo";
-  version = "2.3.3";
+  version = "2.4.0";
 
-  src = fetchurl {
-    url = "https://alt-ergo.ocamlpro.com/http/alt-ergo-${version}/alt-ergo-${version}.tar.gz";
-    sha256 = "124k2a4ikk4wdpmvgjpgl97x9skvr9qznk8m68dzsynzpv6yksaj";
+  src = fetchFromGitHub {
+    owner = "OCamlPro";
+    repo = pname;
+    rev = version;
+    sha256 = "1jm1yrvsg8iyfp9bb728zdx2i7yb6z7minjrfs27k5ncjqkjm65g";
   };
 
   useDune2 = true;
@@ -19,6 +21,7 @@ let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
   pname = "alt-ergo-lib";
   inherit version src useDune2 nativeBuildInputs;
   configureFlags = pname;
+  buildInputs = with ocamlPackages; [ dune-configurator ];
   propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex stdlib-shims zarith ];
 }; in
 
@@ -36,7 +39,9 @@ ocamlPackages.buildDunePackage {
 
   configureFlags = pname;
 
-  buildInputs = [ alt-ergo-parsers ocamlPackages.menhir ];
+  buildInputs = [ alt-ergo-parsers ] ++ (with ocamlPackages; [
+    cmdliner menhir ])
+  ;
 
   meta = {
     description = "High-performance theorem prover and SMT solver";
diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix
index ce93c14b334f..3b3d8a58b569 100644
--- a/pkgs/applications/science/math/gap/default.nix
+++ b/pkgs/applications/science/math/gap/default.nix
@@ -5,6 +5,7 @@
 , makeWrapper
 , readline
 , gmp
+, zlib
 # one of
 # - "minimal" (~400M):
 #     Install the bare minimum of packages required by gap to start.
@@ -61,11 +62,11 @@ in
 stdenv.mkDerivation rec {
   pname = "gap";
   # https://www.gap-system.org/Releases/
-  version = "4.10.2";
+  version = "4.11.0";
 
   src = fetchurl {
     url = "https://files.gap-system.org/gap-${lib.versions.major version}.${lib.versions.minor version}/tar.bz2/gap-${version}.tar.bz2";
-    sha256 = "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94";
+    sha256 = "sha256-vwcKENwqxgWT/mXfD4c9ctTWdQHobrJipva9SPyGhgI=";
   };
 
   # remove all non-essential packages (which take up a lot of space)
@@ -76,6 +77,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     readline
     gmp
+    zlib
   ];
 
   nativeBuildInputs = [
@@ -83,34 +85,22 @@ stdenv.mkDerivation rec {
   ];
 
   patches = [
-    # https://github.com/gap-system/gap/pull/3294
-    (fetchpatch {
-      name = "add-make-install-targets.patch";
-      url = "https://github.com/gap-system/gap/commit/3361c172e6c5ff3bb3f01ba9d6f1dd4ad42cea80.patch";
-      sha256 = "1kwp9qnfvmlbpf1c3rs6j5m2jz22rj7a4hb5x1gj9vkpiyn5pdyj";
-    })
-
     # Fix for locale specific tests causing issues. Already upstream.
     # Backport of https://github.com/gap-system/gap/pull/4022
-    # WHEN REMOVING: also remove the`rm tst/testinstall/strings.tst` line in
-    # `postPatch` below. That line is necessary since the patch is not intended
-    # for gap 4.10.
     (fetchpatch {
       name = "remove-locale-specific-tests.patch";
       url = "https://github.com/gap-system/gap/commit/c18b0c4215b5212a2cc4f305e2d5b94ba716bee8.patch";
-      excludes = ["tst/testinstall/stringobj.tst"];
-      sha256 = "1mz5b4mbw2jdd1ypp5s0dy6pp0jsvwsxr2dm4kbkls20r1r192sc";
+      sha256 = "sha256-De+T9Y7ewRT6plJrj2VR8axRvD/JCTYKOBWB7Bw0oq0=";
     })
 
     # fixes aarch64 gc crashes: https://github.com/gap-system/gap/pull/3965
-    ./mark-genstackfuncbags-as-noinline.patch
+    (fetchpatch {
+      name = "mark-genstackfuncbags-as-noinline.patch";
+      url = "https://github.com/gap-system/gap/commit/f0a8f49ff8dad0a5fa77253d45457c6f40f96778.patch";
+      sha256 = "sha256-GU9tOP1stX2vn8m8kXOBupEpxIYArA76ibKL8eLn0MY=";
+    })
   ];
 
-  postPatch = ''
-    # File not covered by the remove-locale-specific-tests.patch patch above.
-    rm tst/testinstall/strings.tst
-  '';
-
   # "teststandard" is a superset of testinstall. It takes ~1h instead of ~1min.
   # tests are run twice, once with all packages loaded and once without
   # checkTarget = "teststandard";
@@ -155,7 +145,6 @@ stdenv.mkDerivation rec {
 
     mkdir -p "$out/bin" "$out/share/gap/"
 
-    mkdir -p "$out/share/gap"
     echo "Copying files to target directory"
     cp -ar . "$out/share/gap/build-dir"
 
diff --git a/pkgs/applications/science/math/pynac/default.nix b/pkgs/applications/science/math/pynac/default.nix
index 00d35b491d62..9cdcd2b9ea30 100644
--- a/pkgs/applications/science/math/pynac/default.nix
+++ b/pkgs/applications/science/math/pynac/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv
 , fetchFromGitHub
-, fetchurl
+, fetchpatch
 , autoreconfHook
 , pkg-config
 , flint
@@ -11,16 +11,36 @@
 }:
 
 stdenv.mkDerivation rec {
-  version = "0.7.26";
+  version = "0.7.27";
   pname = "pynac";
 
   src = fetchFromGitHub {
     owner = "pynac";
     repo = "pynac";
     rev = "pynac-${version}";
-    sha256 = "09d2p74x1arkydlxy6pw4p4byi7r8q7f29w373h4d8a215kadc6d";
+    sha256 = "sha256-1HHCIeaNE2UsJNX92UlDGLJS8I4nC/8FnwX7Y4F9HpU=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "handle_factor.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/handle_factor.patch?h=9.3.rc3";
+      sha256 = "sha256-U1lb5qwBqZZgklfDMhBX4K5u8bz5x42O4w7hyNy2YVw=";
+    })
+
+    (fetchpatch {
+      name = "power_inf_loop.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/power_inf_loop.patch?h=9.3.rc3";
+      sha256 = "sha256-VYeaJl8u2wl7FQ/6xnpZv1KpdNYEmJoPhuMrBADyTRs=";
+    })
+
+    (fetchpatch {
+      name = "too_much_sub.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/too_much_sub.patch?h=9.3.rc3";
+      sha256 = "sha256-lw7xSQ/l+rzPu+ghWF4omYF0mKksGGPuuHJTktvbdis=";
+    })
+  ];
+
   buildInputs = [
     flint
     gmp
@@ -34,14 +54,6 @@ stdenv.mkDerivation rec {
     pkg-config
   ];
 
-  patches = [
-    (fetchurl {
-      name = "py_ssize_t_clean.patch";
-      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/py_ssize_t_clean.patch?h=9.2";
-      sha256 = "0l3gbg9hc4v671zf4w376krnk3wh8hj3649610nlvzzxckcryzab";
-    })
-  ];
-
   meta = with lib; {
     description = "Python is Not a CAS -- modified version of Ginac";
     longDescription = ''
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix
index b985d56bb27d..e39db4b1ac2d 100644
--- a/pkgs/applications/science/math/sage/default.nix
+++ b/pkgs/applications/science/math/sage/default.nix
@@ -11,14 +11,6 @@ let
 
   python3 = pkgs.python3.override {
     packageOverrides = self: super: {
-      cypari2 = super.cypari2.overridePythonAttrs (oldAttrs: rec {
-        version = "2.1.1";
-        src = oldAttrs.src.override {
-          inherit version;
-          sha256 = "df1ef62e771ec36e5a456f5fc8b51bc6745b70f0efdd0c7a30c3f0b5f1fb93db";
-        };
-      });
-
       # `sagelib`, i.e. all of sage except some wrappers and runtime dependencies
       sagelib = self.callPackage ./sagelib.nix {
         inherit flint arb;
@@ -27,6 +19,10 @@ let
         linbox = pkgs.linbox.override { withSage = true; };
         pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config
       };
+
+      sage_docbuild = self.callPackage ./sage_docbuild.nix {
+        inherit sage-src;
+      };
     };
   };
 
@@ -46,14 +42,16 @@ let
     logo64 = "${sage-src}/doc/common/themes/sage/static/sageicon.png";
   };
 
+  three = callPackage ./threejs-sage.nix { };
+
   # A bash script setting various environment variables to tell sage where
   # the files its looking fore are located. Also see `sage-env`.
   env-locations = callPackage ./env-locations.nix {
     inherit pari_data;
     inherit singular maxima-ecl;
+    inherit three;
     ecl = maxima-ecl.ecl;
     cysignals = python3.pkgs.cysignals;
-    three = nodePackages.three;
     mathjax = nodePackages.mathjax;
   };
 
@@ -61,6 +59,7 @@ let
   # the env-locations file.
   sage-env = callPackage ./sage-env.nix {
     sagelib = python3.pkgs.sagelib;
+    sage_docbuild = python3.pkgs.sage_docbuild;
     inherit env-locations;
     inherit python3 singular palp flint pynac pythonEnv maxima-ecl;
     ecl = maxima-ecl.ecl;
@@ -78,8 +77,8 @@ let
     inherit python3 pythonEnv;
     inherit sage-env;
     inherit pynac singular maxima-ecl;
+    inherit three;
     pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config
-    three = nodePackages.three;
   };
 
   # Doesn't actually build anything, just runs sages testsuite. This is a
@@ -94,6 +93,7 @@ let
 
   pythonRuntimeDeps = with python3.pkgs; [
     sagelib
+    sage_docbuild
     cvxopt
     networkx
     service-identity
diff --git a/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch b/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
index 981759202386..0dbfba642e82 100644
--- a/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
+++ b/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
@@ -1,13 +1,13 @@
 diff --git a/src/sage/env.py b/src/sage/env.py
-index 1ddfc7cfb9..45033d6328 100644
+index 2908f5d04f..81dfd75c0d 100644
 --- a/src/sage/env.py
 +++ b/src/sage/env.py
-@@ -203,97 +203,13 @@ var('ARB_LIBRARY',                   'arb')
- var('SAGE_BANNER', '')
- var('SAGE_IMPORTALL', 'yes')
+@@ -218,93 +218,12 @@ NTL_LIBDIR = var("NTL_LIBDIR")
+ SAGE_BANNER = var("SAGE_BANNER", "")
+ SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes")
  
 -
--def _get_shared_lib_filename(libname, *additional_libnames):
+-def _get_shared_lib_path(*libnames: str) -> Optional[str]:
 -    """
 -    Return the full path to a shared library file installed in
 -    ``$SAGE_LOCAL/lib`` or the directories associated with the
@@ -25,80 +25,76 @@ index 1ddfc7cfb9..45033d6328 100644
 -    For distributions like Debian that use a multiarch layout, we also try the
 -    multiarch lib paths (i.e. ``/usr/lib/<arch>/``).
 -
--    This returns ``None`` if the file does not exist.
+-    This returns ``None`` if no matching library file could be found.
 -
 -    EXAMPLES::
 -
 -        sage: import sys
 -        sage: from fnmatch import fnmatch
--        sage: from sage.env import _get_shared_lib_filename
--        sage: lib_filename = _get_shared_lib_filename("Singular",
--        ....:                                         "singular-Singular")
+-        sage: from sage.env import _get_shared_lib_path
+-        sage: lib_filename = _get_shared_lib_path("Singular", "singular-Singular")
 -        sage: if sys.platform == 'cygwin':
 -        ....:     pattern = "*/cygSingular-*.dll"
 -        ....: elif sys.platform == 'darwin':
--        ....:     pattern = "*/libSingular.dylib"
+-        ....:     pattern = "*/libSingular-*.dylib"
 -        ....: else:
--        ....:     pattern = "*/lib*Singular.so"
--        sage: fnmatch(lib_filename, pattern)
+-        ....:     pattern = "*/lib*Singular-*.so"
+-        sage: fnmatch(str(lib_filename), pattern)
 -        True
--        sage: _get_shared_lib_filename("an_absurd_lib") is None
+-        sage: _get_shared_lib_path("an_absurd_lib") is None
 -        True
 -    """
 -
--    for libname in (libname,) + additional_libnames:
+-    for libname in libnames:
+-        search_directories: List[Path] = []
+-        patterns: List[str] = []
 -        if sys.platform == 'cygwin':
--            # Later down we take the last matching DLL found, so search
--            # SAGE_LOCAL second so that it takes precedence
--            bindirs = [
--                sysconfig.get_config_var('BINDIR'),
--                os.path.join(SAGE_LOCAL, 'bin')
+-            # Later down we take the first matching DLL found, so search
+-            # SAGE_LOCAL first so that it takes precedence
+-            search_directories = [
+-                Path(SAGE_LOCAL) / 'bin',
+-                Path(sysconfig.get_config_var('BINDIR')),
 -            ]
--            pats = ['cyg{}.dll'.format(libname), 'cyg{}-*.dll'.format(libname)]
--            filenames = []
--            for bindir in bindirs:
--                for pat in pats:
--                    filenames += glob.glob(os.path.join(bindir, pat))
--
--            # Note: This is not very robust, since if there are multi DLL
+-            # Note: The following is not very robust, since if there are multible
 -            # versions for the same library this just selects one more or less
--            # at arbitrary.  However, practically speaking, on Cygwin, there
+-            # at arbitrary. However, practically speaking, on Cygwin, there
 -            # will only ever be one version
--            if filenames:
--                return filenames[-1]
+-            patterns = [f'cyg{libname}.dll', f'cyg{libname}-*.dll']
 -        else:
 -            if sys.platform == 'darwin':
 -                ext = 'dylib'
 -            else:
 -                ext = 'so'
 -
--            libdirs = [
--                os.path.join(SAGE_LOCAL, 'lib'),
--                sysconfig.get_config_var('LIBDIR')
--            ]
--            multilib = sysconfig.get_config_var('MULTILIB')
--            if multilib:
--                libdirs.insert(1, os.path.join(libdirs[0], multilib))
+-            search_directories = [Path(SAGE_LOCAL) / 'lib']
+-            libdir = sysconfig.get_config_var('LIBDIR')
+-            if libdir is not None:
+-                libdir = Path(libdir)
+-                search_directories.append(libdir)
+-
+-                multiarchlib = sysconfig.get_config_var('MULTIARCH')
+-                if multiarchlib is not None: 
+-                    search_directories.append(libdir / multiarchlib),
 -
--            for libdir in libdirs:
--                basename = 'lib{}.{}'.format(libname, ext)
--                filename = os.path.join(libdir, basename)
--                if os.path.exists(filename):
--                    return filename
+-            patterns = [f'lib{libname}.{ext}']
+-
+-        for directory in search_directories:
+-            for pattern in patterns:
+-                path = next(directory.glob(pattern), None)
+-                if path is not None:
+-                    return str(path.resolve())
 -
 -    # Just return None if no files were found
 -    return None
 -
--
  # locate singular shared object
  # On Debian it's libsingular-Singular so try that as well
--SINGULAR_SO = _get_shared_lib_filename('Singular', 'singular-Singular')
-+SINGULAR_SO = '/default'
- var('SINGULAR_SO', SINGULAR_SO)
+-SINGULAR_SO = var("SINGULAR_SO", _get_shared_lib_path("Singular", "singular-Singular"))
++SINGULAR_SO = var("SINGULAR_SO", '/default')
  
  # locate libgap shared object
--GAP_SO= _get_shared_lib_filename('gap','')
-+GAP_SO = '/default'
- var('GAP_SO', GAP_SO)
+-GAP_SO = var("GAP_SO", _get_shared_lib_path("gap", ""))
++GAP_SO = var("GAP_SO", '/default')
  
  # post process
+ if ' ' in DOT_SAGE:
diff --git a/pkgs/applications/science/math/sage/patches/dont-grep-threejs-version-from-minified-js.patch b/pkgs/applications/science/math/sage/patches/dont-grep-threejs-version-from-minified-js.patch
deleted file mode 100644
index 88cb66506b1d..000000000000
--- a/pkgs/applications/science/math/sage/patches/dont-grep-threejs-version-from-minified-js.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/sage/repl/rich_output/display_manager.py b/src/sage/repl/rich_output/display_manager.py
-index fb21f7a9c9..f39470777d 100644
---- a/src/sage/repl/rich_output/display_manager.py
-+++ b/src/sage/repl/rich_output/display_manager.py
-@@ -749,9 +749,9 @@ class DisplayManager(SageObject):
-             import sage.env
-             import re
-             import os
--            with open(os.path.join(sage.env.THREEJS_DIR, 'build', 'three.min.js')) as f:
-+            with open(os.path.join(sage.env.THREEJS_DIR, 'build', 'three.js')) as f:
-                 text = f.read().replace('\n','')
--            version = re.search(r'REVISION="(\d+)"', text).group(1)
-+            version = re.search(r"REVISION = '(\d+)'", text).group(1)
-             return """
- <script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@r{0}/build/three.min.js"></script>
- <script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@r{0}/examples/js/controls/OrbitControls.js"></script>
diff --git a/pkgs/applications/science/math/sage/patches/eclib-20210223-test-formatting.patch b/pkgs/applications/science/math/sage/patches/eclib-20210223-test-formatting.patch
deleted file mode 100644
index 3fdb8f768e9d..000000000000
--- a/pkgs/applications/science/math/sage/patches/eclib-20210223-test-formatting.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-diff --git a/src/sage/libs/eclib/interface.py b/src/sage/libs/eclib/interface.py
-index e898456720..6b98c12328 100644
---- a/src/sage/libs/eclib/interface.py
-+++ b/src/sage/libs/eclib/interface.py
-@@ -758,78 +758,78 @@ class mwrank_MordellWeil(SageObject):
- 
-         sage: EQ = mwrank_MordellWeil(E, verbose=True)
-         sage: EQ.search(1)
--        P1 = [0:1:0]     is torsion point, order 1
--        P1 = [-3:0:1]     is generator number 1
--        saturating up to 20...Checking 2-saturation
-+        P1 = [0:1:0]         is torsion point, order 1
-+        P1 = [-3:0:1]         is generator number 1
-+        saturating up to 20...Checking 2-saturation...
-         Points have successfully been 2-saturated (max q used = 7)
--        Checking 3-saturation
-+        Checking 3-saturation...
-         Points have successfully been 3-saturated (max q used = 7)
--        Checking 5-saturation
-+        Checking 5-saturation...
-         Points have successfully been 5-saturated (max q used = 23)
--        Checking 7-saturation
-+        Checking 7-saturation...
-         Points have successfully been 7-saturated (max q used = 41)
--        Checking 11-saturation
-+        Checking 11-saturation...
-         Points have successfully been 11-saturated (max q used = 17)
--        Checking 13-saturation
-+        Checking 13-saturation...
-         Points have successfully been 13-saturated (max q used = 43)
--        Checking 17-saturation
-+        Checking 17-saturation...
-         Points have successfully been 17-saturated (max q used = 31)
--        Checking 19-saturation
-+        Checking 19-saturation...
-         Points have successfully been 19-saturated (max q used = 37)
-         done
--        P2 = [-2:3:1]     is generator number 2
--        saturating up to 20...Checking 2-saturation
-+        P2 = [-2:3:1]         is generator number 2
-+        saturating up to 20...Checking 2-saturation...
-         possible kernel vector = [1,1]
-         This point may be in 2E(Q): [14:-52:1]
-         ...and it is!
-         Replacing old generator #1 with new generator [1:-1:1]
-         Points have successfully been 2-saturated (max q used = 7)
-         Index gain = 2^1
--        Checking 3-saturation
-+        Checking 3-saturation...
-         Points have successfully been 3-saturated (max q used = 13)
--        Checking 5-saturation
-+        Checking 5-saturation...
-         Points have successfully been 5-saturated (max q used = 67)
--        Checking 7-saturation
-+        Checking 7-saturation...
-         Points have successfully been 7-saturated (max q used = 53)
--        Checking 11-saturation
-+        Checking 11-saturation...
-         Points have successfully been 11-saturated (max q used = 73)
--        Checking 13-saturation
-+        Checking 13-saturation...
-         Points have successfully been 13-saturated (max q used = 103)
--        Checking 17-saturation
-+        Checking 17-saturation...
-         Points have successfully been 17-saturated (max q used = 113)
--        Checking 19-saturation
-+        Checking 19-saturation...
-         Points have successfully been 19-saturated (max q used = 47)
-         done (index = 2).
-         Gained index 2, new generators = [ [1:-1:1] [-2:3:1] ]
--        P3 = [-14:25:8]   is generator number 3
--        saturating up to 20...Checking 2-saturation
-+        P3 = [-14:25:8]       is generator number 3
-+        saturating up to 20...Checking 2-saturation...
-         Points have successfully been 2-saturated (max q used = 11)
--        Checking 3-saturation
-+        Checking 3-saturation...
-         Points have successfully been 3-saturated (max q used = 13)
--        Checking 5-saturation
-+        Checking 5-saturation...
-         Points have successfully been 5-saturated (max q used = 71)
--        Checking 7-saturation
-+        Checking 7-saturation...
-         Points have successfully been 7-saturated (max q used = 101)
--        Checking 11-saturation
-+        Checking 11-saturation...
-         Points have successfully been 11-saturated (max q used = 127)
--        Checking 13-saturation
-+        Checking 13-saturation...
-         Points have successfully been 13-saturated (max q used = 151)
--        Checking 17-saturation
-+        Checking 17-saturation...
-         Points have successfully been 17-saturated (max q used = 139)
--        Checking 19-saturation
-+        Checking 19-saturation...
-         Points have successfully been 19-saturated (max q used = 179)
-         done (index = 1).
--        P4 = [-1:3:1]    = -1*P1 + -1*P2 + -1*P3 (mod torsion)
--        P4 = [0:2:1]     = 2*P1 + 0*P2 + 1*P3 (mod torsion)
--        P4 = [2:13:8]    = -3*P1 + 1*P2 + -1*P3 (mod torsion)
--        P4 = [1:0:1]     = -1*P1 + 0*P2 + 0*P3 (mod torsion)
--        P4 = [2:0:1]     = -1*P1 + 1*P2 + 0*P3 (mod torsion)
--        P4 = [18:7:8]    = -2*P1 + -1*P2 + -1*P3 (mod torsion)
--        P4 = [3:3:1]     = 1*P1 + 0*P2 + 1*P3 (mod torsion)
--        P4 = [4:6:1]     = 0*P1 + -1*P2 + -1*P3 (mod torsion)
--        P4 = [36:69:64]  = 1*P1 + -2*P2 + 0*P3 (mod torsion)
--        P4 = [68:-25:64]         = -2*P1 + -1*P2 + -2*P3 (mod torsion)
--        P4 = [12:35:27]  = 1*P1 + -1*P2 + -1*P3 (mod torsion)
-+        P4 = [-1:3:1]        = -1*P1 + -1*P2 + -1*P3 (mod torsion)
-+        P4 = [0:2:1]         = 2*P1 + 0*P2 + 1*P3 (mod torsion)
-+        P4 = [2:13:8]        = -3*P1 + 1*P2 + -1*P3 (mod torsion)
-+        P4 = [1:0:1]         = -1*P1 + 0*P2 + 0*P3 (mod torsion)
-+        P4 = [2:0:1]         = -1*P1 + 1*P2 + 0*P3 (mod torsion)
-+        P4 = [18:7:8]        = -2*P1 + -1*P2 + -1*P3 (mod torsion)
-+        P4 = [3:3:1]         = 1*P1 + 0*P2 + 1*P3 (mod torsion)
-+        P4 = [4:6:1]         = 0*P1 + -1*P2 + -1*P3 (mod torsion)
-+        P4 = [36:69:64]      = 1*P1 + -2*P2 + 0*P3 (mod torsion)
-+        P4 = [68:-25:64]     = -2*P1 + -1*P2 + -2*P3 (mod torsion)
-+        P4 = [12:35:27]      = 1*P1 + -1*P2 + -1*P3 (mod torsion)
-         sage: EQ
-         Subgroup of Mordell-Weil group: [[1:-1:1], [-2:3:1], [-14:25:8]]
- 
-@@ -1076,7 +1076,7 @@ class mwrank_MordellWeil(SageObject):
-             sage: EQ.search(1)
-             P1 = [0:1:0]         is torsion point, order 1
-             P1 = [-3:0:1]         is generator number 1
--            saturating up to 20...Checking 2-saturation
-+            saturating up to 20...Checking 2-saturation...
-             ...
-             P4 = [12:35:27]      = 1*P1 + -1*P2 + -1*P3 (mod torsion)
-             sage: EQ
diff --git a/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch b/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch
index 661077cfa8cd..3c64be100d25 100644
--- a/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch
+++ b/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch
@@ -1,8 +1,8 @@
-diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
-index 73a078e619..059125c59f 100644
---- a/src/sage_setup/docbuild/__init__.py
-+++ b/src/sage_setup/docbuild/__init__.py
-@@ -86,27 +86,6 @@ def builder_helper(type):
+diff --git a/src/sage_docbuild/__init__.py b/src/sage_docbuild/__init__.py
+index 79005b903a..fbe6fe2595 100644
+--- a/src/sage_docbuild/__init__.py
++++ b/src/sage_docbuild/__init__.py
+@@ -85,27 +85,6 @@ def builder_helper(type):
      """
      Returns a function which builds the documentation for
      output type ``type``.
@@ -11,16 +11,16 @@ index 73a078e619..059125c59f 100644
 -
 -    Check that :trac:`25161` has been resolved::
 -
--        sage: from sage_setup.docbuild import DocBuilder, setup_parser
+-        sage: from sage_docbuild import DocBuilder, setup_parser
 -        sage: DocBuilder._options = setup_parser().parse_args([])[0] # builder_helper needs _options to be set
 -
--        sage: import sage_setup.docbuild.sphinxbuild
+-        sage: import sage_docbuild.sphinxbuild
 -        sage: def raiseBaseException():
 -        ....:     raise BaseException("abort pool operation")
--        sage: original_runsphinx, sage_setup.docbuild.sphinxbuild.runsphinx = sage_setup.docbuild.sphinxbuild.runsphinx, raiseBaseException
+-        sage: original_runsphinx, sage_docbuild.sphinxbuild.runsphinx = sage_docbuild.sphinxbuild.runsphinx, raiseBaseException
 -
--        sage: from sage_setup.docbuild import builder_helper, build_ref_doc
--        sage: from sage_setup.docbuild import _build_many as build_many
+-        sage: from sage_docbuild import builder_helper, build_ref_doc
+-        sage: from sage_docbuild import _build_many as build_many
 -        sage: helper = builder_helper("html")
 -        sage: try:
 -        ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
@@ -30,24 +30,24 @@ index 73a078e619..059125c59f 100644
      """
      def f(self, *args, **kwds):
          output_dir = self._output_dir(type)
-@@ -128,10 +107,9 @@ def builder_helper(type):
+@@ -127,10 +106,9 @@ def builder_helper(type):
          logger.debug(build_command)
  
          # Run Sphinx with Sage's special logger
 -        sys.argv = ["sphinx-build"] + build_command.split()
 -        from .sphinxbuild import runsphinx
-+        args = "python3 -um sage_setup.docbuild.sphinxbuild -N".split() + build_command.split()
++        args = "python3 -um sage_docbuild.sphinxbuild -N".split() + build_command.split()
          try:
 -            runsphinx()
 +            subprocess.check_call(args)
          except Exception:
              if ABORT_ON_ERROR:
                  raise
-diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py
-index fe7eba43b2..463790965c 100644
---- a/src/sage_setup/docbuild/sphinxbuild.py
-+++ b/src/sage_setup/docbuild/sphinxbuild.py
-@@ -321,3 +321,8 @@ def runsphinx():
+diff --git a/src/sage_docbuild/sphinxbuild.py b/src/sage_docbuild/sphinxbuild.py
+index f58f6c61d7..ef51a55411 100644
+--- a/src/sage_docbuild/sphinxbuild.py
++++ b/src/sage_docbuild/sphinxbuild.py
+@@ -326,3 +326,8 @@ def runsphinx():
          sys.stderr = saved_stderr
          sys.stdout.flush()
          sys.stderr.flush()
diff --git a/pkgs/applications/science/math/sage/patches/sympy-1.7-update.patch b/pkgs/applications/science/math/sage/patches/sympy-1.7-update.patch
deleted file mode 100644
index 1d21622a2354..000000000000
--- a/pkgs/applications/science/math/sage/patches/sympy-1.7-update.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/src/sage/interfaces/sympy.py b/src/sage/interfaces/sympy.py
-index cc35a42a9f..6e577d5d8d 100644
---- a/src/sage/interfaces/sympy.py
-+++ b/src/sage/interfaces/sympy.py
-@@ -397,7 +397,7 @@ def _sympysage_rf(self):
-         sage: from sympy import Symbol, rf
-         sage: _ = var('x, y')
-         sage: rfxy = rf(Symbol('x'), Symbol('y'))
--        sage: assert rising_factorial(x,y)._sympy_() == rfxy.rewrite('gamma')
-+        sage: assert rising_factorial(x,y)._sympy_() == rfxy.rewrite('gamma', piecewise=False)
-         sage: assert rising_factorial(x,y) == rfxy._sage_()
-     """
-     from sage.arith.all import rising_factorial
-diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
-index 7c18ec1efa..c2619ac42d 100644
---- a/src/sage/symbolic/expression.pyx
-+++ b/src/sage/symbolic/expression.pyx
-@@ -955,6 +955,6 @@ cdef class Expression(CommutativeRingElement):
-             sage: unicode_art(13 - I)
-             13 - â…ˆ
-             sage: unicode_art(1.3 - I)
--            1.3 - 1.0â‹…â…ˆ
-+            1.3 - â…ˆ
-             sage: unicode_art(cos(I))
-             cosh(1)
diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix
index 568a4a39f393..fd67076c97de 100644
--- a/pkgs/applications/science/math/sage/sage-env.nix
+++ b/pkgs/applications/science/math/sage/sage-env.nix
@@ -2,6 +2,7 @@
 , lib
 , writeTextFile
 , sagelib
+, sage_docbuild
 , env-locations
 , gfortran
 , bash
@@ -191,6 +192,7 @@ writeTextFile rec {
   # for find_library
     export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
   '';
-} // {
-  lib = sagelib; # equivalent of `passthru`, which `writeTextFile` doesn't support
+} // { # equivalent of `passthru`, which `writeTextFile` doesn't support
+  lib = sagelib;
+  docbuild = sage_docbuild;
 }
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 1fb605b35998..91e855777f0e 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -24,14 +24,14 @@ let
   );
 in
 stdenv.mkDerivation rec {
-  version = "9.2";
+  version = "9.3.rc4";
   pname = "sage-src";
 
   src = fetchFromGitHub {
     owner = "sagemath";
     repo = "sage";
     rev = version;
-    sha256 = "103j8d5x6szl9fxaz0dvdi4y47q1af9h9y5hmjh2xayi62qmp5ql";
+    sha256 = "sha256-LDY07By2j6JagkgT9zeDJ93+m2/oXXEnDRTDzmR8ftk=";
   };
 
   # Patches needed because of particularities of nix or the way this is packaged.
@@ -53,14 +53,6 @@ stdenv.mkDerivation rec {
     # Parallelize docubuild using subprocesses, fixing an isolation issue. See
     # https://groups.google.com/forum/#!topic/sage-packaging/YGOm8tkADrE
     ./patches/sphinx-docbuild-subprocesses.patch
-
-    # Register sorted dict pprinter earlier (https://trac.sagemath.org/ticket/31053)
-    (fetchSageDiff {
-      base = "9.3.beta4";
-      name = "register-pretty-printer-earlier.patch";
-      rev = "d658230ce06ca19f4a3b3a4576297ee82f2d2151";
-      sha256 = "sha256-9mPUV7K5PoLDH2vVaYaOfvDLDpmxU0Aj7m/eaXYotDs=";
-    })
   ];
 
   # Since sage unfortunately does not release bugfix releases, packagers must
@@ -70,31 +62,6 @@ stdenv.mkDerivation rec {
     # To help debug the transient error in
     # https://trac.sagemath.org/ticket/23087 when it next occurs.
     ./patches/configurationpy-error-verbose.patch
-
-    # fix intermittent errors in Sage 9.2's psage.py (this patch is
-    # already included in Sage 9.3): https://trac.sagemath.org/ticket/30730
-    (fetchSageDiff {
-      base = "9.2.rc2";
-      name = "fix-psage-is-locked.patch";
-      rev = "75df605f216ddc7b6ca719be942d666b241520e9";
-      sha256 = "0g9pl1wbb3sgs26d3bvv70cpa77sfskylv4kd255y1794f1fgk4q";
-    })
-
-    # fix intermittent errors in sagespawn.pyx: https://trac.sagemath.org/ticket/31052
-    (fetchSageDiff {
-      base = "9.2";
-      name = "sagespawn-implicit-casting.patch";
-      rev = "2959ac792ebd6107fe87c9af1541083de5ba02d6";
-      sha256 = "sha256-bWIpEGir9Kawak5CJegBMNcHm/CqhWmdru+emeSsvO0=";
-    })
-
-    # fix intermittent errors in doctest/test.py: https://trac.sagemath.org/ticket/26912
-    (fetchSageDiff {
-      base = "9.3.beta8";
-      name = "set-cysignals-crash-ndebug.patch";
-      rev = "ca5257a5d0f32efc9f8f07e126020856270b1a18";
-      sha256 = "sha256-KViw63xE3O0eUiOYzoxNrr4NL+csql9GPJLDJCf/EZs=";
-    })
   ];
 
   # Patches needed because of package updates. We could just pin the versions of
@@ -111,120 +78,29 @@ stdenv.mkDerivation rec {
 
     # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests
     ./patches/ignore-cmp-deprecation.patch
-
-    # adapt sage's Image class to pillow 8.0.1 (https://trac.sagemath.org/ticket/30971)
-    (fetchSageDiff {
-      base = "9.3.beta2";
-      name = "pillow-8.0.1-update.patch";
-      rev = "f05f2d0aac9c4b5abe68105cee2cc7f2c8461847";
-      sha256 = "sha256-uY2UlgSd5hhOUUukB4Xc3Gjy0/e7p/qyq9jdvz10IOs=";
-    })
-
-    # don't use deprecated numpy type aliases (https://trac.sagemath.org/ticket/31364)
-    (fetchSageDiff {
-      base = "9.3.beta7";
-      name = "dont-use-deprecated-numpy-type-aliases.patch";
-      rev = "dfdef60515d4a4269e82d91280f76a7fdf10bf97";
-      sha256 = "sha256-77/3LkT5J7DQN8IPlGJKB6ZcJPaF7xwje06JNns+0AE=";
-    })
-
-    # fix test output with sympy 1.7 (https://trac.sagemath.org/ticket/30985)
-    ./patches/sympy-1.7-update.patch
-
-    # workaround until we use sage's fork of threejs, which contains a "version" file
-    ./patches/dont-grep-threejs-version-from-minified-js.patch
-
-    # updated eclib output has punctuation changes and tidier whitespace
-    ./patches/eclib-20210223-test-formatting.patch
-
-    # upgrade arb to 2.18.1 (https://trac.sagemath.org/ticket/28623)
-    (fetchSageDiff {
-      base = "9.3.beta3";
-      name = "arb-2.18.1-update.patch";
-      rev = "0c9c4ed35c2eaf34ae0d19387c07b7f460e4abce";
-      sha256 = "sha256-CjOJIsyyVCziAfvE6pWSihPO35IZMcY2/taXAsqhPLY=";
-    })
-
-    # giac 1.6.0-47 update (https://trac.sagemath.org/ticket/30537)
-    (fetchSageDiff {
-      base = "9.3.beta7";
-      name = "giac-1.6.0-47-update.patch";
-      rev = "f05720bf63dfaf33a4e3b6d3ed2c2c0ec46b5d31";
-      sha256 = "sha256-gDUq+84eXd5GxLBWUSI61GMJpBF2KX4LBVOt3mS1NF8=";
-    })
-
-    # Make gcd/lcm interact better with pari and gmpy2 (https://trac.sagemath.org/ticket/30849)
-    # needed for pari 2.13.1 update, which we will do in the future
-    (fetchSageDiff {
-      base = "9.3.beta0";
-      name = "make-gcd-lcm-interact-better-with-pari-and-gmpy2.patch";
-      rev = "75c1516f0abb9e6f8c335e38e4031f6ef674ed30";
-      sha256 = "sha256-RukkieIZcXNrju904H2oyGKdtpdE+9vNzvyjN2IBNg0=";
-    })
-
-    # cypari 2.1.2 update (https://trac.sagemath.org/ticket/31029)
-    (fetchSageDiff {
-      base = "9.3.beta3";
-      name = "cypari-2.1.2-update.patch";
-      rev = "b9aadfd08e81d74ca7c229bb80eb853b592887d0";
-      sha256 = "sha256-eKaMy7kpu+YKdL8bPStgocxBCTfc2Z/10RrGy2LENFw=";
-    })
   ];
 
   patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
 
   postPatch = ''
-    # make sure shebangs etc are fixed, but sage-python23 still works
-    find . -type f -exec sed \
-      -e 's/sage-python23/python3/g' \
-      -i {} \;
-
-    echo '#!${runtimeShell}
-    python3 "$@"' > build/bin/sage-python23
-
     # Make sure sage can at least be imported without setting any environment
     # variables. It won't be close to feature complete though.
     sed -i \
-      "s|var('SAGE_ROOT'.*|var('SAGE_ROOT', '$out')|" \
+      "s|var(\"SAGE_ROOT\".*|var(\"SAGE_ROOT\", \"$out\")|" \
       src/sage/env.py
 
-    # Do not use sage-env-config (generated by ./configure).
-    # Instead variables are set manually.
-    echo '# do nothing' >  src/bin/sage-env-config
-  '';
-
-  # Test src/doc/en/reference/spkg/conf.py will fail if
-  # src/doc/en/reference/spkg/index.rst is not generated.  It is
-  # generated by src/doc/bootstrap, so I've copied the relevant part
-  # here. An alternative would be to create an empty
-  # src/doc/en/reference/spkg/index.rst file.
-  configurePhase = ''
-    OUTPUT_DIR="src/doc/en/reference/spkg"
-    mkdir -p "$OUTPUT_DIR"
-    OUTPUT_INDEX="$OUTPUT_DIR"/index.rst
-    cat > "$OUTPUT_INDEX" <<EOF
-
-    External Packages
-    =================
-
-    .. toctree::
-       :maxdepth: 1
-
-    EOF
-    for PKG_SCRIPTS in build/pkgs/*; do
-        if [ -d "$PKG_SCRIPTS" ]; then
-            PKG_BASE=$(basename "$PKG_SCRIPTS")
-            if [ -f "$PKG_SCRIPTS"/SPKG.rst ]; then
-                # Instead of just copying, we may want to call
-                # a version of sage-spkg-info to format extra information.
-                cp "$PKG_SCRIPTS"/SPKG.rst "$OUTPUT_DIR"/$PKG_BASE.rst
-                echo >> "$OUTPUT_INDEX" "   $PKG_BASE"
-            fi
-        fi
-    done
-    cat >> "$OUTPUT_INDEX" <<EOF
-    .. include:: ../footer.txt
-    EOF
+    # src/doc/en/reference/spkg/conf.py expects index.rst in its directory,
+    # a list of external packages in the sage distribution (build/pkgs)
+    # generated by the bootstrap script (which we don't run).  this is not
+    # relevant for other distributions, so remove it.
+    rm src/doc/en/reference/spkg/conf.py
+    sed -i "/spkg/d" src/doc/en/reference/index.rst
+
+    # the bootstrap script also generates installation instructions for
+    # arch, debian, fedora, cygwin and homebrew using data from build/pkgs.
+    # we don't run the bootstrap script, so disable including the generated
+    # files. docbuilding fails otherwise.
+    sed -i "/literalinclude/d" src/doc/en/installation/source.rst
   '';
 
   buildPhase = "# do nothing";
diff --git a/pkgs/applications/science/math/sage/sage_docbuild.nix b/pkgs/applications/science/math/sage/sage_docbuild.nix
new file mode 100644
index 000000000000..ed78d46b4451
--- /dev/null
+++ b/pkgs/applications/science/math/sage/sage_docbuild.nix
@@ -0,0 +1,20 @@
+{ buildPythonPackage
+, sage-src
+, sphinx
+}:
+
+buildPythonPackage rec {
+  version = src.version;
+  pname = "sage_docbuild";
+  src = sage-src;
+
+  propagatedBuildInputs = [
+    sphinx
+  ];
+
+  preBuild = ''
+    cd build/pkgs/sage_docbuild/src
+  '';
+
+  doCheck = false; # we will run tests in sagedoc.nix
+}
diff --git a/pkgs/applications/science/math/sage/sagedoc.nix b/pkgs/applications/science/math/sage/sagedoc.nix
index a10672f3a092..603c1a585c79 100644
--- a/pkgs/applications/science/math/sage/sagedoc.nix
+++ b/pkgs/applications/science/math/sage/sagedoc.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
     jmol
     cddlib
   ] ++ (with python3.pkgs; [
+    sage_docbuild
     psutil
     future
     sphinx
@@ -44,13 +45,6 @@ stdenv.mkDerivation rec {
     chmod -R 755 "$SAGE_DOC_SRC_OVERRIDE"
   '';
 
-  postPatch = ''
-    # src/doc/bootstrap generates installation instructions for
-    # arch, debian, fedora, cygwin and homebrew. as a hack, disable
-    # including the generated files.
-    sed -i "/literalinclude/d" $SAGE_DOC_SRC_OVERRIDE/en/installation/source.rst
-  '';
-
   buildPhase = ''
     export SAGE_NUM_THREADS="$NIX_BUILD_CORES"
     export HOME="$TMPDIR/sage_home"
@@ -59,13 +53,13 @@ stdenv.mkDerivation rec {
     # needed to link them in the sage docs using intersphinx
     export PPLPY_DOCS=${python3.pkgs.pplpy.doc}/share/doc/pplpy
 
-    # adapted from src/doc/bootstrap
+    # adapted from src/doc/bootstrap (which we don't run)
     OUTPUT_DIR="$SAGE_DOC_SRC_OVERRIDE/en/reference/repl"
     mkdir -p "$OUTPUT_DIR"
     OUTPUT="$OUTPUT_DIR/options.txt"
     ${sage-with-env}/bin/sage -advanced > "$OUTPUT"
 
-    ${sage-with-env}/bin/sage -python -m sage_setup.docbuild \
+    ${sage-with-env}/bin/sage --docbuild \
       --mathjax \
       --no-pdf-links \
       all html
diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix
index 245ddcedeee0..f60cb64d2e8d 100644
--- a/pkgs/applications/science/math/sage/sagelib.nix
+++ b/pkgs/applications/science/math/sage/sagelib.nix
@@ -63,7 +63,6 @@ assert (!blas.isILP64) && (!lapack.isILP64);
 # `sage-tests` and will not have html docs without `sagedoc`.
 
 buildPythonPackage rec {
-  format = "other";
   version = src.version;
   pname = "sagelib";
   src = sage-src;
@@ -74,6 +73,7 @@ buildPythonPackage rec {
     jupyter_core
     pkg-config
     pip # needed to query installed packages
+    ecl
   ];
 
   buildInputs = [
@@ -130,7 +130,7 @@ buildPythonPackage rec {
     sqlite
   ];
 
-  buildPhase = ''
+  preBuild = ''
     export SAGE_ROOT="$PWD"
     export SAGE_LOCAL="$SAGE_ROOT"
     export SAGE_SHARE="$SAGE_LOCAL/share"
@@ -146,15 +146,13 @@ buildPythonPackage rec {
     mkdir -p "$SAGE_SHARE/sage/ext/notebook-ipython"
     mkdir -p "var/lib/sage/installed"
 
-    source build/bin/sage-dist-helpers
-    cd src
-
-    ${python.interpreter} -u setup.py --no-user-cfg build
+    # src/setup.py should not be used, see https://trac.sagemath.org/ticket/31377#comment:124
+    cd build/pkgs/sagelib/src
   '';
 
-  installPhase = ''
-    ${python.interpreter} -u setup.py --no-user-cfg install --prefix=$out
-
+  postInstall = ''
     rm -r "$out/${python.sitePackages}/sage/cython_debug"
   '';
+
+  doCheck = false; # we will run tests in sage-tests.nix
 }
diff --git a/pkgs/applications/science/math/sage/threejs-sage.nix b/pkgs/applications/science/math/sage/threejs-sage.nix
new file mode 100644
index 000000000000..0e4ad4dee955
--- /dev/null
+++ b/pkgs/applications/science/math/sage/threejs-sage.nix
@@ -0,0 +1,18 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "threejs-sage";
+  version = "r122";
+
+  src = fetchFromGitHub {
+    owner = "sagemath";
+    repo = "threejs-sage";
+    rev = version;
+    sha256 = "sha256-xPAPt36Fon3hYQq6SOmGkIyUzAII2LMl10nqYG4UPI0=";
+  };
+
+  installPhase = ''
+    mkdir -p $out/lib/node_modules/three
+    cp -r build version $out/lib/node_modules/three
+  '';
+}
diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix
index fad05099a733..695af3d17440 100644
--- a/pkgs/applications/science/math/singular/default.nix
+++ b/pkgs/applications/science/math/singular/default.nix
@@ -1,57 +1,96 @@
-{ stdenv, fetchurl, gmp, bison, perl, ncurses, readline, coreutils, pkg-config
+{ stdenv, fetchFromGitHub, gmp, bison, perl, ncurses, readline, coreutils, pkg-config
 , lib
 , fetchpatch
 , autoreconfHook
+, sharutils
 , file
 , flint
 , ntl
 , cddlib
-, enableFactory ? true
+, gfan
+, lrcalc
+, doxygen
+, graphviz
+# upstream generates docs with texinfo 4. later versions of texinfo
+# use letters instead of numbers for post-appendix chapters, and we
+# want it to match the upstream format because sage depends on it.
+, texinfo4
+, texlive
+, enableDocs ? true
 , enableGfanlib ? true
 }:
 
 stdenv.mkDerivation rec {
   pname = "singular";
-  version = "4.1.1p2";
-
-  src = let
-    # singular sorts its tarballs in directories by base release (without patch version)
-    # for example 4.1.1p1 will be in the directory 4-1-1
-    baseVersion = builtins.head (lib.splitString "p" version);
-    urlVersion = builtins.replaceStrings [ "." ] [ "-" ] baseVersion;
-  in
-  fetchurl {
-    url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${urlVersion}/singular-${version}.tar.gz";
-    sha256 = "07x9kri8vl4galik7lr6pscq3c51n8570pyw64i7gbj0m706f7wf";
+  version = "4.2.0p2";
+
+  # since the tarball does not contain tests or documentation (and
+  # there is no separate tests tarball for 4.2.0), we fetch from
+  # GitHub.
+  src = fetchFromGitHub {
+    owner = "Singular";
+    repo = "Singular";
+
+    # 4.2.0p2 is not tagged, but the tarball matches commit
+    # 6f68939ddf612d96e3caaaaa8275f77613ac1da8. the commit below has
+    # two extra fixes.
+    rev = "3cda50c00a849455efa2502e56596955491a353a";
+    sha256 = "sha256-OizPhGE6L2LTOrKfeDdDB6BSdvYkDVXvbbYjV14hnHM=";
+
+    # if a release is tagged it will be in the format below.
+    # rev = "Release${lib.replaceStrings ["."] ["-"] version}";
+
+    # the repository's .gitattributes file contains the lines "/Tst/
+    # export-ignore" and "/doc/ export-ignore" so some directories are
+    # not included in the tarball downloaded by fetchzip. setting
+    # fetchSubmodules works around this by using fetchgit instead of
+    # fetchzip.
+    fetchSubmodules = true;
   };
 
+  patches = [
+    # add aarch64 support to cpu-check.m4. copied from redhat.
+    ./redhat-aarch64.patch
+
+    # vspace causes hangs in modstd and other libraries on aarch64
+    ./disable-vspace-on-aarch64.patch
+
+    # the newest version of ax-prog-cc-for-build.m4 seems to trigger
+    # linker errors. see
+    # https://github.com/alsa-project/alsa-firmware/issues/3 for a
+    # related issue.
+    ./use-older-ax-prog-cc-for-build.patch
+  ] ++ lib.optionals enableDocs [
+    # singular supports building without 4ti2, bertini, normaliz or
+    # topcom just fine, but the docbuilding does not skip manual pages
+    # tagged as depending on those binaries (probably a bug in
+    # doc2tex.pl::HandleLib, since it seems to ignore "-exclude"
+    # argumens). skip them manually.
+    ./disable-docs-for-optional-unpackaged-deps.patch
+  ];
+
   configureFlags = [
     "--with-ntl=${ntl}"
-  ] ++ lib.optionals enableFactory [
-    "--enable-factory"
+    "--disable-pyobject-module"
+  ] ++ lib.optionals enableDocs [
+    "--enable-doc-build"
   ] ++ lib.optionals enableGfanlib [
     "--enable-gfanlib"
   ];
 
-  postUnpack = ''
+  prePatch = ''
+    # don't let the tests depend on `hostname`
+    substituteInPlace Tst/regress.cmd --replace 'mysystem_catch("hostname")' 'nix_test_runner'
+
     patchShebangs .
+  '' + lib.optionalString enableDocs ''
+    # work around encoding problem
+    sed -i -e 's/\xb7/@cdot{}/g' doc/decodegb.doc
   '';
 
-  patches = [
-    # NTL error handler was introduced in the library part, preventing users of
-    # the library from implementing their own error handling
-    # https://www.singular.uni-kl.de/forum/viewtopic.php?t=2769
-    (fetchpatch {
-      name = "move_error_handler_out_of_libsingular.patch";
-      # rebased version of https://github.com/Singular/Sources/commit/502cf86d0bb2a96715be6764774b64a69c1ca34c.patch
-      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/singular/patches/singular-ntl-error-handler.patch?h=50b9ae2fd233c30860e1cbb3e63a26f2cc10560a";
-      sha256 = "0vgh4m9zn1kjl0br68n04j4nmn5i1igfn28cph0chnwf7dvr9194";
-    })
-  ];
-
   # For reference (last checked on commit 75f460d):
-  # https://github.com/Singular/Sources/blob/spielwiese/doc/Building-Singular-from-source.md
-  # https://github.com/Singular/Sources/blob/spielwiese/doc/external-packages-dynamic-modules.md
+  # https://github.com/Singular/Singular/blob/spielwiese/doc/Building-Singular-from-source.md
+  # https://github.com/Singular/Singular/blob/spielwiese/doc/external-packages-dynamic-modules.md
   buildInputs = [
     # necessary
     gmp
@@ -60,6 +99,8 @@ stdenv.mkDerivation rec {
     readline
     ntl
     flint
+    lrcalc
+    gfan
   ] ++ lib.optionals enableGfanlib [
     cddlib
   ];
@@ -68,6 +109,12 @@ stdenv.mkDerivation rec {
     perl
     pkg-config
     autoreconfHook
+    sharutils # needed for regress.cmd install checks
+  ] ++ lib.optionals enableDocs [
+    doxygen
+    graphviz
+    texinfo4
+    texlive.combined.scheme-small
   ];
 
   preAutoreconf = ''
@@ -85,23 +132,62 @@ stdenv.mkDerivation rec {
     # do nothing
   '';
 
+  doCheck = true; # very basic checks, does not test any libraries
+
   installPhase = ''
     mkdir -p "$out"
     cp -r Singular/LIB "$out/lib"
     make install
-
+  '' + lib.optionalString enableDocs ''
+    # Sage uses singular.hlp (which is not in the tarball)
+    mkdir -p $out/share/info
+    cp doc/singular.hlp $out/share/info
+  '' + ''
     # Make sure patchelf picks up the right libraries
     rm -rf libpolys factory resources omalloc Singular
   '';
 
+  # singular tests are a bit complicated, see
+  # https://github.com/Singular/Singular/tree/spielwiese/Tst
+  # https://www.singular.uni-kl.de/forum/viewtopic.php&t=2773
+  testsToRun = [
+    "Old/universal.lst"
+    "Buch/buch.lst"
+    "Plural/short.lst"
+    "Old/factor.tst"
+  ] ++ lib.optionals enableGfanlib [
+    # tests that require gfanlib
+    "Short/ok_s.lst"
+  ];
+
   # simple test to make sure singular starts and finds its libraries
   doInstallCheck = true;
   installCheckPhase = ''
+    # Very basic sanity check to make sure singular starts and finds its libraries.
+    # This is redundant with the below tests. It is only kept because the singular test
+    # runner is a bit complicated. In case we decide to give up those tests in the future,
+    # this will still be useful. It takes barely any time.
     "$out/bin/Singular" -c 'LIB "freegb.lib"; exit;'
     if [ $? -ne 0 ]; then
         echo >&2 "Error loading the freegb library in Singular."
         exit 1
     fi
+
+    # Run the test suite
+    cd Tst
+    perl ./regress.cmd \
+      -s "$out/bin/Singular" \
+      ${lib.concatStringsSep " " (map lib.escapeShellArg testsToRun)} \
+      2>"$TMPDIR/out-err.log"
+
+    # unfortunately regress.cmd always returns exit code 0, so check stderr
+    # https://www.singular.uni-kl.de/forum/viewtopic.php&t=2773
+    if [[ -s "$TMPDIR/out-err.log" ]]; then
+      cat "$TMPDIR/out-err.log"
+      exit 1
+    fi
+
+    echo "Exit status $?"
   '';
 
   enableParallelBuilding = true;
@@ -110,6 +196,7 @@ stdenv.mkDerivation rec {
     description = "A CAS for polynomial computations";
     maintainers = teams.sage.members;
     # 32 bit x86 fails with some link error: `undefined reference to `__divmoddi4@GCC_7.0.0'`
+    # https://www.singular.uni-kl.de:8002/trac/ticket/837
     platforms = subtractLists platforms.i686 platforms.unix;
     license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4
     homepage = "http://www.singular.uni-kl.de";
diff --git a/pkgs/applications/science/math/singular/disable-docs-for-optional-unpackaged-deps.patch b/pkgs/applications/science/math/singular/disable-docs-for-optional-unpackaged-deps.patch
new file mode 100644
index 000000000000..46d92922f3ce
--- /dev/null
+++ b/pkgs/applications/science/math/singular/disable-docs-for-optional-unpackaged-deps.patch
@@ -0,0 +1,112 @@
+commit 9e8b044d982e132cf35a106a1cc0cf7e77b27f7c
+Author: Mauricio Collares <mauricio@collares.org>
+Date:   Thu Apr 15 20:33:21 2021 -0300
+
+    Disable manual sections using optional packages not yet in Nixpkgs
+
+        * normaliz.lib depends on normaliz.
+        * polymake.lib depends on topcom.
+        * recover.lib depends on bertini.
+        * sing4ti2.lib depends on 4ti2.
+        * tateProdCplxNegGrad.lib uses multigrading.lib, which depends on 4ti2.
+
+diff --git a/doc/singular.doc b/doc/singular.doc
+index 64b969d39..e704f95f0 100644
+--- a/doc/singular.doc
++++ b/doc/singular.doc
+@@ -407,7 +407,6 @@ LIB "all.lib";
+ * nfmodsyz_lib:: Syzygy modules of submodules of free modules over algebraic number fields
+ * noether_lib:: Noether normalization of an ideal
+ * normal_lib:: procedure for normalization
+-* normaliz_lib:: integral closure, normalization for monomial ideals, toric ideals
+ * pointid_lib:: factorized lex GB of the vanishing ideal of a set of points
+ * primdec_lib:: procedures for primary decomposition
+ * primdecint_lib:: primary decomposition over the integers
+@@ -416,7 +415,6 @@ LIB "all.lib";
+ * reesclos_lib:: Rees Algebra and integral closure of an ideal
+ * rstandard_lib:: Janet bases and border bases for ideals
+ * sagbi_lib:: Subalgebras bases Analogous to Groebner bases for ideals
+-* sing4ti2_lib:: interface to program 4ti2
+ * symodstd_lib:: Groebner bases for symmetric ideals
+ * toric_lib:: toric ideals
+ @end menu
+@@ -521,10 +519,6 @@ LIB "all.lib";
+ @node normal_lib
+ @subsection normal_lib
+ @c lib normal.lib
+-@c ---------------------------------------------------------
+-@node normaliz_lib
+-@subsection normaliz_lib
+-@c lib normaliz.lib tag:normaliz
+ @c ----------------------------------------------------------
+ @node pointid_lib
+ @subsection pointid_lib
+@@ -558,10 +552,6 @@ LIB "all.lib";
+ @subsection sagbi_lib
+ @c lib sagbi.lib
+ @c ---------------------------------------------------------
+-@node sing4ti2_lib
+-@subsection sing4ti2_lib
+-@c lib sing4ti2.lib tag:sing4ti2
+-@c ----------------------------------------------------------
+ @node symodstd_lib
+ @subsection symodstd_lib
+ @c lib symodstd.lib
+@@ -873,7 +863,6 @@ iniD, reslist, sumlist, dividelist, createlist
+ * solve_lib:: procedures to solve polynomial systems
+ * triang_lib:: procedures for decomposing zero-dimensional ideals
+ * ntsolve_lib:: one real solution of polynomial systems (Newton iteration)
+-* recover_lib:: Hybrid numerical/symbolical algorithms
+ * rootisolation_lib:: real root isolation with intervals
+ * signcond_lib:: computing realizable sign conditions
+ * zeroset_lib:: procedures for roots and factorization
+@@ -904,10 +893,6 @@ iniD, reslist, sumlist, dividelist, createlist
+ @subsection ntsolve_lib
+ @c lib ntsolve.lib
+ @c ---------------------------------------------------------
+-@node recover_lib
+-@subsection recover_lib
+-@c lib recover.lib tag:bertini
+-@c ----------------------------------------------------------
+ @node rootisolation_lib
+ @subsection rootisolation_lib
+ @c lib rootisolation.lib
+@@ -1108,7 +1093,6 @@ but not for serious computations.
+ * cimonom_lib:: complete intersection for toric ideals
+ * gfan_lib:: A gfanlib interface for Singular
+ * gitfan_lib:: Compute GIT-fans
+-* polymake_lib:: interface to TOPCOM
+ * realizationMatroids_lib:: Realizability for Tropical Fan Curves
+ * tropical_lib:: interface to gfan
+ * tropicalNewton_lib:: Newton polygons in tropical geometry
+@@ -1125,10 +1109,7 @@ but not for serious computations.
+ @node gitfan_lib
+ @subsection gitfan_lib
+ @c lib gitfan.lib
+-@c ----------------------------------------------------------
+-@node polymake_lib
+-@subsection polymake_lib
+-@c lib polymake.lib tag:topcom
++
+ @c ----------------------------------------------------------
+ @node realizationMatroids_lib
+ @subsection realizationMatroids_lib
+@@ -1219,7 +1200,6 @@ Comments should be send to the author of the library directly.
+ * stanleyreisner_lib:: T1 and T2 for a general Stanley-Reiser ring
+ * swalk_lib:: Sagbi Walk Conversion Algorithm
+ * systhreads_lib:: multi-threaded objects
+-* tateProdCplxNegGrad_lib:: sheaf cohomology on product of projective spaces
+ * VecField_lib:: vector fields
+ @end menu
+ @c ----------------------------------------------------------
+@@ -1310,10 +1290,6 @@ Todos/Issues:
+ @subsection systhreads_lib
+ @c lib systhreads.lib
+ @c ---------------------------------------------------------
+-@node tateProdCplxNegGrad_lib
+-@subsection tateProdCplxNegGrad_lib
+-@c lib tateProdCplxNegGrad.lib
+-@c ---------------------------------------------------------
+ @node VecField_lib
+ @subsection VecField_lib
+ @c lib VecField.lib
diff --git a/pkgs/applications/science/math/singular/disable-vspace-on-aarch64.patch b/pkgs/applications/science/math/singular/disable-vspace-on-aarch64.patch
new file mode 100644
index 000000000000..3e51b7fb2cec
--- /dev/null
+++ b/pkgs/applications/science/math/singular/disable-vspace-on-aarch64.patch
@@ -0,0 +1,15 @@
+diff --git a/kernel/mod2.h b/kernel/mod2.h
+index 867fcae47..2abd84f23 100644
+--- a/kernel/mod2.h
++++ b/kernel/mod2.h
+@@ -60,8 +60,10 @@
+ 
+ /* define for parallel processes with shared memory */
+ #ifndef __CCYGWIN__
++#ifndef SI_CPU_AARCH64
+ #define HAVE_VSPACE 1
+ #endif
++#endif
+ 
+ /*#define PROFILING*/
+ #ifdef PROFILING
diff --git a/pkgs/applications/science/math/singular/redhat-aarch64.patch b/pkgs/applications/science/math/singular/redhat-aarch64.patch
new file mode 100644
index 000000000000..e0db6e87f994
--- /dev/null
+++ b/pkgs/applications/science/math/singular/redhat-aarch64.patch
@@ -0,0 +1,38 @@
+diff --git a/m4/cpu-check.m4 b/m4/cpu-check.m4
+index 3cf0a7f08..12bb926ac 100644
+--- a/m4/cpu-check.m4
++++ b/m4/cpu-check.m4
+@@ -37,6 +37,18 @@ if test "$ac_cv_singcpuname" = ppc; then
+   AC_DEFINE(SI_CPU_PPC,1,"PPC")
+   AC_SUBST(SI_CPU_PPC)
+ fi
++if test "$ac_cv_singcpuname" = arm -o "$ac_cv_singcpuname" = armel; then
++  AC_DEFINE(SI_CPU_ARM,1,"ARM")
++  AC_SUBST(SI_CPU_ARM)
++fi
++if test "$ac_cv_singcpuname" = aarch64; then
++  AC_DEFINE(SI_CPU_AARCH64,1,"AARCH64")
++  AC_SUBST(SI_CPU_AARCH64)
++fi
++if test "$ac_cv_singcpuname" = s390; then
++  AC_DEFINE(SI_CPU_S390,1,"S390")
++  AC_SUBST(SI_CPU_S390)
++fi
+ 
+ # UNAME and PATH
+ AC_MSG_CHECKING(uname for Singular)
+@@ -65,6 +77,14 @@ dnl testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache
+   [powerpc*|ppc*], [AC_DEFINE(HAVE_GENERIC_MULT,1,multiplication is fast on the cpu: a*b is with mod otherwise using tables of logartihms)],
+ dnl the following settings seems to be better on arm processors
+   [arm*], [],
++dnl FIXME: need to run some tests
++  [aarch64*], [
++            AC_DEFINE(HAVE_MULT_MOD,1,multiplication is fast on the cpu: a*b is with mod otherwise using tables of logartihms)
++            AC_DEFINE(HAVE_GENERIC_ADD,1,use branch for addition in Z/p otherwise it uses a generic add)
++            AC_DEFINE(HAVE_DIV_MOD,1,division using extend euclidian algorithm otherwise using tables of logartihms)
++            ],
++dnl FIXME: need to run some tests
++  [s390*], [AC_DEFINE(HAVE_GENERIC_ADD,1,use branch for addition in Z/p otherwise it uses a generic add)],
+   []
+ )
+ 
diff --git a/pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch b/pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch
new file mode 100644
index 000000000000..f664378617cf
--- /dev/null
+++ b/pkgs/applications/science/math/singular/use-older-ax-prog-cc-for-build.patch
@@ -0,0 +1,194 @@
+diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4
+index f7410d74b..12cb005a5 100644
+--- a/m4/ax_prog_cc_for_build.m4
++++ b/m4/ax_prog_cc_for_build.m4
+@@ -32,35 +32,31 @@
+ #   and this notice are preserved. This file is offered as-is, without any
+ #   warranty.
+ 
+-#serial 18
++#serial 9
+ 
+ AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
+ AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_CPP])dnl
+-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
++AC_REQUIRE([AC_EXEEXT])dnl
++AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ 
+ dnl Use the standard macros, but make them use other variable names
+ dnl
+ pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
+-pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl
+ pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
+ pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
+ pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
+ pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
+-pushdef([ac_cv_c_compiler_gnu], ac_cv_build_c_compiler_gnu)dnl
+ pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
+ pushdef([ac_cv_objext], ac_cv_build_objext)dnl
+ pushdef([ac_exeext], ac_build_exeext)dnl
+ pushdef([ac_objext], ac_build_objext)dnl
+ pushdef([CC], CC_FOR_BUILD)dnl
+ pushdef([CPP], CPP_FOR_BUILD)dnl
+-pushdef([GCC], GCC_FOR_BUILD)dnl
+ pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
+ pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
+-pushdef([EXEEXT], BUILD_EXEEXT)dnl
+ pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
+-pushdef([OBJEXT], BUILD_OBJEXT)dnl
+ pushdef([host], build)dnl
+ pushdef([host_alias], build_alias)dnl
+ pushdef([host_cpu], build_cpu)dnl
+@@ -71,29 +67,27 @@ pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
+ pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
+ pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
+ pushdef([ac_cv_host_os], ac_cv_build_os)dnl
+-pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl
+-pushdef([am_cv_CC_dependencies_compiler_type], am_cv_build_CC_dependencies_compiler_type)dnl
+-pushdef([am_cv_prog_cc_c_o], am_cv_build_prog_cc_c_o)dnl
+-pushdef([cross_compiling], cross_compiling_build)dnl
++pushdef([ac_cpp], ac_build_cpp)dnl
++pushdef([ac_compile], ac_build_compile)dnl
++pushdef([ac_link], ac_build_link)dnl
+ 
+-cross_compiling_build=no
++save_cross_compiling=$cross_compiling
++save_ac_tool_prefix=$ac_tool_prefix
++cross_compiling=no
++ac_tool_prefix=
+ 
+-ac_build_tool_prefix=
+-AS_IF([test -n "$build"],      [ac_build_tool_prefix="$build-"],
+-      [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"])
+-
+-AC_LANG_PUSH([C])
+ AC_PROG_CC
+-_AC_COMPILER_EXEEXT
+-_AC_COMPILER_OBJEXT
+ AC_PROG_CPP
++AC_EXEEXT
++
++ac_tool_prefix=$save_ac_tool_prefix
++cross_compiling=$save_cross_compiling
+ 
+ dnl Restore the old definitions
+ dnl
+-popdef([cross_compiling])dnl
+-popdef([am_cv_prog_cc_c_o])dnl
+-popdef([am_cv_CC_dependencies_compiler_type])dnl
+-popdef([ac_tool_prefix])dnl
++popdef([ac_link])dnl
++popdef([ac_compile])dnl
++popdef([ac_cpp])dnl
+ popdef([ac_cv_host_os])dnl
+ popdef([ac_cv_host_vendor])dnl
+ popdef([ac_cv_host_cpu])dnl
+@@ -104,33 +98,25 @@ popdef([host_vendor])dnl
+ popdef([host_cpu])dnl
+ popdef([host_alias])dnl
+ popdef([host])dnl
+-popdef([OBJEXT])dnl
+ popdef([LDFLAGS])dnl
+-popdef([EXEEXT])dnl
+ popdef([CPPFLAGS])dnl
+ popdef([CFLAGS])dnl
+-popdef([GCC])dnl
+ popdef([CPP])dnl
+ popdef([CC])dnl
+ popdef([ac_objext])dnl
+ popdef([ac_exeext])dnl
+ popdef([ac_cv_objext])dnl
+ popdef([ac_cv_exeext])dnl
+-popdef([ac_cv_c_compiler_gnu])dnl
+ popdef([ac_cv_prog_cc_g])dnl
+ popdef([ac_cv_prog_cc_cross])dnl
+ popdef([ac_cv_prog_cc_works])dnl
+-popdef([ac_cv_prog_cc_c89])dnl
+ popdef([ac_cv_prog_gcc])dnl
+ popdef([ac_cv_prog_CPP])dnl
+ 
+-dnl restore global variables ac_ext, ac_cpp, ac_compile,
+-dnl ac_link, ac_compiler_gnu (dependant on the current
+-dnl language after popping):
+-AC_LANG_POP([C])
+-
+ dnl Finally, set Makefile variables
+ dnl
++BUILD_EXEEXT=$ac_build_exeext
++BUILD_OBJEXT=$ac_build_objext
+ AC_SUBST(BUILD_EXEEXT)dnl
+ AC_SUBST(BUILD_OBJEXT)dnl
+ AC_SUBST([CFLAGS_FOR_BUILD])dnl
+diff --git a/m4/ax_prog_cxx_for_build.m4 b/m4/ax_prog_cxx_for_build.m4
+index 4d976769f..17c19a89f 100644
+--- a/m4/ax_prog_cxx_for_build.m4
++++ b/m4/ax_prog_cxx_for_build.m4
+@@ -31,7 +31,7 @@
+ #   and this notice are preserved. This file is offered as-is, without any
+ #   warranty.
+ 
+-#serial 4
++#serial 3
+ 
+ AU_ALIAS([AC_PROG_CXX_FOR_BUILD], [AX_PROG_CXX_FOR_BUILD])
+ AC_DEFUN([AX_PROG_CXX_FOR_BUILD], [dnl
+@@ -49,7 +49,6 @@ pushdef([ac_cv_prog_cxx_cross], ac_cv_build_prog_cxx_cross)dnl
+ pushdef([ac_cv_prog_cxx_g], ac_cv_build_prog_cxx_g)dnl
+ pushdef([CXX], CXX_FOR_BUILD)dnl
+ pushdef([CXXCPP], CXXCPP_FOR_BUILD)dnl
+-pushdef([GXX], GXX_FOR_BUILD)dnl
+ pushdef([CXXFLAGS], CXXFLAGS_FOR_BUILD)dnl
+ pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
+ pushdef([CXXCPPFLAGS], CXXCPPFLAGS_FOR_BUILD)dnl
+@@ -63,25 +62,26 @@ pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
+ pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
+ pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
+ pushdef([ac_cv_host_os], ac_cv_build_os)dnl
+-pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl
+-pushdef([am_cv_CXX_dependencies_compiler_type], am_cv_build_CXX_dependencies_compiler_type)dnl
+-pushdef([cross_compiling], cross_compiling_build)dnl
++pushdef([ac_cxxcpp], ac_build_cxxcpp)dnl
++pushdef([ac_compile], ac_build_compile)dnl
++pushdef([ac_link], ac_build_link)dnl
+ 
+-cross_compiling_build=no
++save_cross_compiling=$cross_compiling
++save_ac_tool_prefix=$ac_tool_prefix
++cross_compiling=no
++ac_tool_prefix=
+ 
+-ac_build_tool_prefix=
+-AS_IF([test -n "$build"],      [ac_build_tool_prefix="$build-"],
+-      [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"])
+-
+-AC_LANG_PUSH([C++])
+ AC_PROG_CXX
+ AC_PROG_CXXCPP
+ 
++ac_tool_prefix=$save_ac_tool_prefix
++cross_compiling=$save_cross_compiling
++
+ dnl Restore the old definitions
+ dnl
+-popdef([cross_compiling])dnl
+-popdef([am_cv_CXX_dependencies_compiler_type])dnl
+-popdef([ac_tool_prefix])dnl
++popdef([ac_link])dnl
++popdef([ac_compile])dnl
++popdef([ac_cxxcpp])dnl
+ popdef([ac_cv_host_os])dnl
+ popdef([ac_cv_host_vendor])dnl
+ popdef([ac_cv_host_cpu])dnl
+@@ -103,10 +103,6 @@ popdef([ac_cv_prog_cxx_works])dnl
+ popdef([ac_cv_prog_gxx])dnl
+ popdef([ac_cv_prog_CXXCPP])dnl
+ 
+-dnl restore global variables (dependant on the current
+-dnl language after popping):
+-AC_LANG_POP([C++])
+-
+ dnl Finally, set Makefile variables
+ dnl
+ AC_SUBST([CXXFLAGS_FOR_BUILD])dnl
diff --git a/pkgs/applications/version-management/subversion/CVE-2020-17525.patch b/pkgs/applications/version-management/subversion/CVE-2020-17525.patch
new file mode 100644
index 000000000000..c844c3773e34
--- /dev/null
+++ b/pkgs/applications/version-management/subversion/CVE-2020-17525.patch
@@ -0,0 +1,15 @@
+Patch included in advisory @ https://subversion.apache.org/security/CVE-2020-17525-advisory.txt
+
+--- a/subversion/libsvn_repos/config_file.c
++++ b/subversion/libsvn_repos/config_file.c
+@@ -237,6 +237,10 @@ get_repos_config(svn_stream_t **stream,
+     {
+       /* Search for a repository in the full path. */
+       repos_root_dirent = svn_repos_find_root_path(dirent, scratch_pool);
++      if (repos_root_dirent == NULL)
++        return svn_error_trace(handle_missing_file(stream, checksum, access,
++                                                   url, must_exist,
++                                                   svn_node_none));
+ 
+       /* Attempt to open a repository at repos_root_dirent. */
+       SVN_ERR(svn_repos_open3(&access->repos, repos_root_dirent, NULL,
diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix
index 1f604c44d785..9f780de748e9 100644
--- a/pkgs/applications/version-management/subversion/default.nix
+++ b/pkgs/applications/version-management/subversion/default.nix
@@ -17,7 +17,7 @@ assert javahlBindings -> jdk != null && perl != null;
 
 let
 
-  common = { version, sha256 }: stdenv.mkDerivation (rec {
+  common = { version, sha256, extraPatches ? [ ] }: stdenv.mkDerivation (rec {
     inherit version;
     pname = "subversion";
 
@@ -35,7 +35,7 @@ let
       ++ lib.optional perlBindings perl
       ++ lib.optional saslSupport sasl;
 
-    patches = [ ./apr-1.patch ];
+    patches = [ ./apr-1.patch ] ++ extraPatches;
 
     # We are hitting the following issue even with APR 1.6.x
     # -> https://issues.apache.org/jira/browse/SVN-4813
@@ -118,5 +118,6 @@ in {
   subversion = common {
     version = "1.12.2";
     sha256 = "0wgpw3kzsiawzqk4y0xgh1z93kllxydgv4lsviim45y5wk4bbl1v";
+    extraPatches = [ ./CVE-2020-17525.patch ];
   };
 }
diff --git a/pkgs/applications/video/jellyfin-media-player/default.nix b/pkgs/applications/video/jellyfin-media-player/default.nix
index 10a3a8cc174b..829cc4835eac 100644
--- a/pkgs/applications/video/jellyfin-media-player/default.nix
+++ b/pkgs/applications/video/jellyfin-media-player/default.nix
@@ -26,18 +26,18 @@
 
 mkDerivation rec {
   pname = "jellyfin-media-player";
-  version = "1.4.1";
+  version = "1.5.0";
 
   src = fetchFromGitHub {
     owner = "jellyfin";
     repo = "jellyfin-media-player";
     rev = "v${version}";
-    sha256 = "sha256-500Qlxpqkf+9D/jrzkrYkkFwxs0soLG/I5mgFV1UOc8=";
+    sha256 = "sha256-A3vo6678XFUV2RN1lcGYbIjCbBjR1oeORcidKZVnImg=";
   };
 
   jmpDist = fetchzip {
-    url = "https://github.com/iwalton3/jellyfin-web-jmp/releases/download/jwc-10.7.2-2/dist.zip";
-    sha256 = "sha256-9oxOcSCV1Gm8WLpwVLanyUlhPx5PWUrkkWvKmwND94g=";
+    url = "https://github.com/iwalton3/jellyfin-web-jmp/releases/download/jwc-10.7.2-3/dist.zip";
+    sha256 = "sha256-Rb0q3NFmnYkueq0JkIWkX0C/oL+gFrNOELCNfh9X/P4=";
   };
 
   patches = [
diff --git a/pkgs/applications/video/simplescreenrecorder/default.nix b/pkgs/applications/video/simplescreenrecorder/default.nix
index 939ae7c44400..14575a88dc17 100644
--- a/pkgs/applications/video/simplescreenrecorder/default.nix
+++ b/pkgs/applications/video/simplescreenrecorder/default.nix
@@ -1,14 +1,16 @@
-{ lib, stdenv, mkDerivation, fetchurl, alsaLib, ffmpeg_3, libjack2, libX11, libXext, qtx11extras
-, libXfixes, libGLU, libGL, pkg-config, libpulseaudio, qtbase, cmake, ninja
+{ lib, stdenv, mkDerivation, fetchFromGitHub, alsaLib, ffmpeg, libjack2, libX11, libXext, libXinerama, qtx11extras
+, libXfixes, libGLU, libGL, pkg-config, libpulseaudio, libv4l, qtbase, qttools, cmake, ninja
 }:
 
 mkDerivation rec {
   pname = "simplescreenrecorder";
-  version = "0.3.11";
+  version = "0.4.3";
 
-  src = fetchurl {
-    url = "https://github.com/MaartenBaert/ssr/archive/${version}.tar.gz";
-    sha256 = "0l6irdadqpajvv0dj3ngs1231n559l0y1pykhs2h7526qm4w7xal";
+  src = fetchFromGitHub {
+    owner = "MaartenBaert";
+    repo = "ssr";
+    rev = version;
+    sha256 = "0mrx8wprs8bi42fwwvk6rh634ic9jnn0gkfpd6q9pcawnnbz3vq8";
   };
 
   cmakeFlags = [ "-DWITH_QT5=TRUE" ];
@@ -25,14 +27,14 @@ mkDerivation rec {
 
   nativeBuildInputs = [ pkg-config cmake ninja ];
   buildInputs = [
-    alsaLib ffmpeg_3 libjack2 libX11 libXext libXfixes libGLU libGL
-    libpulseaudio qtbase qtx11extras
+    alsaLib ffmpeg libjack2 libX11 libXext libXfixes libXinerama libGLU libGL
+    libpulseaudio libv4l qtbase qttools qtx11extras
   ];
 
   meta = with lib; {
     description = "A screen recorder for Linux";
     homepage = "https://www.maartenbaert.be/simplescreenrecorder";
-    license = licenses.gpl3;
+    license = licenses.gpl3Plus;
     platforms = [ "x86_64-linux" ];
     maintainers = [ maintainers.goibhniu ];
   };
diff --git a/pkgs/applications/video/simplescreenrecorder/fix-paths.patch b/pkgs/applications/video/simplescreenrecorder/fix-paths.patch
index ba02240ce1f2..9cf634285fcb 100644
--- a/pkgs/applications/video/simplescreenrecorder/fix-paths.patch
+++ b/pkgs/applications/video/simplescreenrecorder/fix-paths.patch
@@ -12,10 +12,19 @@ index 48be48d..5038d4c 100755
 -LD_PRELOAD="$LD_PRELOAD:libssr-glinject.so" "$@"
 +LD_PRELOAD="$LD_PRELOAD:@out@/lib/libssr-glinject.so" "$@"
 diff --git a/src/AV/Input/GLInjectInput.cpp b/src/AV/Input/GLInjectInput.cpp
-index 6b378f8..cbcf82b 100644
+index fc98f31..18f5196 100644
 --- a/src/AV/Input/GLInjectInput.cpp
 +++ b/src/AV/Input/GLInjectInput.cpp
-@@ -96,7 +96,7 @@ void GLInjectInput::SetCapturing(bool capturing) {
+@@ -113,7 +113,7 @@ bool ExecuteDetached(const char* command, const char* working_directory) {
+ 
+ 			// try to execute command
+ 			do {
+-				res = execl("/bin/sh", "/bin/sh", "-c", command, (char*) NULL);
++				res = execl("@sh@", "@sh@", "-c", command, (char*) NULL);
+ 			} while(res == -1 and errno == EINTR);
+ 
+ 			// failed, send feedback
+@@ -207,7 +207,7 @@ void GLInjectInput::SetCapturing(bool capturing) {
  bool GLInjectInput::LaunchApplication(const QString& channel, bool relax_permissions, const QString& command, const QString& working_directory) {
  
  	// prepare command
@@ -24,12 +33,3 @@ index 6b378f8..cbcf82b 100644
  	full_command += "SSR_CHANNEL=\"" + ShellEscape(channel) + "\" ";
  	if(relax_permissions)
  		full_command += "SSR_STREAM_RELAX_PERMISSIONS=1 ";
-@@ -106,7 +106,7 @@ bool GLInjectInput::LaunchApplication(const QString& channel, bool relax_permiss
- 	QStringList args;
- 	args.push_back("-c");
- 	args.push_back(full_command);
--	return QProcess::startDetached("/bin/sh", args, working_directory);
-+	return QProcess::startDetached("@sh@", args, working_directory);
- 
- }
- 
diff --git a/pkgs/applications/video/streamlink/default.nix b/pkgs/applications/video/streamlink/default.nix
index 97607f939fdd..94bd0877a7d1 100644
--- a/pkgs/applications/video/streamlink/default.nix
+++ b/pkgs/applications/video/streamlink/default.nix
@@ -1,30 +1,29 @@
 { lib
-, pythonPackages
+, python3
 , fetchFromGitHub
 , rtmpdump
-, ffmpeg_3
+, ffmpeg
 }:
 
-pythonPackages.buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "streamlink";
-  version = "2.0.0";
-  disabled = pythonPackages.pythonOlder "3.5.0";
+  version = "2.1.1";
 
   src = fetchFromGitHub {
     owner = "streamlink";
     repo = "streamlink";
     rev = version;
-    sha256 = "+W9Nu5Ze08r7IlUZOkkVOz582E1Bbj0a3qIQHwxSmj8=";
+    sha256 = "14vqh4pck3q766qln7c57n9bz8zrlgfqrpkdn8x0ac9zhlhfn1zm";
   };
 
-  checkInputs = with pythonPackages; [
-    pytest
+  checkInputs = with python3.pkgs; [
+    pytestCheckHook
     mock
     requests-mock
     freezegun
   ];
 
-  propagatedBuildInputs = (with pythonPackages; [
+  propagatedBuildInputs = (with python3.pkgs; [
     pycryptodome
     requests
     iso-639
@@ -33,7 +32,11 @@ pythonPackages.buildPythonApplication rec {
     isodate
   ]) ++ [
     rtmpdump
-    ffmpeg_3
+    ffmpeg
+  ];
+
+  disabledTests = [
+    "test_plugin_not_in_removed_list"
   ];
 
   meta = with lib; {
diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index f3d5572750fe..954404e5268f 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -105,6 +105,8 @@ rec {
 
         # systemd
         install -Dm644 ./contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
+        substituteInPlace $out/etc/systemd/system/docker.service --replace /usr/bin/dockerd $out/bin/dockerd
+        install -Dm644 ./contrib/init/systemd/docker.socket $out/etc/systemd/system/docker.socket
       '';
 
       DOCKER_BUILDTAGS = []
@@ -178,6 +180,11 @@ rec {
     '' + optionalString (stdenv.isLinux) ''
       # symlink docker daemon to docker cli derivation
       ln -s ${moby}/bin/dockerd $out/bin/dockerd
+
+      # systemd
+      mkdir -p $out/etc/systemd/system
+      ln -s ${moby}/etc/systemd/system/docker.service $out/etc/systemd/system/docker.service
+      ln -s ${moby}/etc/systemd/system/docker.socket $out/etc/systemd/system/docker.socket
     '' + ''
       # completion (cli)
       installShellCompletion --bash ./contrib/completion/bash/docker
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix
index d01af5dddb83..74c3f0e729db 100644
--- a/pkgs/applications/virtualization/qemu/default.nix
+++ b/pkgs/applications/virtualization/qemu/default.nix
@@ -297,6 +297,9 @@ stdenv.mkDerivation rec {
     qemu-system-i386 = "bin/qemu-system-i386";
   };
 
+  # Builds in ~3h with 2 cores, and ~20m with a big-parallel builder.
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with lib; {
     homepage = "http://www.qemu.org/";
     description = "A generic and open source machine emulator and virtualizer";
diff --git a/pkgs/data/misc/graphs/default.nix b/pkgs/data/misc/graphs/default.nix
index 54b6c16613e8..19438d835665 100644
--- a/pkgs/data/misc/graphs/default.nix
+++ b/pkgs/data/misc/graphs/default.nix
@@ -4,11 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "graphs";
-  version = "20161026";
+  version = "20210214";
 
   src = fetchurl {
-    url = "mirror://sageupstream/${pname}/${pname}-${version}.tar.bz2";
-    sha256 = "0a2b5lly9nifphvknz88rrhfbbc8vqnlqcv19zdpfq8h8nnyjbb2";
+    url = "https://mirrors.mit.edu/sage/spkg/upstream/${pname}/${pname}-${version}.tar.bz2";
+    # TODO: switch to the url below once Sage 9.3 is released
+    # url = "mirror://sageupstream/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-ByN8DZhTYRUFw4n9e7klAMh0P1YxurtND0Xf2DMvN0E=";
   };
 
   installPhase = ''
diff --git a/pkgs/data/themes/qogir/default.nix b/pkgs/data/themes/qogir/default.nix
index 3f87473a4a15..a1011fa0a159 100644
--- a/pkgs/data/themes/qogir/default.nix
+++ b/pkgs/data/themes/qogir/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "qogir-theme";
-  version = "2021-02-09";
+  version = "2021-04-20";
 
   src = fetchFromGitHub {
     owner = "vinceliuice";
     repo = pname;
     rev = version;
-    sha256 = "1pilq939bqzxysw4ixd279c49bp7l74bykpprrhgc5f2klpjg1zn";
+    sha256 = "17ajrg5safnb6b1jbwvnysc4rvl6gkpnqdf89bammlrpkj6fr3ip";
   };
 
   buildInputs = [ gdk-pixbuf librsvg ];
diff --git a/pkgs/development/coq-modules/coqhammer/default.nix b/pkgs/development/coq-modules/coqhammer/default.nix
index 89aa8d74e85c..93582745564e 100644
--- a/pkgs/development/coq-modules/coqhammer/default.nix
+++ b/pkgs/development/coq-modules/coqhammer/default.nix
@@ -5,18 +5,27 @@ with lib; mkCoqDerivation {
   pname = "coqhammer";
   owner = "lukaszcz";
   defaultVersion = with versions; switch coq.coq-version [
-    { case = "8.12"; out = "1.3-coq8.12"; }
-    { case = "8.11"; out = "1.3-coq8.11"; }
-    { case = "8.10"; out = "1.3-coq8.10"; }
+    { case = "8.13"; out = "1.3.1-coq8.13"; }
+    { case = "8.12"; out = "1.3.1-coq8.12"; }
+    { case = "8.11"; out = "1.3.1-coq8.11"; }
+    { case = "8.10"; out = "1.3.1-coq8.10"; }
     { case = "8.9";  out = "1.1.1-coq8.9"; }
     { case = "8.8";  out = "1.1-coq8.8"; }
   ] null;
+  release."1.3.1-coq8.13".sha256 = "033j6saw24anb1lqbgsg1zynxi2rnxq7pgqwh11k8r8y3xisz78w";
+  release."1.3.1-coq8.12".sha256 = "0xy3vy4rv8w5ydwb9nq8y4dcimd91yr0hak2j4kn02svssg1kv1y";
+  release."1.3.1-coq8.11".sha256 = "0i9nlcayq0ac95vc09d1w8sd221gdjs0g215n086qscqjwimnz8j";
+  release."1.3.1-coq8.10".sha256 = "0aq9qwqx680lkidhb77fmyq403rvfcdxch849x1pzy6a48rz5yra";
   release."1.3-coq8.12".sha256   = "1q1y3cwhd98pkm98g71fsdjz85bfwgcz2xn7s7wwmiraifv5l6z8";
   release."1.3-coq8.11".sha256   = "08zf8qfna7b9p2myfaz4g7bas3a1q1156x78n5isqivlnqfrjc1b";
   release."1.3-coq8.10".sha256   = "1fj8497ir4m79hyrmmmmrag01001wrby0h24wv6525vz0w5py3cd";
   release."1.1.1-coq8.9".sha256  = "1knjmz4hr8vlp103j8n4fyb2lfxysnm512gh3m2kp85n6as6fvb9";
   release."1.1-coq8.8".sha256    = "0ms086wp4jmrzyglb8wymchzyflflk01nsfsk4r6qv8rrx81nx9h";
 
+  release."1.3.1-coq8.13".version  = "1.3.1";
+  release."1.3.1-coq8.12".version  = "1.3.1";
+  release."1.3.1-coq8.11".version  = "1.3.1";
+  release."1.3.1-coq8.10".version  = "1.3.1";
   release."1.3-coq8.12".version  = "1.3";
   release."1.3-coq8.11".version  = "1.3";
   release."1.3-coq8.10".version  = "1.3";
diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix
index d6fbb97014d7..7fd7b2fbbdda 100644
--- a/pkgs/development/libraries/aws-sdk-cpp/default.nix
+++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix
@@ -63,6 +63,9 @@ stdenv.mkDerivation rec {
     ./cmake-dirs.patch
   ];
 
+  # Builds in 2+h with 2 cores, and ~10m with a big-parallel builder.
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with lib; {
     description = "A C++ interface for Amazon Web Services";
     homepage = "https://github.com/awslabs/aws-sdk-cpp";
diff --git a/pkgs/development/libraries/cimg/default.nix b/pkgs/development/libraries/cimg/default.nix
index 9c89279cd51f..f70513e0cd00 100644
--- a/pkgs/development/libraries/cimg/default.nix
+++ b/pkgs/development/libraries/cimg/default.nix
@@ -1,28 +1,33 @@
-{ lib, stdenv, fetchFromGitHub }:
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
 
 stdenv.mkDerivation rec {
   pname = "cimg";
-  version = "2.9.6";
+  version = "2.9.7";
 
   src = fetchFromGitHub {
     owner = "dtschump";
     repo = "CImg";
     rev = "v.${version}";
-    sha256 = "sha256-RdOfog5FOw5XESyDFX68Lb2MUyCeUuPaq/0UVNTjNKo=";
+    sha256 = "sha256-cR2wvGtomT1cZh8wKMCfYDNuP3d1gKhHJavVnvuQ8Mc=";
   };
 
   installPhase = ''
+    runHook preInstall
     install -dm 755 $out/include/CImg/plugins $doc/share/doc/cimg/examples
-
     install -m 644 CImg.h $out/include/
     cp -dr --no-preserve=ownership examples/* $doc/share/doc/cimg/examples/
     cp -dr --no-preserve=ownership plugins/* $out/include/CImg/plugins/
     cp README.txt $doc/share/doc/cimg/
+    runHook postInstall
   '';
 
   outputs = [ "out" "doc" ];
 
   meta = with lib; {
+    homepage = "http://cimg.eu/";
     description = "A small, open source, C++ toolkit for image processing";
     longDescription = ''
       CImg stands for Cool Image. It is easy to use, efficient and is intended
@@ -30,7 +35,6 @@ stdenv.mkDerivation rec {
       C++. Due to its generic conception, it can cover a wide range of image
       processing applications.
     '';
-    homepage = "http://cimg.eu/";
     license = licenses.cecill-c;
     maintainers = [ maintainers.AndersonTorres ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/eclib/default.nix b/pkgs/development/libraries/eclib/default.nix
index a8697207ed1a..4709441a1011 100644
--- a/pkgs/development/libraries/eclib/default.nix
+++ b/pkgs/development/libraries/eclib/default.nix
@@ -14,7 +14,7 @@ assert withFlint -> flint != null;
 
 stdenv.mkDerivation rec {
   pname = "eclib";
-  version = "20210223"; # upgrade might break the sage interface
+  version = "20190909"; # upgrade might break the sage interface
   # sage tests to run:
   # src/sage/interfaces/mwrank.py
   # src/sage/libs/eclib
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     owner = "JohnCremona";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-xnSw5cdg4PLa0GT/blCYDz/IG5aj+HG2NHSlyCiH9g0=";
+    sha256 = "0y1vdi4120gdw56gg2dn3wh625yr9wpyk3wpbsd25w4lv83qq5da";
   };
   buildInputs = [
     pari
diff --git a/pkgs/development/libraries/ffmpegthumbnailer/default.nix b/pkgs/development/libraries/ffmpegthumbnailer/default.nix
index 2e68dbb1d120..dfdbf8eb2f80 100644
--- a/pkgs/development/libraries/ffmpegthumbnailer/default.nix
+++ b/pkgs/development/libraries/ffmpegthumbnailer/default.nix
@@ -1,4 +1,4 @@
-{ fetchFromGitHub, lib, stdenv, ffmpeg_3, cmake, libpng, pkg-config, libjpeg
+{ fetchFromGitHub, lib, stdenv, ffmpeg, cmake, libpng, pkg-config, libjpeg
 }:
 
 stdenv.mkDerivation rec {
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ ffmpeg_3 libpng libjpeg ];
+  buildInputs = [ ffmpeg libpng libjpeg ];
   cmakeFlags = [ "-DENABLE_THUMBNAILER=ON" ];
 
   meta = with lib;  {
diff --git a/pkgs/development/libraries/flint/default.nix b/pkgs/development/libraries/flint/default.nix
index 2c540d130087..0adaa2fe5e74 100644
--- a/pkgs/development/libraries/flint/default.nix
+++ b/pkgs/development/libraries/flint/default.nix
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
     inherit version;
     description = "Fast Library for Number Theory";
     license = lib.licenses.gpl2Plus;
-    maintainers = [lib.maintainers.raskin];
+    maintainers = lib.teams.sage.members;
     platforms = lib.platforms.unix;
     homepage = "http://www.flintlib.org/";
     downloadPage = "http://www.flintlib.org/downloads.html";
diff --git a/pkgs/development/libraries/ftgl/default.nix b/pkgs/development/libraries/ftgl/default.nix
index 5588e27356f0..466ffcbb73a0 100644
--- a/pkgs/development/libraries/ftgl/default.nix
+++ b/pkgs/development/libraries/ftgl/default.nix
@@ -1,28 +1,42 @@
 { lib
 , stdenv
-, fetchurl
+, fetchFromGitHub
+, autoreconfHook
+, doxygen
+, freeglut
 , freetype
+, GLUT
 , libGL
 , libGLU
 , OpenGL
+, pkg-config
 }:
 
 stdenv.mkDerivation rec {
   pname = "ftgl";
-  version = "2.1.3-rc5";
+  version = "2.4.0";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/${pname}-${version}.tar.gz";
-    hash = "sha256-VFjWISJFSGlXLTn4qoV0X8BdVRgAG876Y71su40mVls=";
+  src = fetchFromGitHub {
+    owner = "frankheckenbach";
+    repo = "ftgl";
+    rev = "v${version}";
+    hash = "sha256-6TDNGoMeBLnucmHRgEDIVWcjlJb7N0sTluqBwRMMWn4=";
   };
 
+  nativeBuildInputs = [
+    autoreconfHook
+    doxygen
+    pkg-config
+  ];
   buildInputs = [
     freetype
   ] ++ (if stdenv.isDarwin then [
     OpenGL
+    GLUT
   ] else [
     libGL
     libGLU
+    freeglut
   ]);
 
   configureFlags = [
@@ -31,8 +45,13 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  postInstall = ''
+    install -Dm644 src/FTSize.h -t ${placeholder "out"}/include/FTGL
+    install -Dm644 src/FTFace.h -t ${placeholder "out"}/include/FTGL
+  '';
+
   meta = with lib; {
-    homepage = "https://sourceforge.net/apps/mediawiki/ftgl/";
+    homepage = "https://github.com/frankheckenbach/ftgl";
     description = "Font rendering library for OpenGL applications";
     longDescription = ''
       FTGL is a free cross-platform Open Source C++ library that uses Freetype2
@@ -40,7 +59,7 @@ stdenv.mkDerivation rec {
       pixmaps, texture maps, outlines, polygon mesh, and extruded polygon
       rendering modes.
     '';
-    license = licenses.gpl3Plus;
+    license = licenses.mit;
     maintainers = with maintainers; [ AndersonTorres ];
     platforms = platforms.unix;
   };
diff --git a/pkgs/development/libraries/libchewing/default.nix b/pkgs/development/libraries/libchewing/default.nix
index 1436d4bd59dc..c6b7841ca400 100644
--- a/pkgs/development/libraries/libchewing/default.nix
+++ b/pkgs/development/libraries/libchewing/default.nix
@@ -1,20 +1,24 @@
-{ lib, stdenv, fetchurl, sqlite }:
+{ lib, stdenv, fetchFromGitHub, sqlite, cmake }:
 
 stdenv.mkDerivation rec {
   pname = "libchewing";
-  version = "0.5.1";
+  version = "unstable-2020-06-27";
 
-  src = fetchurl {
-    url = "https://github.com/chewing/libchewing/releases/download/v${version}/libchewing-${version}.tar.bz2";
-    sha256 = "0aqp2vqgxczydpn7pxi7r6xf3l1hgl710f0gbi1k8q7s2lscc24p";
+  src = fetchFromGitHub {
+    owner = "chewing";
+    repo = "libchewing";
+    rev = "452f6221fbad90c0706a3963b17e226216e40dd7";
+    sha256 = "sha256-w3/K2O/CU+XVzqzVCYJyq1vLgToN6iIUhJ9J7ia4p9E=";
   };
 
   buildInputs = [ sqlite ];
 
+  nativeBuildInputs = [ cmake ];
+
   meta = with lib; {
     description = "Intelligent Chinese phonetic input method";
     homepage = "http://chewing.im/";
-    license = licenses.lgpl21;
+    license = licenses.lgpl21Only;
     maintainers = [ maintainers.ericsagnes ];
     platforms = platforms.linux;
   };
diff --git a/pkgs/development/libraries/mpfi/default.nix b/pkgs/development/libraries/mpfi/default.nix
index 399c5416d781..db36ed38a953 100644
--- a/pkgs/development/libraries/mpfi/default.nix
+++ b/pkgs/development/libraries/mpfi/default.nix
@@ -1,16 +1,24 @@
-{lib, stdenv, fetchurl, mpfr}:
+{lib, stdenv, fetchurl, autoconf, automake, libtool, texinfo, mpfr}:
 stdenv.mkDerivation rec {
   pname = "mpfi";
   version = "1.5.4";
-  file_nr = "37331";
+  file_nr = "38111";
+
   src = fetchurl {
     # NOTE: the file_nr is whats important here. The actual package name (including the version)
     # is ignored. To find out the correct file_nr, go to https://gforge.inria.fr/projects/mpfi/
     # and click on Download in the section "Latest File Releases".
-    url = "https://gforge.inria.fr/frs/download.php/file/${file_nr}/mpfi-${version}.tar.bz2";
-    sha256 = "sha256-I4PUV7IIxs088uZracTOR0d7Kg2zH77AzUseuqJHGS8=";
+    url = "https://gforge.inria.fr/frs/download.php/file/${file_nr}/mpfi-${version}.tgz";
+    sha256 = "sha256-Ozk4WV1yCvF5c96vcnz8DdQcixbCCtwQOpcPSkOuOlY=";
   };
-  buildInputs = [mpfr];
+
+  nativeBuildInputs = [ autoconf automake libtool texinfo ];
+  buildInputs = [ mpfr ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
   meta = {
     inherit version;
     description = "A multiple precision interval arithmetic library based on MPFR";
diff --git a/pkgs/development/libraries/qhull/default.nix b/pkgs/development/libraries/qhull/default.nix
index 78e111353115..0a6f39e672cd 100644
--- a/pkgs/development/libraries/qhull/default.nix
+++ b/pkgs/development/libraries/qhull/default.nix
@@ -1,13 +1,14 @@
 { lib, stdenv, fetchFromGitHub, cmake }:
 
-stdenv.mkDerivation {
-  name = "qhull-2016.1";
+stdenv.mkDerivation rec {
+  pname = "qhull";
+  version = "2020.2";
 
   src = fetchFromGitHub {
     owner = "qhull";
     repo = "qhull";
-    rev = "5bbc75608c817b50383a0c24c3977cc09d0bbfde";
-    sha256 = "0wrgqc2mih7h8fs9v5jcn9dr56afqi9bgh2w9dcvzvzvxizr9kjj";
+    rev = version;
+    sha256 = "sha256-djUO3qzY8ch29AuhY3Bn1ajxWZ4/W70icWVrxWRAxRc=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/ocaml-modules/dtoa/default.nix b/pkgs/development/ocaml-modules/dtoa/default.nix
index da075f5c7982..44bc5d7498bf 100644
--- a/pkgs/development/ocaml-modules/dtoa/default.nix
+++ b/pkgs/development/ocaml-modules/dtoa/default.nix
@@ -13,7 +13,7 @@ buildDunePackage rec {
     sha256 = "0zkhn0rdq82g6gamsv6nkx6i44s8104nh6jg5xydazl9jl1704xn";
   };
 
-  hardeningDisable = lib.optional stdenv.isDarwin "strictoverflow";
+  hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
 
   meta = with lib; {
     homepage = "https://github.com/flowtype/ocaml-dtoa";
diff --git a/pkgs/development/ocaml-modules/h2/default.nix b/pkgs/development/ocaml-modules/h2/default.nix
new file mode 100644
index 000000000000..dd96e0ecc441
--- /dev/null
+++ b/pkgs/development/ocaml-modules/h2/default.nix
@@ -0,0 +1,59 @@
+{ buildDunePackage
+, lib
+, fetchFromGitHub
+, ocaml
+, hpack
+, angstrom
+, faraday
+, base64
+, psq
+, httpaf
+, alcotest
+, yojson
+, hex
+}:
+
+let
+  http2-frame-test-case = fetchFromGitHub {
+    owner = "http2jp";
+    repo = "http2-frame-test-case";
+    rev = "5c67db0d4d68e1fb7d3a241d6e01fc04d981f465";
+    sha256 = "16yyb37f8mk9saw7ndjs5is67yq7qa6b6y7k0c75ibxi4n9aw1r3";
+  };
+in
+
+buildDunePackage rec {
+  pname = "h2";
+
+  inherit (hpack)
+    version
+    src
+    useDune2
+    ;
+
+  minimumOCamlVersion = "4.06";
+
+  propagatedBuildInputs = [
+    angstrom
+    faraday
+    base64
+    psq
+    hpack
+    httpaf
+  ];
+
+  # Tests fail with 4.06
+  doCheck = lib.versionAtLeast ocaml.version "4.07";
+  preCheck = ''
+    ln -s "${http2-frame-test-case}" lib_test/http2-frame-test-case
+  '';
+  checkInputs = [
+    alcotest
+    yojson
+    hex
+  ];
+
+  meta = hpack.meta // {
+    description = "A high-performance, memory-efficient, and scalable HTTP/2 library for OCaml";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/hpack/default.nix b/pkgs/development/ocaml-modules/hpack/default.nix
new file mode 100644
index 000000000000..ec967312b874
--- /dev/null
+++ b/pkgs/development/ocaml-modules/hpack/default.nix
@@ -0,0 +1,37 @@
+{ buildDunePackage
+, lib
+, fetchurl
+, angstrom
+, faraday
+}:
+
+buildDunePackage rec {
+  pname = "hpack";
+  version = "0.8.0";
+
+  src = fetchurl {
+    url = "https://github.com/anmonteiro/ocaml-h2/releases/download/${version}/h2-${version}.tbz";
+    sha256 = "0qcn3yvyz0h419fjg9nb20csfmwmh3ihz0zb0jfzdycf5w4mlry6";
+  };
+
+  useDune2 = true;
+  minimumOCamlVersion = "4.04";
+
+  propagatedBuildInputs = [
+    angstrom
+    faraday
+  ];
+
+  # circular dependency
+  doCheck = false;
+
+  meta = {
+    license = lib.licenses.bsd3;
+    description = "An HPACK (Header Compression for HTTP/2) implementation in OCaml";
+    homepage = "https://github.com/anmonteiro/ocaml-h2";
+    maintainers = with lib.maintainers; [
+      sternenseemann
+      anmonteiro
+    ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/letsencrypt/default.nix b/pkgs/development/ocaml-modules/letsencrypt/default.nix
new file mode 100644
index 000000000000..b3c0d4f89412
--- /dev/null
+++ b/pkgs/development/ocaml-modules/letsencrypt/default.nix
@@ -0,0 +1,84 @@
+{ buildDunePackage
+, lib
+, fetchurl
+, astring
+, asn1-combinators
+, uri
+, rresult
+, base64
+, cmdliner
+, cohttp
+, cohttp-lwt
+, cohttp-lwt-unix
+, zarith
+, logs
+, fmt
+, lwt
+, mirage-crypto
+, mirage-crypto-pk
+, mirage-crypto-rng
+, x509
+, yojson
+, ounit
+, dns
+, dns-tsig
+, ptime
+, bos
+, fpath
+, randomconv
+, domain-name
+}:
+
+buildDunePackage rec {
+  pname = "letsencrypt";
+  version = "0.2.4";
+
+  src = fetchurl {
+    url = "https://github.com/mmaker/ocaml-letsencrypt/releases/download/v${version}/letsencrypt-v${version}.tbz";
+    sha256 = "91c79828a50243804da29c17563c54d2d528a79207e5b874dce6a3e7fedf7567";
+  };
+
+  minimumOCamlVersion = "4.08";
+  useDune2 = true;
+
+  buildInputs = [
+    cmdliner
+    cohttp
+    cohttp-lwt-unix
+    zarith
+    fmt
+    mirage-crypto-rng
+    ptime
+    bos
+    fpath
+    randomconv
+    domain-name
+  ];
+
+  propagatedBuildInputs = [
+    logs
+    yojson
+    lwt
+    base64
+    mirage-crypto
+    mirage-crypto-pk
+    asn1-combinators
+    x509
+    uri
+    dns
+    dns-tsig
+    rresult
+    astring
+    cohttp-lwt
+  ];
+
+  doCheck = true;
+  checkInputs = [ ounit ];
+
+  meta = {
+    description = "ACME implementation in OCaml";
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.sternenseemann ];
+    homepage = "https://github.com/mmaker/ocaml-letsencrypt";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix
index 2eda6d5f55ea..549838db396c 100644
--- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix
+++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix
@@ -7,11 +7,11 @@ buildDunePackage rec {
   minimumOCamlVersion = "4.08";
 
   pname = "mirage-crypto";
-  version = "0.10.0";
+  version = "0.10.1";
 
   src = fetchurl {
     url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz";
-    sha256 = "20915c53ddb658c53f588c414f13676bc8ad3cd734d9ed909225ea080dd8144d";
+    sha256 = "028e2fc1f0a3e9b06603c6a253ecd043100099bc1c12c0567d8bc46d3781499c";
   };
 
   useDune2 = true;
diff --git a/pkgs/development/ocaml-modules/paf/default.nix b/pkgs/development/ocaml-modules/paf/default.nix
new file mode 100644
index 000000000000..0c91051e2433
--- /dev/null
+++ b/pkgs/development/ocaml-modules/paf/default.nix
@@ -0,0 +1,82 @@
+{ buildDunePackage
+, lib
+, fetchurl
+, fetchpatch
+, mirage-stack
+, mirage-time
+, httpaf
+, tls-mirage
+, mimic
+, cohttp-lwt
+, letsencrypt
+, emile
+, ke
+, bigstringaf
+, domain-name
+, duration
+, faraday
+, ipaddr
+, tls
+, x509
+, lwt
+, logs
+, fmt
+, mirage-crypto-rng
+, tcpip
+, mirage-time-unix
+, ptime
+, uri
+, alcotest-lwt
+}:
+
+buildDunePackage rec {
+  pname = "paf";
+  version = "0.0.1";
+
+  src = fetchurl {
+    url = "https://github.com/dinosaure/paf-le-chien/releases/download/${version}/paf-${version}.tbz";
+    sha256 = "7a794c21ce458bda302553b0f5ac128c067579fbb3b7b8fba9b410446c43e790";
+  };
+
+  useDune2 = true;
+  minimumOCamlVersion = "4.08";
+
+  propagatedBuildInputs = [
+    mirage-stack
+    mirage-time
+    httpaf
+    tls-mirage
+    mimic
+    cohttp-lwt
+    letsencrypt
+    emile
+    ke
+    bigstringaf
+    domain-name
+    ipaddr
+    duration
+    faraday
+    tls
+    x509
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    lwt
+    logs
+    fmt
+    mirage-crypto-rng
+    tcpip
+    mirage-time-unix
+    ptime
+    uri
+    alcotest-lwt
+  ];
+
+  meta = {
+    description = "HTTP/AF and MirageOS";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.sternenseemann ];
+    homepage = "https://github.com/dinosaure/paf-le-chien";
+  };
+}
diff --git a/pkgs/development/python-modules/btrfs/default.nix b/pkgs/development/python-modules/btrfs/default.nix
index adaf1f610e35..ff21d5670d72 100644
--- a/pkgs/development/python-modules/btrfs/default.nix
+++ b/pkgs/development/python-modules/btrfs/default.nix
@@ -1,17 +1,23 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
 }:
 
 buildPythonPackage rec {
   pname = "btrfs";
-  version = "11";
+  version = "12";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "1w92sj47wy53ygz725xr613k32pk5khi0g9lrpp6img871241hrx";
+  src = fetchFromGitHub {
+    owner = "knorrie";
+    repo = "python-btrfs";
+    rev = "v${version}";
+    sha256 = "sha256-ZQSp+pbHABgBTrCwC2YsUUXAf/StP4ny7MEhBgCRqgE=";
   };
 
+  # no tests (in v12)
+  doCheck = false;
+  pythonImportsCheck = [ "btrfs" ];
+
   meta = with lib; {
     description = "Inspect btrfs filesystems";
     homepage = "https://github.com/knorrie/python-btrfs";
diff --git a/pkgs/development/python-modules/cve-bin-tool/default.nix b/pkgs/development/python-modules/cve-bin-tool/default.nix
new file mode 100644
index 000000000000..61ae8976815e
--- /dev/null
+++ b/pkgs/development/python-modules/cve-bin-tool/default.nix
@@ -0,0 +1,83 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, jsonschema
+, plotly
+, pytest
+, pytest-xdist
+, pytest-cov
+, pytest-asyncio
+, beautifulsoup4
+, pyyaml
+, isort
+, py
+, jinja2
+, rpmfile
+, reportlab
+, zstandard
+, rich
+, aiohttp
+, toml
+  # aiohttp[speedups]
+, aiodns
+, brotlipy
+, cchardet
+, pillow
+, pytestCheckHook
+}:
+buildPythonPackage {
+  pname = "cve-bin-tool";
+  version = "unstable-2021-04-15";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "cve-bin-tool";
+    rev = "10cb6fd0baffe35babfde024bc8c70aa58629237";
+    sha256 = "STf0tJBpadBqsbC+MghBai8zahDkrXfLoFRJ+84wvvY=";
+  };
+
+  # Wants to open a sqlite database, access the internet, etc
+  doCheck = false;
+
+  propagatedBuildInputs = [
+    jsonschema
+    plotly
+    pytest
+    pytest-xdist
+    pytest-cov
+    pytest-asyncio
+    beautifulsoup4
+    pyyaml
+    isort
+    py
+    jinja2
+    rpmfile
+    reportlab
+    zstandard
+    rich
+    aiohttp
+    toml
+
+    # aiohttp[speedups]
+    aiodns
+    brotlipy
+    cchardet
+    # needed by brotlipy
+    pillow
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "cve_bin_tool"
+  ];
+
+  meta = with lib; {
+    description = "CVE Binary Checker Tool";
+    homepage = "https://github.com/intel/cve-bin-tool";
+    license = licenses.gpl3Only;
+    maintainers = teams.determinatesystems.members;
+  };
+}
diff --git a/pkgs/development/python-modules/karton-mwdb-reporter/default.nix b/pkgs/development/python-modules/karton-mwdb-reporter/default.nix
index 9f4c1ee67099..68b28bffe6fa 100644
--- a/pkgs/development/python-modules/karton-mwdb-reporter/default.nix
+++ b/pkgs/development/python-modules/karton-mwdb-reporter/default.nix
@@ -1,10 +1,8 @@
 { lib
 , buildPythonPackage
-, chardet
 , fetchFromGitHub
 , karton-core
 , mwdblib
-, python
 }:
 
 buildPythonPackage rec {
diff --git a/pkgs/development/python-modules/onnx/default.nix b/pkgs/development/python-modules/onnx/default.nix
index 90683a84f46a..cf1d595d90cd 100644
--- a/pkgs/development/python-modules/onnx/default.nix
+++ b/pkgs/development/python-modules/onnx/default.nix
@@ -8,25 +8,21 @@
 , numpy
 , six
 , typing-extensions
-, typing
-, pytestrunner
-, pytest
+, pytestCheckHook
 , nbval
 , tabulate
 }:
 
 buildPythonPackage rec {
   pname = "onnx";
-  version = "1.8.1";
+  version = "1.9.0";
 
-  # Due to Protobuf packaging issues this build of Onnx with Python 2 gives
-  # errors on import.
-  # Also support for Python 2 will be deprecated from Onnx v1.8.
+  # Python 2 is not supported as of Onnx v1.8
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "9d65c52009a90499f8c25fdfe5acda3ac88efe0788eb1d5f2575a989277145fb";
+    sha256 = "0yjv2axz2vc2ysniwislsp53fsb8f61y1warrr2ppn2d9ijml1d9";
   };
 
   nativeBuildInputs = [ cmake ];
@@ -36,11 +32,10 @@ buildPythonPackage rec {
     numpy
     six
     typing-extensions
-  ] ++ lib.optional (pythonOlder "3.5") [ typing ];
+  ];
 
   checkInputs = [
-    pytestrunner
-    pytest
+    pytestCheckHook
     nbval
     tabulate
   ];
@@ -48,6 +43,9 @@ buildPythonPackage rec {
   postPatch = ''
     chmod +x tools/protoc-gen-mypy.sh.in
     patchShebangs tools/protoc-gen-mypy.sh.in tools/protoc-gen-mypy.py
+
+    substituteInPlace setup.py \
+      --replace "setup_requires.append('pytest-runner')" ""
   '';
 
   preBuild = ''
diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix
index 1436153e1db5..59a8c74f709c 100644
--- a/pkgs/development/python-modules/pytorch/default.nix
+++ b/pkgs/development/python-modules/pytorch/default.nix
@@ -297,6 +297,9 @@ in buildPythonPackage rec {
     install_name_tool -change @rpath/libc10.dylib $lib/lib/libc10.dylib $lib/lib/libshm.dylib
   '';
 
+  # Builds in 2+h with 2 cores, and ~15m with a big-parallel builder.
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with lib; {
     description = "Open source, prototype-to-production deep learning platform";
     homepage    = "https://pytorch.org/";
diff --git a/pkgs/development/python-modules/rpmfile/default.nix b/pkgs/development/python-modules/rpmfile/default.nix
new file mode 100644
index 000000000000..e5d656795c2a
--- /dev/null
+++ b/pkgs/development/python-modules/rpmfile/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools-scm
+}:
+buildPythonPackage rec {
+  pname = "rpmfile";
+  version = "1.0.8";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "e56cfc10e1a7d953b1890d81652a89400c614f4cdd9909464aece434d93c3a3e";
+  };
+
+  # Tests access the internet
+  doCheck = false;
+
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  pythonImportsCheck = [
+    "rpmfile"
+  ];
+
+  meta = with lib; {
+    description = "Read rpm archive files";
+    homepage = "https://github.com/srossross/rpmfile";
+    license = licenses.mit;
+    maintainers = teams.determinatesystems.members;
+  };
+}
diff --git a/pkgs/development/tools/air/default.nix b/pkgs/development/tools/air/default.nix
index c058a3fec238..28cb6bf7a46c 100644
--- a/pkgs/development/tools/air/default.nix
+++ b/pkgs/development/tools/air/default.nix
@@ -2,13 +2,13 @@
 
 buildGoModule rec {
   pname = "air";
-  version = "1.25";
+  version = "1.27.2";
 
   src = fetchFromGitHub {
     owner = "cosmtrek";
     repo = "air";
     rev = "v${version}";
-    sha256 = "sha256-on9Rb+QGFWx7/k9xD+tcaPu6YNaBBkFBHHMSWJbZpWM=";
+    sha256 = "sha256-VQymiDge42JBQwAHfHMF8imBC90uPout0fZRuQVOP5w=";
   };
 
   vendorSha256 = "sha256-B7AgUFjiW3P1dU88u3kswbCQJ7Qq7rgPlX+b+3Pq1L4=";
diff --git a/pkgs/development/tools/analysis/codeql/default.nix b/pkgs/development/tools/analysis/codeql/default.nix
index f62b1a248061..abcd947fa318 100644
--- a/pkgs/development/tools/analysis/codeql/default.nix
+++ b/pkgs/development/tools/analysis/codeql/default.nix
@@ -12,7 +12,7 @@
 
 stdenv.mkDerivation rec {
   pname = "codeql";
-  version = "2.5.0";
+  version = "2.5.2";
 
   dontConfigure = true;
   dontBuild = true;
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   src = fetchzip {
     url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip";
-    sha256 = "sha256-teZ/9+oAEqGmy2S8Q89YDe8lqvAjzV6RWJ5AnfgQ6Mc=";
+    sha256 = "sha256-/Pl9qDzFSL67lBEyHPqy3QfNCXzR510SgM0U8f55Dqg=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/tools/bazelisk/default.nix b/pkgs/development/tools/bazelisk/default.nix
index f9b4c3ea724f..ab73b8cd8f31 100644
--- a/pkgs/development/tools/bazelisk/default.nix
+++ b/pkgs/development/tools/bazelisk/default.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "bazelisk";
-  version = "1.7.5";
+  version = "1.8.0";
 
   src = fetchFromGitHub {
     owner = "bazelbuild";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-jXRTj/7GJO6rSueOmw8aNg69w43lxiDbSeZR802+kws=";
+    sha256 = "sha256-bD04wqmtBgdNlPGXz7/4kYQ97r9EthFfGExxOjt8u7k=";
   };
 
-  vendorSha256 = "sha256-fW7KHsxhBfz947Tg+O5bdtiH6xMeKmLRHX9FWQSyxVQ=";
+  vendorSha256 = "sha256-IkW13y51NhKflAeHLu8k7DxRqYVnfMHSnfFuT6H/flo=";
 
   doCheck = false;
 
diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix
index 00e70c46b2a9..7b9c6bca7e2b 100644
--- a/pkgs/development/tools/build-managers/sbt/default.nix
+++ b/pkgs/development/tools/build-managers/sbt/default.nix
@@ -8,11 +8,11 @@
 
 stdenv.mkDerivation rec {
   pname = "sbt";
-  version = "1.5.0";
+  version = "1.5.1";
 
   src = fetchurl {
     url = "https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz";
-    sha256 = "1dj241cj3v8kzqnz5s499rijpl7wv4rw171swqnc0xza90513pxa";
+    sha256 = "0dsbqipr549awv584fyl227s1gknlpsf5krp990w7w3bbxl3avb7";
   };
 
   postPatch = ''
diff --git a/pkgs/development/tools/go-task/default.nix b/pkgs/development/tools/go-task/default.nix
index 2e8988ec7881..e97819c4343f 100644
--- a/pkgs/development/tools/go-task/default.nix
+++ b/pkgs/development/tools/go-task/default.nix
@@ -2,13 +2,13 @@
 
 buildGoModule rec {
   pname = "go-task";
-  version = "3.4.1";
+  version = "3.4.2";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = "task";
     rev = "v${version}";
-    sha256 = "sha256-r0AHGgv2huMaZfsbK7o4KKJirNeOff1M3jgG8ZUJoiA=";
+    sha256 = "sha256-632ISkBIZJBJpybuiuRHOV3CAJg1rSe3hK+W7hmW2cM=";
   };
 
   vendorSha256 = "sha256-qKjCGZnCts4GfBafSRXR7xTvfJdqK8zjpu01eiyITkU=";
diff --git a/pkgs/development/tools/protoc-gen-go-grpc/default.nix b/pkgs/development/tools/protoc-gen-go-grpc/default.nix
new file mode 100644
index 000000000000..40aa45a30085
--- /dev/null
+++ b/pkgs/development/tools/protoc-gen-go-grpc/default.nix
@@ -0,0 +1,29 @@
+{ buildGoPackage
+, fetchFromGitHub
+, lib
+}:
+
+buildGoPackage rec {
+  pname = "protoc-gen-go-grpc";
+  version = "1.1.0";
+
+  goPackagePath = "google.golang.org/grpc";
+
+  src = fetchFromGitHub {
+    owner = "grpc";
+    repo = "grpc-go";
+    rev = "cmd/protoc-gen-go-grpc/v${version}";
+    sha256 = "14rjb8j6fm07rnns3dpwgkzf3y6rmia6i9n7ns6cldc5mbf7nwi3";
+  };
+
+  subPackages = [ "cmd/protoc-gen-go-grpc" ];
+
+  goDeps = ./deps.nix;
+
+  meta = with lib; {
+    description = "The Go language implementation of gRPC. HTTP/2 based RPC";
+    license = licenses.asl20;
+    maintainers = [ maintainers.raboof ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/protoc-gen-go-grpc/deps.nix b/pkgs/development/tools/protoc-gen-go-grpc/deps.nix
new file mode 100644
index 000000000000..d559989244d9
--- /dev/null
+++ b/pkgs/development/tools/protoc-gen-go-grpc/deps.nix
@@ -0,0 +1,333 @@
+# file generated from go.mod using vgo2nix (https://github.com/nix-community/vgo2nix)
+[
+  {
+    goPackagePath = "cloud.google.com/go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/googleapis/google-cloud-go";
+      rev = "v0.26.0";
+      sha256 = "149v3ci17g6wd2pm18mzcncq5qpl9hwdjnz3rlbn5rfidyn46la1";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/BurntSushi/toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/BurntSushi/toml";
+      rev = "v0.3.1";
+      sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/census-instrumentation/opencensus-proto";
+    fetch = {
+      type = "git";
+      url = "https://github.com/census-instrumentation/opencensus-proto";
+      rev = "v0.2.1";
+      sha256 = "19fcx3sc99i5dsklny6r073z5j20vlwn2xqm6di1q3b1xwchzqfj";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/client9/misspell";
+    fetch = {
+      type = "git";
+      url = "https://github.com/client9/misspell";
+      rev = "v0.3.4";
+      sha256 = "1vwf33wsc4la25zk9nylpbp9px3svlmldkm0bha4hp56jws4q9cs";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/cncf/udpa/go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/cncf/udpa";
+      rev = "5459f2c99403";
+      sha256 = "0i3al193dsp91j7iywqrm6fr56y2sz51ci4vf19mb3j4n2x44gsi";
+      moduleDir = "go";
+    };
+  }
+  {
+    goPackagePath = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev = "v1.1.0";
+      sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/envoyproxy/go-control-plane";
+    fetch = {
+      type = "git";
+      url = "https://github.com/envoyproxy/go-control-plane";
+      rev = "668b12f5399d";
+      sha256 = "0vmhc8ii081x1k2qw4kji7wjyg6l25zp1y6qxi27wq8m341i4rzb";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/envoyproxy/protoc-gen-validate";
+    fetch = {
+      type = "git";
+      url = "https://github.com/envoyproxy/protoc-gen-validate";
+      rev = "v0.1.0";
+      sha256 = "0kxd3wwh3xwqk0r684hsy281xq4y71cd11d4q2hspcjbnlbwh7cy";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/glog";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/glog";
+      rev = "23def4e6c14b";
+      sha256 = "0jb2834rw5sykfr937fxi8hxi2zy80sj2bdn9b3jb4b26ksqng30";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/mock";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/mock";
+      rev = "v1.1.1";
+      sha256 = "0ap8wb6pdl6ccmdb43advjll2ly4sz26wsc3axw0hbrjrybybzgy";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev = "v1.4.2";
+      sha256 = "0m5z81im4nsyfgarjhppayk4hqnrwswr3nix9mj8pff8x9jvcjqw";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/google/go-cmp";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/go-cmp";
+      rev = "v0.5.0";
+      sha256 = "04pzp583p6b32y34c6jygfxarff9qjs39rarvfh6467z24sdd9k4";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/google/uuid";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/uuid";
+      rev = "v1.1.2";
+      sha256 = "1rbpfa0v0ly9sdnixcxhf79swki54ikgm1zkwwkj64p1ws66syqd";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev = "v1.0.0";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/prometheus/client_model";
+    fetch = {
+      type = "git";
+      url = "https://github.com/prometheus/client_model";
+      rev = "14fe0d1b01d4";
+      sha256 = "0zdmk6rbbx39cvfz0r59v2jg5sg9yd02b4pds5n5llgvivi99550";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/objx";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/objx";
+      rev = "v0.1.0";
+      sha256 = "19ynspzjdynbi85xw06mh8ad5j0qa1vryvxjgvbnyrr8rbm4vd8w";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev = "v1.5.1";
+      sha256 = "09r89m1wy4cjv2nps1ykp00qjpi0531r07q3s34hr7m6njk4srkl";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "c2843e01d9a2";
+      sha256 = "01xgxbj5r79nmisdvpq48zfy8pzaaj90bn6ngd4nf33j9ar1dp8r";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/exp";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/exp";
+      rev = "509febef88a4";
+      sha256 = "02isrh39z8znrp5znplzy0dip2gnrl3jm1355raliyvhnhg04j6q";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/lint";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/lint";
+      rev = "d0100b6bd8b3";
+      sha256 = "0b0amr9x4ji66iv9ayfx7zrfx52k1m5g66qfcxkgj80qrb1y2yn7";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "d8887717615a";
+      sha256 = "1wfm6ngxjyj7v5a2dqib6lw8bb2rdnf1kl48diykxjrsddn0s163";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/oauth2";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/oauth2";
+      rev = "d2e6202438be";
+      sha256 = "0wbn75fd10485nb93bm4kqldqifdim5xqy4v7r5sdvimvf3fyhn7";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sync";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sync";
+      rev = "112230192c58";
+      sha256 = "05i2k43j2d0llq768hg5pf3hb2yhfzp9la1w5wp0rsnnzblr0lfn";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "d0b11bdaac8a";
+      sha256 = "18yfsmw622l7gc5sqriv5qmck6903vvhivpzp8i3xfy3z33dybdl";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev = "v0.3.0";
+      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/tools";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/tools";
+      rev = "2c0ae7006135";
+      sha256 = "1lsi2ssxajclj3bciz2a41v1vjv768ja3v6wnbyhxy8xphwkp4fk";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/xerrors";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/xerrors";
+      rev = "9bdfabe68543";
+      sha256 = "1yjfi1bk9xb81lqn85nnm13zz725wazvrx3b50hx19qmwg7a4b0c";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "google.golang.org/appengine";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/appengine";
+      rev = "v1.4.0";
+      sha256 = "06zl7w4sxgdq2pl94wy9ncii6h0z3szl4xpqds0sv3b3wbdlhbnn";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "google.golang.org/genproto";
+    fetch = {
+      type = "git";
+      url = "https://github.com/googleapis/go-genproto";
+      rev = "cb27e3aa2013";
+      sha256 = "0ml73ghqcwbz7ipfk8fnxb5indcml49b5p7vp1fsyny0abyyrmxf";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "google.golang.org/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/protobuf";
+      rev = "v1.25.0";
+      sha256 = "0apfl42x166dh96zfq5kvv4b4ax9xljik6bq1mnvn2240ir3mc23";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/check.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/check.v1";
+      rev = "20d25e280405";
+      sha256 = "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "v2.2.2";
+      sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
+      moduleDir = "";
+    };
+  }
+  {
+    goPackagePath = "honnef.co/go/tools";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dominikh/go-tools";
+      rev = "ea95bdfd59fc";
+      sha256 = "1763nw7pwpzkvzfnm63dgzcgbq9hwmq5l1nffchnhh77vgkaq4ic";
+      moduleDir = "";
+    };
+  }
+]
diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix
index 3e352977d56e..8b7e41ed3bd0 100644
--- a/pkgs/misc/vim-plugins/overrides.nix
+++ b/pkgs/misc/vim-plugins/overrides.nix
@@ -128,15 +128,23 @@ self: super: {
     '';
   });
 
+  completion-buffers = super.completion-buffers.overrideAttrs (old: {
+    dependencies = with self; [ completion-nvim ];
+  });
+
   completion-tabnine = super.completion-tabnine.overrideAttrs (old: {
+    dependencies = with self; [ completion-nvim ];
     buildInputs = [ tabnine ];
-
     postFixup = ''
       mkdir $target/binaries
       ln -s ${tabnine}/bin/TabNine $target/binaries/TabNine_$(uname -s)
     '';
   });
 
+  completion-treesitter = super.completion-treesitter.overrideAttrs (old: {
+    dependencies = with self; [ completion-nvim nvim-treesitter ];
+  });
+
   cpsm = super.cpsm.overrideAttrs (old: {
     buildInputs = [
       python3
@@ -162,11 +170,11 @@ self: super: {
   });
 
   defx-nvim = super.defx-nvim.overrideAttrs (old: {
-    dependencies = with super; [ nvim-yarp ];
+    dependencies = with self; [ nvim-yarp ];
   });
 
   deoplete-fish = super.deoplete-fish.overrideAttrs (old: {
-    dependencies = with super; [ deoplete-nvim vim-fish ];
+    dependencies = with self; [ deoplete-nvim vim-fish ];
   });
 
   deoplete-go = super.deoplete-go.overrideAttrs (old: {
@@ -180,7 +188,7 @@ self: super: {
   });
 
   deoplete-khard = super.deoplete-khard.overrideAttrs (old: {
-    dependencies = [ self.deoplete-nvim ];
+    dependencies = with self; [ deoplete-nvim ];
     passthru.python3Dependencies = ps: [ (ps.toPythonModule khard) ];
     meta = {
       description = "Address-completion for khard via deoplete";
@@ -200,11 +208,11 @@ self: super: {
 
   ensime-vim = super.ensime-vim.overrideAttrs (old: {
     passthru.python3Dependencies = ps: with ps; [ sexpdata websocket_client ];
-    dependencies = with super; [ vimproc-vim vimshell-vim super.self forms ];
+    dependencies = with self; [ vimproc-vim vimshell-vim self.self forms ];
   });
 
   forms = super.forms.overrideAttrs (old: {
-    dependencies = with super; [ super.self ];
+    dependencies = with self; [ self.self ];
   });
 
   fruzzy =
@@ -243,7 +251,7 @@ self: super: {
     });
 
   fzf-vim = super.fzf-vim.overrideAttrs (old: {
-    dependencies = [ self.fzfWrapper ];
+    dependencies = with self; [ fzfWrapper ];
   });
 
   # Mainly used as a dependency for fzf-vim. Wraps the fzf program as a vim
@@ -261,6 +269,10 @@ self: super: {
     configurePhase = "cd plugins/nvim";
   });
 
+  gitsigns-nvim = super.gitsigns-nvim.overrideAttrs (old: {
+    dependencies = with self; [ plenary-nvim ];
+  });
+
   jedi-vim = super.jedi-vim.overrideAttrs (old: {
     # checking for python3 support in vim would be neat, too, but nobody else seems to care
     buildInputs = [ python3.pkgs.jedi ];
@@ -320,7 +332,7 @@ self: super: {
   });
 
   lf-vim = super.lf-vim.overrideAttrs (old: {
-    dependencies = with super; [ vim-floaterm ];
+    dependencies = with self; [ vim-floaterm ];
   });
 
   meson = buildVimPluginFrom2Nix {
@@ -339,32 +351,32 @@ self: super: {
   });
 
   ncm2 = super.ncm2.overrideAttrs (old: {
-    dependencies = with super; [ nvim-yarp ];
+    dependencies = with self; [ nvim-yarp ];
   });
 
   ncm2-jedi = super.ncm2-jedi.overrideAttrs (old: {
-    dependencies = with super; [ nvim-yarp ncm2 ];
+    dependencies = with self; [ nvim-yarp ncm2 ];
     passthru.python3Dependencies = ps: with ps; [ jedi ];
   });
 
   ncm2-neoinclude = super.ncm2-neoinclude.overrideAttrs (old: {
-    dependencies = with super; [ neoinclude-vim ];
+    dependencies = with self; [ neoinclude-vim ];
   });
 
   ncm2-neosnippet = super.ncm2-neosnippet.overrideAttrs (old: {
-    dependencies = with super; [ neosnippet-vim ];
+    dependencies = with self; [ neosnippet-vim ];
   });
 
   ncm2-syntax = super.ncm2-syntax.overrideAttrs (old: {
-    dependencies = with super; [ neco-syntax ];
+    dependencies = with self; [ neco-syntax ];
   });
 
   ncm2-ultisnips = super.ncm2-ultisnips.overrideAttrs (old: {
-    dependencies = with super; [ ultisnips ];
+    dependencies = with self; [ ultisnips ];
   });
 
   nvim-lsputils = super.nvim-lsputils.overrideAttrs (old: {
-    dependencies = with super; [ popfix ];
+    dependencies = with self; [ popfix ];
   });
 
   # Usage:
@@ -396,7 +408,7 @@ self: super: {
   };
 
   skim-vim = super.skim-vim.overrideAttrs (old: {
-    dependencies = [ self.skim ];
+    dependencies = with self; [ skim ];
   });
 
   sql-nvim = super.sql-nvim.overrideAttrs (old: {
@@ -436,10 +448,15 @@ self: super: {
     });
 
   telescope-frecency-nvim = super.telescope-frecency-nvim.overrideAttrs (old: {
-    dependencies = [ self.sql-nvim ];
+    dependencies = with self; [ sql-nvim telescope-nvim ];
+  });
+
+  telescope-fzf-writer-nvim = super.telescope-fzf-writer-nvim.overrideAttrs (old: {
+    dependencies = with self; [ telescope-nvim ];
   });
 
   telescope-fzy-native-nvim = super.telescope-fzy-native-nvim.overrideAttrs (old: {
+    dependencies = with self; [ telescope-nvim ];
     preFixup =
       let
         fzy-lua-native-path = "deps/fzy-lua-native";
@@ -463,6 +480,18 @@ self: super: {
     meta.platforms = lib.platforms.all;
   });
 
+  telescope-nvim = super.telescope-nvim.overrideAttrs (old: {
+    dependencies = with self; [ plenary-nvim popup-nvim ];
+  });
+
+  telescope-symbols-nvim = super.telescope-symbols-nvim.overrideAttrs (old: {
+    dependencies = with self; [ telescope-nvim ];
+  });
+
+  telescope-z-nvim = super.telescope-z-nvim.overrideAttrs (old: {
+    dependencies = with self; [ telescope-nvim ];
+  });
+
   unicode-vim =
     let
       unicode-data = fetchurl {
@@ -490,23 +519,23 @@ self: super: {
   });
 
   vim-addon-actions = super.vim-addon-actions.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+    dependencies = with self; [ vim-addon-mw-utils tlib_vim ];
   });
 
   vim-addon-async = super.vim-addon-async.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-signs ];
+    dependencies = with self; [ vim-addon-signs ];
   });
 
   vim-addon-background-cmd = super.vim-addon-background-cmd.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-mw-utils ];
+    dependencies = with self; [ vim-addon-mw-utils ];
   });
 
   vim-addon-completion = super.vim-addon-completion.overrideAttrs (old: {
-    dependencies = with super; [ tlib_vim ];
+    dependencies = with self; [ tlib_vim ];
   });
 
   vim-addon-goto-thing-at-cursor = super.vim-addon-goto-thing-at-cursor.overrideAttrs (old: {
-    dependencies = with super; [ tlib_vim ];
+    dependencies = with self; [ tlib_vim ];
   });
 
   vim-addon-manager = super.vim-addon-manager.overrideAttrs (old: {
@@ -514,11 +543,11 @@ self: super: {
   });
 
   vim-addon-mru = super.vim-addon-mru.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-other vim-addon-mw-utils ];
+    dependencies = with self; [ vim-addon-other vim-addon-mw-utils ];
   });
 
   vim-addon-nix = super.vim-addon-nix.overrideAttrs (old: {
-    dependencies = with super; [
+    dependencies = with self; [
       vim-addon-completion
       vim-addon-goto-thing-at-cursor
       vim-addon-errorformats
@@ -529,23 +558,23 @@ self: super: {
   });
 
   vim-addon-sql = super.vim-addon-sql.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-completion vim-addon-background-cmd tlib_vim ];
+    dependencies = with self; [ vim-addon-completion vim-addon-background-cmd tlib_vim ];
   });
 
   vim-addon-syntax-checker = super.vim-addon-syntax-checker.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+    dependencies = with self; [ vim-addon-mw-utils tlib_vim ];
   });
 
   vim-addon-toggle-buffer = super.vim-addon-toggle-buffer.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+    dependencies = with self; [ vim-addon-mw-utils tlib_vim ];
   });
 
   vim-addon-xdebug = super.vim-addon-xdebug.overrideAttrs (old: {
-    dependencies = with super; [ webapi-vim vim-addon-mw-utils vim-addon-signs vim-addon-async ];
+    dependencies = with self; [ webapi-vim vim-addon-mw-utils vim-addon-signs vim-addon-async ];
   });
 
   vim-bazel = super.vim-bazel.overrideAttrs (old: {
-    dependencies = with super; [ vim-maktaba ];
+    dependencies = with self; [ vim-maktaba ];
   });
 
   vim-beancount = super.vim-beancount.overrideAttrs (old: {
@@ -593,7 +622,7 @@ self: super: {
   });
 
   vim-codefmt = super.vim-codefmt.overrideAttrs (old: {
-    dependencies = with super; [ vim-maktaba ];
+    dependencies = with self; [ vim-maktaba ];
   });
 
   vim-dasht = super.vim-dasht.overrideAttrs (old: {
@@ -604,7 +633,7 @@ self: super: {
   });
 
   vim-easytags = super.vim-easytags.overrideAttrs (old: {
-    dependencies = with super; [ vim-misc ];
+    dependencies = with self; [ vim-misc ];
     patches = [
       (fetchpatch {
         # https://github.com/xolox/vim-easytags/pull/170 fix version detection for universal-ctags
@@ -649,7 +678,7 @@ self: super: {
     });
 
   vim-gist = super.vim-gist.overrideAttrs (old: {
-    dependencies = with super; [ webapi-vim ];
+    dependencies = with self; [ webapi-vim ];
   });
 
   vim-grammarous = super.vim-grammarous.overrideAttrs (old: {
@@ -713,7 +742,7 @@ self: super: {
   });
 
   vim-snipmate = super.vim-snipmate.overrideAttrs (old: {
-    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+    dependencies = with self; [ vim-addon-mw-utils tlib_vim ];
   });
 
   vim-stylish-haskell = super.vim-stylish-haskell.overrideAttrs (old: {
@@ -751,7 +780,7 @@ self: super: {
     pname = "vim2nix";
     version = "1.0";
     src = ./vim2nix;
-    dependencies = with super; [ vim-addon-manager ];
+    dependencies = with self; [ vim-addon-manager ];
   };
 
   vimacs = super.vimacs.overrideAttrs (old: {
@@ -791,7 +820,7 @@ self: super: {
   });
 
   vimshell-vim = super.vimshell-vim.overrideAttrs (old: {
-    dependencies = with super; [ vimproc-vim ];
+    dependencies = with self; [ vimproc-vim ];
   });
 
   YankRing-vim = super.YankRing-vim.overrideAttrs (old: {
diff --git a/pkgs/os-specific/linux/kernel/linux-lqx.nix b/pkgs/os-specific/linux/kernel/linux-lqx.nix
index 8662fbbd18bc..8d0333e8fd6c 100644
--- a/pkgs/os-specific/linux/kernel/linux-lqx.nix
+++ b/pkgs/os-specific/linux/kernel/linux-lqx.nix
@@ -1,7 +1,7 @@
 { lib, fetchFromGitHub, buildLinux, linux_zen, ... } @ args:
 
 let
-  version = "5.11.15";
+  version = "5.11.16";
   suffix = "lqx1";
 in
 
@@ -14,7 +14,7 @@ buildLinux (args // {
     owner = "zen-kernel";
     repo = "zen-kernel";
     rev = "v${version}-${suffix}";
-    sha256 = "1dwibknj4q8cd3mim679mrb4j8yi7p4q9qjcb4rwvw0yzgxmz3lv";
+    sha256 = "1j25r45arikjwyhbr72r1935pr7a8g2j6vshggywdiixvizvrx9b";
   };
 
   extraMeta = {
diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix
index 92aaa9574580..b28400819d53 100644
--- a/pkgs/os-specific/linux/kernel/linux-zen.nix
+++ b/pkgs/os-specific/linux/kernel/linux-zen.nix
@@ -1,7 +1,7 @@
 { lib, fetchFromGitHub, buildLinux, ... } @ args:
 
 let
-  version = "5.11.15";
+  version = "5.11.16";
   suffix = "zen1";
 in
 
@@ -14,7 +14,7 @@ buildLinux (args // {
     owner = "zen-kernel";
     repo = "zen-kernel";
     rev = "v${version}-${suffix}";
-    sha256 = "0n9wm0lpwkqd79112k03lxp4hc898nvs2jjw3hxzggn5wk4i2dz9";
+    sha256 = "0jyicnpqccn194jrm1mc4zq0cil7ls9l57ws3nv783vlk7b0k3gv";
   };
 
   extraMeta = {
diff --git a/pkgs/os-specific/linux/usbip/default.nix b/pkgs/os-specific/linux/usbip/default.nix
index d98559c46001..43c22a8fd12a 100644
--- a/pkgs/os-specific/linux/usbip/default.nix
+++ b/pkgs/os-specific/linux/usbip/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     homepage = "https://github.com/torvalds/linux/tree/master/tools/usb/usbip";
     description = "allows to pass USB device from server to client over the network";
-    license = licenses.gpl2;
+    license = with licenses; [ gpl2Only gpl2Plus ];
     platforms = platforms.linux;
     broken = kernelOlder "4.10";
   };
diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix
index 063964b2f6a6..02c0b4aa5e56 100644
--- a/pkgs/servers/clickhouse/default.nix
+++ b/pkgs/servers/clickhouse/default.nix
@@ -70,6 +70,9 @@ stdenv.mkDerivation rec {
 
   hardeningDisable = [ "format" ];
 
+  # Builds in 7+h with 2 cores, and ~20m with a big-parallel builder.
+  requiredSystemFeatures = [ "big-parallel" ];
+
   meta = with lib; {
     homepage = "https://clickhouse.tech/";
     description = "Column-oriented database management system";
diff --git a/pkgs/servers/jellyfin/10.5.x.nix b/pkgs/servers/jellyfin/10.5.x.nix
deleted file mode 100644
index 9bece72566f8..000000000000
--- a/pkgs/servers/jellyfin/10.5.x.nix
+++ /dev/null
@@ -1,61 +0,0 @@
-{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnetCorePackages, ffmpeg,
-  fontconfig, freetype, nixosTests }:
-
-let
-  os = if stdenv.isDarwin then "osx" else "linux";
-  arch =
-    with stdenv.hostPlatform;
-    if isx86_32 then "x86"
-    else if isx86_64 then "x64"
-    else if isAarch32 then "arm"
-    else if isAarch64 then "arm64"
-    else lib.warn "Unsupported architecture, some image processing features might be unavailable" "unknown";
-  musl = lib.optionalString stdenv.hostPlatform.isMusl
-    (if (arch != "x64")
-      then lib.warn "Some image processing features might be unavailable for non x86-64 with Musl" "musl-"
-      else "musl-");
-  runtimeDir = "${os}-${musl}${arch}";
-
-in stdenv.mkDerivation rec {
-  pname = "jellyfin";
-  version = "10.5.5";
-
-  # Impossible to build anything offline with dotnet
-  src = fetchurl {
-    url = "https://github.com/jellyfin/jellyfin/releases/download/v${version}/jellyfin_${version}_portable.tar.gz";
-    sha256 = "1s3hva1j5w74qc9wyqnmr5clk4smzfi7wvx8qrzrwy81mx7r5w27";
-  };
-
-  nativeBuildInputs = [ unzip ];
-  buildInputs = [
-    makeWrapper
-  ];
-
-  propagatedBuildInputs = [
-    dotnetCorePackages.aspnetcore_3_1
-    sqlite
-  ];
-
-  preferLocalBuild = true;
-
-  installPhase = ''
-    install -dm 755 "$out/opt/jellyfin"
-    cp -r * "$out/opt/jellyfin"
-    makeWrapper "${dotnetCorePackages.aspnetcore_3_1}/bin/dotnet" $out/bin/jellyfin \
-      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
-        sqlite fontconfig freetype stdenv.cc.cc.lib
-      ]}:$out/opt/jellyfin/runtimes/${runtimeDir}/native/" \
-      --add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg"
-  '';
-
-  passthru.tests = {
-    smoke-test = nixosTests.jellyfin;
-  };
-
-  meta =  with lib; {
-    description = "The Free Software Media System";
-    homepage = "https://jellyfin.org/";
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ nyanloutre minijackson ];
-  };
-}
diff --git a/pkgs/servers/simple-http-server/default.nix b/pkgs/servers/simple-http-server/default.nix
new file mode 100644
index 000000000000..d93b4664019e
--- /dev/null
+++ b/pkgs/servers/simple-http-server/default.nix
@@ -0,0 +1,29 @@
+{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "simple-http-server";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "TheWaWaR";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "01a129i1ph3m8k6zkdcqnnkqbhlqpk7qvvdsz2i2kas54csbgsww";
+  };
+
+  cargoSha256 = "050avk6wff8v1dlsfvxwvldmmgfakdxmhglv2bhvc2f3q8cf1d5d";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ];
+
+  # Currently no tests are implemented, so we avoid building the package twice
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Simple HTTP server in Rust";
+    homepage = "https://github.com/TheWaWaR/simple-http-server";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mephistophiles ];
+  };
+}
diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix
index c886173096e1..42252ccbe38c 100644
--- a/pkgs/shells/fish/plugins/default.nix
+++ b/pkgs/shells/fish/plugins/default.nix
@@ -15,6 +15,8 @@ lib.makeScope newScope (self: with self; {
 
   foreign-env = callPackage ./foreign-env { };
 
+  forgit-fish = callPackage ./forgit.nix { };
+
   fzf-fish = callPackage ./fzf-fish.nix { };
 
   pure = callPackage ./pure.nix { };
diff --git a/pkgs/shells/fish/plugins/forgit.nix b/pkgs/shells/fish/plugins/forgit.nix
new file mode 100644
index 000000000000..b905b7a25895
--- /dev/null
+++ b/pkgs/shells/fish/plugins/forgit.nix
@@ -0,0 +1,22 @@
+{ lib, buildFishPlugin, fetchFromGitHub, git, fzf }:
+
+buildFishPlugin rec {
+  pname = "forgit";
+  version = "unstable-2021-04-09";
+
+  buildInputs = [ git fzf ];
+
+  src = fetchFromGitHub {
+    owner = "wfxr";
+    repo = "forgit";
+    rev = "7806fc3ab37ac479c315eb54b164f67ba9ed17ea";
+    sha256 = "sha256-a7wjuqXe3+y5zlgSLk5J31WoORbieFimvtr0FQHRY5M=";
+  };
+
+  meta = with lib; {
+    description = "A utility tool powered by fzf for using git interactively.";
+    homepage = "https://github.com/wfxr/forgit";
+    license = licenses.mit;
+    maintainers = with maintainers; [ happysalada ];
+  };
+}
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix
index 7fa7f2305e84..ac62ad30829a 100644
--- a/pkgs/stdenv/generic/check-meta.nix
+++ b/pkgs/stdenv/generic/check-meta.nix
@@ -203,6 +203,7 @@ let
   metaTypes = with lib.types; rec {
     # These keys are documented
     description = str;
+    mainProgram = str;
     longDescription = str;
     branch = str;
     homepage = either (listOf str) str;
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index 74609412782c..de1b1abd6155 100644
--- a/pkgs/stdenv/generic/make-derivation.nix
+++ b/pkgs/stdenv/generic/make-derivation.nix
@@ -89,6 +89,10 @@ in rec {
 
     , patches ? []
 
+    , __contentAddressed ?
+      (! attrs ? outputHash) # Fixed-output drvs can't be content addressed too
+      && (config.contentAddressedByDefault or false)
+
     , ... } @ attrs:
 
     let
@@ -253,6 +257,12 @@ in rec {
           inherit doCheck doInstallCheck;
 
           inherit outputs;
+        } // lib.optionalAttrs (__contentAddressed) {
+          inherit __contentAddressed;
+          # Provide default values for outputHashMode and outputHashAlgo because
+          # most people won't care about these anyways
+          outputHashAlgo = attrs.outputHashAlgo or "sha256";
+          outputHashMode = attrs.outputHashMode or "recursive";
         } // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
           cmakeFlags =
             (/**/ if lib.isString cmakeFlags then [cmakeFlags]
diff --git a/pkgs/tools/filesystems/avfs/default.nix b/pkgs/tools/filesystems/avfs/default.nix
index 3315085191e1..b4fc7f1e4f6e 100644
--- a/pkgs/tools/filesystems/avfs/default.nix
+++ b/pkgs/tools/filesystems/avfs/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   pname = "avfs";
-  version = "1.1.3";
+  version = "1.1.4";
   src = fetchurl {
     url = "mirror://sourceforge/avf/${version}/${pname}-${version}.tar.bz2";
-    sha256 = "1psh8k7g7rb0gn7aygbjv86kxyi9xq07barxksa99nnmq3lc2kjg";
+    sha256 = "0ax1zbw4pmggx1b784bfabdqyn39k7109cnl22p69y2phnpq2y9s";
   };
 
   nativeBuildInputs = [ pkg-config ];
@@ -21,6 +21,6 @@ stdenv.mkDerivation rec {
     homepage = "http://avf.sourceforge.net/";
     description = "Virtual filesystem that allows browsing of compressed files";
     platforms = lib.platforms.unix;
-    license = lib.licenses.gpl2;
+    license = lib.licenses.gpl2Only;
   };
 }
diff --git a/pkgs/tools/filesystems/btrfs-heatmap/default.nix b/pkgs/tools/filesystems/btrfs-heatmap/default.nix
index 04d74d78cfde..9de91738e74d 100644
--- a/pkgs/tools/filesystems/btrfs-heatmap/default.nix
+++ b/pkgs/tools/filesystems/btrfs-heatmap/default.nix
@@ -2,25 +2,17 @@
 , fetchFromGitHub
 , python3
 , installShellFiles
-, fetchurl
 }:
 
 stdenv.mkDerivation rec {
   pname = "btrfs-heatmap";
-  version = "8";
+  version = "9";
 
   src = fetchFromGitHub {
     owner = "knorrie";
     repo = "btrfs-heatmap";
     rev = "v${version}";
-    sha256 = "035frvk3s7g18y81srssvm550nfq7jylr7w60nvixidxvrc0yrnh";
-  };
-
-  # man page is currently only in the debian branch
-  # https://github.com/knorrie/btrfs-heatmap/issues/11
-  msrc = fetchurl {
-    url = "https://raw.githubusercontent.com/knorrie/btrfs-heatmap/45d844e12d7f5842ebb99e65d7b968a5e1a89066/debian/man/btrfs-heatmap.8";
-    sha256 = "1md7xc426sc8lq4w29gjd6gv7vjqhcwrqqcr6z39kihvi04d5f6q";
+    sha256 = "sha256-yCkuZqWwxrs2eS7EXY6pAOVVVSq7dAMxJtf581gX8vg=";
   };
 
   buildInputs = [ python3 ];
@@ -29,11 +21,15 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "man" ];
 
   installPhase = ''
-    install -Dm 0755 heatmap.py $out/sbin/btrfs-heatmap
-    installManPage ${msrc}
+    runHook preInstall
+
+    install -Dm 0755 btrfs-heatmap $out/sbin/btrfs-heatmap
+    installManPage man/btrfs-heatmap.1
 
     buildPythonPath ${python3.pkgs.btrfs}
     patchPythonScript $out/sbin/btrfs-heatmap
+
+    runHook postInstall
   '';
 
   meta = with lib; {
diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix
index 413fc9de1859..57d5845c9961 100644
--- a/pkgs/tools/filesystems/ceph/default.nix
+++ b/pkgs/tools/filesystems/ceph/default.nix
@@ -198,6 +198,9 @@ in rec {
 
     doCheck = false; # uses pip to install things from the internet
 
+    # Takes 7+h to build with 2 cores.
+    requiredSystemFeatures = [ "big-parallel" ];
+
     meta = getMeta "Distributed storage system";
 
     passthru.version = version;
diff --git a/pkgs/tools/filesystems/gcsfuse/default.nix b/pkgs/tools/filesystems/gcsfuse/default.nix
index e39a3d33dacb..b145d1802a1c 100644
--- a/pkgs/tools/filesystems/gcsfuse/default.nix
+++ b/pkgs/tools/filesystems/gcsfuse/default.nix
@@ -2,13 +2,13 @@
 
 buildGoPackage rec {
   pname = "gcsfuse";
-  version = "0.33.2";
+  version = "0.34.1";
 
   src = fetchFromGitHub {
     owner = "googlecloudplatform";
     repo = "gcsfuse";
     rev = "v${version}";
-    sha256 = "sha256-y40JWfD6selBo2IP7VgASmlNUDhXwOdQIRlRHPi3Nh0=";
+    sha256 = "16ns04g4cvp6lfhkifgib5rxpbcxy8ghhavi3mv1cvxawpmdrxnq";
   };
 
   goPackagePath = "github.com/googlecloudplatform/gcsfuse";
diff --git a/pkgs/tools/graphics/agi/default.nix b/pkgs/tools/graphics/agi/default.nix
index aca53c254619..5fb1881eff9a 100644
--- a/pkgs/tools/graphics/agi/default.nix
+++ b/pkgs/tools/graphics/agi/default.nix
@@ -14,11 +14,11 @@
 
 stdenv.mkDerivation rec {
   pname = "agi";
-  version = "1.1.0-dev-20210421";
+  version = "1.1.0-dev-20210423";
 
   src = fetchzip {
     url = "https://github.com/google/agi-dev-releases/releases/download/v${version}/agi-${version}-linux.zip";
-    sha256 = "sha256-2IgGvQy6omDEwrzQDfa/OLi3f+Q2zarvJVGk6ZhsjSA=";
+    sha256 = "sha256-49ZKqG+CiQkdoBMLdYrN5fMnJH5TtXdUknQLQB2UG04=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/tools/graphics/vips/default.nix b/pkgs/tools/graphics/vips/default.nix
index 333c4848db20..9319fa9b610e 100644
--- a/pkgs/tools/graphics/vips/default.nix
+++ b/pkgs/tools/graphics/vips/default.nix
@@ -27,7 +27,7 @@
 
 stdenv.mkDerivation rec {
   pname = "vips";
-  version = "8.10.5";
+  version = "8.10.6";
 
   outputs = [ "bin" "out" "man" "dev" ];
 
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
     owner = "libvips";
     repo = "libvips";
     rev = "v${version}";
-    sha256 = "sha256-h21Ep6f4/y+m0kdrCA5dcULFeOOyLtMx2etAziG6f9Y=";
+    sha256 = "sha256-hdpkBC76PnPTN+rnNchLVk1CrhcClTtbaWyUcyUtuAk=";
     # Remove unicode file names which leads to different checksums on HFS+
     # vs. other filesystems because of unicode normalisation.
     extraPostFetch = ''
diff --git a/pkgs/tools/misc/castty/default.nix b/pkgs/tools/misc/castty/default.nix
new file mode 100644
index 000000000000..ddda737c8b5b
--- /dev/null
+++ b/pkgs/tools/misc/castty/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, fetchFromGitHub, libsoundio, lame }:
+
+stdenv.mkDerivation {
+  pname = "castty";
+  version = "unstable-2020-11-10";
+
+  src = fetchFromGitHub {
+    owner = "dhobsd";
+    repo = "castty";
+    rev = "333a2bafd96d56cd0bb91577ae5ba0f7d81b3d99";
+    sha256 = "0p84ivwsp8ds4drn0hx2ax04gp0xyq6blj1iqfsmrs4slrajdmqs";
+  };
+
+  buildInputs = [ libsoundio lame ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "CLI tool to record audio-enabled screencasts of your terminal, for the web";
+    homepage = "https://github.com/dhobsd/castty";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ iblech ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/tools/misc/dialog/default.nix b/pkgs/tools/misc/dialog/default.nix
index dca8d9666af5..744f55aed10b 100644
--- a/pkgs/development/tools/misc/dialog/default.nix
+++ b/pkgs/tools/misc/dialog/default.nix
@@ -12,14 +12,16 @@ assert unicodeSupport -> ncurses.unicode && ncurses != null;
 
 stdenv.mkDerivation rec {
   pname = "dialog";
-  version = "1.3-20210306";
+  version = "1.3-20210324";
 
   src = fetchurl {
     url = "ftp://ftp.invisible-island.net/dialog/${pname}-${version}.tgz";
-    hash = "sha256-pz57YHtjX2PAICuzMTEG5wD5H+Sp9NJspwA/brK5yw8=";
+    hash = "sha256-AcLR4umvmwg+ogDKrQhP39pVF41bv05Cyf/0STUVFlM=";
   };
 
-  buildInputs = [ ncurses ];
+  buildInputs = [
+    ncurses
+  ];
 
   configureFlags = [
     "--disable-rpath-hacks"
diff --git a/pkgs/tools/misc/goreleaser/default.nix b/pkgs/tools/misc/goreleaser/default.nix
index 6b92ecc5ef29..77cb54ce58d3 100644
--- a/pkgs/tools/misc/goreleaser/default.nix
+++ b/pkgs/tools/misc/goreleaser/default.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "goreleaser";
-  version = "0.163.1";
+  version = "0.164.0";
 
   src = fetchFromGitHub {
     owner = "goreleaser";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-2SDy/Mk4TkXkJKF1gFW7/FH4Y31TE2X38I0r/Ng/BjU=";
+    sha256 = "sha256-DGiA9Ww/8sHNRgZ7nOx60YVZaxYBH5GJf6KqilwRKrE=";
   };
 
-  vendorSha256 = "sha256-+Qdxnd+IhBNfZ0R2lCfPGJSjpTw1TA6uPjykCfrYtMk=";
+  vendorSha256 = "sha256-y7GesJU2kDtC5S6rnduDX9gcXakNIR8MdLuPW2m1QWs=";
 
   buildFlagsArray = [
     "-ldflags="
diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix
index ad7a74e8137f..29ce5b23faaa 100644
--- a/pkgs/tools/misc/grub/2.0x.nix
+++ b/pkgs/tools/misc/grub/2.0x.nix
@@ -154,5 +154,7 @@ stdenv.mkDerivation rec {
     license = licenses.gpl3Plus;
 
     platforms = platforms.gnu ++ platforms.linux;
+
+    maintainers = [ maintainers.samueldr ];
   };
 })
diff --git a/pkgs/tools/misc/handlr/default.nix b/pkgs/tools/misc/handlr/default.nix
index 978168d36764..baa718c1b1fc 100644
--- a/pkgs/tools/misc/handlr/default.nix
+++ b/pkgs/tools/misc/handlr/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "handlr";
-  version = "0.6.1";
+  version = "0.6.3";
 
   src = fetchFromGitHub {
     owner = "chmln";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0mxkirsicagvfyihcb06g2bsz5h0zp7xc87vldp4amgddzaxhpbg";
+    sha256 = "sha256-OtU6sL2Bbbec0gHxk3bl5Inn+ZmNYiHgpSF0gjDuRSg=";
   };
 
-  cargoSha256 = "11glh6f0cjrq76212h80na2rgwpzjmk0j78y3i98nv203rkrczid";
+  cargoSha256 = "sha256-bX7QWV1R+pLxvghpaV10LeROv4wBVfZhHyrPCIgqETA=";
 
   nativeBuildInputs = [ shared-mime-info ];
 
diff --git a/pkgs/tools/misc/nncp/default.nix b/pkgs/tools/misc/nncp/default.nix
index 2c821c333609..dbc709dd41c1 100644
--- a/pkgs/tools/misc/nncp/default.nix
+++ b/pkgs/tools/misc/nncp/default.nix
@@ -10,11 +10,11 @@
 
 stdenv.mkDerivation rec {
   pname = "nncp";
-  version = "6.3.0";
+  version = "6.4.0";
 
   src = fetchurl {
     url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz";
-    sha256 = "0ss6p91r9sr3q8p8f6mjjc2cspx3fq0q4w44gfxl0da2wc8nmhkn";
+    sha256 = "16xrwhr7avss238k83ih1njl0gfca57ghg360ba9ixlssrb1239x";
   };
 
   nativeBuildInputs = [ go redo-apenwarr ];
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index fa17bea85852..3baad9f939b0 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -18,11 +18,11 @@ buildPythonPackage rec {
   # The websites youtube-dl deals with are a very moving target. That means that
   # downloads break constantly. Because of that, updates should always be backported
   # to the latest stable release.
-  version = "2021.04.07";
+  version = "2021.04.26";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz";
-    sha256 = "02d51l6gdjr3zhhi7ydf5kzv8dv4jzq0ygja7zb2h9k7hnl0l27m";
+    sha256 = "0jpa65jr5djn9175p6a8j9i1zgarshfwfsgmprc0vvnsl3s23ksc";
   };
 
   nativeBuildInputs = [ installShellFiles makeWrapper ];
diff --git a/pkgs/tools/misc/zellij/default.nix b/pkgs/tools/misc/zellij/default.nix
new file mode 100644
index 000000000000..2f5f22193466
--- /dev/null
+++ b/pkgs/tools/misc/zellij/default.nix
@@ -0,0 +1,34 @@
+{ lib, fetchFromGitHub, rustPlatform, stdenv, installShellFiles, libiconv }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "zellij";
+  version = "0.5.1";
+
+  src = fetchFromGitHub {
+    owner = "zellij-org";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "102zw4napzx05rpmx6scl6il55syf3lw1gzmy1y66cg1f70sij4d";
+  };
+
+  cargoSha256 = "121fsch0an6d2hqaq0ws9cm7g5ppzfrycmmhajfacfg6wbiax1m5";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
+
+  preCheck = ''
+    HOME=$TMPDIR
+  '';
+
+  postInstall = ''
+    installShellCompletion assets/completions/zellij.{bash,fish} --zsh assets/completions/_zellij
+  '';
+
+  meta = with lib; {
+    description = "A terminal workspace with batteries included";
+    homepage = "https://zellij.dev/";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ therealansh ];
+  };
+}
diff --git a/pkgs/tools/networking/zerotierone/default.nix b/pkgs/tools/networking/zerotierone/default.nix
index 60da9b3abcbb..4a44843e947b 100644
--- a/pkgs/tools/networking/zerotierone/default.nix
+++ b/pkgs/tools/networking/zerotierone/default.nix
@@ -2,22 +2,22 @@
 
 stdenv.mkDerivation rec {
   pname = "zerotierone";
-  version = "1.6.4";
+  version = "1.6.5";
 
   src = fetchFromGitHub {
     owner = "zerotier";
     repo = "ZeroTierOne";
     rev = version;
-    sha256 = "06b6k1rzqkd7cdl7n0gz5ky48fs2nhn0q2qxx1rww38vbfc7lpmf";
+    sha256 = "0dlnrb59vnxa3pjkgfqd5jil9kl6axh23v0bffi4kx8jwzpdwas8";
   };
 
   preConfigure = ''
-      patchShebangs ./doc/build.sh
-      substituteInPlace ./doc/build.sh \
-        --replace '/usr/bin/ronn' '${buildPackages.ronn}/bin/ronn' \
+    patchShebangs ./doc/build.sh
+    substituteInPlace ./doc/build.sh \
+      --replace '/usr/bin/ronn' '${buildPackages.ronn}/bin/ronn' \
 
-      substituteInPlace ./make-linux.mk \
-        --replace 'armv5' 'armv6'
+    substituteInPlace ./make-linux.mk \
+      --replace 'armv5' 'armv6'
   '';
 
 
diff --git a/pkgs/tools/security/gitleaks/default.nix b/pkgs/tools/security/gitleaks/default.nix
index 685280ab4adb..c47afcd8e0f7 100644
--- a/pkgs/tools/security/gitleaks/default.nix
+++ b/pkgs/tools/security/gitleaks/default.nix
@@ -5,13 +5,13 @@
 
 buildGoModule rec {
   pname = "gitleaks";
-  version = "7.4.0";
+  version = "7.4.1";
 
   src = fetchFromGitHub {
     owner = "zricethezav";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-AY9pOARFAqIOimhcwEyau2MwJCFsWu8I36P7Z0xyJH0=";
+    sha256 = "sha256-GoHntsyxrMzLHlyKC3JxCkLoquIjOtidcG7hTNTYGuI=";
   };
 
   vendorSha256 = "sha256-Cc4DJPpOMHxDcH22S7znYo7QHNRXv8jOJhznu09kaE4=";
diff --git a/pkgs/tools/security/grype/default.nix b/pkgs/tools/security/grype/default.nix
index 5db1f1d20e76..7323d092472f 100644
--- a/pkgs/tools/security/grype/default.nix
+++ b/pkgs/tools/security/grype/default.nix
@@ -6,16 +6,16 @@
 
 buildGoModule rec {
   pname = "grype";
-  version = "0.10.2";
+  version = "0.11.0";
 
   src = fetchFromGitHub {
     owner = "anchore";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-kKzrV2TTO8NmB3x27ZStMZpSIRGwm5Ev+cPGwT50FEU=";
+    sha256 = "sha256-E1tJ9hEJ4GaL+S4dz6aGq3nJPpdtx0/Tfb1RzgJSe8M=";
   };
 
-  vendorSha256 = "sha256-PC2n6+gPDxpG8RTAmCfK4P40yfxqlleYI6Ex4FtPjk4=";
+  vendorSha256 = "sha256-LUyrX/rm01tCPT6Ua6hphhf+4ycNn4tLONRyH3iTrZ4=";
 
   propagatedBuildInputs = [ docker ];
 
diff --git a/pkgs/tools/security/nsjail/001-fix-bison-link-error.patch b/pkgs/tools/security/nsjail/001-fix-bison-link-error.patch
new file mode 100644
index 000000000000..427cea5b02b6
--- /dev/null
+++ b/pkgs/tools/security/nsjail/001-fix-bison-link-error.patch
@@ -0,0 +1,30 @@
+From 8e309a0af0851ab54ca7c6d51b6f3d19ee42c8ee Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos@foutrelis.com>
+Date: Wed, 17 Mar 2021 16:36:40 +0200
+Subject: [PATCH] Replace YYUSE call with void cast in src/parser.y
+
+The YYUSE macro was renamed to YY_USE in bison 3.7.5; we might as well
+avoid using it altogether and cast the unused variable to void instead.
+
+Fixes the following linker error:
+
+/usr/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror':
+arm_syscalls.c:(.text+0x6984): undefined reference to `YYUSE'
+---
+ src/parser.y | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/parser.y b/src/parser.y
+index e0f109c..0e01373 100644
+--- a/kafel/src/parser.y
++++ b/kafel/src/parser.y
+@@ -420,8 +420,8 @@ const_def
+ 
+ void yyerror(YYLTYPE * loc, struct kafel_ctxt* ctxt, yyscan_t scanner,
+              const char *msg) {
++  (void)scanner; /* suppress unused-parameter warning */
+   if (!ctxt->lexical_error) {
+-    YYUSE(scanner);
+     if (loc->filename != NULL) {
+       append_error(ctxt, "%s:%d:%d: %s", loc->filename, loc->first_line, loc->first_column, msg);
+     } else {
diff --git a/pkgs/tools/security/nsjail/default.nix b/pkgs/tools/security/nsjail/default.nix
index d48564ce95b0..568113368a08 100644
--- a/pkgs/tools/security/nsjail/default.nix
+++ b/pkgs/tools/security/nsjail/default.nix
@@ -4,7 +4,7 @@
 
 stdenv.mkDerivation rec {
   pname = "nsjail";
-  version = "3.0";
+  version = "3.0"; # Bumping? Remove the bison patch.
 
   src = fetchFromGitHub {
     owner           = "google";
@@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
   buildInputs = [ libnl protobuf protobufc ];
   enableParallelBuilding = true;
 
+  patches = [
+    # To remove after bumping 3.0
+    ./001-fix-bison-link-error.patch
+  ];
+
   preBuild = ''
     makeFlagsArray+=(USER_DEFINES='-DNEWUIDMAP_PATH=${shadow}/bin/newuidmap -DNEWGIDMAP_PATH=${shadow}/bin/newgidmap')
   '';
diff --git a/pkgs/tools/system/gdu/default.nix b/pkgs/tools/system/gdu/default.nix
index 3b7ef2c88d94..9e522f232039 100644
--- a/pkgs/tools/system/gdu/default.nix
+++ b/pkgs/tools/system/gdu/default.nix
@@ -6,13 +6,13 @@
 
 buildGoModule rec {
   pname = "gdu";
-  version = "4.10.1";
+  version = "4.11.0";
 
   src = fetchFromGitHub {
     owner = "dundee";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-zU4aSvfW1ph9PrXsAErCOedPn4oeeSh8tpnUj5LRlUw=";
+    sha256 = "sha256-E+/Ig6+J7pJ98O+YAntBGERml2ELzkji3gworBdcSVY=";
   };
 
   vendorSha256 = "sha256-QiO5p0x8kmIN6f0uYS0IR2MlWtRYTHeZpW6Nmupjias=";
diff --git a/pkgs/tools/text/fastmod/default.nix b/pkgs/tools/text/fastmod/default.nix
index ba2bedd5eacc..e838e2931c7e 100644
--- a/pkgs/tools/text/fastmod/default.nix
+++ b/pkgs/tools/text/fastmod/default.nix
@@ -6,16 +6,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "fastmod";
-  version = "0.4.1";
+  version = "0.4.2";
 
   src = fetchFromGitHub {
     owner = "facebookincubator";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0nrh6h5imbpl7i0sqqm16x9ggazww5739vng1ay1v6sgbbs0a095";
+    sha256 = "sha256-Lv8hARD/aVWiWpJQmPWPeACpX15+3NogoUl5yh63E7A=";
   };
 
-  cargoSha256 = "18bspi59vfnqijxgipmv2h6h5iy7qynpk1ph46yhjsnndjlxxcba";
+  cargoSha256 = "sha256-L1MKoVacVKcpEG2IfS+eENxFZNiSaTDTxfFbFlvzYl8=";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/tools/text/languagetool/default.nix b/pkgs/tools/text/languagetool/default.nix
index 90ddd5b69290..810e3feaa228 100644
--- a/pkgs/tools/text/languagetool/default.nix
+++ b/pkgs/tools/text/languagetool/default.nix
@@ -2,16 +2,18 @@
 
 stdenv.mkDerivation rec {
   pname = "LanguageTool";
-  version = "5.2";
+  version = "5.3";
 
   src = fetchzip {
     url = "https://www.languagetool.org/download/${pname}-${version}.zip";
-    sha256 = "1fz3rxqg5z2jxbalraz8lwkzj0jh69zzfmf3vpwywilvl7xlhdrd";
+    sha256 = "1km20ajqb65vkhkrf94zy5srcss66ix8padp7ng59pa8pj11wmi2";
   };
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ jre ];
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out/share
     mv -- * $out/share/
 
@@ -22,6 +24,8 @@ stdenv.mkDerivation rec {
 
     makeWrapper ${jre}/bin/java $out/bin/languagetool-http-server \
       --add-flags "-cp $out/share/languagetool-server.jar org.languagetool.server.HTTPServer"
+
+    runHook postInstall
   '';
 
   meta = with lib; {
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index d7f1fff525d6..8f2ff5cc4f72 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -336,6 +336,7 @@ mapAliases ({
   kodiGBM = kodi-gbm;
   kodiPlain = kodi;
   kodiPlainWayland = kodi-wayland;
+  jellyfin_10_5 = throw "Jellyfin 10.5 is no longer supported and contains a security vulnerability. Please upgrade to a newer version."; # added 2021-04-26
   julia_07 = throw "julia_07 is deprecated in favor of julia_10 LTS"; # added 2020-09-15
   julia_11 = throw "julia_11 is deprecated in favor of latest Julia version"; # added 2020-09-15
   kdeconnect = plasma5Packages.kdeconnect-kde; # added 2020-10-28
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a3414accf304..2d6636416eeb 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -265,6 +265,8 @@ in
 
   protoc-gen-go = callPackage ../development/tools/protoc-gen-go { };
 
+  protoc-gen-go-grpc = callPackage ../development/tools/protoc-gen-go-grpc { };
+
   protoc-gen-twirp = callPackage ../development/tools/protoc-gen-twirp { };
 
   protoc-gen-twirp_php = callPackage ../development/tools/protoc-gen-twirp_php { };
@@ -1233,6 +1235,8 @@ in
 
   inherit (nodePackages) castnow;
 
+  castty = callPackage ../tools/misc/castty { };
+
   certigo = callPackage ../tools/admin/certigo { };
 
   catcli = python3Packages.callPackage ../tools/filesystems/catcli { };
@@ -2274,7 +2278,7 @@ in
     inherit (haskellPackages) ghcWithPackages diagrams-builder;
   };
 
-  dialog = callPackage ../development/tools/misc/dialog { };
+  dialog = callPackage ../tools/misc/dialog { };
 
   dibbler = callPackage ../tools/networking/dibbler { };
 
@@ -2693,8 +2697,6 @@ in
 
   jellyfin = callPackage ../servers/jellyfin { };
 
-  jellyfin_10_5 = callPackage ../servers/jellyfin/10.5.x.nix { };
-
   jellyfin-media-player = libsForQt5.callPackage ../applications/video/jellyfin-media-player {
     inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa CoreAudio MediaPlayer;
   };
@@ -4649,7 +4651,7 @@ in
   frostwire-bin = callPackage ../applications/networking/p2p/frostwire/frostwire-bin.nix { };
 
   ftgl = callPackage ../development/libraries/ftgl {
-    inherit (darwin.apple_sdk.frameworks) OpenGL;
+    inherit (darwin.apple_sdk.frameworks) OpenGL GLUT;
   };
 
   ftop = callPackage ../os-specific/linux/ftop { };
@@ -7164,6 +7166,8 @@ in
   openbazaar = callPackage ../applications/networking/openbazaar { };
   openbazaar-client = callPackage ../applications/networking/openbazaar/client.nix { };
 
+  openboard = libsForQt5.callPackage ../applications/graphics/openboard { };
+
   opencc = callPackage ../tools/text/opencc { };
 
   opencl-info = callPackage ../tools/system/opencl-info { };
@@ -9769,6 +9773,8 @@ in
 
   zdelta = callPackage ../tools/compression/zdelta { };
 
+  zellij = callPackage ../tools/misc/zellij { };
+
   zenith = callPackage ../tools/system/zenith {
     inherit (darwin.apple_sdk.frameworks) IOKit;
   };
@@ -17623,7 +17629,7 @@ in
 
   stlport = callPackage ../development/libraries/stlport { };
 
-  streamlink = callPackage ../applications/video/streamlink { pythonPackages = python3Packages; };
+  streamlink = callPackage ../applications/video/streamlink { };
   streamlink-twitch-gui-bin = callPackage ../applications/video/streamlink-twitch-gui/bin.nix {};
 
   sub-batch = callPackage ../applications/video/sub-batch { };
@@ -24653,6 +24659,8 @@ in
 
   motif = callPackage ../development/libraries/motif { };
 
+  mousai = callPackage ../applications/audio/mousai { };
+
   mozjpeg = callPackage ../applications/graphics/mozjpeg { };
 
   easytag = callPackage ../applications/audio/easytag { };
@@ -31013,6 +31021,8 @@ in
 
   simplehttp2server = callPackage ../servers/simplehttp2server { };
 
+  simple-http-server = callPackage ../servers/simple-http-server { };
+
   diceware = with python3Packages; toPythonApplication diceware;
 
   xml2rfc = with python3Packages; toPythonApplication xml2rfc;
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index c7891a1821e8..bb4541535715 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -401,6 +401,8 @@ let
       inherit (pkgs) gsl;
     };
 
+    h2 = callPackage ../development/ocaml-modules/h2 { };
+
     hacl_x25519 = callPackage ../development/ocaml-modules/hacl_x25519 { };
 
     herelib = callPackage ../development/ocaml-modules/herelib { };
@@ -413,6 +415,8 @@ let
 
     hmap = callPackage ../development/ocaml-modules/hmap { };
 
+    hpack = callPackage ../development/ocaml-modules/hpack { };
+
     hxd = callPackage ../development/ocaml-modules/hxd { };
 
     imagelib = callPackage ../development/ocaml-modules/imagelib { };
@@ -576,6 +580,8 @@ let
 
     lens = callPackage ../development/ocaml-modules/lens { };
 
+    letsencrypt = callPackage ../development/ocaml-modules/letsencrypt { };
+
     linenoise = callPackage ../development/ocaml-modules/linenoise { };
 
     llvm = callPackage ../development/ocaml-modules/llvm {
@@ -938,6 +944,8 @@ let
 
     ounit2 = callPackage ../development/ocaml-modules/ounit2 { };
 
+    paf = callPackage ../development/ocaml-modules/paf { };
+
     parse-argv = callPackage ../development/ocaml-modules/parse-argv { };
 
     path_glob = callPackage ../development/ocaml-modules/path_glob { };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index edeb7ffb3d00..adb4a4aa4038 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1603,6 +1603,8 @@ in {
 
   curve25519-donna = callPackage ../development/python-modules/curve25519-donna { };
 
+  cve-bin-tool = callPackage ../development/python-modules/cve-bin-tool { };
+
   cvxopt = callPackage ../development/python-modules/cvxopt { };
 
   cvxpy = callPackage ../development/python-modules/cvxpy { };
@@ -7108,6 +7110,8 @@ in {
     inherit python;
   });
 
+  rpmfile = callPackage ../development/python-modules/rpmfile { };
+
   rpmfluff = callPackage ../development/python-modules/rpmfluff { };
 
   rpy2 = callPackage ../development/python-modules/rpy2 { };