about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/applications/science
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/science')
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/astrolog/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/calcmysky/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/celestia/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/gildas/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/gnuastro/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/gprojector/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/siril/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix76
-rw-r--r--nixpkgs/pkgs/applications/science/astronomy/xplanet/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/EZminc/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/MACS2/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/angsd/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/ants/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bayescan/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bcftools/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bedops/default.nix18
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bedtools/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/blast/bin.nix60
-rw-r--r--nixpkgs/pkgs/applications/science/biology/blast/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bowtie/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/bwa/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/biology/cmtk/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/biology/deeptools/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/delly/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/biology/diamond/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch20
-rw-r--r--nixpkgs/pkgs/applications/science/biology/dssp/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/biology/emboss/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/fastp/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/febio-studio/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/freebayes/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/gatk/default.nix47
-rw-r--r--nixpkgs/pkgs/applications/science/biology/genmap/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/hh-suite/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/biology/igv/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/inormalize/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/iqtree/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/science/biology/jbrowse/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/science/biology/kent/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/science/biology/last/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mafft/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/science/biology/megahit/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/meme-suite/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minia/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/minimap2/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mmseqs2/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/muscle/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch21
-rw-r--r--nixpkgs/pkgs/applications/science/biology/nest/default.nix86
-rw-r--r--nixpkgs/pkgs/applications/science/biology/neuron/default.nix154
-rw-r--r--nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch21
-rw-r--r--nixpkgs/pkgs/applications/science/biology/neuron/neuron_darwin_rpath.patch11
-rw-r--r--nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/octopus/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/science/biology/paml/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/quast/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/sambamba/default.nix15
-rw-r--r--nixpkgs/pkgs/applications/science/biology/samtools/default.nix17
-rw-r--r--nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/seaview/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/seqkit/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/science/biology/seqtk/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/science/biology/snpeff/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/spades/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/sratoolkit/default.nix56
-rw-r--r--nixpkgs/pkgs/applications/science/biology/stacks/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/star/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/biology/strelka/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/subread/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/biology/svaba/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/biology/tandem-aligner/default.nix67
-rw-r--r--nixpkgs/pkgs/applications/science/biology/treemix/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/biology/trf/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/science/biology/truvari/default.nix73
-rw-r--r--nixpkgs/pkgs/applications/science/biology/varscan/default.nix4
-rwxr-xr-xnixpkgs/pkgs/applications/science/biology/vcftools/default.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/biology/veryfasttree/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix101
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/avogadro2/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/chemtool/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix16
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/d-seams/default.nix11
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/element/default.nix9
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix214
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/openmolcas/MKL-MPICH.patch24
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix17
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/science/computer-architecture/accelergy/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/computer-architecture/qtrvsim/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/computer-architecture/timeloop/default.nix99
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/bitscope/common.nix9
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/csxcad/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/dataexplorer/default.nix66
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/digital/default.nix92
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/dsview/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/dsview/install.patch30
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/dsview/libsigrok4dsl.nix28
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/dsview/libsigrokdecode4dsl.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/dsview/qt515.patch13
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/flatcam/shapely-library-paths.patch31
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/flopoco/default.nix93
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/fped/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/gerbv/default.nix62
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/kicad/base.nix72
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/kicad/default.nix59
-rwxr-xr-xnixpkgs/pkgs/applications/science/electronics/kicad/update.sh6
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix48
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/kicad/writable.patch49
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix20
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/nvc/default.nix20
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/openboardview/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/openems/default.nix1
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch53
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch41
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/openroad/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/pcb/default.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/pulseview/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/qfsm/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/qucs-s/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/qucs/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/systemc/default.nix18
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/verilator/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/verilog/default.nix60
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix18
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/xcircuit/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/xoscope/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/electronics/xyce/default.nix9
-rw-r--r--nixpkgs/pkgs/applications/science/engineering/strictdoc/conftest.py.patch15
-rw-r--r--nixpkgs/pkgs/applications/science/engineering/strictdoc/default.nix84
-rw-r--r--nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/geometry/drgeo/default.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/geometry/gama/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/logic/abc/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/logic/abella/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/acgtk/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/science/logic/alt-ergo/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/logic/anders/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/logic/aspino/default.nix10
-rw-r--r--nixpkgs/pkgs/applications/science/logic/avy/default.nix5
-rw-r--r--nixpkgs/pkgs/applications/science/logic/avy/glucose-fenv.patch40
-rw-r--r--nixpkgs/pkgs/applications/science/logic/avy/minisat-fenv.patch38
-rw-r--r--nixpkgs/pkgs/applications/science/logic/beluga/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/logic/bitwuzla/default.nix10
-rw-r--r--nixpkgs/pkgs/applications/science/logic/boolector/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cadical/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cbmc/default.nix16
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cedille/default.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/logic/coq/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cryptominisat/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cubicle/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cvc3/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch39
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cvc4/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/cvc5/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/logic/dafny/default.nix61
-rw-r--r--nixpkgs/pkgs/applications/science/logic/dafny/deps.nix184
-rw-r--r--nixpkgs/pkgs/applications/science/logic/easycrypt/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/logic/easycrypt/runtest.nix1
-rw-r--r--nixpkgs/pkgs/applications/science/logic/egglog/Cargo.lock1026
-rw-r--r--nixpkgs/pkgs/applications/science/logic/egglog/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/science/logic/ekrhyper/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch7
-rw-r--r--nixpkgs/pkgs/applications/science/logic/elan/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/logic/fast-downward/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/logic/formula/default.nix1
-rw-r--r--nixpkgs/pkgs/applications/science/logic/formula/nuget.nix91
-rw-r--r--nixpkgs/pkgs/applications/science/logic/glucose/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/science/logic/glucose/syrup.nix24
-rw-r--r--nixpkgs/pkgs/applications/science/logic/hol_light/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/iprover/default.nix5
-rw-r--r--nixpkgs/pkgs/applications/science/logic/isabelle/components/isabelle-linter.nix21
-rw-r--r--nixpkgs/pkgs/applications/science/logic/isabelle/components/mkBuild.nix36
-rw-r--r--nixpkgs/pkgs/applications/science/logic/isabelle/default.nix96
-rw-r--r--nixpkgs/pkgs/applications/science/logic/kissat/default.nix9
-rw-r--r--nixpkgs/pkgs/applications/science/logic/klee/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/logic/klee/klee-uclibc.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/logic/lean/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/logic/leo2/default.nix10
-rw-r--r--nixpkgs/pkgs/applications/science/logic/logisim-evolution/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/mcy/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/logic/metis-prover/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/logic/monosat/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/naproche/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/logic/nusmv/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/logic/opensmt/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/ott/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/logic/petrinizer/default.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/logic/potassco/clingcon_limits.patch24
-rw-r--r--nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/prooftree/default.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/logic/prover9/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/logic/proverif/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/sad/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/science/logic/sad/monoid.patch51
-rw-r--r--nixpkgs/pkgs/applications/science/logic/sad/patch.patch200
-rw-r--r--nixpkgs/pkgs/applications/science/logic/satallax/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/science/logic/sharpsat-td/default.nix83
-rw-r--r--nixpkgs/pkgs/applications/science/logic/statverif/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/surelog/default.nix72
-rw-r--r--nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/science/logic/tlaplus/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/tlaplus/tlaps.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/uhdm/default.nix46
-rw-r--r--nixpkgs/pkgs/applications/science/logic/vampire/default.nix11
-rw-r--r--nixpkgs/pkgs/applications/science/logic/why3/default.nix18
-rw-r--r--nixpkgs/pkgs/applications/science/logic/why3/with-provers.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/logic/workcraft/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/yices/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/logic/z3/4.4.0.nix43
-rw-r--r--nixpkgs/pkgs/applications/science/logic/z3/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/science/machine-learning/finalfrontier/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/machine-learning/openbugs/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/science/machine-learning/shogun/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/science/machine-learning/shogun/fix-virtual-destruction.patch20
-rw-r--r--nixpkgs/pkgs/applications/science/machine-learning/starspace/default.nix8
-rwxr-xr-xnixpkgs/pkgs/applications/science/machine-learning/streamlit/default.nix64
-rw-r--r--nixpkgs/pkgs/applications/science/machine-learning/uarmsolver/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/science/machine-learning/vowpal-wabbit/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/science/math/4ti2/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/LiE/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/math/R/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/math/R/test-reg-packages.patch15
-rw-r--r--nixpkgs/pkgs/applications/science/math/bcal/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/math/bliss/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/math/caffe/default.nix10
-rw-r--r--nixpkgs/pkgs/applications/science/math/calc/default.nix53
-rw-r--r--nixpkgs/pkgs/applications/science/math/calculix/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/math/cemu-ti/default.nix (renamed from nixpkgs/pkgs/applications/science/math/cemu/default.nix)28
-rw-r--r--nixpkgs/pkgs/applications/science/math/clp/default.nix18
-rw-r--r--nixpkgs/pkgs/applications/science/math/cntk/default.nix9
-rw-r--r--nixpkgs/pkgs/applications/science/math/eigenmath/default.nix47
-rw-r--r--nixpkgs/pkgs/applications/science/math/eukleides/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/science/math/form/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/math/fricas/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/math/gap/default.nix93
-rw-r--r--nixpkgs/pkgs/applications/science/math/geogebra/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/math/giac/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/math/giac/increase-pari-stack-size.patch18
-rw-r--r--nixpkgs/pkgs/applications/science/math/ginac/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/glsurf/default.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/math/gmsh/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/science/math/gmsh/fix-python.patch50
-rw-r--r--nixpkgs/pkgs/applications/science/math/gretl/default.nix10
-rw-r--r--nixpkgs/pkgs/applications/science/math/jags/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/labplot/default.nix107
-rw-r--r--nixpkgs/pkgs/applications/science/math/lp_solve/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/math/mathematica/10.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/math/mathematica/11.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/math/mathematica/9.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/math/mathematica/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/math/mathematica/generic.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/mathematica/versions.nix48
-rw-r--r--nixpkgs/pkgs/applications/science/math/maxima/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/science/math/mxnet/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/science/math/nasc/default.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/math/pagsuite/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/science/math/pari/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/math/pari/gp2c.nix9
-rw-r--r--nixpkgs/pkgs/applications/science/math/perseus/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/math/polymake/default.nix57
-rw-r--r--nixpkgs/pkgs/applications/science/math/primecount/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/math/primesieve/default.nix5
-rw-r--r--nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/pspp/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/math/qalculate-qt/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/science/math/ratpoints/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/math/readstat/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/README.md40
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/env-locations.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch19
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/patches/disable-slow-glpk-test.patch17
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch87
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/patches/fix-ecl-race.patch19
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch25
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch81
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-setup.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/sage-src.nix132
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/sage-tests.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/sage.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix27
-rw-r--r--nixpkgs/pkgs/applications/science/math/sage/sagelib.nix165
-rw-r--r--nixpkgs/pkgs/applications/science/math/scalp/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/math/scilab-bin/default.nix173
-rw-r--r--nixpkgs/pkgs/applications/science/math/singular/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/math/speedcrunch/default.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/math/symmetrica/default.nix1
-rw-r--r--nixpkgs/pkgs/applications/science/math/weka/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/math/wolfram-engine/default.nix17
-rw-r--r--nixpkgs/pkgs/applications/science/math/wolfram-engine/l10ns.nix14
-rw-r--r--nixpkgs/pkgs/applications/science/math/wxmaxima/default.nix11
-rw-r--r--nixpkgs/pkgs/applications/science/math/yacas/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch12
-rw-r--r--nixpkgs/pkgs/applications/science/medicine/dcmtk/default.nix11
-rw-r--r--nixpkgs/pkgs/applications/science/medicine/xmedcon/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/misc/bada-bib/default.nix7
-rw-r--r--nixpkgs/pkgs/applications/science/misc/boinc/default.nix63
-rw-r--r--nixpkgs/pkgs/applications/science/misc/cwltool/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/misc/fityk/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/misc/gephi/default.nix18
-rw-r--r--nixpkgs/pkgs/applications/science/misc/graphia/default.nix11
-rw-r--r--nixpkgs/pkgs/applications/science/misc/megam/default.nix62
-rw-r--r--nixpkgs/pkgs/applications/science/misc/megam/ocaml-includes.patch2
-rw-r--r--nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/misc/openmodelica/combined/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix3
-rw-r--r--nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/misc/openmvg/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/science/misc/openmvs/default.nix82
-rw-r--r--nixpkgs/pkgs/applications/science/misc/root/5.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/misc/root/default.nix105
-rw-r--r--nixpkgs/pkgs/applications/science/misc/root/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/applications/science/misc/root/tests/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/misc/root/tests/test-thisroot.nix49
-rw-r--r--nixpkgs/pkgs/applications/science/misc/sasview/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/misc/simgrid/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/misc/snakemake/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/misc/toil/default.nix64
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix97
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/data.nix33
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/default.nix79
-rw-r--r--nixpkgs/pkgs/applications/science/molecular-dynamics/viennarna/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/networking/sumo/default.nix15
-rw-r--r--nixpkgs/pkgs/applications/science/physics/crystfel/0002-fix-ftbfs-with-gcc-10.patch43
-rw-r--r--nixpkgs/pkgs/applications/science/physics/crystfel/default.nix82
-rw-r--r--nixpkgs/pkgs/applications/science/physics/crystfel/disable-fmemopen-on-aarch64-darwin.patch13
-rw-r--r--nixpkgs/pkgs/applications/science/physics/crystfel/libccp4-use-hardcoded-syminfo-lib.patch16
-rw-r--r--nixpkgs/pkgs/applications/science/physics/crystfel/link-to-argp-standalone-if-needed.patch24
-rw-r--r--nixpkgs/pkgs/applications/science/physics/dawn/default.nix9
-rw-r--r--nixpkgs/pkgs/applications/science/physics/dawncut/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0001-fix-import-of-QPainterPath.patch24
-rw-r--r--nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0002-fem-rename-loopvars-to-avoid-redefinition.patch82
-rw-r--r--nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0003-ignore-qwt_compat.patch36
-rw-r--r--nixpkgs/pkgs/applications/science/physics/nnpdf/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/physics/sherpa/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/physics/xfitter/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/science/physics/xnec2c/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix11
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/emuflight-configurator/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/inav-configurator/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix13
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/mujoco/default.nix122
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/mujoco/dependencies.patch114
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/fix-10132.patch62
391 files changed, 7206 insertions, 3130 deletions
diff --git a/nixpkgs/pkgs/applications/science/astronomy/astrolog/default.nix b/nixpkgs/pkgs/applications/science/astronomy/astrolog/default.nix
index 26d0639ae67f..743a58e9e053 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/astrolog/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/astrolog/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   '';
 
   buildInputs = [ xorg.libX11 ];
-  NIX_CFLAGS_COMPILE = "-Wno-format-security";
+  env.NIX_CFLAGS_COMPILE = "-Wno-format-security";
 
   installPhase =
   let
diff --git a/nixpkgs/pkgs/applications/science/astronomy/calcmysky/default.nix b/nixpkgs/pkgs/applications/science/astronomy/calcmysky/default.nix
new file mode 100644
index 000000000000..bff3f39e8975
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/astronomy/calcmysky/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, wrapQtAppsHook
+, glm
+, eigen
+, qtbase
+}:
+
+stdenv.mkDerivation rec {
+  pname = "calcmysky";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "10110111";
+    repo = "CalcMySky";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-QVKyPyod0pxoFge/GAcle9AWXPCLR/seBVWRfs9I9tE=";
+  };
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+  buildInputs = [ glm eigen qtbase ];
+
+  cmakeFlags = [ "-DQT_VERSION=6" ];
+
+  doCheck = true;
+
+  meta = with lib;{
+    description = "Simulator of light scattering by planetary atmospheres";
+    homepage = "https://github.com/10110111/CalcMySky";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/astronomy/celestia/default.nix b/nixpkgs/pkgs/applications/science/astronomy/celestia/default.nix
index 3f21987661cf..7f979596148f 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/celestia/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/celestia/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "celestia";
-  version = "1.6.2.2";
+  version = "1.6.3";
 
   src = fetchFromGitHub {
     owner = "CelestiaProject";
     repo = "Celestia";
     rev = version;
-    sha256 = "1s9fgxh6i3x1sy75y5wcidi2mjrf5xj71dd4n6rg0hkps441sgsp";
+    sha256 = "sha256-iBlrP9Yr/l3tzR1PpRf8C87WfrL6mZDwDtWyd2yJ7Dc=";
   };
 
   nativeBuildInputs = [ pkg-config autoreconfHook ];
diff --git a/nixpkgs/pkgs/applications/science/astronomy/gildas/default.nix b/nixpkgs/pkgs/applications/science/astronomy/gildas/default.nix
index 1c0b1eeefe69..64e3f8713b2f 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/gildas/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/gildas/default.nix
@@ -3,12 +3,12 @@
 }:
 
 let
-  python3Env = python3.withPackages(ps: with ps; [ numpy ]);
+  python3Env = python3.withPackages(ps: with ps; [ numpy setuptools ]);
 in
 
 stdenv.mkDerivation rec {
-  srcVersion = "nov21a";
-  version = "20211101_a";
+  srcVersion = "feb23a";
+  version = "20230201_a";
   pname = "gildas";
 
   src = fetchurl {
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
     # source code of the previous release to a different directory
     urls = [ "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.xz"
       "http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.xz" ];
-    sha256 = "0fb6iqwh4hm7v7sib7sx98vxdavn3d6q2gq6y6vxg2z29g31f8g2";
+    sha256 = "sha256-A6jtcC8QMtJ7YcNaPiOjwNPDGPAjmRA3jZLEt5iBONE=";
   };
 
   nativeBuildInputs = [ pkg-config groff perl getopt gfortran which ];
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
 
   patches = [ ./wrapper.patch ./clang.patch ./aarch64.patch ];
 
-  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument";
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument";
 
   NIX_LDFLAGS = lib.optionalString stdenv.isDarwin (with darwin.apple_sdk.frameworks; "-F${CoreFoundation}/Library/Frameworks");
 
@@ -50,7 +50,6 @@ stdenv.mkDerivation rec {
   '';
 
   meta = {
-    broken = stdenv.isDarwin;
     description = "Radioastronomy data analysis software";
     longDescription = ''
       GILDAS is a collection of state-of-the-art software
@@ -66,6 +65,7 @@ stdenv.mkDerivation rec {
     license = lib.licenses.free;
     maintainers = [ lib.maintainers.bzizou lib.maintainers.smaret ];
     platforms = lib.platforms.all;
+    broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 
 }
diff --git a/nixpkgs/pkgs/applications/science/astronomy/gnuastro/default.nix b/nixpkgs/pkgs/applications/science/astronomy/gnuastro/default.nix
index d0d3ab65627b..69f4011f2737 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/gnuastro/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/gnuastro/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   pname = "gnuastro";
-  version = "0.18";
+  version = "0.20";
 
   src = fetchurl {
     url = "mirror://gnu/gnuastro/gnuastro-${version}.tar.gz";
-    sha256 = "sha256-bKfiLhQFERdMbwL9+UitCL8/dB/k6YKNjBzfKnCtWec=";
+    sha256 = "sha256-kkuLtqwc0VFj3a3Dqb/bi4jKx7UJnV+CHs7bw/Cwac0=";
   };
 
   nativeBuildInputs = [ libtool ];
diff --git a/nixpkgs/pkgs/applications/science/astronomy/gprojector/default.nix b/nixpkgs/pkgs/applications/science/astronomy/gprojector/default.nix
index f5fa5f1d1e4b..5fd698788cc9 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/gprojector/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/gprojector/default.nix
@@ -10,11 +10,11 @@
 
 stdenvNoCC.mkDerivation rec {
   pname = "gprojector";
-  version = "3.0.4";
+  version = "3.0.6";
 
   src = fetchzip {
     url = "https://www.giss.nasa.gov/tools/gprojector/download/G.ProjectorJ-${version}.tgz";
-    sha256 = "sha256-6EixVNRgYnuY9INb7gAyBzo125DhPEUPD+pGxjzmhy8=";
+    sha256 = "sha256-aw/p6mbTJl023d46NUZV3pnP4WVdYqZTFmgGlHEKfq0=";
   };
 
   desktopItems = [ (makeDesktopItem {
diff --git a/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix b/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix
index 8212e6a2a9fa..c4721c490cce 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/kstars/default.nix
@@ -14,11 +14,11 @@
 
 mkDerivation rec {
   pname = "kstars";
-  version = "3.6.0";
+  version = "3.6.4";
 
   src = fetchurl {
     url = "mirror://kde/stable/kstars/kstars-${version}.tar.xz";
-    sha256 = "sha256-wdv2TOOPIB3VRG3XMs58i/HvMDZ9wvERAhBQNslJ25E=";
+    sha256 = "sha256-9MJqJVgSZVBzlLv08Z6i8yO4YV1exsD5+yLJjqIGD20=";
   };
 
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
diff --git a/nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix b/nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix
index 52049302a27b..2eef054d5ff5 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/phd2/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, gtk3, wxGTK30-gtk3
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, gtk3, wxGTK32
 , curl, gettext, glib, indi-full, libnova, wrapGAppsHook }:
 
 stdenv.mkDerivation rec {
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     gtk3
-    wxGTK30-gtk3
+    wxGTK32
     curl
     gettext
     glib
diff --git a/nixpkgs/pkgs/applications/science/astronomy/siril/default.nix b/nixpkgs/pkgs/applications/science/astronomy/siril/default.nix
index 4a51e88dc3b9..db0411f1337a 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/siril/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/siril/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "siril";
-  version = "1.0.0";
+  version = "1.0.6";
 
   src = fetchFromGitLab {
     owner = "free-astro";
     repo = pname;
     rev = version;
-    sha256 = "sha256-yqWFEa1fnSwl0ecN9hMI13QCfj0f69CFqTJlEAhTpJI=";
+    sha256 = "sha256-KFCA3fUMVFHmh1BdKed5/dkq0EeYcmoWec97WX9ZHUc=";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix b/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix
index b157be0fcb75..2b8d292eada0 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix
@@ -1,31 +1,81 @@
-{ stdenv, lib, fetchFromGitHub
-, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv
-, qtscript, qtserialport, qttools, qtcharts
-, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, perl
+, wrapGAppsHook
+, wrapQtAppsHook
+, qtbase
+, qtcharts
+, qtpositioning
+, qtmultimedia
+, qtserialport
+, qttranslations
+, qtwayland
+, qtwebengine
+, calcmysky
+, qxlsx
+, indilib
+, libnova
 }:
 
 stdenv.mkDerivation rec {
   pname = "stellarium";
-  version = "0.22.2";
+  version = "23.1";
 
   src = fetchFromGitHub {
     owner = "Stellarium";
     repo = "stellarium";
     rev = "v${version}";
-    sha256 = "sha256-FBH5IB1keMzRP06DQK2e7HX8rwm5/sdTX+cB80uG0vw=";
+    hash = "sha256-7jzS3pRklPsCTgCr3nrywfHCNlBDHuyuGGvrVoI9+A0=";
   };
 
-  nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace CMakeLists.txt \
+      --replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \
+                'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Applications/Stellarium.app/Contents")'
+    substituteInPlace src/CMakeLists.txt \
+      --replace "\''${_qt_bin_dir}/../" "${qtmultimedia}/lib/qt-6/"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    perl
+    wrapGAppsHook
+    wrapQtAppsHook
+  ];
 
   buildInputs = [
-    freetype libpng libGLU libGL openssl libiconv qtscript qtserialport qttools
-    qtmultimedia qtlocation qtbase qtcharts
+    qtbase
+    qtcharts
+    qtpositioning
+    qtmultimedia
+    qtserialport
+    qttranslations
+    qtwebengine
+    calcmysky
+    qxlsx
+    indilib
+    libnova
+  ] ++ lib.optionals stdenv.isLinux [
+    qtwayland
   ];
 
   preConfigure = lib.optionalString stdenv.isDarwin ''
-    substituteInPlace CMakeLists.txt \
-      --replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \
-                'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Applications/Stellarium.app/Contents")'
+    export LC_ALL=en_US.UTF-8
+  '';
+
+  # fatal error: 'QtSerialPort/QSerialPortInfo' file not found
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-F${qtserialport}/lib";
+
+  dontWrapGApps = true;
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    makeWrapper $out/Applications/Stellarium.app/Contents/MacOS/Stellarium $out/bin/stellarium
+  '';
+
+  preFixup = ''
+    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
   '';
 
   meta = with lib; {
@@ -33,6 +83,6 @@ stdenv.mkDerivation rec {
     homepage = "https://stellarium.org/";
     license = licenses.gpl2Plus;
     platforms = platforms.unix;
-    maintainers = with maintainers; [ ma27 ];
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/astronomy/xplanet/default.nix b/nixpkgs/pkgs/applications/science/astronomy/xplanet/default.nix
index 8c0cb2be32b9..94aa92a1b713 100644
--- a/nixpkgs/pkgs/applications/science/astronomy/xplanet/default.nix
+++ b/nixpkgs/pkgs/applications/science/astronomy/xplanet/default.nix
@@ -26,11 +26,11 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
 
   meta = with lib; {
     description = "Renders an image of the earth or other planets into the X root window";
-    homepage = "http://xplanet.sourceforge.net";
+    homepage = "https://xplanet.sourceforge.net";
     license = licenses.gpl2;
     maintainers = with maintainers; [ lassulus sander ];
     platforms = platforms.all;
diff --git a/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix b/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix
index 6c140b03ee4b..a4bb8c62f1c4 100644
--- a/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/EZminc/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libminc, bicpl, itk4, fftwFloat, gsl }:
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libminc, bicpl, itk, fftwFloat, gsl }:
 
 stdenv.mkDerivation rec {
   pname = "EZminc";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ itk4 libminc bicpl fftwFloat gsl ];
+  buildInputs = [ itk libminc bicpl fftwFloat gsl ];
 
   cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake"
                  "-DEZMINC_BUILD_TOOLS=TRUE"
diff --git a/nixpkgs/pkgs/applications/science/biology/MACS2/default.nix b/nixpkgs/pkgs/applications/science/biology/MACS2/default.nix
index 868479c48e55..5663ffaf4486 100644
--- a/nixpkgs/pkgs/applications/science/biology/MACS2/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/MACS2/default.nix
@@ -1,10 +1,10 @@
-{ lib, python3, fetchurl }:
+{ lib, python3, fetchPypi }:
 
 python3.pkgs.buildPythonPackage rec {
   pname = "MACS2";
   version = "2.2.7.1";
 
-  src = python3.pkgs.fetchPypi {
+  src = fetchPypi {
     inherit pname version;
     sha256 = "1rcxj943kgzs746f5jrb72x1cp4v50rk3qmad0m99a02vndscb5d";
   };
diff --git a/nixpkgs/pkgs/applications/science/biology/angsd/default.nix b/nixpkgs/pkgs/applications/science/biology/angsd/default.nix
index 02e00cd19ad6..799ba87f073b 100644
--- a/nixpkgs/pkgs/applications/science/biology/angsd/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/angsd/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "angsd";
-  version = "0.937";
+  version = "0.940";
 
   src = fetchFromGitHub {
     owner = "ANGSD";
     repo = "angsd";
-    sha256 = "1020gh066dprqhfi90ywqzqqnq7awn49wrkkjnizmmab52v00kxs";
+    sha256 = "sha256-Ppxgy54pAnqJUzNX5c12NHjKTQyEEcPSpCEEVOyZ/LA=";
     rev = "${version}";
   };
 
diff --git a/nixpkgs/pkgs/applications/science/biology/ants/default.nix b/nixpkgs/pkgs/applications/science/biology/ants/default.nix
index ac332f271662..d71fbca4becd 100644
--- a/nixpkgs/pkgs/applications/science/biology/ants/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/ants/default.nix
@@ -1,26 +1,18 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, makeWrapper, itk4, vtk_7, Cocoa }:
+{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, itk, vtk, Cocoa }:
 
 stdenv.mkDerivation rec {
-  pname    = "ANTs";
-  version = "2.2.0";
+  pname = "ANTs";
+  version = "2.4.4";
 
   src = fetchFromGitHub {
-    owner  = "ANTsX";
-    repo   = "ANTs";
-    rev    = "37ad4e20be3a5ecd26c2e4e41b49e778a0246c3d";
-    sha256 = "1hrdwv3m9xh3yf7l0rm2ggxc2xzckfb8srs88g485ibfszx7i03q";
+    owner = "ANTsX";
+    repo = "ANTs";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-GQndI8ayBvqujb2/qXT6RBAfr8hNPCI5IbwYkPlyNg0=";
   };
 
-  patches = [
-    # Fix build with gcc8
-    (fetchpatch {
-      url = "https://github.com/ANTsX/ANTs/commit/89af9b2694715bf8204993e032fa132f80cf37bd.patch";
-      sha256 = "1glkrwa1jmxxbmzihycxr576azjqby31jwpj165qc54c91pn0ams";
-    })
-  ];
-
   nativeBuildInputs = [ cmake makeWrapper ];
-  buildInputs = [ itk4 vtk_7 ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
+  buildInputs = [ itk vtk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
 
   cmakeFlags = [ "-DANTS_SUPERBUILD=FALSE" "-DUSE_VTK=TRUE" ];
 
diff --git a/nixpkgs/pkgs/applications/science/biology/bayescan/default.nix b/nixpkgs/pkgs/applications/science/biology/bayescan/default.nix
index cd5bb3210364..e715ff4b45b0 100644
--- a/nixpkgs/pkgs/applications/science/biology/bayescan/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/bayescan/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     cp -r ../*pdf ../input_examples ../"R functions" $out/share/doc/bayescan
   '';
 
-  NIX_CFLAGS_COMPILE = [ "-std=c++14" ];
+  env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
 
   meta = with lib; {
     description = "Detecting natural selection from population-based genetic data";
diff --git a/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix b/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix
index c04d6af080e3..993afff5965e 100644
--- a/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/bcftools/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "bcftools";
-  version = "1.15";
+  version = "1.17";
 
   src = fetchurl {
     url = "https://github.com/samtools/bcftools/releases/download/${version}/${pname}-${version}.tar.bz2";
-    sha256 = "sha256-GIXMtFCobpegCqkF1zgcqeB72JZ8BXBaYdAAfS4iKW4=";
+    sha256 = "sha256-AfddjnAdhbLHWRckEgCcwE8pthYWrOL6dRFhI95Flsw=";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/applications/science/biology/bedops/default.nix b/nixpkgs/pkgs/applications/science/biology/bedops/default.nix
index bde774c622bd..d455e98264cc 100644
--- a/nixpkgs/pkgs/applications/science/biology/bedops/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/bedops/default.nix
@@ -18,7 +18,20 @@ stdenv.mkDerivation rec {
     # We use nixpkgs versions of these libraries
     rm -r third-party
     sed -i '/^LIBS/d' system.mk/*
-    sed -i 's|^LIBRARIES.*$|LIBRARIES = -lbz2 -lz -ljansson|' */*/*/*/Makefile
+    sed -i 's|^LIBRARIES.*$|LIBRARIES = -lbz2 -lz -ljansson|' */*/*/*/Makefile*
+
+    # `make support` installs above libraries
+    substituteInPlace system.mk/* \
+      --replace ": support" ":"
+
+    # Variable name is different in this makefile
+    substituteInPlace applications/bed/sort-bed/src/Makefile.darwin \
+      --replace "DIST_DIR" "BINDIR"
+
+    # `mkdir -p $BINDIR` is missing
+    substituteInPlace applications/bed/sort-bed/src/Makefile.darwin \
+      --replace 'mkdir -p ''${OBJ_DIR}' 'mkdir -p ''${OBJ_DIR} ''${BINDIR}'
+
     substituteInPlace applications/bed/starch/src/Makefile --replace '$(LIBRARIES)' ""
 
     # Function name is different in nixpkgs provided libraries
@@ -27,7 +40,7 @@ stdenv.mkDerivation rec {
     done
 
     # Don't force static
-    for f in */*/*/*/Makefile ; do
+    for f in */*/*/*/Makefile* ; do
       substituteInPlace $f --replace '-static' ""
     done
   '';
@@ -46,6 +59,5 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2Only;
     maintainers = with maintainers; [ jbedo ];
     platforms = platforms.x86_64;
-    broken = stdenv.isDarwin;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix b/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix
index aac36d2af310..92cb420139df 100644
--- a/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/bedtools/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "bedtools";
-  version = "2.30.0";
+  version = "2.31.0";
 
   src = fetchFromGitHub {
     owner = "arq5x";
     repo = "bedtools2";
     rev = "v${version}";
-    sha256 = "sha256-NqKldF7ePJn3pT+AkESIQghBKSFFOEBBsTaKEbU+oaQ=";
+    sha256 = "sha256-LBD3z0+zGbQJ67oyPRFPgbiMY9EP17vSk1EKz3DrkEc=";
   };
 
   strictDeps = true;
diff --git a/nixpkgs/pkgs/applications/science/biology/blast/bin.nix b/nixpkgs/pkgs/applications/science/biology/blast/bin.nix
new file mode 100644
index 000000000000..daae9c096144
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/blast/bin.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchurl
+, python3
+, perl
+, blast
+, autoPatchelfHook
+, zlib
+, bzip2
+, glib
+, libxml2
+, coreutils
+}:
+let
+  pname = "blast-bin";
+  version = "2.13.0";
+
+  srcs = rec {
+    x86_64-linux = fetchurl {
+      url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-linux.tar.gz";
+      hash = "sha256-QPK3OdT++GoNI1NHyEpu2/hB2hqHYPQ/vNXFAVCwVEc=";
+    };
+    aarch64-linux = fetchurl {
+      url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-arm-linux.tar.gz";
+      hash = "sha256-vY8K66k7KunpBUjFsJTTb+ur5n1XmU0/mYxhZsi9ycs=";
+    };
+    x86_64-darwin = fetchurl {
+      url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-x64-macosx.tar.gz";
+      hash = "sha256-Y0JlOUl9Ego6LTxTCNny3P5c1H3fApPXQm7Z6Zhq9RA=";
+    };
+    aarch64-darwin = x86_64-darwin;
+  };
+  src = srcs.${stdenv.hostPlatform.system};
+in
+stdenv.mkDerivation {
+  inherit pname version src;
+
+  nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+
+  buildInputs = [ python3 perl ] ++ lib.optionals stdenv.isLinux [ zlib bzip2 glib libxml2 ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 bin/* -t $out/bin
+
+    runHook postInstall
+  '';
+
+  preFixup = ''
+    substituteInPlace $out/bin/get_species_taxids.sh \
+      --replace /bin/rm ${coreutils}/bin/rm
+  '';
+
+  meta = with lib; {
+    inherit (blast.meta) description homepage license;
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    maintainers = with maintainers; [ natsukium ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/blast/default.nix b/nixpkgs/pkgs/applications/science/biology/blast/default.nix
index eb94a06944e5..383aa6d09a5b 100644
--- a/nixpkgs/pkgs/applications/science/biology/blast/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/blast/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "blast";
-  version = "2.13.0";
+  version = "2.14.0";
 
   src = fetchurl {
     url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${version}/ncbi-blast-${version}+-src.tar.gz";
-    sha256 = "sha256-iVU3FNEz2vKMR3+D0zN5Szxi5BSECMByobRiDl7E/rI=";
+    sha256 = "sha256-v0d/Gww7gvC3pwlL8AOpqD4347BxbB33mQYMT+qxdQA=";
   };
 
   sourceRoot = "ncbi-blast-${version}+-src/c++";
diff --git a/nixpkgs/pkgs/applications/science/biology/bowtie/default.nix b/nixpkgs/pkgs/applications/science/biology/bowtie/default.nix
index ccb797d8a227..bec263a2d931 100644
--- a/nixpkgs/pkgs/applications/science/biology/bowtie/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/bowtie/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "An ultrafast memory-efficient short read aligner";
     license = licenses.artistic2;
-    homepage = "http://bowtie-bio.sourceforge.net";
+    homepage = "https://bowtie-bio.sourceforge.net";
     maintainers = with maintainers; [ prusnak ];
     platforms = platforms.all;
   };
diff --git a/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix b/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix
index 1702079e017f..954b704be0c6 100644
--- a/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/bowtie2/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "bowtie2";
-  version = "2.4.5";
+  version = "2.5.1";
 
   src = fetchFromGitHub {
     owner = "BenLangmead";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-xCsTkQXrZS+Njn0YfidhPln+OwVfTXOqbtB0dCfTP2U=";
+    sha256 = "sha256-HaiZmWU6akHXJVWBmCvkG2E61NDrAP7UIxx9DNCEZqE=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/applications/science/biology/bwa/default.nix b/nixpkgs/pkgs/applications/science/biology/bwa/default.nix
index 801ad00876bf..4786f25beb50 100644
--- a/nixpkgs/pkgs/applications/science/biology/bwa/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/bwa/default.nix
@@ -1,24 +1,16 @@
-{ lib, stdenv, fetchurl, fetchpatch, zlib }:
+{ lib, stdenv, fetchFromGitHub, zlib }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation {
   pname = "bwa";
-  version = "0.7.17";
+  version = "unstable-2022-09-23";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/bio-bwa/${pname}-${version}.tar.bz2";
-    sha256 = "1zfhv2zg9v1icdlq4p9ssc8k01mca5d1bd87w71py2swfi74s6yy";
+  src = fetchFromGitHub {
+    owner = "lh3";
+    repo = "bwa";
+    rev = "139f68fc4c3747813783a488aef2adc86626b01b";
+    hash = "sha256-8u35lTK6gBKeapYoIkG9MuJ/pyy/HFA2OiPn+Ml2C6c=";
   };
 
-  patches = [
-    # Pull upstream patch for -fno-common toolchain support like upstream
-    # gcc-10: https://github.com/lh3/bwa/pull/267
-    (fetchpatch {
-      name  = "fno-common.patch";
-      url = "https://github.com/lh3/bwa/commit/2a1ae7b6f34a96ea25be007ac9d91e57e9d32284.patch";
-      sha256 = "1lihfxai6vcshv5vr3m7yhk833bdivkja3gld6ilwrc4z28f6wqy";
-    })
-  ];
-
   buildInputs = [ zlib ];
 
   # Avoid hardcoding gcc to allow environments with a different
@@ -32,19 +24,23 @@ stdenv.mkDerivation rec {
   # it's unclear which headers are intended to be part of the public interface
   # so we may find ourselves having to add more here over time
   installPhase = ''
+    runHook preInstall
+
     install -vD -t $out/bin bwa
     install -vD -t $out/lib libbwa.a
     install -vD -t $out/include bntseq.h
     install -vD -t $out/include bwa.h
     install -vD -t $out/include bwamem.h
     install -vD -t $out/include bwt.h
+
+    runHook postInstall
   '';
 
   meta = with lib; {
     description = "A software package for mapping low-divergent sequences against a large reference genome, such as the human genome";
-    license     = licenses.gpl3;
-    homepage    = "http://bio-bwa.sourceforge.net/";
+    license     = licenses.gpl3Plus;
+    homepage    = "https://bio-bwa.sourceforge.net/";
     maintainers = with maintainers; [ luispedro ];
-    platforms = platforms.x86_64;
+    platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/biology/cmtk/default.nix b/nixpkgs/pkgs/applications/science/biology/cmtk/default.nix
index 42ce5f934e82..3eef64837255 100644
--- a/nixpkgs/pkgs/applications/science/biology/cmtk/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/cmtk/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
 
-  NIX_CFLAGS_COMPILE = [
+  env.NIX_CFLAGS_COMPILE = toString [
     "-std=c++11"
     (lib.optional stdenv.cc.isClang "-Wno-error=c++11-narrowing")
   ];
diff --git a/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix b/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix
index 90eef027a842..cbde1647db9b 100644
--- a/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/dcm2niix/default.nix
@@ -4,7 +4,7 @@
 , substituteAll
 , cmake
 , openjpeg
-, libyamlcpp
+, yaml-cpp
 , batchVersion ? false
 , withJpegLs ? true
 , withOpenJpeg ? true
@@ -40,12 +40,12 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = lib.optionals batchVersion [ libyamlcpp ]
+  buildInputs = lib.optionals batchVersion [ yaml-cpp ]
     ++ lib.optionals withOpenJpeg [ openjpeg openjpeg.dev ];
 
   cmakeFlags = lib.optionals batchVersion [
     "-DBATCH_VERSION=ON"
-    "-DYAML-CPP_DIR=${libyamlcpp}/lib/cmake/yaml-cpp"
+    "-DYAML-CPP_DIR=${yaml-cpp}/lib/cmake/yaml-cpp"
   ] ++ lib.optionals withJpegLs [
     "-DUSE_JPEGLS=ON"
   ] ++ lib.optionals withOpenJpeg [
diff --git a/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix b/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix
index 1739a4c999a4..eaf0b5932726 100644
--- a/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/deeptools/default.nix
@@ -23,7 +23,7 @@ buildPythonApplication rec {
     deeptoolsintervals
   ];
 
-  checkInputs = [ nose ];
+  nativeCheckInputs = [ nose ];
 
   meta = with lib; {
     homepage = "https://deeptools.readthedocs.io/en/develop";
diff --git a/nixpkgs/pkgs/applications/science/biology/delly/default.nix b/nixpkgs/pkgs/applications/science/biology/delly/default.nix
index ee4a8f299444..838c4ae802a8 100644
--- a/nixpkgs/pkgs/applications/science/biology/delly/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/delly/default.nix
@@ -1,14 +1,14 @@
-{ lib, stdenv, fetchpatch, fetchFromGitHub, htslib, zlib, bzip2, xz, ncurses, boost }:
+{ lib, stdenv, fetchFromGitHub, htslib, zlib, bzip2, xz, ncurses, boost }:
 
 stdenv.mkDerivation rec {
   pname = "delly";
-  version = "1.1.3";
+  version = "1.1.6";
 
   src = fetchFromGitHub {
       owner = "dellytools";
       repo = pname;
       rev = "v${version}";
-      sha256 = "sha256-fGwSRYpvGYyYvRvP1ljs3mhXRpONzO5/QVegjqMsOdk=";
+      sha256 = "sha256-/I//7MhsC/CcBeIJblzbjXp/yOSBm83KWJsrYpl6UJk=";
   };
 
   buildInputs = [ zlib htslib bzip2 xz ncurses boost ];
diff --git a/nixpkgs/pkgs/applications/science/biology/diamond/default.nix b/nixpkgs/pkgs/applications/science/biology/diamond/default.nix
index 86b239c93843..76ef4b7784c4 100644
--- a/nixpkgs/pkgs/applications/science/biology/diamond/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/diamond/default.nix
@@ -2,18 +2,15 @@
 
 stdenv.mkDerivation rec {
   pname = "diamond";
-  version = "0.8.36";
+  version = "2.1.7";
 
   src = fetchFromGitHub {
     owner = "bbuchfink";
     repo = "diamond";
     rev = "v${version}";
-    sha256 = "sha256-7uqOQOzkYN0RNwKBGUZ/Ny5NVZMoGByOk+GUvjdBzck=";
+    sha256 = "sha256-5AjP7zH0WZhJqhcjgQjeK/WPCqy1Tl1gXXqRsHbqkys=";
   };
 
-  patches = [
-    ./diamond-0.8.36-no-warning.patch
-  ];
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib ];
@@ -21,24 +18,17 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Accelerated BLAST compatible local sequence aligner";
     longDescription = ''
-      A sequence aligner for protein and translated DNA
-      searches and functions as a drop-in replacement for the NCBI BLAST
-      software tools. It is suitable for protein-protein search as well as
-      DNA-protein search on short reads and longer sequences including contigs
-      and assemblies, providing a speedup of BLAST ranging up to x20,000.
+      DIAMOND is a sequence aligner for protein and translated DNA searches, designed for high performance analysis of big sequence data. The key features are:
+      - Pairwise alignment of proteins and translated DNA at 100x-10,000x speed of BLAST.
+      - Frameshift alignments for long read analysis.
+      - Low resource requirements and suitable for running on standard desktops or laptops.
+      - Various output formats, including BLAST pairwise, tabular and XML, as well as taxonomic classification.
 
-      DIAMOND is developed by Benjamin Buchfink. Feel free to contact him for support (Email Twitter).
-
-      If you use DIAMOND in published research, please cite
-      B. Buchfink, Xie C., D. Huson,
-      "Fast and sensitive protein alignment using DIAMOND",
-      Nature Methods 12, 59-60 (2015).
+      When using the tool in published research, please cite:
+      - Buchfink B, Reuter K, Drost HG, "Sensitive protein alignments at tree-of-life scale using DIAMOND", Nature Methods 18, 366–368 (2021). doi:10.1038/s41592-021-01101-x
     '';
     homepage = "https://github.com/bbuchfink/diamond";
-    license = {
-      fullName = "University of Tuebingen, Benjamin Buchfink";
-      url = "https://raw.githubusercontent.com/bbuchfink/diamond/master/src/COPYING";
-    };
-    maintainers = [ ];
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ thyol ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch b/nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch
deleted file mode 100644
index a16d475c5564..000000000000
--- a/nixpkgs/pkgs/applications/science/biology/diamond/diamond-0.8.36-no-warning.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -u -r diamond-0.8.36/src/dp/scalar_traceback.h diamond-0.8.36-patched/src/dp/scalar_traceback.h
---- diamond-0.8.36/src/dp/scalar_traceback.h	2017-02-06 16:32:05.000000000 +0100
-+++ diamond-0.8.36-patched/src/dp/scalar_traceback.h	2017-02-23 15:13:24.000000000 +0100
-@@ -19,6 +19,7 @@
- #ifndef SCALAR_TRACEBACK_H_
- #define SCALAR_TRACEBACK_H_
- 
-+#include <cmath>
- #include <exception>
- #include "../basic/score_matrix.h"
- 
-@@ -31,7 +32,7 @@
- template<>
- inline bool almost_equal<float>(float x, float y)
- {
--	return abs(x - y) < 0.001f;
-+	return std::abs(x - y) < 0.001f;
- }
- 
- template<typename _score>
diff --git a/nixpkgs/pkgs/applications/science/biology/dssp/default.nix b/nixpkgs/pkgs/applications/science/biology/dssp/default.nix
index 762b0515e85c..59da360d1b6d 100644
--- a/nixpkgs/pkgs/applications/science/biology/dssp/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/dssp/default.nix
@@ -1,19 +1,30 @@
-{ lib, stdenv, fetchFromGitHub, boost, cmake, libcifpp, zlib, }:
+{ lib, stdenv, fetchFromGitHub, cmake, libcifpp, libmcfp, zlib }:
+let
+  libcifpp' = libcifpp.overrideAttrs (oldAttrs:  rec {
+    # dssp 4.2.2.1 requires specific version "5.0.8" of libcifpp
+    version = "5.0.8";
+    src = fetchFromGitHub {
+      inherit (oldAttrs.src) owner repo;
+      rev = "v${version}";
+      sha256 = "sha256-KJGcopGhCWSl+ElG3BPJjBf/kvYJowOHxto6Ci1IMco=";
+    };
+  });
+in
 
 stdenv.mkDerivation rec {
   pname = "dssp";
-  version = "4.0.5";
+  version = "4.2.2.1";
 
   src = fetchFromGitHub {
     owner = "PDB-REDO";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1x35rdcm4fch66pjbmy73lv0gdb6g9y3v023a66512a6nzsqjsir";
+    sha256 = "sha256-vmGvC5d8LTo+pcY9sxwj0d6JvH8Lyk+QSOZo5raBci4=";
   };
 
   nativeBuildInputs = [ cmake ];
 
-  buildInputs = [ boost libcifpp zlib ];
+  buildInputs = [ libcifpp' libmcfp zlib ];
 
   meta = with lib; {
     description = "Calculate the most likely secondary structure assignment given the 3D structure of a protein";
diff --git a/nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix b/nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix
index 4a6b093e1d0b..c5ab32a68838 100644
--- a/nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/ecopcr/default.nix
@@ -1,17 +1,19 @@
-{ lib, stdenv, fetchurl, gcc, zlib, python27 }:
+{ lib, stdenv, fetchurl, gcc, zlib, python3 }:
 
 stdenv.mkDerivation rec {
   pname = "ecopcr";
-  version = "0.8.0";
+  version = "1.0.1";
 
   src = fetchurl {
-    url = "https://git.metabarcoding.org/obitools/ecopcr/uploads/6f37991b325c8c171df7e79e6ae8d080/ecopcr-${version}.tar.gz";
-    sha256 = "10c58hj25z78jh0g3zcbx4890yd2qrvaaanyx8mn9p49mmyf5pk6";
+    url = "https://git.metabarcoding.org/obitools/ecopcr/-/archive/ecopcr_v${version}/ecopcr-ecopcr_v${version}.tar.gz";
+    hash = "sha256-ssvWpi7HuuRRAkpqqrX3ijLuBqM3QsrmrG+t7/m6fZA=";
   };
 
-  sourceRoot = "ecoPCR/src";
+  buildInputs = [ gcc python3 zlib ];
 
-  buildInputs = [ gcc python27 zlib ];
+  preConfigure = ''
+    cd src
+  '';
 
   installPhase = ''
     mkdir -p $out/bin
diff --git a/nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix b/nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix
index 44caca2fa2c8..05c445b6cd08 100644
--- a/nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/eggnog-mapper/default.nix
@@ -8,13 +8,13 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "eggnog-mapper";
-  version = "2.1.7";
+  version = "2.1.10";
 
   src = fetchFromGitHub {
     owner = "eggnogdb";
     repo = pname;
-    rev = version;
-    hash = "sha256-auVD/r8m3TAB1KYMQ7Sae23eDg6LRx/daae0505cjwU=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-6R2gl2l2Cl/eva0g+kxDLBI2+5T9cFTgaGMsEfeDVU0=";
   };
 
   postPatch = ''
@@ -36,7 +36,7 @@ python3Packages.buildPythonApplication rec {
   ] ++ (with python3Packages; [
     biopython
     psutil
-    XlsxWriter
+    xlsxwriter
   ]);
 
   # Tests rely on some of the databases being available, which is not bundled
diff --git a/nixpkgs/pkgs/applications/science/biology/emboss/default.nix b/nixpkgs/pkgs/applications/science/biology/emboss/default.nix
index 29669d027303..d590a5da8a67 100644
--- a/nixpkgs/pkgs/applications/science/biology/emboss/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/emboss/default.nix
@@ -25,6 +25,6 @@ stdenv.mkDerivation rec {
     data in a variety of formats and even allows transparent retrieval of
     sequence data from the web.'';
     license = lib.licenses.gpl2;
-    homepage = "http://emboss.sourceforge.net/";
+    homepage = "https://emboss.sourceforge.net/";
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/biology/fastp/default.nix b/nixpkgs/pkgs/applications/science/biology/fastp/default.nix
index 4dace9e63b42..e7fc0d4a35f1 100644
--- a/nixpkgs/pkgs/applications/science/biology/fastp/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/fastp/default.nix
@@ -8,13 +8,13 @@
 
 stdenv.mkDerivation rec {
   pname = "fastp";
-  version = "0.23.2";
+  version = "0.23.4";
 
   src = fetchFromGitHub {
     owner = "OpenGene";
     repo = "fastp";
     rev = "v${version}";
-    sha256 = "sha256-W1mXTfxD7/gHJhao6qqbNcyM3t2cfrUYiBYPJi/O1RI=";
+    sha256 = "sha256-hkCo8CiZNJuVcL9Eg/R7YzM7/FEcGEnovV325oWa7y8=";
   };
 
   buildInputs = [ zlib libdeflate isa-l ];
diff --git a/nixpkgs/pkgs/applications/science/biology/febio-studio/default.nix b/nixpkgs/pkgs/applications/science/biology/febio-studio/default.nix
index e334637f243c..550d221c74eb 100644
--- a/nixpkgs/pkgs/applications/science/biology/febio-studio/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/febio-studio/default.nix
@@ -1,7 +1,7 @@
 { lib, stdenv, fetchFromGitHub, cmake, zlib, libglvnd, libGLU, wrapQtAppsHook
 , sshSupport ? true, openssl, libssh
 , tetgenSupport ? true, tetgen
-, ffmpegSupport ? true, ffmpeg
+, ffmpegSupport ? true, ffmpeg_4
 , dicomSupport  ? false, dcmtk
 , withModelRepo ? true
 , withCadFeatures ? false
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ zlib libglvnd libGLU openssl libssh ]
     ++ lib.optional sshSupport openssl
     ++ lib.optional tetgenSupport tetgen
-    ++ lib.optional ffmpegSupport ffmpeg
+    ++ lib.optional ffmpegSupport ffmpeg_4
     ++ lib.optional dicomSupport dcmtk
   ;
 
diff --git a/nixpkgs/pkgs/applications/science/biology/freebayes/default.nix b/nixpkgs/pkgs/applications/science/biology/freebayes/default.nix
index 5c2f09a4faef..0ceaab4ab46b 100644
--- a/nixpkgs/pkgs/applications/science/biology/freebayes/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/freebayes/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   # gcc-10. Otherwise build fails as:
   #   ld: foomatic_rip-options.o:/build/foomatic-filters-4.0.17/options.c:49: multiple definition of `cupsfilter';
   #     foomatic_rip-foomaticrip.o:/build/foomatic-filters-4.0.17/foomaticrip.c:158: first defined here
-  NIX_CFLAGS_COMPILE = "-fcommon";
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
 
   installPhase = ''
     install -vD bin/freebayes bin/bamleftalign scripts/* -t $out/bin
diff --git a/nixpkgs/pkgs/applications/science/biology/gatk/default.nix b/nixpkgs/pkgs/applications/science/biology/gatk/default.nix
new file mode 100644
index 000000000000..43e5382b5d50
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/gatk/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchzip, jre, makeWrapper, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "gatk";
+  version = "4.4.0.0";
+  src = fetchzip {
+    url = "https://github.com/broadinstitute/gatk/releases/download/${version}/gatk-${version}.zip";
+    sha256 = "sha256-svOtIS6gz9nwVgVmVQbk9z6Ufyobpn6bFbZY4zurvUI=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ python3 ];
+
+  dontUnpack = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -m755 -D $src/gatk-package-${version}-local.jar $out/bin/
+    install -m755 -D $src/gatk-package-${version}-spark.jar $out/bin/
+    install -m755 -D $src/gatk $out/bin/
+  '';
+  postFixup = ''
+    wrapProgram $out/bin/gatk --prefix PATH : ${lib.makeBinPath [ jre ]}
+  '';
+
+  meta = with lib; {
+    homepage = "https://gatk.broadinstitute.org/hc/en-us";
+    description = "A wide variety of tools with a primary focus on variant discovery and genotyping." ;
+    license = licenses.asl20;
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ] ;
+    maintainers = with maintainers; [ apraga ];
+    longDescription = ''
+      The GATK is the industry standard for identifying SNPs and indels in germline
+      DNA and RNAseq data. Its scope is now expanding to include somatic short variant
+      calling, and to tackle copy number (CNV) and structural variation (SV). In
+      addition to the variant callers themselves, the GATK also includes many
+      utilities to perform related tasks such as processing and quality control of
+      high-throughput sequencing data, and bundles the popular Picard toolkit.
+
+      These tools were primarily designed to process exomes and whole genomes
+      generated with Illumina sequencing technology, but they can be adapted to handle
+      a variety of other technologies and experimental designs. And although it was
+      originally developed for human genetics, the GATK has since evolved to handle
+      genome data from any organism, with any level of ploidy.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/genmap/default.nix b/nixpkgs/pkgs/applications/science/biology/genmap/default.nix
index c2d1b8da7af1..c6f9cf1fb193 100644
--- a/nixpkgs/pkgs/applications/science/biology/genmap/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/genmap/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
   patches = [ ./gtest.patch ];
-  checkInputs = [ gtest which ];
+  nativeCheckInputs = [ gtest which ];
   preCheck = "make genmap_algo_test";
 
   # disable benchmarks
diff --git a/nixpkgs/pkgs/applications/science/biology/hh-suite/default.nix b/nixpkgs/pkgs/applications/science/biology/hh-suite/default.nix
new file mode 100644
index 000000000000..2e01ace7d0f1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/hh-suite/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, xxd
+, enableMpi ? false
+, mpi
+, openmp
+}:
+stdenv.mkDerivation rec {
+  pname = "hh-suite";
+  version = "3.3.0";
+
+  src = fetchFromGitHub {
+    owner = "soedinglab";
+    repo = "hh-suite";
+    rev = "v${version}";
+    hash = "sha256-kjNqJddioCZoh/cZL3YNplweIGopWIGzCYQOnKDqZmw=";
+  };
+
+  nativeBuildInputs = [ cmake xxd ];
+  cmakeFlags = lib.optional stdenv.hostPlatform.isx86 "-DHAVE_SSE2=1"
+    ++ lib.optional stdenv.hostPlatform.isAarch "-DHAVE_ARM8=1"
+    ++ lib.optional stdenv.hostPlatform.avx2Support "-DHAVE_AVX2=1"
+    ++ lib.optional stdenv.hostPlatform.sse4_1Support "-DHAVE_SSE4_1=1";
+
+  buildInputs = lib.optional stdenv.cc.isClang openmp
+    ++ lib.optional enableMpi mpi;
+
+  meta = with lib; {
+    description = "Remote protein homology detection suite";
+    homepage = "https://github.com/soedinglab/hh-suite";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ natsukium ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/igv/default.nix b/nixpkgs/pkgs/applications/science/biology/igv/default.nix
index 29b61db76f22..c9af0483da2a 100644
--- a/nixpkgs/pkgs/applications/science/biology/igv/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/igv/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   pname = "igv";
-  version = "2.13.2";
+  version = "2.16.1";
   src = fetchzip {
     url = "https://data.broadinstitute.org/igv/projects/downloads/${lib.versions.majorMinor version}/IGV_${version}.zip";
-    sha256 = "sha256-S0EoZAqjElrM/bp1p69jLuclXeUzSIuH8VsgCO6F04U=";
+    sha256 = "sha256-/3ielakIRdm9/iGBKSk+fTyzYRnsMTdCdsKghnziVwA=";
   };
 
   installPhase = ''
diff --git a/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix b/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix
index 8ea115c6b25d..b4999193e177 100644
--- a/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/inormalize/default.nix
@@ -4,7 +4,7 @@
 
 stdenv.mkDerivation rec {
   pname = "inormalize";
-  name  = "${pname}-2014-10-21";
+  version  = "unstable-2014-10-21";
 
   src = fetchFromGitHub {
     owner  = "BIC-MNI";
diff --git a/nixpkgs/pkgs/applications/science/biology/iqtree/default.nix b/nixpkgs/pkgs/applications/science/biology/iqtree/default.nix
new file mode 100644
index 000000000000..abf9cfba45fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/iqtree/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, eigen
+, zlib
+, llvmPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "iqtree";
+  version = "2.2.2.6";
+
+  src = fetchFromGitHub {
+    owner = "iqtree";
+    repo = "iqtree2";
+    rev = "v${version}";
+    hash = "sha256-dce7JOPZaosRP99/xRfz88EwXR9nYXK6Z4t2i5Uje1w=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    boost
+    eigen
+    zlib
+  ] ++ lib.optionals stdenv.isDarwin [
+    llvmPackages.openmp
+  ];
+
+  meta = with lib; {
+    homepage = "http://www.iqtree.org/";
+    description = "Efficient and versatile phylogenomic software by maximum likelihood";
+    license = licenses.lgpl2;
+    maintainers = with maintainers; [ bzizou ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/jbrowse/default.nix b/nixpkgs/pkgs/applications/science/biology/jbrowse/default.nix
new file mode 100644
index 000000000000..3ed6a885aa75
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/jbrowse/default.nix
@@ -0,0 +1,39 @@
+{ lib, fetchurl, appimageTools, wrapGAppsHook }:
+
+let
+  pname = "jbrowse";
+  version = "2.5.0";
+
+  src = fetchurl {
+    url = "https://github.com/GMOD/jbrowse-components/releases/download/v${version}/jbrowse-desktop-v${version}-linux.AppImage";
+    sha256 = "sha256-YLsyA+RVoFvjE4MfAtglJYdUgic487SxwdUhvolzBPc=";
+  };
+
+  appimageContents = appimageTools.extractType2 {
+    inherit pname version src;
+  };
+
+in
+appimageTools.wrapType2 {
+  inherit pname version src;
+  unshareIpc = false;
+
+  extraInstallCommands = ''
+    mkdir -p $out/bin
+    mv $out/bin/jbrowse-${version} $out/bin/jbrowse-desktop
+
+    install -m 444 -D ${appimageContents}/jbrowse-desktop.desktop $out/share/applications/jbrowse-desktop.desktop
+    install -m 444 -D ${appimageContents}/jbrowse-desktop.png \
+       $out/share/icons/hicolor/512x512/apps/jbrowse-desktop.png
+    substituteInPlace $out/share/applications/jbrowse-desktop.desktop \
+      --replace 'Exec=AppRun --no-sandbox' 'Exec=jbrowse-desktop'
+  '';
+
+  meta = with lib; {
+    description = "The next-generation genome browser";
+    homepage = "https://jbrowse.org/jb2/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ benwbooth ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/kent/default.nix b/nixpkgs/pkgs/applications/science/biology/kent/default.nix
index 12bbfa09c251..f1e891bb85aa 100644
--- a/nixpkgs/pkgs/applications/science/biology/kent/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/kent/default.nix
@@ -13,61 +13,75 @@
 }:
 stdenv.mkDerivation rec {
   pname = "kent";
-  version = "404";
+  version = "446";
 
   src = fetchFromGitHub {
     owner = "ucscGenomeBrowser";
     repo = pname;
     rev = "v${version}_base";
-    sha256 = "0l5lmqqc6sqkf4hyk3z4825ly0vdlj5xdfad6zd0708cb1v81nbx";
+    hash = "sha256-d8gcoyMwINdHoD6xaNKt4rCKrKir99+i4KIzJ2YnxRw=";
   };
 
   buildInputs = [ libpng libuuid zlib bzip2 xz openssl curl libmysqlclient ];
 
   patchPhase = ''
+    runHook prePatch
+
     substituteInPlace ./src/checkUmask.sh \
       --replace "/bin/bash" "${bash}/bin/bash"
 
     substituteInPlace ./src/hg/sqlEnvTest.sh \
       --replace "which mysql_config" "${which}/bin/which ${libmysqlclient}/bin/mysql_config"
+
+    runHook postPatch
   '';
 
   buildPhase = ''
+    runHook preBuild
+
     export MACHTYPE=$(uname -m)
     export CFLAGS="-fPIC"
     export MYSQLINC=$(mysql_config --include | sed -e 's/^-I//g')
     export MYSQLLIBS=$(mysql_config --libs)
-    export DESTBINDIR=$NIX_BUILD_TOP/bin
-    export HOME=$NIX_BUILD_TOP
+    export HOME=$TMPDIR
+    export DESTBINDIR=$HOME/bin
+
+    mkdir -p $HOME/lib $HOME/bin/x86_64
 
     cd ./src
     chmod +x ./checkUmask.sh
     ./checkUmask.sh
 
-    mkdir -p $NIX_BUILD_TOP/lib
-    mkdir -p $NIX_BUILD_TOP/bin/x86_64
-
     make libs
     cd jkOwnLib
     make
 
-    cp ../lib/x86_64/jkOwnLib.a $NIX_BUILD_TOP/lib
-    cp ../lib/x86_64/jkweb.a $NIX_BUILD_TOP/lib
+    cp ../lib/x86_64/jkOwnLib.a $HOME/lib
+    cp ../lib/x86_64/jkweb.a $HOME/lib
+    cp -r ../inc  $HOME/
 
     cd ../utils
     make
+
+    runHook postBuild
   '';
 
   installPhase = ''
-    mkdir -p $out/bin
-    mkdir -p $out/lib
-    cp $NIX_BUILD_TOP/lib/jkOwnLib.a $out/lib
-    cp $NIX_BUILD_TOP/lib/jkweb.a $out/lib
-    cp $NIX_BUILD_TOP/bin/x86_64/* $out/bin
+    runHook preInstall
+
+    mkdir -p $out/bin $out/lib $out/inc
+    cp $HOME/lib/jkOwnLib.a $out/lib
+    cp $HOME/lib/jkweb.a $out/lib
+    cp $HOME/bin/x86_64/* $out/bin
+    cp -r $HOME/inc/* $out/inc/
+
+    runHook postInstall
   '';
 
   meta = with lib; {
     description = "UCSC Genome Bioinformatics Group's suite of biological analysis tools, i.e. the kent utilities";
+    homepage = "http://genome.ucsc.edu";
+    changelog = "https://github.com/ucscGenomeBrowser/kent/releases/tag/v${version}_base";
     license = licenses.unfree;
     maintainers = with maintainers; [ scalavision ];
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/applications/science/biology/last/default.nix b/nixpkgs/pkgs/applications/science/biology/last/default.nix
index 031e59619005..7b6689a358a8 100644
--- a/nixpkgs/pkgs/applications/science/biology/last/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/last/default.nix
@@ -1,20 +1,35 @@
-{ lib, stdenv, fetchFromGitLab, unzip, zlib, python3, parallel }:
+{ lib
+, stdenv
+, fetchFromGitLab
+, unzip
+, zlib
+, python3
+, parallel
+}:
 
 stdenv.mkDerivation rec {
   pname = "last";
-  version = "1406";
+  version = "1453";
 
   src = fetchFromGitLab {
     owner = "mcfrith";
     repo = "last";
-    rev = version;
-    sha256 = "sha256-N1B9W++4SiMRMUjDi8ZexOWF/HQpN8BBPuDKYh4bCS8=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-r8bWk1+weSyQ5QPGKKwdAzMkzh3DgzTUr5YCMUq5UUM=";
   };
 
-  nativeBuildInputs = [ unzip ];
-  buildInputs = [ zlib python3 ];
+  nativeBuildInputs = [
+    unzip
+  ];
 
-  makeFlags = [ "prefix=${placeholder "out"}" ];
+  buildInputs = [
+    zlib
+    python3
+  ];
+
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+  ];
 
   postFixup = ''
     for f in $out/bin/parallel-* ; do
diff --git a/nixpkgs/pkgs/applications/science/biology/mafft/default.nix b/nixpkgs/pkgs/applications/science/biology/mafft/default.nix
index 7b1a3c68072c..e9acd1c88b66 100644
--- a/nixpkgs/pkgs/applications/science/biology/mafft/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/mafft/default.nix
@@ -1,12 +1,14 @@
-{ lib, stdenv, fetchurl }:
+{ lib, stdenv, fetchFromGitLab }:
 
 stdenv.mkDerivation rec {
   pname = "mafft";
-  version = "7.505";
+  version = "7.520";
 
-  src = fetchurl {
-    url = "https://mafft.cbrc.jp/alignment/software/mafft-${version}-with-extensions-src.tgz";
-    sha256 = "sha256-9Up4Zw/NmWAjO8w7PdNZ85WnHAztRae+HP6uGZUM5v8=";
+  src = fetchFromGitLab {
+    owner = "sysimm";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-H+EcKahJWwidAx+IUT4uCZEty+S8hUeMSB8VbTu5SmQ=";
   };
 
   preBuild = ''
diff --git a/nixpkgs/pkgs/applications/science/biology/megahit/default.nix b/nixpkgs/pkgs/applications/science/biology/megahit/default.nix
index 45cb7560502d..7f054a51d5e0 100644
--- a/nixpkgs/pkgs/applications/science/biology/megahit/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/megahit/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib ];
 
-  cmakeFlags = lib.optional stdenv.hostPlatform.isStatic [
+  cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [
     "-DSTATIC_BUILD=ON"
     ];
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/biology/meme-suite/default.nix b/nixpkgs/pkgs/applications/science/biology/meme-suite/default.nix
index bfa561437e74..c0f67c314161 100644
--- a/nixpkgs/pkgs/applications/science/biology/meme-suite/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/meme-suite/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, python3, perl, glibc, zlib }:
+{ lib, stdenv, fetchurl, python3, perl, zlib }:
 
 stdenv.mkDerivation rec {
   pname = "meme-suite";
diff --git a/nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix b/nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix
index 3b12e12a2258..456e8f42dbac 100644
--- a/nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/messer-slim/default.nix
@@ -1,14 +1,14 @@
 { lib, stdenv, fetchFromGitHub, cmake, gcc, gcc-unwrapped }:
 
 stdenv.mkDerivation rec {
-  version = "4.0";
+  version = "4.0.1";
   pname = "messer-slim";
 
   src = fetchFromGitHub {
     owner = "MesserLab";
     repo = "SLiM";
     rev = "v${version}";
-    sha256 = "sha256-2iEflSDknlQtCLz2MvEZExOT+MQlEYOMY2JI0XE6mw0=";
+    sha256 = "sha256-KC9MbIJi//ZYreoRS+DED8eQW7e4IPvGT+rLI+f7Zrk=";
   };
 
   nativeBuildInputs = [ cmake gcc gcc-unwrapped ];
diff --git a/nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix b/nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix
index e8aef4138b05..42178722b551 100644
--- a/nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/minc-widgets/default.nix
@@ -4,8 +4,7 @@
 
 stdenv.mkDerivation rec {
   pname = "minc-widgets";
-  name  = "${pname}-2016-04-20";
-
+  version = "unstable-2016-04-20";
 
   src = fetchFromGitHub {
     owner  = "BIC-MNI";
diff --git a/nixpkgs/pkgs/applications/science/biology/minia/default.nix b/nixpkgs/pkgs/applications/science/biology/minia/default.nix
index 6b6bc300e0d9..023a05d7504f 100644
--- a/nixpkgs/pkgs/applications/science/biology/minia/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/minia/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   patches = [ ./no-bundle.patch ];
 
-  NIX_CFLAGS_COMPILE = [ "-Wformat" ];
+  env.NIX_CFLAGS_COMPILE = toString [ "-Wformat" ];
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ hdf5 boost ];
diff --git a/nixpkgs/pkgs/applications/science/biology/minimap2/default.nix b/nixpkgs/pkgs/applications/science/biology/minimap2/default.nix
index 7e162e2d27c6..35c1b076d7eb 100644
--- a/nixpkgs/pkgs/applications/science/biology/minimap2/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/minimap2/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "minimap2";
-  version = "2.24";
+  version = "2.26";
 
   src = fetchFromGitHub {
     repo = pname;
     owner = "lh3";
     rev = "v${version}";
-    sha256 = "sha256-sEp7/Y5ifV9LTqrkhlkfykTJYMMuc+VtF7PvmIpBxUw=";
+    sha256 = "sha256-vK8Z/j6Ndu1vMFYPPzViP4evtIhyVVFwsfTqNCYnXpQ=";
   };
 
   buildInputs = [ zlib ];
diff --git a/nixpkgs/pkgs/applications/science/biology/mmseqs2/default.nix b/nixpkgs/pkgs/applications/science/biology/mmseqs2/default.nix
new file mode 100644
index 000000000000..253f4a43a81c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/mmseqs2/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, xxd
+, perl
+, installShellFiles
+, enableAvx2 ? stdenv.hostPlatform.avx2Support
+, enableSse4_1 ? stdenv.hostPlatform.sse4_1Support
+, enableMpi ? false
+, mpi
+, openmp
+, zlib
+, bzip2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mmseqs2";
+  version = "14-7e284";
+
+  src = fetchFromGitHub {
+    owner = "soedinglab";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-pVryZGblgMEqJl5M20CHxav269yGY6Y4ci+Gxt6SHOU=";
+  };
+
+  nativeBuildInputs = [ cmake xxd perl installShellFiles ];
+  cmakeFlags =
+    lib.optional enableAvx2 "-DHAVE_AVX2=1"
+    ++ lib.optional enableSse4_1 "-DHAVE_SSE4_1=1"
+    ++ lib.optional enableMpi "-DHAVE_MPI=1";
+
+  buildInputs =
+    lib.optionals stdenv.cc.isClang [ openmp zlib bzip2 ]
+    ++ lib.optional enableMpi mpi;
+
+  postInstall = ''
+    installShellCompletion --bash --cmd mmseqs $out/util/bash-completion.sh
+    rm -r $out/util/
+  '';
+
+  meta = with lib; {
+    description = "Ultra fast and sensitive sequence search and clustering suite";
+    homepage = "https://mmseqs.com/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ natsukium ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix b/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix
index 99b6269737d1..4cb130296aec 100644
--- a/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/mrtrix/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
     qt5.qtsvg
   ];
 
-  installCheckInputs = [ bc ];
+  nativeInstallCheckInputs = [ bc ];
 
   postPatch = ''
     patchShebangs ./build ./configure ./run_tests ./bin/*
diff --git a/nixpkgs/pkgs/applications/science/biology/muscle/default.nix b/nixpkgs/pkgs/applications/science/biology/muscle/default.nix
index 54ff58cce717..86219f35f95a 100644
--- a/nixpkgs/pkgs/applications/science/biology/muscle/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/muscle/default.nix
@@ -1,36 +1,27 @@
-{ lib, stdenv, fetchurl }:
+{ lib, stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
-  _name   = "muscle";
-  name    = "${_name}-${version}";
-  version = "3.8.31";
+  pname   = "muscle";
+  version = "5.1.0";
 
-  src = fetchurl {
-    url = "https://www.drive5.com/muscle/downloads${version}/${_name}${version}_src.tar.gz";
-    sha256 = "1b89z0x7h098g99g00nqadgjnb2r5wpi9s11b7ddffqkh9m9dia3";
-  };
 
-  patches = [
-    ./muscle-3.8.31-no-static.patch
-  ];
+  src = fetchFromGitHub {
+    owner = "rcedgar";
+    repo = pname;
+    rev = "${version}";
+    hash = "sha256-NpnJziZXga/T5OavUt3nQ5np8kJ9CFcSmwyg4m6IJsk=";
+  };
 
-  preBuild = ''
-    cd ./src/
-    patchShebangs mk
-  '';
+  sourceRoot = "source/src";
 
   installPhase = ''
-    install -vD muscle $out/bin/muscle
+    install -m755 -D Linux/muscle $out/bin/muscle
   '';
 
   meta = with lib; {
-    broken = (stdenv.isLinux && stdenv.isAarch64);
-    description = "A multiple sequence alignment method with reduced time and space complexity";
-    license     = licenses.publicDomain;
+    description = "Multiple sequence alignment with top benchmark scores scalable to thousands of sequences";
+    license     = licenses.gpl3Plus;
     homepage    = "https://www.drive5.com/muscle/";
-    maintainers = [ maintainers.unode ];
-    # NOTE: Supposed to be compatible with darwin/intel & PPC but currently fails.
-    # Anyone with access to these platforms is welcome to give it a try
-    platforms   = lib.platforms.linux;
+    maintainers = with maintainers; [ unode thyol ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch b/nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch
deleted file mode 100644
index 7f4b2129518d..000000000000
--- a/nixpkgs/pkgs/applications/science/biology/muscle/muscle-3.8.31-no-static.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/src/mk	2010-05-02 01:15:42.000000000 +0200
-+++ b/src/mk	2018-01-27 17:07:23.539092748 +0100
-@@ -5,14 +5,14 @@
- rm -f *.o muscle.make.stdout.txt muscle.make.stderr.txt
- for CPPName in $CPPNames
- do
--  echo $CPPName >> /dev/tty
-+  echo $CPPName
-   g++ $ENV_GCC_OPTS -c -O3 -msse2 -mfpmath=sse -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 $CPPName.cpp -o $CPPName.o  >> muscle.make.stdout.txt 2>> muscle.make.stderr.txt
- done
- 
- LINK_OPTS=
--if [ `uname -s` == Linux ] ; then
--    LINK_OPTS=-static
--fi
-+#if [ `uname -s` == Linux ] ; then
-+#    LINK_OPTS=-static
-+#fi
- g++ $LINK_OPTS $ENV_LINK_OPTS -g -o muscle $ObjNames  >> muscle.make.stdout.txt 2>> muscle.make.stderr.txt
- tail muscle.make.stderr.txt
- 
diff --git a/nixpkgs/pkgs/applications/science/biology/nest/default.nix b/nixpkgs/pkgs/applications/science/biology/nest/default.nix
new file mode 100644
index 000000000000..912fecff177b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/nest/default.nix
@@ -0,0 +1,86 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, testers
+, cmake
+, gsl
+, libtool
+, findutils
+, llvmPackages
+, mpi
+, nest
+, pkg-config
+, boost
+, python3
+, readline
+, autoPatchelfHook
+, withPython ? false
+, withMpi ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nest";
+  version = "3.4";
+
+  src = fetchFromGitHub {
+    owner = "nest";
+    repo = "nest-simulator";
+    rev = "v${version}";
+    hash = "sha256-+wjsZxW2l0WGyGTm/6vyzPEeqCfyxJml9oP/zn6W1L0=";
+  };
+
+  postPatch = ''
+    patchShebangs cmake/CheckFiles/check_return_val.sh
+    # fix PyNEST installation path
+    # it expects CMAKE_INSTALL_LIBDIR to be relative
+    substituteInPlace cmake/ProcessOptions.cmake \
+      --replace "\''${CMAKE_INSTALL_LIBDIR}/python" "lib/python"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    findutils
+  ];
+
+  buildInputs = [
+    gsl
+    readline
+    libtool # libltdl
+    boost
+  ] ++ lib.optionals withPython [
+    python3
+    python3.pkgs.cython
+  ] ++ lib.optional withMpi mpi
+    ++ lib.optional stdenv.isDarwin llvmPackages.openmp;
+
+  propagatedBuildInputs = with python3.pkgs; [
+    numpy
+  ];
+
+  cmakeFlags = [
+    "-Dwith-python=${if withPython then "ON" else "OFF"}"
+    "-Dwith-mpi=${if withMpi then "ON" else "OFF"}"
+    "-Dwith-openmp=ON"
+  ];
+
+  postInstall = ''
+    # Alternative to autoPatchElf, moves libraries where
+    # Nest expects them to be
+    find $out/lib/nest -exec ln -s {} $out/lib \;
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = nest;
+    command = "nest --version";
+  };
+
+  meta = with lib; {
+    description = "NEST is a command line tool for simulating neural networks";
+    homepage = "https://www.nest-simulator.org/";
+    changelog = "https://github.com/nest/nest-simulator/releases/tag/v${version}";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ jiegec davidcromp ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/neuron/default.nix b/nixpkgs/pkgs/applications/science/biology/neuron/default.nix
index 36f1b4c699a8..5b08fbfd6704 100644
--- a/nixpkgs/pkgs/applications/science/biology/neuron/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/neuron/default.nix
@@ -1,94 +1,104 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , fetchurl
-, pkg-config
-, automake
-, autoconf
-, libtool
-, ncurses
 , readline
-, which
-, python ? null
-, useMpi ? false
+, xorg
 , mpi
-, iv
+, cmake
+, bison
+, flex
+, git
+, perl
+, gsl
+, xcbuild
+, python3
+, useMpi ? false
+, useIv ? true
+, useCore ? false
+, useRx3d ? false
 }:
 
+
 stdenv.mkDerivation rec {
-  pname = "neuron${lib.optionalString useMpi "-mpi"}";
-  version = "7.5";
+  pname = "neuron";
+  version = "8.2.2";
 
-  nativeBuildInputs = [ which pkg-config automake autoconf libtool ];
-  buildInputs = [ ncurses readline python iv ]
-    ++ lib.optional useMpi mpi;
+  # format is for pythonModule conversion
+  format = "other";
 
-  src = fetchurl {
-    url = "https://www.neuron.yale.edu/ftp/neuron/versions/v${version}/nrn-${version}.tar.gz";
-    sha256 = "0f26v3qvzblcdjg7isq0m9j2q8q7x3vhmkfllv8lsr3gyj44lljf";
-  };
+  nativeBuildInputs = [
+    cmake
+    bison
+    flex
+    git
+  ] ++ lib.optionals useCore [ perl gsl ]
+  ++ lib.optionals stdenv.isDarwin [ xcbuild ];
 
-  patches = (lib.optional (stdenv.isDarwin) [ ./neuron-carbon-disable.patch ]);
+  buildInputs = lib.optionals useIv [
+    xorg.libX11.dev
+    xorg.libXcomposite.dev
+    xorg.libXext.dev
+  ];
 
-  # With LLVM 3.8 and above, clang (really libc++) gets upset if you attempt to redefine these...
-  postPatch = lib.optionalString stdenv.cc.isClang ''
-    substituteInPlace src/gnu/neuron_gnu_builtin.h \
-      --replace 'double abs(double arg);' "" \
-      --replace 'float abs(float arg);' "" \
-      --replace 'short abs(short arg);' "" \
-      --replace 'long abs(long arg);' ""
-  '' + lib.optionalString stdenv.isDarwin ''
-    # we are darwin, but we don't have all the quirks the source wants to compensate for
-    substituteInPlace src/nrnpython/setup.py.in --replace 'readline="edit"' 'readline="readline"'
-    for f in src/nrnpython/*.[ch] ; do
-      substituteInPlace $f --replace "<Python/Python.h>" "<Python.h>"
-    done
-  '';
+  propagatedBuildInputs = [
+    readline
+    python3
+    python3.pkgs.wheel
+    python3.pkgs.setuptools
+    python3.pkgs.scikit-build
+    python3.pkgs.matplotlib
+  ] ++ lib.optionals useMpi [
+    mpi
+  ] ++ lib.optionals useMpi [
+    python3.pkgs.mpi4py
+  ] ++ lib.optionals useRx3d [
+    python3.pkgs.cython
+    python3.pkgs.numpy
+  ];
 
-  enableParallelBuilding = true;
+  patches = [ ./neuron_darwin_rpath.patch ];
 
-  ## neuron install by default everything under prefix/${host_arch}/*
-  ## override this to support nix standard file hierarchy
-  ## without issues: install everything under prefix/
-  preConfigure = ''
-    ./build.sh
-    export prefix="''${prefix} --exec-prefix=''${out}"
+  # Patch build shells for cmake (bin, src, cmake) and submodules (external)
+  postPatch = ''
+    patchShebangs ./bin ./src ./external ./cmake
+    sed -e 's#DESTDIR =#DESTDIR = '"$out"'#' -i external/coreneuron/extra/nrnivmodl_core_makefile.in
   '';
 
-  configureFlags = with lib;
-                    [ "--with-readline=${readline}" "--with-iv=${iv}" ]
-                    ++  optionals (python != null)  [ "--with-nrnpython=${python.interpreter}" ]
-                    ++ (if useMpi then ["--with-mpi" "--with-paranrn"]
-                        else ["--without-mpi"]);
+  cmakeFlags = [
+    "-DNRN_ENABLE_INTERVIEWS=${if useIv then "ON" else "OFF"}"
+    "-DNRN_ENABLE_MPI=${if useMpi then "ON" else "OFF"}"
+    "-DNRN_ENABLE_CORENEURON=${if useCore then "ON" else "OFF"}"
+    "-DNRN_ENABLE_RX3D=${if useRx3d then "ON" else "OFF"}"
+  ];
 
-
-  postInstall = lib.optionalString (python != null) ''
-    ## standardise python neuron install dir if any
-    if [[ -d $out/lib/python ]]; then
-        mkdir -p ''${out}/${python.sitePackages}
-        mv ''${out}/lib/python/*  ''${out}/${python.sitePackages}/
-    fi
+  postInstall = ''
+    mkdir -p $out/${python3.sitePackages}
+    mv $out/lib/python/* $out/${python3.sitePackages}/
+    rm -rf $out/lib/python build
+    for entry in $out/lib/*.so; do
+      # remove references to build
+      patchelf --set-rpath $(patchelf --print-rpath $entry | tr ':' '\n' | sed '/^\/build/d' | tr '\n' ':') $entry
+    done
   '';
 
-  propagatedBuildInputs = [ readline ncurses which libtool ];
+  src = fetchurl {
+    url = "https://github.com/neuronsimulator/nrn/releases/download/${version}/full-src-package-${version}.tar.gz";
+    sha256 = "sha256-orGeBxu3pu4AyAW5P1EGJv8G0dOUZcSOjpUaloqicZU=";
+  };
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     description = "Simulation environment for empirically-based simulations of neurons and networks of neurons";
-
-    longDescription = "NEURON is a simulation environment for developing and exercising models of
-                neurons and networks of neurons. It is particularly well-suited to problems where
-                cable properties of cells play an important role, possibly including extracellular
-                potential close to the membrane), and where cell membrane properties are complex,
-                involving many ion-specific channels, ion accumulation, and second messengers";
-
-    sourceProvenance = with sourceTypes; [
-      fromSource
-    ] ++ lib.optionals (python != null) [
-      binaryNativeCode  # "geometry3d" bundled libraries
-    ];
-    license     = licenses.bsd3;
-    homepage    = "http://www.neuron.yale.edu/neuron";
-    maintainers = [ maintainers.adev ];
-    # source claims it's only tested for x86 and powerpc
-    platforms   = platforms.x86_64 ++ platforms.i686;
+    longDescription = ''
+      NEURON is a simulation environment for developing and exercising models of
+      neurons and networks of neurons. It is particularly well-suited to problems where
+      cable properties of cells play an important role, possibly including extracellular
+      potential close to the membrane), and where cell membrane properties are complex,
+      involving many ion-specific channels, ion accumulation, and second messengers
+    '';
+    sourceProvenance = with sourceTypes; [ fromSource ];
+    license = licenses.bsd3;
+    homepage = "http://www.neuron.yale.edu/neuron";
+    maintainers = with maintainers; [ adev davidcromp ];
+    platforms = platforms.all;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch b/nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch
deleted file mode 100644
index 923bffb1c338..000000000000
--- a/nixpkgs/pkgs/applications/science/biology/neuron/neuron-carbon-disable.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- nrn-7.4/src/mac/Makefile.am	2015-11-12 21:42:45.000000000 +0100
-+++ nrn-7.4.new/src/mac/Makefile.am	2016-08-24 17:43:39.000000000 +0200
-@@ -15,18 +15,8 @@
- host_cpu = @host_cpu@
- 
- if MAC_DARWIN
--carbon = @enable_carbon@
- bin_SCRIPTS = $(launch_scripts)
- install: install-am
--if UniversalMacBinary
--	$(CC) -arch ppc -o aoutppc -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon
--	$(CC) -arch i386 -o aouti386 -Dcpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon
--	lipo aouti386 aoutppc -create -output a.out
--else
--	gcc -g -arch i386 -Dncpu="\"$(host_cpu)\"" -I. $(srcdir)/launch.c $(srcdir)/mac2uxarg.c -framework Carbon
--
--endif
--	carbon=$(carbon) sh $(srcdir)/launch_inst.sh "$(host_cpu)" "$(DESTDIR)$(prefix)" "$(srcdir)"
- 	for i in $(S) ; do \
- 		sed "s/^CPU.*/CPU=\"$(host_cpu)\"/" < $(DESTDIR)$(bindir)/$$i > temp; \
- 		mv temp $(DESTDIR)$(bindir)/$$i; \
diff --git a/nixpkgs/pkgs/applications/science/biology/neuron/neuron_darwin_rpath.patch b/nixpkgs/pkgs/applications/science/biology/neuron/neuron_darwin_rpath.patch
new file mode 100644
index 000000000000..1b0fa2670782
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/neuron/neuron_darwin_rpath.patch
@@ -0,0 +1,11 @@
+--- a/src/nrnpython/setup.py.in
++++ b/src/nrnpython/setup.py.in
+@@ -124,7 +124,7 @@ libdirs = [destdir + get_escaped_path("@NRN_LIBDIR@"),
+ rpath_prefix_flag='-Wl,-R'
+ extra_link_args = [@NRN_LINK_FLAGS_COMMA_SEPARATED_STRINGS@]
+ @MAC_DARWIN_FALSE@extra_link_args += [rpath_prefix_flag+lib_path for lib_path in libdirs]
+-@MAC_DARWIN_TRUE@extra_link_args.append("-Wl,-rpath,@loader_path/../../")
++@MAC_DARWIN_TRUE@extra_link_args.append("-Wl,-rpath,@loader_path/../../../")
+ @MAC_DARWIN_TRUE@extra_link_args.append("-Wl,-rpath,%s" % ivlibdir)
+
+ # as neuron module will be built during make, add build/lib
diff --git a/nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix b/nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix
index d5f625893e92..0be59bcd726a 100644
--- a/nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/niftyreg/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "07v9v9s41lvw72wpb1jgh2nzanyc994779bd35p76vg8mzifmprl";
   };
 
-  NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ];
+  env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=narrowing" ];
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib ];
diff --git a/nixpkgs/pkgs/applications/science/biology/octopus/default.nix b/nixpkgs/pkgs/applications/science/biology/octopus/default.nix
index 95912d3a7c32..c2948087d8ed 100644
--- a/nixpkgs/pkgs/applications/science/biology/octopus/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/octopus/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchFromGitHub, cmake, boost, gmp, htslib, zlib, xz, pkg-config}:
+{lib, stdenv, fetchurl, fetchFromGitHub, cmake, boost, gmp, htslib, zlib, xz, pkg-config}:
 
 stdenv.mkDerivation rec {
   pname = "octopus";
@@ -14,6 +14,16 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [ boost gmp htslib zlib xz ];
 
+  patches = [ (fetchurl {
+    url = "https://github.com/luntergroup/octopus/commit/17a597d192bcd5192689bf38c5836a98b824867a.patch";
+    sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY=";
+  }) ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=deprecated-declarations"
+  ];
+
   postInstall = ''
     mkdir $out/bin
     mv $out/octopus $out/bin
diff --git a/nixpkgs/pkgs/applications/science/biology/paml/default.nix b/nixpkgs/pkgs/applications/science/biology/paml/default.nix
index 66ba244cacd6..871c76dc6e31 100644
--- a/nixpkgs/pkgs/applications/science/biology/paml/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/paml/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   # gcc-10. Otherwise build fails as:
   #   ld: /build/ccKomtcd.o:(.bss+0x4544): multiple definition of `SeqTypes';
   #     /build/ccx7EsgU.o:(.bss+0x2a0dfdc): first defined here
-  NIX_CFLAGS_COMPILE = "-fcommon";
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
 
   preBuild = ''
     cd ./src/
diff --git a/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix b/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix
index 94dc8e62cd32..8bd1af4b11d7 100644
--- a/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/picard-tools/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "picard-tools";
-  version = "2.26.11";
+  version = "3.0.0";
 
   src = fetchurl {
     url = "https://github.com/broadinstitute/picard/releases/download/${version}/picard.jar";
-    sha256 = "sha256-0swggo1a5gExpj3VgaWKT/TYd7rfSFBcqRrAURnTPjM=";
+    sha256 = "sha256-DV4oqzAfrTsCAw0BkjiIEpuoLF9yKsXMstQYq3asVJk=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix b/nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix
index b21ef2d71d6c..00fd0ff0083e 100644
--- a/nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/plink-ng/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   preBuild = ''
     sed -i 's|zlib-1.2.8/zlib.h|zlib.h|g' *.c *.h
-    ${if stdenv.cc.isClang then "sed -i 's|g++|clang++|g' Makefile.std" else ""}
+    ${lib.optionalString stdenv.cc.isClang "sed -i 's|g++|clang++|g' Makefile.std"}
 
     makeFlagsArray+=(
       ZLIB=-lz
diff --git a/nixpkgs/pkgs/applications/science/biology/quast/default.nix b/nixpkgs/pkgs/applications/science/biology/quast/default.nix
index 0a33c9767319..e5ee4b53089f 100644
--- a/nixpkgs/pkgs/applications/science/biology/quast/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/quast/default.nix
@@ -27,7 +27,7 @@ pythonPackages.buildPythonApplication rec {
       --replace "/bin/bash" "${bash}/bin/bash"
     mkdir -p "$out/${python.sitePackages}"
     export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
-    ${python.interpreter} setup.py install \
+    ${python.pythonForBuild.interpreter} setup.py install \
       --install-lib=$out/${python.sitePackages} \
       --prefix="$out"
   '';
diff --git a/nixpkgs/pkgs/applications/science/biology/sambamba/default.nix b/nixpkgs/pkgs/applications/science/biology/sambamba/default.nix
index 36e950a18121..38333cbc9988 100644
--- a/nixpkgs/pkgs/applications/science/biology/sambamba/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/sambamba/default.nix
@@ -10,23 +10,30 @@
 
 stdenv.mkDerivation rec {
   pname = "sambamba";
-  version = "0.8.2";
+  version = "1.0.0";
 
   src = fetchFromGitHub {
     owner = "biod";
     repo = "sambamba";
     rev = "v${version}";
-    sha256 = "sha256-FEa9QjQoGNUOAtMNMZcqpTKMKVtXoBuOomTy0mpos/0=";
+    sha256 = "sha256-HwAzsbT71Q35Io6H7Hzs4RTatpRpdHqV0cwPYAlsf6c=";
     fetchSubmodules = true;
   };
 
   nativeBuildInputs = [ which python3 ldc ];
   buildInputs = [ zlib lz4 ];
 
+  buildFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+  ];
+
   # Upstream's install target is broken; copy manually
   installPhase = ''
-    mkdir -p $out/bin
-    cp bin/sambamba-${version} $out/bin/sambamba
+    runHook preInstall
+
+    install -Dm755 bin/sambamba-${version} $out/bin/sambamba
+
+    runHook postInstall
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/biology/samtools/default.nix b/nixpkgs/pkgs/applications/science/biology/samtools/default.nix
index 29ba667b0552..5e18d5ead58a 100644
--- a/nixpkgs/pkgs/applications/science/biology/samtools/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/samtools/default.nix
@@ -2,24 +2,15 @@
 
 stdenv.mkDerivation rec {
   pname = "samtools";
-  version = "1.13";
+  version = "1.17";
 
   src = fetchurl {
     url = "https://github.com/samtools/samtools/releases/download/${version}/${pname}-${version}.tar.bz2";
-    sha256 = "sha256-YWyi4FHMgAmh6cAc/Yx8r4twkW3f9m87dpFAeUZfjGA=";
+    sha256 = "sha256-Ot85C2KCGf1kCPFGAqTEqpDmPhizldrXIqtRlDiipyk";
   };
 
-  patches = [
-    # Pull upstream patch for ncurses-6.3 support
-    (fetchpatch {
-      name = "ncurses-6.3.patch";
-      url = "https://github.com/samtools/samtools/commit/396ef20eb0854d6b223c3223b60bb7efe42301f7.patch";
-      sha256 = "sha256-p0l9ymXK9nqL2w8EytbW+qeaI7dD86IQgIVxacBj838=";
-    })
-  ];
-
   # tests require `bgzip` from the htslib package
-  checkInputs = [ htslib ];
+  nativeCheckInputs = [ htslib ];
 
   nativeBuildInputs = [ perl ];
 
@@ -32,7 +23,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--with-htslib=${htslib}" ]
     ++ lib.optional (ncurses == null) "--without-curses"
-    ++ lib.optional stdenv.hostPlatform.isStatic ["--without-curses" ]
+    ++ lib.optionals stdenv.hostPlatform.isStatic ["--without-curses" ]
     ;
 
   preCheck = ''
diff --git a/nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix b/nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix
index 590f10dd87a1..2472e4976cad 100644
--- a/nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix
+++ b/nixpkgs/pkgs/applications/science/biology/samtools/samtools_0_1_19.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Tools for manipulating SAM/BAM/CRAM format";
     license = licenses.mit;
-    homepage = "http://samtools.sourceforge.net/";
+    homepage = "https://samtools.sourceforge.net/";
     platforms = platforms.unix;
     maintainers = [ maintainers.unode ];
   };
diff --git a/nixpkgs/pkgs/applications/science/biology/seaview/default.nix b/nixpkgs/pkgs/applications/science/biology/seaview/default.nix
index 9cfa7cb933b0..640d2f5ae416 100644
--- a/nixpkgs/pkgs/applications/science/biology/seaview/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/seaview/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
 
           Gouy M., Guindon S. & Gascuel O. (2010) SeaView version 4 : a multiplatform graphical user interface for sequence alignment and phylogenetic tree building. Molecular Biology and Evolution 27(2):221-224.
     '';
-    homepage = "http://doua.prabi.fr/software/seaview";
+    homepage = "https://doua.prabi.fr/software/seaview";
     license = licenses.gpl3;
     maintainers = [ maintainers.iimog ];
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/applications/science/biology/seqkit/default.nix b/nixpkgs/pkgs/applications/science/biology/seqkit/default.nix
new file mode 100644
index 000000000000..598c8248bfb4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/seqkit/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, fetchFromGitHub
+, buildGoModule
+}:
+
+buildGoModule rec {
+  pname = "seqkit";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "shenwei356";
+    repo = "seqkit";
+    rev = "v${version}";
+    sha256 = "sha256-v2Z94UDuXnT7eVFX+uLSxXR34eIBzRm1bHwD7gO9SVA=";
+  };
+
+  vendorHash = "sha256-dDMSwZnTWC60zvPDvUT+9T/mUUrhW0Itn87XO/+Ef2Q=";
+
+  meta = with lib; {
+    description = "cross-platform and ultrafast toolkit for FASTA/Q file manipulation";
+    homepage = "https://github.com/shenwei356/seqkit";
+    license = licenses.mit;
+    maintainers = with maintainers; [ bzizou ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/seqtk/default.nix b/nixpkgs/pkgs/applications/science/biology/seqtk/default.nix
new file mode 100644
index 000000000000..90bd4bb3c65e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/seqtk/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, zlib
+, libdeflate
+, isa-l
+}:
+
+stdenv.mkDerivation rec {
+  pname = "seqtk";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "lh3";
+    repo = "seqtk";
+    rev = "v${version}";
+    hash = "sha256-W6IUn7R9tlnWrKe/qOHJL+43AL4EZB7zj7M5u9l83WE=";
+  };
+
+  buildInputs = [ zlib libdeflate isa-l ];
+
+  makeFlags = [ "CC=cc" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 -t $out/bin seqtk
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Toolkit for processing sequences in FASTA/Q formats";
+    license = licenses.mit;
+    homepage = "https://github.com/lh3/seqtk";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ bwlang ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix b/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix
index a47a107349da..269d6e307f1d 100644
--- a/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/snpeff/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Genetic variant annotation and effect prediction toolbox";
     license = licenses.lgpl3;
-    homepage = "http://snpeff.sourceforge.net/";
+    homepage = "https://snpeff.sourceforge.net/";
     sourceProvenance = with sourceTypes; [ binaryBytecode ];
     maintainers = with maintainers; [ jbedo ];
     platforms = platforms.all;
diff --git a/nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix b/nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix
index 11530c6a7226..6884e1955f75 100644
--- a/nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/sortmerna/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, cmake, rocksdb, rapidjson, pkg-config, fetchFromGitHub, fetchpatch, zlib }:
+{ lib, stdenv, cmake, rocksdb, rapidjson, pkg-config, fetchFromGitHub, zlib }:
 
 stdenv.mkDerivation rec {
   pname = "sortmerna";
diff --git a/nixpkgs/pkgs/applications/science/biology/spades/default.nix b/nixpkgs/pkgs/applications/science/biology/spades/default.nix
index 9780c8a99a46..976dd65ef223 100644
--- a/nixpkgs/pkgs/applications/science/biology/spades/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/spades/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "SPAdes";
-  version = "3.15.4";
+  version = "3.15.5";
 
   src = fetchurl {
     url = "http://cab.spbu.ru/files/release${version}/${pname}-${version}.tar.gz";
-    sha256 = "sha256-OyQcUopCqL398j5b+PAISDR5BZDQhJHezqnw8AnYWJ8=";
+    sha256 = "sha256-FVw2QNVx8uexmgUDHR/Q0ZvYLfeF04hw+5O9JBsSu/o=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/applications/science/biology/sratoolkit/default.nix b/nixpkgs/pkgs/applications/science/biology/sratoolkit/default.nix
new file mode 100644
index 000000000000..8a1bb5376eaf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/sratoolkit/default.nix
@@ -0,0 +1,56 @@
+{ stdenv
+, lib
+, fetchurl
+, autoPatchelfHook
+, libidn
+, zlib
+, bzip2
+}:
+
+
+let
+  libidn11 = libidn.overrideAttrs (old: {
+    pname = "libidn";
+    version = "1.34";
+    src = fetchurl {
+      url = "mirror://gnu/libidn/libidn-1.34.tar.gz";
+      sha256 = "0g3fzypp0xjcgr90c5cyj57apx1cmy0c6y9lvw2qdcigbyby469p";
+    };
+  });
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "sratoolkit";
+  version = "2.11.3";
+
+  src = fetchurl {
+    url = "https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/${version}/sratoolkit.${version}-ubuntu64.tar.gz";
+    sha256 = "1590lc4cplxr3lhjqci8fjncy67imn2h14qd2l87chmhjh243qvx";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+  ];
+
+  buildInputs = [
+    libidn11
+    zlib
+    bzip2
+    stdenv.cc.cc.lib
+  ];
+
+  sourceRoot = "./sratoolkit.${version}-ubuntu64/bin";
+
+  installPhase = ''
+    find -L . -executable -type f -! -name "*remote-fuser*" -exec install -m755 -D {} $out/bin/{} \;
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/ncbi/sra-tools";
+    description = "The SRA Toolkit and SDK from NCBI is a collection of tools and libraries for using data in the INSDC Sequence Read Archives.";
+    license = licenses.publicDomain;
+    maintainers = with maintainers; [ thyol ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/stacks/default.nix b/nixpkgs/pkgs/applications/science/biology/stacks/default.nix
index 5fcb367ce5cb..04ef7c2e062b 100644
--- a/nixpkgs/pkgs/applications/science/biology/stacks/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/stacks/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   pname = "stacks";
-  version = "2.60";
+  version = "2.62";
   src = fetchurl {
     url = "http://catchenlab.life.illinois.edu/stacks/source/${pname}-${version}.tar.gz";
-    sha256 = "sha256-ppKG7Z1TyLwUyqRnGYk3QWPJqKeNcW04GMW7myPFSNM=";
+    sha256 = "sha256-7uhQVLC/AEPAPUdm3+vABoIwG4uhNy/EngjsrZjT0Ts=";
   };
 
   buildInputs = [ zlib ];
diff --git a/nixpkgs/pkgs/applications/science/biology/star/default.nix b/nixpkgs/pkgs/applications/science/biology/star/default.nix
index 3555929a33ea..e1a21cba0da2 100644
--- a/nixpkgs/pkgs/applications/science/biology/star/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/star/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "star";
-  version = "2.7.10a";
+  version = "2.7.10b";
 
   src = fetchFromGitHub {
     repo = "STAR";
     owner = "alexdobin";
     rev = version;
-    sha256 = "sha256-qwddCGMOKWgx76qGwRQXwvv9fCSeVsZbWHmlBwEqGKE=";
+    sha256 = "sha256-58Y4lzqXwBhRlXcionUg2IhAg5znNUuyr/FsuNZd+5Q=";
   };
 
   sourceRoot = "source/source";
diff --git a/nixpkgs/pkgs/applications/science/biology/strelka/default.nix b/nixpkgs/pkgs/applications/science/biology/strelka/default.nix
index 8585f3770fbc..9730601e4e7d 100644
--- a/nixpkgs/pkgs/applications/science/biology/strelka/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/strelka/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib python2 ];
 
-  NIX_CFLAGS_COMPILE = [
+  env.NIX_CFLAGS_COMPILE = toString [
     "-Wno-error=maybe-uninitialized"
     "-Wno-error=pessimizing-move"
   ];
diff --git a/nixpkgs/pkgs/applications/science/biology/subread/default.nix b/nixpkgs/pkgs/applications/science/biology/subread/default.nix
index 987433a3a6d5..62ea61af9192 100644
--- a/nixpkgs/pkgs/applications/science/biology/subread/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/subread/default.nix
@@ -6,11 +6,11 @@
 
 stdenv.mkDerivation rec {
   pname = "subread";
-  version = "2.0.3";
+  version = "2.0.6";
 
   src = fetchurl {
     url = "mirror://sourceforge/subread/subread-${version}/subread-${version}-source.tar.gz";
-    sha256 = "sha256-Vs7zovkU1DJxMGnVwoL0iDHDoezIlDKtVYDKoyKl9Ws=";
+    sha256 = "sha256-8P3aa5hjTSlGAolIwiAlPhCg8nx/pfJJE7ZbOsbLsEU=";
   };
 
   buildInputs = [
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
     license = licenses.gpl3;
     maintainers = with maintainers; [ jbedo ];
     platforms = [ "x86_64-darwin" "x86_64-linux" ];
-    homepage = "http://subread.sourceforge.net/";
+    homepage = "https://subread.sourceforge.net/";
   };
 
 }
diff --git a/nixpkgs/pkgs/applications/science/biology/svaba/default.nix b/nixpkgs/pkgs/applications/science/biology/svaba/default.nix
index b1a174aaf882..441c7ed6dcc3 100644
--- a/nixpkgs/pkgs/applications/science/biology/svaba/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/svaba/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   # gcc-10. Otherwise build fails as:
   #   ld: ./libfml.a(rle.o):/build/source/SeqLib/fermi-lite/rle.h:33: multiple definition of
   #     `rle_auxtab'; ./libfml.a(misc.o):/build/source/SeqLib/fermi-lite/rle.h:33: first defined here
-  NIX_CFLAGS_COMPILE = "-fcommon";
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
 
   installPhase = ''
     runHook preInstall
diff --git a/nixpkgs/pkgs/applications/science/biology/tandem-aligner/default.nix b/nixpkgs/pkgs/applications/science/biology/tandem-aligner/default.nix
new file mode 100644
index 000000000000..5f197bd7f79c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/tandem-aligner/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "TandemAligner";
+  version = "0.1";
+
+  src = fetchFromGitHub {
+    owner = "seryrzu";
+    repo = "tandem_aligner";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-iMDj1HZ8LzmZckuAM3lbG3eSJSd/5JGVA6SBs7+AgX8=";
+  };
+
+  patches = [
+    (fetchpatch {
+      # https://github.com/seryrzu/tandem_aligner/pull/4
+      url = "https://github.com/seryrzu/tandem_aligner/commit/8b516c94f90aaa9cb84278aa811285d4204b03a9.patch";
+      hash = "sha256-kD46SykXklG/avK0+sc61YKFw9Bes8ZgFAjVXmcpN8k=";
+      stripLen = 1;
+    })
+  ];
+
+  sourceRoot = "source/tandem_aligner";
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ zlib ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    cp src/projects/tandem_aligner/tandem_aligner $out/bin
+    runHook postInstall
+  '';
+
+  doCheck = true;
+
+  # adapted from target test_launch in Makefile
+  checkPhase = ''
+    runHook preCheck
+    mkdir -p $TMPDIR/test_launch
+    src/projects/tandem_aligner/tandem_aligner \
+      --first $src/tandem_aligner/test_dataset/first.fasta \
+      --second $src/tandem_aligner/test_dataset/second.fasta \
+      -o $TMPDIR/test_launch \
+      --debug
+    grep -q "Thank you for using TandemAligner!" $TMPDIR/test_launch/tandem_aligner.log
+    diff $TMPDIR/test_launch/cigar.txt $src/tandem_aligner/test_dataset/true_cigar.txt
+    runHook postCheck
+  '';
+
+  meta = {
+    description = "A parameter-free algorithm for sequence alignment";
+    homepage = "https://github.com/seryrzu/tandem_aligner";
+    changelog = "https://github.com/seryrzu/tandem_aligner/releases/tag/v${finalAttrs.version}";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ amesgen ];
+    platforms = lib.platforms.linux;
+    mainProgram = "tandem_aligner";
+  };
+})
diff --git a/nixpkgs/pkgs/applications/science/biology/treemix/default.nix b/nixpkgs/pkgs/applications/science/biology/treemix/default.nix
new file mode 100644
index 000000000000..7bf966919a67
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/treemix/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenv
+, fetchurl
+, zlib
+, gsl
+, boost
+}:
+
+stdenv.mkDerivation rec {
+  pname = "treemix";
+  version = "1.13";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/nygcresearch/treemix/downloads/${pname}-${version}.tar.gz";
+    sha256 = "1nd3rzsdgk47r8b8k43mdfvaagln533sm08s1jr0dz8km8nlym7y";
+  };
+
+  buildInputs = [ zlib gsl boost ];
+
+  meta = with lib ; {
+    description = "Inference of patterns of population splitting and mixing from genome-wide allele frequency data";
+    homepage = "https://bitbucket.org/nygcresearch/treemix/wiki/Home";
+    license = licenses.gpl3Only;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/trf/default.nix b/nixpkgs/pkgs/applications/science/biology/trf/default.nix
new file mode 100644
index 000000000000..f36788eb612c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/trf/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "trf";
+  version = "4.09.1";
+
+  src = fetchFromGitHub {
+    owner = "Benson-Genomics-Lab";
+    repo = "trf";
+    rev = "v${version}";
+    sha256 = "sha256-73LypVqBdlRdDCblf9JNZQmS5Za8xpId4ha5GjTJHDo=";
+  };
+
+  meta = with lib; {
+    description = "Tandem Repeats Finder: a program to analyze DNA sequences";
+    homepage = "https://tandem.bu.edu/trf/trf.html";
+    license = licenses.agpl3Plus;
+    maintainers = with maintainers; [ natsukium ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/biology/truvari/default.nix b/nixpkgs/pkgs/applications/science/biology/truvari/default.nix
index 31c1fc50ee3e..e626af56278f 100644
--- a/nixpkgs/pkgs/applications/science/biology/truvari/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/truvari/default.nix
@@ -1,47 +1,90 @@
 { lib
 , fetchFromGitHub
+, fetchpatch
 , python3Packages
+, runtimeShell
+, bcftools
+, htslib
 }:
 
-python3Packages.buildPythonApplication rec {
+let
+  ssshtest = fetchFromGitHub {
+    owner = "ryanlayer";
+    repo = "ssshtest";
+    rev = "d21f7f928a167fca6e2eb31616673444d15e6fd0";
+    hash = "sha256-zecZHEnfhDtT44VMbHLHOhRtNsIMWeaBASupVXtmrks=";
+  };
+in python3Packages.buildPythonApplication rec {
   pname = "truvari";
-  version = "2.1.1";
+  version = "4.0.0";
 
   src = fetchFromGitHub {
-    owner = "spiralgenetics";
+    owner = "ACEnglish";
     repo = "truvari";
     rev = "v${version}";
-    sha256 = "14nsdbj063qm175xxixs34cihvsiskc9gym8pg7gbwsh13k5a00h";
+    hash = "sha256-UJNMKEV5m2jFqnWvkVAtymkcE2TjPIXp7JqRZpMSqsE=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "fix-anno-trf-on-darwin.patch";
+      url = "https://github.com/ACEnglish/truvari/commit/f9f36305e8eaa88f951562210e3672a4d4f71265.patch";
+      hash = "sha256-7O9jTQDCC2b8hUBm0qJQCYMzTC9NFtn/E0dTHSfJALU=";
+    })
+    (fetchpatch {
+      name = "fix-anno-grm-on-darwin.patch";
+      url = "https://github.com/ACEnglish/truvari/commit/31416552008a506204ed4e2add55474f10392357.patch";
+      hash = "sha256-42u0ewZU38GCoSfff+XQFv9hEFeO3WlJufTHcl6vkN4=";
+    })
+  ];
+
   postPatch = ''
     substituteInPlace setup.py \
-      --replace 'python-Levenshtein==0.12.1' 'python-Levenshtein>=0.12.1'
+      --replace "rich==" "rich>="
+    substituteInPlace truvari/utils.py \
+      --replace "/bin/bash" "${runtimeShell}"
+    patchShebangs repo_utils/test_files
   '';
 
   propagatedBuildInputs = with python3Packages; [
-    pyvcf
-    python-Levenshtein
-    progressbar2
+    rich
+    edlib
     pysam
-    pyfaidx
     intervaltree
+    joblib
+    numpy
     pytabix
-    acebinf
     bwapy
-    joblib
     pandas
   ];
 
-  # no tests
-  doCheck = false;
+  makeWrapperArgs = [
+    "--prefix" "PATH" ":" (lib.makeBinPath [ bcftools htslib ])
+  ];
+
   pythonImportsCheck = [ "truvari" ];
 
+  nativeCheckInputs = [
+    bcftools
+    htslib
+  ] ++ (with python3Packages; [
+    coverage
+  ]);
+
+  checkPhase = ''
+    runHook preCheck
+
+    ln -s ${ssshtest}/ssshtest .
+    bash repo_utils/truvari_ssshtests.sh
+
+    runHook postCheck
+  '';
+
   meta = with lib; {
     description = "Structural variant comparison tool for VCFs";
-    homepage = "https://github.com/spiralgenetics/truvari";
+    homepage = "https://github.com/ACEnglish/truvari";
     license = licenses.mit;
-    maintainers = with maintainers; [ scalavision ];
+    maintainers = with maintainers; [ natsukium scalavision ];
     longDescription = ''
       Truvari is a benchmarking tool for comparison sets of SVs.
       It can calculate the recall, precision, and f-measure of a
diff --git a/nixpkgs/pkgs/applications/science/biology/varscan/default.nix b/nixpkgs/pkgs/applications/science/biology/varscan/default.nix
index 8b9b086b77b2..bf6d16c3701d 100644
--- a/nixpkgs/pkgs/applications/science/biology/varscan/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/varscan/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "varscan";
-  version = "2.4.4";
+  version = "2.4.6";
 
   src = fetchurl {
     url = "https://github.com/dkoboldt/varscan/raw/master/VarScan.v${version}.jar";
-    sha256 = "sha256-+yO3KrZ2+1qJvQIJHCtsmv8hC5a+4E2d7mrvTYtygU0=";
+    sha256 = "sha256-6CcjC0epbKsDXFxxeOUImSGh4cjR5INqawL/iOOkwqs=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/nixpkgs/pkgs/applications/science/biology/vcftools/default.nix b/nixpkgs/pkgs/applications/science/biology/vcftools/default.nix
index 9f88079627e0..a4ec84d4d506 100755
--- a/nixpkgs/pkgs/applications/science/biology/vcftools/default.nix
+++ b/nixpkgs/pkgs/applications/science/biology/vcftools/default.nix
@@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
     sha256 = "0msb09d2cnm8rlpg8bsc1lhjddvp3kf3i9dsj1qs4qgsdlzhxkyx";
   };
 
-  buildInputs = [ autoreconfHook pkg-config zlib perl ];
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ zlib perl ];
 
   meta = with lib; {
     description = "A set of tools written in Perl and C++ for working with VCF files, such as those generated by the 1000 Genomes Project";
diff --git a/nixpkgs/pkgs/applications/science/biology/veryfasttree/default.nix b/nixpkgs/pkgs/applications/science/biology/veryfasttree/default.nix
new file mode 100644
index 000000000000..f85f93055289
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/biology/veryfasttree/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname   = "veryfasttree";
+  version = "3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "citiususc";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-AOzbxUnrn1qgscjdOKf4dordnSKtIg3nSVaYWK1jbuc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  installPhase = ''
+    install -m755 -D VeryFastTree $out/bin/VeryFastTree
+  '';
+
+  meta = with lib; {
+    description = "Speeding up the estimation of phylogenetic trees for large alignments through parallelization and vectorization strategies";
+    license     = licenses.gpl3Plus;
+    homepage    = "https://github.com/citiususc/veryfasttree";
+    maintainers = with maintainers; [ thyol ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix b/nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix
new file mode 100644
index 000000000000..2a892dd56253
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/apbs/default.nix
@@ -0,0 +1,101 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, blas
+, superlu
+, suitesparse
+, python3
+, libintl
+, libiconv
+}:
+let
+  # this is a fork version of fetk (http://www.fetk.org/)
+  # which is maintained by apbs team
+  fetk = stdenv.mkDerivation (finalAttrs: {
+    pname = "fetk";
+    version = "1.9.3";
+
+    src = fetchFromGitHub {
+      owner = "Electrostatics";
+      repo = "fetk";
+      rev = "refs/tags/${finalAttrs.version}";
+      hash = "sha256-uFA1JRR05cNcUGaJj9IyGNONB2hU9IOBPzOj/HucNH4=";
+    };
+
+    nativeBuildInputs = [
+      cmake
+    ];
+
+    cmakeFlags = [
+      "-DBLAS_LIBRARIES=${blas}/lib"
+      "-DBLA_STATIC=OFF"
+      "-DBUILD_SUPERLU=OFF"
+    ];
+
+    buildInputs = [
+      blas
+      superlu
+      suitesparse
+    ];
+
+    meta = with lib; {
+      description = "Fork of the Finite Element ToolKit from fetk.org";
+      homepage = "https://github.com/Electrostatics/FETK";
+      changelog = "https://github.com/Electrostatics/FETK/releases/tag/${finalAttrs.version}";
+      license = licenses.lgpl21Plus;
+      maintainers = with maintainers; [ natsukium ];
+      platforms = platforms.unix;
+    };
+  });
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "apbs";
+  version = "3.4.1";
+
+  src = fetchFromGitHub {
+    owner = "Electrostatics";
+    repo = "apbs";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-2DnHU9hMDl4OJBaTtcRiB+6R7gAeFcuOUy7aI63A3gQ=";
+  };
+
+  postPatch = ''
+    # ImportFETK.cmake downloads source and builds fetk
+    substituteInPlace CMakeLists.txt \
+      --replace "include(ImportFETK)" "" \
+      --replace 'import_fetk(''${FETK_VERSION})' ""
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    fetk
+    suitesparse
+    blas
+    python3
+  ] ++ lib.optionals stdenv.isDarwin [
+    libintl
+    libiconv
+  ];
+
+  cmakeFlags = [
+    "-DPYTHON_VERSION=${python3.version}"
+    "-DAPBS_LIBS=mc;maloc"
+    "-DCMAKE_MODULE_PATH=${fetk}/share/fetk/cmake;"
+    "-DENABLE_TESTS=1"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Software for biomolecular electrostatics and solvation calculations";
+    homepage = "https://www.poissonboltzmann.org/";
+    changelog = "https://github.com/Electrostatics/apbs/releases/tag/v${finalAttrs.version}";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ natsukium ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix b/nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix
index c6339bab1228..547123b67957 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/avogadro/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake pkg-config doxygen ];
 
-  NIX_CFLAGS_COMPILE = "-include ${libGLU.dev}/include/GL/glu.h";
+  env.NIX_CFLAGS_COMPILE = "-include ${libGLU.dev}/include/GL/glu.h";
 
   patches = [
     (fetchurl {
diff --git a/nixpkgs/pkgs/applications/science/chemistry/avogadro2/default.nix b/nixpkgs/pkgs/applications/science/chemistry/avogadro2/default.nix
index 6931c8621c96..2ff0cab1847a 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/avogadro2/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/avogadro2/default.nix
@@ -12,13 +12,13 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "avogadro2";
-  version = "1.95.1";
+  version = "1.97.0";
 
   src = fetchFromGitHub {
     owner = "OpenChemistry";
     repo = "avogadroapp";
     rev = version;
-    sha256 = "9GnsxQsMuik6CPDmJbJPF0/+LXbZHf/JLevpSsMEoP0=";
+    hash = "sha256-gZpMgFSPz70QNfd8gH5Jb9RTxQfQalWx33LkgXLEqOQ=";
   };
 
   postUnpack = ''
diff --git a/nixpkgs/pkgs/applications/science/chemistry/chemtool/default.nix b/nixpkgs/pkgs/applications/science/chemistry/chemtool/default.nix
index 37057e1c604a..fe2d658b5a44 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/chemtool/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/chemtool/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   # Otherwise built fails as:
   #   ld: inout.o:/build/chemtool-1.6.14/ct1.h:279: multiple definition of
   #     `outtype'; draw.o:/build/chemtool-1.6.14/ct1.h:279: first defined here
-  NIX_CFLAGS_COMPILE = "-fcommon";
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
 
   preFixup = ''
     gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ fig2dev ]}")
diff --git a/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix b/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix
index 26cf411cb78a..a16797b955e5 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/cp2k/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, python3, gfortran, blas, lapack
 , fftw, libint, libvori, libxc, mpi, gsl, scalapack, openssh, makeWrapper
-, libxsmm, spglib, which, pkg-config
+, libxsmm, spglib, which, pkg-config, plumed, zlib
 , enableElpa ? false
 , elpa
 } :
@@ -11,13 +11,13 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "cp2k";
-  version = "9.1.0";
+  version = "2023.1";
 
   src = fetchFromGitHub {
     owner = "cp2k";
     repo = "cp2k";
     rev = "v${version}";
-    hash = "sha256-P9RwZmrE1E0UTQVasQxWAqa3LBLyJNGeJo8T6u5WWcw=";
+    hash = "sha256-SG5Gz0cDiSfbSZ8m4K+eARMLU4iMk/xK3esN5yt05RE=";
     fetchSubmodules = true;
   };
 
@@ -34,6 +34,8 @@ in stdenv.mkDerivation rec {
     scalapack
     blas
     lapack
+    plumed
+    zlib
   ] ++ lib.optional enableElpa elpa;
 
   propagatedBuildInputs = [ mpi ];
@@ -64,7 +66,8 @@ in stdenv.mkDerivation rec {
     AR         = ar -r
     DFLAGS     = -D__FFTW3 -D__LIBXC -D__LIBINT -D__parallel -D__SCALAPACK \
                  -D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM -D__SPGLIB \
-                 -D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"}
+                 -D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"} \
+                 -D__PLUMED2
     CFLAGS    = -fopenmp
     FCFLAGS    = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
                  -ftree-vectorize -funroll-loops -msse2 \
@@ -77,8 +80,11 @@ in stdenv.mkDerivation rec {
                  -lxcf03 -lxc -lxsmmf -lxsmm -lsymspg \
                  -lint2 -lstdc++ -lvori \
                  -lgomp -lpthread -lm \
-                 -fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"}
+                 -fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"} \
+                 -lz -ldl -lstdc++ ${lib.optionalString (mpi.pname == "openmpi") "$(mpicxx --showme:link)"} \
+                 -lplumed
     LDFLAGS    = \$(FCFLAGS) \$(LIBS)
+    include ${plumed}/lib/plumed/src/lib/Plumed.inc
     EOF
   '';
 
diff --git a/nixpkgs/pkgs/applications/science/chemistry/d-seams/default.nix b/nixpkgs/pkgs/applications/science/chemistry/d-seams/default.nix
index 74260bacabcc..260b1e24a082 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/d-seams/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/d-seams/default.nix
@@ -1,4 +1,4 @@
-{ clangStdenv, fetchFromGitHub, catch2, rang, fmt, libyamlcpp, cmake
+{ clangStdenv, fetchFromGitHub, fetchpatch, catch2, rang, fmt, yaml-cpp, cmake
 , eigen, lua, luaPackages, liblapack, blas, lib, boost, gsl }:
 
 clangStdenv.mkDerivation rec {
@@ -12,8 +12,15 @@ clangStdenv.mkDerivation rec {
     sha256 = "03zhhl9vhi3rhc3qz1g3zb89jksgpdlrk15fcr8xcz8pkj6r5b1i";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "use_newer_cxxopts_which_builds_with_clang11.patch";
+      url = "https://github.com/d-SEAMS/seams-core/commit/f6156057e43d0aa1a0df9de67d8859da9c30302d.patch";
+      hash = "sha256-PLbT1lqdw+69lIHH96MPcGRjfIeZyb88vc875QLYyqw=";
+    })
+  ];
   nativeBuildInputs = [ cmake lua luaPackages.luafilesystem ];
-  buildInputs = [ fmt rang libyamlcpp eigen catch2 boost gsl liblapack blas ];
+  buildInputs = [ fmt rang yaml-cpp eigen catch2 boost gsl liblapack blas ];
 
   meta = with lib; {
     description =
diff --git a/nixpkgs/pkgs/applications/science/chemistry/element/default.nix b/nixpkgs/pkgs/applications/science/chemistry/element/default.nix
index 812272e2fb9b..f0865b503dea 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/element/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/element/default.nix
@@ -1,22 +1,23 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, stdenv, buildGoModule, fetchFromGitHub }:
 
 buildGoModule rec {
   pname = "element";
-  version = "1.0.0";
+  version = "1.0.1";
 
   src = fetchFromGitHub {
     owner = "gennaro-tedesco";
     repo = pname;
     rev = "v${version}";
-    sha256 = "gjdcNvYNnxb6hOE/MQjTezZeYGBWTr4E8/Pt8YQv3lY=";
+    sha256 = "sha256-06RDZnie0Lv7i95AwnBGl6PPucuj8pIT6DHW3e3mu1o=";
   };
 
-  vendorSha256 = "A4g2rQTaYrA4/0rqldUv7iuibzNINEvx9StUnaN2/Yg=";
+  vendorSha256 = "sha256-A4g2rQTaYrA4/0rqldUv7iuibzNINEvx9StUnaN2/Yg=";
 
   meta = with lib; {
     description = "The periodic table on the command line";
     homepage = "https://github.com/gennaro-tedesco/element";
     license = licenses.asl20;
     maintainers = [ maintainers.j0hax ];
+    broken = stdenv.isDarwin;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix
index 8ab389afaee5..e5807c6c108b 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/gwyddion/default.nix
@@ -21,10 +21,10 @@ in
 
 stdenv.mkDerivation rec {
   pname = "gwyddion";
-   version = "2.60";
+   version = "2.61";
   src = fetchurl {
     url = "mirror://sourceforge/gwyddion/gwyddion-${version}.tar.xz";
-    sha256 = "sha256-38PIardlOzDrVKWvV4AiQlecTYmwYegtzRya713Au/Y=";
+    sha256 = "sha256-rDhYVMDTH9mSu90HZAX8ap4HF//8fYhW/ozzJdIrUgo=";
   };
 
   nativeBuildInputs = [ pkg-config file ];
@@ -68,5 +68,7 @@ stdenv.mkDerivation rec {
     license = lib.licenses.gpl2;
     platforms = with lib.platforms; linux ++ darwin;
     maintainers = [ lib.maintainers.cge ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix
index 4e1497acc055..097addca18f3 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/jmol/default.nix
@@ -25,14 +25,14 @@ let
   };
 in
 stdenv.mkDerivation rec {
-  version = "14.32.68";
+  version = "16.1.13";
   pname = "jmol";
 
   src = let
     baseVersion = "${lib.versions.major version}.${lib.versions.minor version}";
   in fetchurl {
     url = "mirror://sourceforge/jmol/Jmol/Version%20${baseVersion}/Jmol%20${version}/Jmol-${version}-binary.tar.gz";
-    sha256 = "sha256-CCVy+24O5rlAxnd01TeYqcOhDoSrxebfR1Ez7VDDrW4=";
+    hash = "sha256-BiCv1meuefFgzuhm/u5XmQNzM94xBOQsGtJceEBnu6s=";
   };
 
   patchPhase = ''
diff --git a/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix
index 2b5a1b969509..0f4d76c3f26b 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/marvin/default.nix
@@ -4,12 +4,12 @@ with lib;
 
 stdenv.mkDerivation rec {
   pname = "marvin";
-  version = "22.8.0";
+  version = "23.4.0";
 
   src = fetchurl {
     name = "marvin-${version}.deb";
     url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
-    sha256 = "sha256-dmG2p4KqzjLuuVw+wPWaxVoqOqba8Tx5l44PauWpqv4=";
+    sha256 = "sha256-+jzGcuAcbXOwsyAL+Hr9Fas2vO2S8ZKSaZeCf/bnl7A=";
   };
 
   nativeBuildInputs = [ dpkg makeWrapper ];
diff --git a/nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix b/nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix
new file mode 100644
index 000000000000..d2b2b558bb78
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/mopac/default.nix
@@ -0,0 +1,43 @@
+{ stdenv
+, lib
+, gfortran
+, fetchFromGitHub
+, cmake
+, blas
+, lapack
+, python3Packages
+}:
+
+assert blas.isILP64 == lapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "mopac";
+  version = "22.0.6";
+
+  src = fetchFromGitHub {
+    owner = "openmopac";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-j4AP3tki+Ep9Pv+pDg8TwCiJvpF2j5npW3Kpat+7gGg=";
+  };
+
+  nativeBuildInputs = [ gfortran cmake ];
+
+  buildInputs = [ blas lapack ];
+
+  checkInputs = with python3Packages; [ python numpy ];
+
+  doCheck = true;
+
+  preCheck = ''
+    export OMP_NUM_THREADS=2
+  '';
+
+  meta = with lib; {
+    description = "Semiempirical quantum chemistry";
+    homepage = "https://github.com/openmopac/mopac";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sheepforce markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix b/nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix
new file mode 100644
index 000000000000..82daf5f85e74
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/nwchem/default.nix
@@ -0,0 +1,214 @@
+{ lib
+, stdenv
+, pkgs
+, fetchFromGitHub
+, fetchurl
+, which
+, openssh
+, gcc
+, gfortran
+, perl
+, mpi
+, blas
+, lapack
+, python3
+, tcsh
+, bash
+, automake
+, autoconf
+, libtool
+, makeWrapper
+}:
+
+assert blas.isILP64 == lapack.isILP64;
+
+let
+  versionGA = "5.8.2"; # Fixed by nwchem
+
+  gaSrc = fetchFromGitHub {
+    owner = "GlobalArrays";
+    repo = "ga";
+    rev = "v${versionGA}";
+    hash = "sha256-2ffQIg9topqKX7ygnWaa/UunL9d0Lj9qr9xucsjLuoY=";
+  };
+
+  dftd3Src = fetchurl {
+    url = "https://www.chemiebn.uni-bonn.de/pctc/mulliken-center/software/dft-d3/dftd3.tgz";
+    hash = "sha256-2Xz5dY9hqoH9hUJUSPv0pujOB8EukjZzmDGjrzKID1k=";
+  };
+
+  versionLibxc = "6.1.0";
+  libxcSrc = fetchurl {
+    url = "https://gitlab.com/libxc/libxc/-/archive/${versionLibxc}/libxc-${versionLibxc}.tar.gz";
+    hash = "sha256-9ZN0X6R+v7ndxGeqr9wvoSdfDXJQxpLOl2E4mpDdjq8=";
+  };
+
+  plumedSrc = fetchFromGitHub {
+    owner = "edoapra";
+    repo = "plumed2";
+    rev = "e7c908da50bde1c6399c9f0e445d6ea3330ddd9b";
+    hash = "sha256-CNlb6MTEkD977hj3xonYqZH1/WlQ1EdVD7cvL//heRM=";
+  };
+
+in
+stdenv.mkDerivation rec {
+  pname = "nwchem";
+  version = "7.2.0";
+
+  src = fetchFromGitHub {
+    owner = "nwchemgit";
+    repo = "nwchem";
+    rev = "v${version}-release";
+    hash = "sha256-/biwHOSMGpdnYRGrGlDounKKLVaG2XkBgCmpE0IKR/Y=";
+  };
+
+  nativeBuildInputs = [
+    perl
+    automake
+    autoconf
+    libtool
+    makeWrapper
+    gfortran
+    which
+  ];
+  buildInputs = [
+    tcsh
+    openssh
+    blas
+    lapack
+    python3
+  ];
+  propagatedBuildInputs = [ mpi ];
+  propagatedUserEnvPkgs = [ mpi ];
+
+  postUnpack = ''
+    # These run 'configure' in source tree and
+    # require a writable directory
+    cp -r ${gaSrc}/ source/src/tools/ga-${versionGA}
+    chmod -R u+w source/src/tools/ga-${versionGA}
+
+    cp -r ${plumedSrc} source/src/libext/plumed/plumed2
+    chmod -R u+w source/src/libext/plumed/plumed2
+
+    # Provide tarball in expected location
+    ln -s ${dftd3Src} source/src/nwpw/nwpwlib/nwpwxc/dftd3.tgz
+    ln -s ${libxcSrc} source/src/libext/libxc/libxc-${versionLibxc}.tar.gz
+  '';
+
+  postPatch = ''
+    find -type f -executable -exec sed -i "s:/bin/csh:${tcsh}/bin/tcsh:" \{} \;
+    find -type f -name "GNUmakefile" -exec sed -i "s:/usr/bin/gcc:${gcc}/bin/gcc:" \{} \;
+    find -type f -name "GNUmakefile" -exec sed -i "s:/bin/rm:rm:" \{} \;
+    find -type f -executable -exec sed -i "s:/bin/rm:rm:" \{} \;
+    find -type f -name "makelib.h" -exec sed -i "s:/bin/rm:rm:" \{} \;
+
+    # Overwrite script, skipping the download
+    echo -e '#!/bin/sh\n cd ga-${versionGA};autoreconf -ivf' > src/tools/get-tools-github
+
+    patchShebangs ./
+  '';
+
+  # There is no configure script. Instead the build is controlled via
+  # environment variables passed to the Makefile
+  configurePhase = ''
+    runHook preConfigure
+
+    # config parameters
+    export NWCHEM_TARGET="LINUX64"
+
+    export ARMCI_NETWORK="MPI-PR"
+    export USE_MPI="y"
+    export USE_MPIF="y"
+
+    export NWCHEM_MODULES="all python"
+
+    export USE_PYTHONCONFIG="y"
+    export USE_PYTHON64="n"
+    export PYTHONLIBTYPE="so"
+    export PYTHONHOME="${python3}"
+    export PYTHONVERSION=${lib.versions.majorMinor python3.version}
+
+    export BLASOPT="-L${blas}/lib -lblas"
+    export LAPACK_LIB="-L${lapack}/lib -llapack"
+    export BLAS_SIZE=${if blas.isILP64 then "8" else "4"}
+
+    # extra TCE related options
+    export MRCC_METHODS="y"
+    export EACCSD="y"
+    export IPCCSD="y"
+
+    export CCSDTQ="y"
+
+    export NWCHEM_TOP="$(pwd)"
+
+    runHook postConfigure
+  '';
+
+  enableParallelBuilding = true;
+
+  preBuild = ''
+    ln -s ${gaSrc} src/tools/ga-${versionGA}.tar.gz
+    cd src
+    make nwchem_config
+    ${lib.optionalString (!blas.isILP64) "make 64_to_32"}
+  '';
+
+  postBuild = ''
+    cd $NWCHEM_TOP/src/util
+    make version
+    make
+    cd $NWCHEM_TOP/src
+    make link
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/nwchem
+
+    cp $NWCHEM_TOP/bin/LINUX64/nwchem $out/bin/nwchem
+    cp -r $NWCHEM_TOP/src/data $out/share/nwchem/
+    cp -r $NWCHEM_TOP/src/basis/libraries $out/share/nwchem/data
+    cp -r $NWCHEM_TOP/src/nwpw/libraryps $out/share/nwchem/data
+    cp -r $NWCHEM_TOP/QA $out/share/nwchem
+
+    wrapProgram $out/bin/nwchem \
+      --set-default NWCHEM_BASIS_LIBRARY $out/share/nwchem/data/libraries/
+
+    cat > $out/share/nwchem/nwchemrc << EOF
+    nwchem_basis_library $out/share/nwchem/data/libraries/
+    nwchem_nwpw_library $out/share/nwchem//data/libraryps/
+    ffield amber
+    amber_1 $out/share/nwchem/data/amber_s/
+    amber_2 $out/share/nwchem/data/amber_q/
+    amber_3 $out/share/nwchem/data/amber_x/
+    amber_4 $out/share/nwchem/data/amber_u/
+    spce    $out/share/nwchem/data/solvents/spce.rst
+    charmm_s $out/share/nwchem/data/charmm_s/
+    charmm_x $out/share/nwchem/data/charmm_x/
+    EOF
+  '';
+
+  doCheck = false;
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    export OMP_NUM_THREADS=1
+
+    # Fix to make mpich run in a sandbox
+    export HYDRA_IFACE=lo
+    export OMPI_MCA_rmaps_base_oversubscribe=1
+
+    # run a simple water test
+    mpirun -np 2 $out/bin/nwchem $out/share/nwchem/QA/tests/h2o/h2o.nw > h2o.out
+    grep "Total SCF energy" h2o.out  | grep 76.010538
+  '';
+
+  passthru = { inherit mpi; };
+
+  meta = with lib; {
+    description = "Open Source High-Performance Computational Chemistry";
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ sheepforce markuskowa ];
+    homepage = "https://nwchemgit.github.io";
+    license = licenses.ecl20;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix b/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
index 25749b8947c4..4fb077e4985d 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
@@ -8,16 +8,17 @@
 }:
 
 assert (!blas.isILP64) && (!lapack.isILP64);
+assert (blas.isILP64 == arpack.isILP64);
 
 stdenv.mkDerivation rec {
   pname = "octopus";
-  version = "11.4";
+  version = "12.2";
 
   src = fetchFromGitLab {
     owner = "octopus-code";
     repo = "octopus";
     rev = version;
-    sha256 = "1z423sjpc4ajjy3s7623z3rfwmp2hgis7iiiy8gb5apw73k33dyv";
+    sha256 = "sha256-tM3D0geOT+8X3EofI+iPR48z8LKFSxQMoO/W/be+OFg=";
   };
 
   nativeBuildInputs = [
@@ -40,12 +41,12 @@ stdenv.mkDerivation rec {
   ];
 
   configureFlags = with lib; [
-    "--with-yaml-prefix=${libyaml}"
+    "--with-yaml-prefix=${lib.getDev libyaml}"
     "--with-blas=-lblas"
     "--with-lapack=-llapack"
-    "--with-fftw-prefix=${fftw.dev}"
-    "--with-gsl-prefix=${gsl}"
-    "--with-libxc-prefix=${libxc}"
+    "--with-fftw-prefix=${lib.getDev fftw}"
+    "--with-gsl-prefix=${lib.getDev gsl}"
+    "--with-libxc-prefix=${lib.getDev libxc}"
     "--enable-openmp"
   ] ++ optional enableFma "--enable-fma3"
     ++ optional enableFma4 "--enable-fma4"
diff --git a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/MKL-MPICH.patch b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/MKL-MPICH.patch
deleted file mode 100644
index c1bc211a68e4..000000000000
--- a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/MKL-MPICH.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 276ae4e..5e56176 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1304,9 +1304,9 @@ if (LINALG STREQUAL "MKL")
-       endif ()
-     else ()
-       if (ADDRMODE EQUAL 64)
--        set (libpath "${MKLROOT}/lib/intel64")
-+        set (libpath "${MKLROOT}/lib")
-       elseif (ADDRMODE EQUAL 32)
--        set (libpath "${MKLROOT}/lib/ia32")
-+        set (libpath "${MKLROOT}/lib")
-       endif ()
-     endif ()
-     set (MKL_LIBRARY_PATH ${libpath} CACHE PATH "location of MKL libraries." FORCE)
-@@ -1380,7 +1380,7 @@ if (LINALG STREQUAL "MKL")
-     find_library (LIBMKL_BLACS NAMES "mkl_blacs_intelmpi_ilp64"
-                   PATHS ${MKL_LIBRARY_PATH} NO_DEFAULT_PATH)
-   elseif (MPI_IMPLEMENTATION STREQUAL "mpich")
--    find_library (LIBMKL_BLACS NAMES "mkl_blacs_ilp64"
-+    find_library (LIBMKL_BLACS NAMES "mkl_blacs_intelmpi_ilp64"
-                   PATHS ${MKL_LIBRARY_PATH} NO_DEFAULT_PATH)
-   endif ()
diff --git a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix
index 52dd025bf027..9acb2019d1f2 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/openmolcas/default.nix
@@ -15,21 +15,19 @@ let
 
 in stdenv.mkDerivation {
   pname = "openmolcas";
-  version = "22.06";
+  version = "23.02";
 
   src = fetchFromGitLab {
     owner = "Molcas";
     repo = "OpenMolcas";
     # The tag keeps moving, fix a hash instead
-    rev = "17238da5c339c41ddf14ceb88f139d57143d7a14"; # 2022-06-17
-    sha256 = "0g17x5fp27b57f7j284xl3b3i9c4b909q504wpz0ipb0mrcvcpdp";
+    rev = "03265f62cd98b985712b063aea88313f984a8857"; # 2023-02-11
+    sha256 = "sha256-Kj2RDJq8PEvKclLrSYIOdl6g6lcRsTNZCjwxGOs3joY=";
   };
 
   patches = [
     # Required to handle openblas multiple outputs
     ./openblasPath.patch
-    # Required for MKL builds
-    ./MKL-MPICH.patch
   ];
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix b/nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix
index c281f63b3bf8..155d521549e3 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/pymol/default.nix
@@ -7,12 +7,11 @@
 , netcdf
 , glew
 , glm
-, freeglut
 , libpng
 , libxml2
-, tk
 , freetype
 , msgpack
+, qt5
 }:
 let
   pname = "pymol";
@@ -47,12 +46,11 @@ python3Packages.buildPythonApplication rec {
     sha256 = "sha256-JdsgcVF1w1xFPZxVcyS+GcWg4a1Bd4SvxFOuSdlz9SM=";
   };
 
-  buildInputs = [ python3Packages.numpy glew glm freeglut libpng libxml2 tk freetype msgpack netcdf ];
-  NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
+  nativeBuildInputs = [ qt5.wrapQtAppsHook ];
+  buildInputs = [ python3Packages.numpy python3Packages.pyqt5 glew glm libpng libxml2 freetype msgpack netcdf ];
+  env.NIX_CFLAGS_COMPILE = "-I ${libxml2.dev}/include/libxml2";
   hardeningDisable = [ "format" ];
 
-  setupPyBuildFlags = [ "--glut" ];
-
   installPhase = ''
     python setup.py install --home="$out"
     runHook postInstall
@@ -60,15 +58,18 @@ python3Packages.buildPythonApplication rec {
 
   postInstall = with python3Packages; ''
     wrapProgram $out/bin/pymol \
-      --prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ Pmw tkinter ]}
+      --prefix PYTHONPATH : ${lib.makeSearchPathOutput "lib" python3.sitePackages [ pyqt5 pyqt5.pyqt5_sip ]}
 
     mkdir -p "$out/share/icons/"
     ln -s ../../lib/python/pymol/pymol_path/data/pymol/icons/icon2.svg "$out/share/icons/pymol.svg"
     cp -r "${desktopItem}/share/applications/" "$out/share/"
   '';
 
+  preFixup = ''
+    wrapQtApp "$out/bin/pymol"
+  '';
+
   meta = with lib; {
-    broken = stdenv.isDarwin;
     inherit description;
     homepage = "https://www.pymol.org/";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix b/nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix
index f49b9d1f45f9..c0e0e874cbd6 100644
--- a/nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix
+++ b/nixpkgs/pkgs/applications/science/chemistry/siesta/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = false;  # Started making trouble with gcc-11
 
-  # Must do manualy becuase siesta does not do the regular
+  # Must do manually because siesta does not do the regular
   # ./configure; make; make install
   configurePhase = ''
     cd Obj
diff --git a/nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix b/nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix
new file mode 100644
index 000000000000..4e8dbb6f0768
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/chemistry/wxmacmolplt/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, wxGTK32
+, libGL
+, libGLU
+, pkg-config
+, xorg
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wxmacmolplt";
+  version = "7.7.2";
+
+  src = fetchFromGitHub {
+    owner = "brettbode";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-sNxCjIEJUrDWtcUqBQqvanNfgNQ7T4cabYy+x9D1U+Q=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [
+    wxGTK32
+    libGL
+    libGLU
+    xorg.libX11
+    xorg.libX11.dev
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Graphical user interface for GAMESS-US";
+    homepage = "https://brettbode.github.io/wxmacmolplt/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sheepforce markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/computer-architecture/accelergy/default.nix b/nixpkgs/pkgs/applications/science/computer-architecture/accelergy/default.nix
new file mode 100644
index 000000000000..ec702d2b2906
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/computer-architecture/accelergy/default.nix
@@ -0,0 +1,27 @@
+{ lib, fetchFromGitHub, python3Packages, pkgs }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "accelergy";
+  version = "unstable-2022-05-03";
+
+  src = fetchFromGitHub {
+    owner = "Accelergy-Project";
+    repo = "accelergy";
+    rev = "34df8e87a889ae55cecba58992d4573466b40565";
+    hash = "sha256-SRtt1EocHy5fKszpoumC+mOK/qhreoA2/Ff1wcu5WKo=";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    pyyaml
+    yamlordereddictloader
+    pyfiglet
+    setuptools
+  ];
+
+  meta = with lib; {
+    description = "An architecture-level energy/area estimator for accelerator designs";
+    license = licenses.mit;
+    homepage = "https://accelergy.mit.edu/";
+    maintainers = with maintainers; [ gdinh ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/computer-architecture/qtrvsim/default.nix b/nixpkgs/pkgs/applications/science/computer-architecture/qtrvsim/default.nix
index c4bb788798d6..9b15ef8939c3 100644
--- a/nixpkgs/pkgs/applications/science/computer-architecture/qtrvsim/default.nix
+++ b/nixpkgs/pkgs/applications/science/computer-architecture/qtrvsim/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "QtRVSim";
-  version = "0.9.3";
+  version = "0.9.5";
 
   src = fetchFromGitHub {
     owner = "cvut";
     repo = "qtrvsim";
     rev = "refs/tags/v${version}";
-    sha256 = "BV/nHRvimPaBtY1nfK1PZ2yJ9xWZpNlwiTRfI/9KQec=";
+    sha256 = "sha256-TKF7nkhnp+JXTD2J/FyVxQoVZgOSKX1IQ/RPqRBOI/4=";
   };
 
   nativeBuildInputs = [ cmake wrapQtAppsHook ];
diff --git a/nixpkgs/pkgs/applications/science/computer-architecture/timeloop/default.nix b/nixpkgs/pkgs/applications/science/computer-architecture/timeloop/default.nix
new file mode 100644
index 000000000000..4e794aaa29e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/computer-architecture/timeloop/default.nix
@@ -0,0 +1,99 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, scons
+, libconfig
+, boost
+, libyaml
+, yaml-cpp
+, ncurses
+, gpm
+, enableAccelergy ? true
+, enableISL ? false
+, accelergy
+}:
+
+stdenv.mkDerivation rec {
+  pname = "timeloop";
+  version = "unstable-2022-11-29";
+
+  src = fetchFromGitHub {
+    owner = "NVlabs";
+    repo = "timeloop";
+    rev = "905ba953432c812772de935d57fd0a674a89d3c1";
+    hash = "sha256-EXiWXf8hdX4vFRNk9wbFSOsix/zVkwrafGUtFrsoAN0=";
+  };
+
+  nativeBuildInputs = [ scons ];
+
+  buildInputs = [
+    libconfig
+    boost
+    libyaml
+    yaml-cpp
+    ncurses
+    accelergy
+   ] ++ lib.optionals stdenv.isLinux [ gpm ];
+
+  preConfigure = ''
+    cp -r ./pat-public/src/pat ./src/pat
+  '';
+
+  enableParallelBuilding = true;
+
+  #link-time optimization fails on darwin
+  #see https://github.com/NixOS/nixpkgs/issues/19098
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fno-lto";
+
+  postPatch = ''
+    # use nix ar/ranlib
+    substituteInPlace ./SConstruct \
+      --replace "env.Replace(AR = \"gcc-ar\")" "" \
+      --replace "env.Replace(RANLIB = \"gcc-ranlib\")" ""
+    '' + lib.optionalString stdenv.isDarwin ''
+    # prevent clang from dying on errors that gcc is fine with
+    substituteInPlace ./src/SConscript --replace "-Werror" "-Wno-inconsistent-missing-override"
+
+    # disable LTO on macos
+    substituteInPlace ./src/SConscript --replace ", '-flto'" ""
+
+    # static builds on mac fail as no static libcrt is provided by apple
+    # see https://stackoverflow.com/questions/3801011/ld-library-not-found-for-lcrt0-o-on-osx-10-6-with-gcc-clang-static-flag
+    substituteInPlace ./src/SConscript \
+      --replace "'-static-libgcc', " "" \
+      --replace "'-static-libstdc++', " "" \
+      --replace "'-Wl,--whole-archive', '-static', " "" \
+      --replace ", '-Wl,--no-whole-archive'" ""
+
+    #remove hardcoding of gcc
+    sed -i '40i env.Replace(CC = "${stdenv.cc.targetPrefix}cc")' ./SConstruct
+    sed -i '40i env.Replace(CXX = "${stdenv.cc.targetPrefix}c++")' ./SConstruct
+
+    #gpm doesn't exist on darwin
+    substituteInPlace ./src/SConscript --replace ", 'gpm'" ""
+   '';
+
+  sconsFlags =
+    # will fail on clang/darwin on link without --static due to undefined extern
+    # however, will fail with static on linux as nixpkgs deps aren't static
+    lib.optional stdenv.isDarwin "--static"
+    ++ lib.optional enableAccelergy "--accelergy"
+    ++ lib.optional enableISL "--with-isl";
+
+
+  installPhase = ''
+    cp -r ./bin ./lib $out
+    mkdir -p $out/share
+    cp -r ./doc $out/share
+    mkdir -p $out/data
+    cp -r ./problem-shapes ./configs $out/data
+   '';
+
+  meta = with lib; {
+    description = "Chip modeling/mapping benchmarking framework";
+    homepage = "https://timeloop.csail.mit.edu";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ gdinh ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix b/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix
index 7aafa70f7fa1..2e882aff361d 100644
--- a/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/appcsxcad/default.nix
@@ -7,7 +7,6 @@
 , hdf5
 , vtkWithQt5
 , qtbase
-, wrapQtAppsHook
 , fparser
 , tinyxml
 , cgal
@@ -16,13 +15,13 @@
 
 mkDerivation {
   pname = "appcsxcad";
-  version = "unstable-2020-01-04";
+  version = "unstable-2023-01-06";
 
   src = fetchFromGitHub {
     owner = "thliebig";
     repo = "AppCSXCAD";
-    rev = "de8c271ec8b57e80233cb2a432e3d7fd54d30876";
-    sha256 = "0shnfa0if3w588a68gr82qi6k7ldg1j2921fnzji90mmay21birp";
+    rev = "379ede4b8e00c11e8d0fb724c35547991b30c423";
+    hash = "sha256-L0ZEyovnfMzM7JuITBuhb4tJ2Aqgw52IiKEfEGq7Yo0=";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/applications/science/electronics/bitscope/common.nix b/nixpkgs/pkgs/applications/science/electronics/bitscope/common.nix
index 2018878773ef..6a024748daf2 100644
--- a/nixpkgs/pkgs/applications/science/electronics/bitscope/common.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/bitscope/common.nix
@@ -1,5 +1,5 @@
 { atk
-, buildFHSUserEnv
+, buildFHSEnv
 , cairo
 , dpkg
 , gdk-pixbuf
@@ -32,10 +32,7 @@ let
       ];
     } // (attrs.meta or {});
 
-    buildInputs = [
-      dpkg
-      makeWrapper
-    ];
+    nativeBuildInputs = [ makeWrapper dpkg ];
 
     libs = attrs.libs or [
       atk
@@ -59,7 +56,7 @@ let
       ${(wrapBinary libs) attrs.toolName}
     '';
   });
-in buildFHSUserEnv {
+in buildFHSEnv {
   name = "${attrs.toolName}-${attrs.version}";
   runScript = "${pkg.outPath}/bin/${attrs.toolName}";
 } // { inherit (pkg) meta name; }
diff --git a/nixpkgs/pkgs/applications/science/electronics/csxcad/default.nix b/nixpkgs/pkgs/applications/science/electronics/csxcad/default.nix
index d9953a785739..f6b0ff93fff5 100644
--- a/nixpkgs/pkgs/applications/science/electronics/csxcad/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/csxcad/default.nix
@@ -13,13 +13,13 @@
 
 stdenv.mkDerivation rec {
   pname = "csxcad";
-  version = "unstable-2020-02-08";
+  version = "unstable-2022-05-18";
 
   src = fetchFromGitHub {
     owner = "thliebig";
     repo = "CSXCAD";
-    rev = "ef6e40931dbd80e0959f37c8e9614c437bf7e518";
-    sha256 = "072s765jyzpdq8qqysdy0dld17m6sr9zfcs0ip2zk8c4imxaysnb";
+    rev = "cd9decb4d9cebe3c8bf115e2c0ee73f730f22da1";
+    sha256 = "1604amhvp7dm8ych7gwzxwawqvb9hpjglk5ffd4qm0y3k6r89arn";
   };
 
   patches = [./searchPath.patch ];
diff --git a/nixpkgs/pkgs/applications/science/electronics/dataexplorer/default.nix b/nixpkgs/pkgs/applications/science/electronics/dataexplorer/default.nix
new file mode 100644
index 000000000000..76f3ee826986
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/dataexplorer/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchurl
+, jdk
+, ant
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dataexplorer";
+  version = "3.7.8";
+
+  src = fetchurl {
+    url = "mirror://savannah/dataexplorer/dataexplorer-${version}-src.tar.gz";
+    sha256 = "sha256-NiCtUqavYNUXsTkgi2V9u2qn8dBTLTEm52ju450d5Lw=";
+  };
+
+  nativeBuildInputs = [ ant makeWrapper ];
+
+  buildInputs = [ jdk ];
+
+  buildPhase = ''
+    ant -f build/build.xml dist
+  '';
+
+  doCheck = false;
+  # Missing dependencies (e.g. junit). Does not work.
+  #checkPhase = ''
+  #  ant -f build/build.xml check
+  #'';
+
+  installPhase = ''
+    ant -Dprefix=$out/share/ -f build/build.xml install
+
+    # The sources contain a wrapper script in $out/share/DataExplorer/DataExplorer
+    # but it hardcodes bash shebang and does not pin the java path.
+    # So we create our own wrapper, using similar cmdline args as upstream.
+    mkdir -p $out/bin
+    makeWrapper ${jdk}/bin/java $out/bin/DataExplorer \
+      --add-flags "-Xms64m -Xmx3092m -jar $out/share/DataExplorer/DataExplorer.jar" \
+      --set SWT_GTK3 0
+
+    makeWrapper ${jdk}/bin/java $out/bin/DevicePropertiesEditor \
+      --add-flags "-Xms32m -Xmx512m -classpath $out/share/DataExplorer/DataExplorer.jar gde.ui.dialog.edit.DevicePropertiesEditor" \
+      --set SWT_GTK3 0 \
+      --set LIBOVERLAY_SCROLLBAR 0
+
+    install -Dvm644 build/misc/GNU_LINUX_JUNSI_ICHARER_USB_UDEV_RULE/50-Junsi-iCharger-USB.rules \
+      $out/etc/udev/rules.d/50-Junsi-iCharger-USB.rules
+    install -Dvm644 build/misc/GNU_LINUX_SKYRC_UDEV_RULE/50-SkyRC-Charger.rules \
+      $out/etc/udev/rules.d/50-SkyRC-Charger.rules
+  '';
+
+  meta = with lib; {
+    description = "Graphical tool to analyze data, gathered from various hardware devices";
+    homepage = "https://www.nongnu.org/dataexplorer/index.html";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ panicgh ];
+    platforms = [ "x86_64-linux" ];
+    sourceProvenance = with sourceTypes; [
+      fromSource
+      binaryNativeCode  # contains RXTXcomm (JNI library with *.so files)
+      binaryBytecode    # contains thirdparty jar files, e.g. javax.json, org.glassfish.json
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/electronics/digital/default.nix b/nixpkgs/pkgs/applications/science/electronics/digital/default.nix
new file mode 100644
index 000000000000..5f4df4f7cfec
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/digital/default.nix
@@ -0,0 +1,92 @@
+{ lib, stdenv, fetchFromGitHub, makeDesktopItem, copyDesktopItems, makeWrapper
+, jre, maven, git
+}:
+
+let
+  pkgDescription = "A digital logic designer and circuit simulator.";
+  version = "0.30";
+  buildDate = "2023-02-03T08:00:56+01:00"; # v0.30 commit date
+
+  desktopItem = makeDesktopItem {
+    type = "Application";
+    name = "Digital";
+    desktopName = pkgDescription;
+    comment = "Easy-to-use digital logic designer and circuit simulator";
+    exec = "digital";
+    icon = "digital";
+    categories = [ "Education" "Electronics" ];
+    mimeTypes = [ "text/x-digital" ];
+    terminal = false;
+    keywords = [ "simulator" "digital" "circuits" ];
+  };
+
+  # Use the "no-git-rev" maven profile, which deactivates the plugin that
+  # inspect the .git folder to find the version number we are building, we then
+  # provide that version number manually as a property.
+  # (see https://github.com/hneemann/Digital/issues/289#issuecomment-513721481)
+  # Also use the commit date as a build and output timestamp.
+  mvnOptions = "-Pno-git-rev -Dgit.commit.id.describe=${version} -Dproject.build.outputTimestamp=${buildDate} -DbuildTimestamp=${buildDate}";
+in
+stdenv.mkDerivation rec {
+  pname = "digital";
+  inherit version jre;
+
+  src = fetchFromGitHub {
+    owner = "hneemann";
+    repo = "Digital";
+    rev = "932791eb6486d04f2ea938d83bcdb71b56d3a3f6";
+    sha256 = "cDykYlcFvDLFBy9UnX07iCR2LCq28SNU+h9vRT/AoJM=";
+  };
+
+  # Fetching maven dependencies from "central" needs the network at build phase,
+  # we do that in this extra derivation that explicitly specifies its
+  # outputHash to ensure determinism.
+  mavenDeps = stdenv.mkDerivation {
+    name = "${pname}-${version}-maven-deps";
+    inherit src nativeBuildInputs version;
+    dontFixup = true;
+    buildPhase = ''
+      mvn package ${mvnOptions} -Dmaven.repo.local=$out
+    '';
+    # keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with
+    # lastModified timestamps inside
+    installPhase = ''
+      find $out -type f \
+        -name \*.lastUpdated -or \
+        -name resolver-status.properties -or \
+        -name _remote.repositories \
+        -delete
+    '';
+    outputHashAlgo = "sha256";
+    outputHashMode = "recursive";
+    outputHash = "1Cgw+5V2E/RENMRMm368+2yvY7y6v9gTlo+LRgrCXcE=";
+  };
+
+  nativeBuildInputs = [ copyDesktopItems maven makeWrapper ];
+
+  buildPhase = ''
+    mvn package --offline ${mvnOptions} -Dmaven.repo.local=${mavenDeps}
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/java
+
+    classpath=$(find ${mavenDeps} -name "*.jar" -printf ':%h/%f');
+    install -Dm644 target/Digital.jar $out/share/java
+
+    makeWrapper ${jre}/bin/java $out/bin/${pname} \
+      --add-flags "-classpath $out/share/java/${pname}-${version}.jar:''${classpath#:}" \
+      --add-flags "-jar $out/share/java/Digital.jar"
+  '';
+
+  desktopItems = [ desktopItem ];
+
+  meta = with lib; {
+    homepage = "https://github.com/hneemann/Digital";
+    description = pkgDescription;
+    license = licenses.gpl3Only;
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    maintainers = with maintainers; [ Dettorer ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix b/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix
index eb8246a584d3..f016b53d553c 100644
--- a/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/dsview/default.nix
@@ -1,47 +1,29 @@
 { lib, mkDerivation, fetchFromGitHub, pkg-config, cmake
-, libzip, boost, fftw, qtbase, libusb1, libsigrok4dsl
-, libsigrokdecode4dsl, python3, fetchpatch
+, libzip, boost, fftw, qtbase, libusb1
+, python3, fetchpatch
 }:
 
 mkDerivation rec {
   pname = "dsview";
 
-  version = "1.12";
+  version = "1.2.2";
 
   src = fetchFromGitHub {
       owner = "DreamSourceLab";
       repo = "DSView";
       rev = "v${version}";
-      sha256 = "q7F4FuK/moKkouXTNPZDVon/W/ZmgtNHJka4MiTxA0U=";
+      sha256 = "sha256-QaCVu/n9PDbAiJgPDVN6SJMILeUO/KRkKcHYAstm86Q=";
   };
 
-  sourceRoot = "source/DSView";
-
   patches = [
     # Fix absolute install paths
     ./install.patch
-
-    # Fix buld with Qt5.15 already merged upstream for future release
-    # Using local file instead of content of commit #33e3d896a47 because
-    # sourceRoot make it unappliable
-    ./qt515.patch
-
-    # Change from upstream master that removes extern-C scopes which
-    # cause failures with modern glib. This can likely be removed if
-    # there is an upstream release >1.12
-    (fetchpatch {
-      name = "fix-extern-c.patch";
-      url = "https://github.com/DreamSourceLab/DSView/commit/33cc733abe19872bf5ed08540a94b798d0d4ecf4.patch";
-      sha256 = "sha256-TLfLQa3sdyNHTpMMvId/V6uUuOFihOZMFJOj9frnDoY=";
-      stripLen = 2;
-      extraPrefix = "";
-    })
   ];
 
   nativeBuildInputs = [ cmake pkg-config ];
 
   buildInputs = [
-    boost fftw qtbase libusb1 libzip libsigrokdecode4dsl libsigrok4dsl
+    boost fftw qtbase libusb1 libzip
     python3
   ];
 
diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch b/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch
index 75c3e9628656..9fd9133e2795 100644
--- a/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch
+++ b/nixpkgs/pkgs/applications/science/electronics/dsview/install.patch
@@ -1,15 +1,23 @@
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c1c33e1..208a184 100644
+index eb9be42..220817c 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -427,8 +427,8 @@
- install(FILES ../NEWS31 DESTINATION share/${PROJECT_NAME} RENAME NEWS31)
- install(FILES ../ug25.pdf DESTINATION share/${PROJECT_NAME} RENAME ug25.pdf)
- install(FILES ../ug31.pdf DESTINATION share/${PROJECT_NAME} RENAME ug31.pdf)
--install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/)
--install(FILES DSView.desktop DESTINATION /usr/share/applications/)
-+install(FILES DreamSourceLab.rules DESTINATION etc/udev/rules.d/)
-+install(FILES DSView.desktop DESTINATION share/applications/)
+@@ -662,16 +662,8 @@ install(FILES DSView/icons/logo.svg DESTINATION share/icons/hicolor/scalable/app
+ install(FILES DSView/icons/logo.svg DESTINATION share/pixmaps RENAME dsview.svg)
  
- #===============================================================================
- #= Packaging (handled by CPack)
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux")	
+-	install(FILES DSView/DSView.desktop DESTINATION /usr/share/applications RENAME dsview.desktop)
+-	
+-	if(IS_DIRECTORY /usr/lib/udev/rules.d)
+-		install(FILES DSView/DreamSourceLab.rules DESTINATION /usr/lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
+-	elseif(IS_DIRECTORY /lib/udev/rules.d)
+-		install(FILES DSView/DreamSourceLab.rules DESTINATION /lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
+-	elseif(IS_DIRECTORY /etc/udev/rules.d)
+-		install(FILES DSView/DreamSourceLab.rules DESTINATION /etc/udev/rules.d RENAME 60-dreamsourcelab.rules)
+-	endif()
+-
++	install(FILES DSView/DSView.desktop DESTINATION share/applications RENAME dsview.desktop)
++	install(FILES DSView/DreamSourceLab.rules DESTINATION etc/udev/rules.d RENAME 60-dreamsourcelab.rules)
+ endif()
+ 
+ install(FILES NEWS25 DESTINATION share/DSView RENAME NEWS25)
diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/libsigrok4dsl.nix b/nixpkgs/pkgs/applications/science/electronics/dsview/libsigrok4dsl.nix
deleted file mode 100644
index c33bfd408b92..000000000000
--- a/nixpkgs/pkgs/applications/science/electronics/dsview/libsigrok4dsl.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ lib, stdenv, pkg-config, autoreconfHook,
-glib, libzip, libserialport, check, libusb1, libftdi,
-systemd, alsa-lib, dsview
-}:
-
-stdenv.mkDerivation {
-  inherit (dsview) version src;
-
-  pname = "libsigrok4dsl";
-
-  postUnpack = ''
-    export sourceRoot=$sourceRoot/libsigrok4DSL
-  '';
-
-  nativeBuildInputs = [ pkg-config autoreconfHook ];
-
-  buildInputs = [
-    glib libzip libserialport libusb1 libftdi systemd check alsa-lib
-  ];
-
-  meta = with lib; {
-    description = "A fork of the sigrok library for usage with DSView";
-    homepage = "https://www.dreamsourcelab.com/";
-    license = licenses.gpl3Plus;
-    platforms = platforms.linux;
-    maintainers = [ maintainers.bachp ];
-  };
-}
diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/libsigrokdecode4dsl.nix b/nixpkgs/pkgs/applications/science/electronics/dsview/libsigrokdecode4dsl.nix
deleted file mode 100644
index 09eed4a67c57..000000000000
--- a/nixpkgs/pkgs/applications/science/electronics/dsview/libsigrokdecode4dsl.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ lib, stdenv, pkg-config, autoreconfHook,
-glib, check, python3, dsview
-}:
-
-stdenv.mkDerivation {
-  inherit (dsview) version src;
-
-  pname = "libsigrokdecode4dsl";
-
-  postUnpack = ''
-    export sourceRoot=$sourceRoot/libsigrokdecode4DSL
-  '';
-
-  nativeBuildInputs = [ pkg-config autoreconfHook ];
-
-  buildInputs = [
-    python3 glib check
-  ];
-
-  meta = with lib; {
-    description = "A fork of the sigrokdecode library for usage with DSView";
-    homepage = "https://www.dreamsourcelab.com/";
-    license = licenses.gpl3Plus;
-    platforms = platforms.linux;
-    maintainers = [ maintainers.bachp ];
-  };
-}
diff --git a/nixpkgs/pkgs/applications/science/electronics/dsview/qt515.patch b/nixpkgs/pkgs/applications/science/electronics/dsview/qt515.patch
deleted file mode 100644
index 552f2062ec57..000000000000
--- a/nixpkgs/pkgs/applications/science/electronics/dsview/qt515.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp
-index 921d3db..16cdce9 100755
---- a/pv/view/viewport.cpp
-+++ b/pv/view/viewport.cpp
-@@ -37,7 +37,7 @@
- 
- #include <QMouseEvent>
- #include <QStyleOption>
--
-+#include <QPainterPath>
- 
- #include <math.h>
- 
diff --git a/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix b/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix
index 1f6679625ec7..338823bbf386 100644
--- a/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/flatcam/default.nix
@@ -1,10 +1,38 @@
 { lib
-, python3Packages
+, stdenv
+, python3
+, fetchPypi
 , fetchFromBitbucket
 , fetchpatch
+, substituteAll
+, geos
 }:
 
-python3Packages.buildPythonApplication rec {
+let
+  python = python3.override {
+    packageOverrides = self: super: {
+      shapely = super.shapely.overridePythonAttrs (old: rec {
+        version = "1.8.4";
+        src = fetchPypi {
+          pname = "Shapely";
+          inherit version;
+          hash = "sha256-oZXlHKr6IYKR8suqP+9p/TNTyT7EtlsqRyLEz0DDGYw=";
+        };
+        # Environment variable used in shapely/_buildcfg.py
+        GEOS_LIBRARY_PATH = "${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}";
+        patches = [
+          # Patch to search form GOES .so/.dylib files in a Nix-aware way
+          (substituteAll {
+            src = ./shapely-library-paths.patch;
+            libgeos_c = GEOS_LIBRARY_PATH;
+            libc = lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6";
+          })
+        ];
+      });
+    };
+  };
+in
+python.pkgs.buildPythonApplication rec {
   pname = "flatcam";
   version = "8.5";
 
@@ -15,12 +43,12 @@ python3Packages.buildPythonApplication rec {
     sha256 = "199kiiml18k34z1zhk2hbhibphmnv0kb11kxiajq52alps0mjb3m";
   };
 
-  propagatedBuildInputs = with python3Packages; [
+  propagatedBuildInputs = with python.pkgs; [
     matplotlib
     numpy
     packaging
     pyqt4
-    Rtree
+    rtree
     scipy
     setuptools
     shapely
@@ -40,6 +68,10 @@ python3Packages.buildPythonApplication rec {
     ./release.patch
   ];
 
+  postPatch = ''
+    substituteInPlace setup.py --replace "'shapely>=1.3'" "'shapely>=1.3',"
+  '';
+
   # Only non-GUI tests can be run deterministically in the Nix build environment.
   checkPhase = ''
     python -m unittest tests.test_excellon
diff --git a/nixpkgs/pkgs/applications/science/electronics/flatcam/shapely-library-paths.patch b/nixpkgs/pkgs/applications/science/electronics/flatcam/shapely-library-paths.patch
new file mode 100644
index 000000000000..d095eada9d6e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/flatcam/shapely-library-paths.patch
@@ -0,0 +1,31 @@
+diff --git a/shapely/geos.py b/shapely/geos.py
+index 88c5f53..1ccd6e4 100644
+--- a/shapely/geos.py
++++ b/shapely/geos.py
+@@ -96,6 +96,7 @@ if sys.platform.startswith('linux'):
+         alt_paths = [
+             'libgeos_c.so.1',
+             'libgeos_c.so',
++            '@libgeos_c@',
+         ]
+         _lgeos = load_dll('geos_c', fallbacks=alt_paths)
+ 
+@@ -160,6 +161,7 @@ elif sys.platform == 'darwin':
+             "/usr/local/lib/libgeos_c.dylib",
+             # homebrew Apple Silicon
+             "/opt/homebrew/lib/libgeos_c.dylib",
++            "@libgeos_c@",
+         ]
+         _lgeos = load_dll('geos_c', fallbacks=alt_paths)
+ 
+diff --git a/tests/test_dlls.py b/tests/test_dlls.py
+index c71da8e..c36262c 100644
+--- a/tests/test_dlls.py
++++ b/tests/test_dlls.py
+@@ -18,4 +18,5 @@ class LoadingTestCase(unittest.TestCase):
+             '/opt/homebrew/lib/libgeos_c.dylib',  # homebrew (macOS)
+             os.path.join(sys.prefix, "lib", "libgeos_c.so"), # anaconda (Linux)
+             'libgeos_c.so.1',
+-            'libgeos_c.so'])
++            'libgeos_c.so',
++            '@libgeos_c@'])
diff --git a/nixpkgs/pkgs/applications/science/electronics/flopoco/default.nix b/nixpkgs/pkgs/applications/science/electronics/flopoco/default.nix
new file mode 100644
index 000000000000..7ce1087209e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/flopoco/default.nix
@@ -0,0 +1,93 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, cmake
+, installShellFiles
+, bison
+, boost
+, flex
+, gmp
+, libxml2
+, mpfi
+, mpfr
+, scalp
+, sollya
+, wcpg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "flopoco";
+  version = "4.1.3";
+
+  src = fetchFromGitLab {
+    owner = pname;
+    repo = pname;
+    # flopoco-4.1.3 is not tagged on GitLab
+    rev = "67598298207c9f3261c35679c8a5966480c4343c";
+    sha256 = "sha256-0jRjg4/qciqBcjsi6BTbKO4VJkcoEzpC98wFkUOIGbI=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-clang-error-sin-cos.patch";
+      url = "https://gitlab.com/flopoco/flopoco/-/commit/de3aa60ad19333952c176c2a2e51f12653ca736b.patch";
+      postFetch = ''
+        substituteInPlace $out \
+          --replace 'FixSinCosCORDIC.hpp' 'CordicSinCos.hpp'
+      '';
+      sha256 = "sha256-BlamA/MZuuqqvGYto+jPeQPop6gwva0y394Odw8pdwg=";
+    })
+    (fetchpatch {
+      name = "fix-clang-error-atan2.patch";
+      url = "https://gitlab.com/flopoco/flopoco/-/commit/a3ffe2436c1b59ee0809b3772b74f2d43c6edb99.patch";
+      sha256 = "sha256-dSYcufLHDL0p1V1ghmy6X6xse5f6mjUqckaVqLZnTaA=";
+    })
+  ];
+
+  postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+    sed -i "s/-pg//g" {,src/Apps/TaMaDi/}CMakeLists.txt
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    bison
+    cmake
+    installShellFiles
+  ];
+
+  buildInputs = [
+    boost
+    flex
+    gmp
+    libxml2
+    mpfi
+    mpfr
+    scalp
+    sollya
+    wcpg
+  ];
+
+  postBuild = ''
+    ./flopoco BuildAutocomplete
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 flopoco $out/bin/flopoco
+    cp bin* fp* ieee* longacc* $out/bin/
+    installShellCompletion --bash flopoco_autocomplete
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "The FloPoCo arithmetic core generator";
+    homepage = "https://flopoco.org/";
+    license = licenses.unfree;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ wegank ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/electronics/fped/default.nix b/nixpkgs/pkgs/applications/science/electronics/fped/default.nix
index b1244b79a89f..138d45c787cd 100644
--- a/nixpkgs/pkgs/applications/science/electronics/fped/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/fped/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
   # Workaround build failure on -fno-common toolchains:
   #   ld: postscript.o:postscript.h:29: multiple definition of
   #     `postscript_params'; fped.o:postscript.h:29: first defined here
-  NIX_CFLAGS_COMPILE = "-fcommon";
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
 
   # This uses '/bin/bash', '/usr/local' and 'lex' by default
   makeFlags = [
diff --git a/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix b/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix
index ca2b2e5175b0..d5779abc2c6b 100644
--- a/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/fritzing/default.nix
@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
     cp -a ${parts}/* parts/
   '';
 
-  NIX_CFLAGS_COMPILE = "-I${quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}/quazip";
+  env.NIX_CFLAGS_COMPILE = "-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}/quazip";
 
   qmakeFlags = [
     "phoenix.pro"
@@ -81,5 +81,6 @@ stdenv.mkDerivation rec {
     license = with licenses; [ gpl3 cc-by-sa-30 ];
     maintainers = with maintainers; [ robberer muscaln ];
     platforms = platforms.linux;
+    mainProgram = "Fritzing";
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/gerbv/default.nix b/nixpkgs/pkgs/applications/science/electronics/gerbv/default.nix
index f83cfa1bf04e..963a78bf06ff 100644
--- a/nixpkgs/pkgs/applications/science/electronics/gerbv/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/gerbv/default.nix
@@ -1,35 +1,55 @@
-{ lib, stdenv, fetchgit, fetchpatch, pkg-config, gettext, libtool, automake, autoconf, cairo, gtk2, autoreconfHook }:
+{ lib
+, stdenv
+, autoconf
+, automake
+, autoreconfHook
+, cairo
+, fetchFromGitHub
+, gettext
+, gtk2-x11
+, libtool
+, pkg-config
+}:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "gerbv";
-  version = "2015-10-08";
+  version = "2.9.7";
 
-  src = fetchgit {
-    url = "git://git.geda-project.org/gerbv.git";
-    rev = "76b8b67bfa10823ce98f1c4c3b49a2afcadf7659";
-    sha256 = "00jn1xhf6kblxc5gac1wvk8zm12fy6sk81nj3jwdag0z6wk3z446";
+  src = fetchFromGitHub {
+    owner = "gerbv";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-KxKNMWhWwmlIpueDOSWAWADEHFha8axywPJ6rRz0jIg=";
   };
 
-  patches = [
-    # Pull patch pending upstream inclusion for -fno-common toolchains:
-    #  https://sourceforge.net/p/gerbv/patches/84/
-    (fetchpatch {
-      name = "fnoc-mmon.patch";
-      url = "https://sourceforge.net/p/gerbv/patches/84/attachment/0001-gerbv-fix-build-on-gcc-10-fno-common.patch";
-      sha256 = "1avfbkqhxl7wxn1z19y30ilkwvdgpdkzhzawrs5y3damxmqq8ggk";
-    })
+  postPatch = ''
+    sed -i '/AC_INIT/s/m4_esyscmd.*/${version}])/' configure.ac
+  '';
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    autoreconfHook
+    pkg-config
   ];
 
-  nativeBuildInputs = [ autoreconfHook pkg-config automake autoconf ];
-  buildInputs = [ gettext libtool cairo gtk2 ];
+  buildInputs = [
+    cairo
+    gettext
+    gtk2-x11
+    libtool
+  ];
 
-  configureFlags = ["--disable-update-desktop-database"];
+  configureFlags = [
+    "--disable-update-desktop-database"
+  ];
 
   meta = with lib; {
     description = "A Gerber (RS-274X) viewer";
-    homepage = "http://gerbv.geda-project.org/";
+    homepage = "https://gerbv.github.io/";
+    changelog = "https://github.com/gerbv/gerbv/releases/tag/v${version}";
+    license = licenses.gpl2Plus;
     maintainers = with maintainers; [ mog ];
-    platforms = platforms.linux;
-    license = licenses.gpl2;
+    platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix b/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix
index 10dcb2327c06..276c59aee7d5 100644
--- a/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/gtkwave/default.nix
@@ -16,11 +16,11 @@
 
 stdenv.mkDerivation rec {
   pname = "gtkwave";
-  version = "3.3.111";
+  version = "3.3.115";
 
   src = fetchurl {
     url = "mirror://sourceforge/gtkwave/${pname}-gtk3-${version}.tar.gz";
-    sha256 = "0cv222qhgldfniz6zys52zhrynfsp5v0h8ia857lng7v33vw5qdl";
+    sha256 = "sha256-rbenwCsYygg1oGS2cvbNxR+HXEVLAYmnQ/LOi5HmSqU=";
   };
 
   nativeBuildInputs = [ pkg-config wrapGAppsHook ];
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "VCD/Waveform viewer for Unix and Win32";
-    homepage = "http://gtkwave.sourceforge.net";
+    homepage = "https://gtkwave.sourceforge.net";
     license = lib.licenses.gpl2Plus;
     maintainers = with lib.maintainers; [ thoughtpolice jiegec ];
     platforms = lib.platforms.linux ++ lib.platforms.darwin;
diff --git a/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix b/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix
index 6b5f04fe7349..296fae0a0ed6 100644
--- a/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix
@@ -1,9 +1,57 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, ninja, pkg-config, python3Packages
-, boost, rapidjson, qtbase, qtsvg, igraph, spdlog, wrapQtAppsHook
-, graphviz, llvmPackages, z3
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, ninja
+, pkg-config
+, python3Packages
+, boost
+, rapidjson
+, qtbase
+, qtsvg
+, igraph
+, spdlog
+, wrapQtAppsHook
+, graphviz
+, llvmPackages
+, z3
+, fmt_8
+, suitesparse
 }:
 
-stdenv.mkDerivation rec {
+let
+  igraph' = igraph.overrideAttrs (old: rec {
+    version = "0.9.10";
+    src = fetchFromGitHub {
+      owner = "igraph";
+      repo = "igraph";
+      rev = version;
+      hash = "sha256-prDadHsNhDRkNp1i0niKIYxE0g85Zs0ngvUy6uK8evk=";
+    };
+    postPatch = old.postPatch + lib.optionalString stdenv.isAarch64 ''
+      # https://github.com/igraph/igraph/issues/1694
+      substituteInPlace tests/CMakeLists.txt \
+        --replace "igraph_scg_grouping3" "" \
+        --replace "igraph_scg_semiprojectors2" ""
+    '';
+    buildInputs = old.buildInputs ++ [ suitesparse ];
+    cmakeFlags = old.cmakeFlags ++ [ "-DIGRAPH_USE_INTERNAL_CXSPARSE=OFF" ];
+  });
+  # no stable hal release yet with recent spdlog/fmt support, remove
+  # once 4.0.0 is released - see https://github.com/emsec/hal/issues/452
+  spdlog' = spdlog.override {
+    fmt = fmt_8.overrideAttrs (_: rec {
+      version = "8.0.1";
+      src = fetchFromGitHub {
+        owner = "fmtlib";
+        repo = "fmt";
+        rev = version;
+        sha256 = "1mnvxqsan034d2jiqnw2yvkljl7lwvhakmj5bscwp1fpkn655bbw";
+      };
+    });
+  };
+in stdenv.mkDerivation rec {
   version = "3.3.0";
   pname = "hal-hardware-analyzer";
 
@@ -34,7 +82,7 @@ stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = [ cmake ninja pkg-config ];
-  buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog graphviz wrapQtAppsHook z3 ]
+  buildInputs = [ qtbase qtsvg boost rapidjson igraph' spdlog' graphviz wrapQtAppsHook z3 ]
     ++ (with python3Packages; [ python pybind11 ])
     ++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
 
diff --git a/nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix b/nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix
index d0c75152c427..6cfa3017e39d 100644
--- a/nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/horizon-eda/default.nix
@@ -13,24 +13,23 @@
 , librsvg
 , libspnav
 , libuuid
-, opencascade
+, opencascade-occt
 , pkg-config
 , podofo
 , python3
 , sqlite
 , wrapGAppsHook
-, zeromq
 }:
 
 stdenv.mkDerivation rec {
   pname = "horizon-eda";
-  version = "2.3.1";
+  version = "2.4.0";
 
   src = fetchFromGitHub {
     owner = "horizon-eda";
     repo = "horizon";
     rev = "v${version}";
-    sha256 = "1vvps44n9yrzdpircl98n4061lcmwksisnf3a8xkf3qbcnixnwlp";
+    sha256 = "sha256-R827l7WxyeCPQFXSzFcn4nE4AZBAOQ7s5QylDpxbw3U=";
   };
 
   buildInputs = [
@@ -44,11 +43,10 @@ stdenv.mkDerivation rec {
     librsvg
     libspnav
     libuuid
-    opencascade
+    opencascade-occt
     podofo
     python3
     sqlite
-    zeromq
   ];
 
   nativeBuildInputs = [
@@ -57,7 +55,7 @@ stdenv.mkDerivation rec {
     wrapGAppsHook
   ];
 
-  CASROOT = opencascade;
+  CASROOT = opencascade-occt;
 
   installFlags = [
     "INSTALL=${coreutils}/bin/install"
diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix
index aa5d9a7ade19..1b0bdc3ae49c 100644
--- a/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/kicad/base.nix
@@ -5,6 +5,7 @@
 , libGL
 , zlib
 , wxGTK
+, gtk3
 , libX11
 , gettext
 , glew
@@ -19,7 +20,7 @@
 , pcre
 , libpthreadstubs
 , libXdmcp
-, lndir
+, unixODBC
 
 , util-linux
 , libselinux
@@ -31,8 +32,10 @@
 , dbus
 , at-spi2-core
 , libXtst
+, pcre2
+, libdeflate
 
-, swig
+, swig4
 , python
 , wxPython
 , opencascade-occt
@@ -43,11 +46,9 @@
 , baseName
 , kicadSrc
 , kicadVersion
-, withOCC
 , withNgspice
 , withScripting
 , withI18n
-, withPCM
 , debug
 , sanitizeAddress
 , sanitizeThreads
@@ -65,51 +66,54 @@ stdenv.mkDerivation rec {
 
   src = kicadSrc;
 
+  patches = [
+    # upstream issue 12941 (attempted to upstream, but appreciably unacceptable)
+    ./writable.patch
+  ];
+
   # tagged releases don't have "unknown"
   # kicad nightlies use git describe --dirty
   # nix removes .git, so its approximated here
-  postPatch = ''
-    substituteInPlace CMakeModules/KiCadVersion.cmake \
-      --replace "unknown" "${builtins.substring 0 10 src.rev}" \
+  postPatch = lib.optionalString (!stable) ''
+    substituteInPlace cmake/KiCadVersion.cmake \
+      --replace "unknown" "${builtins.substring 0 10 src.rev}"
   '';
 
   makeFlags = optionals (debug) [ "CFLAGS+=-Og" "CFLAGS+=-ggdb" ];
 
+  # some ngspice tests attempt to write to $HOME/.cache/
+  XDG_CACHE_HOME = "$TMP";
+  # failing tests still attempt to create $HOME though
+
   cmakeFlags = [
-    # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
-    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+    "-DKICAD_USE_EGL=ON"
+    "-DOCC_INCLUDE_DIR=${opencascade-occt}/include/opencascade"
   ]
-  ++ optionals (withScripting) [
-    "-DKICAD_SCRIPTING_WXPYTHON=ON"
+  ++ optionals (stable) [
+    # https://gitlab.com/kicad/code/kicad/-/issues/12491
+    # should be resolved in the next release
+    "-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;qa_eeschema'"
   ]
+  ++ optional (stable && !withNgspice) "-DKICAD_SPICE=OFF"
   ++ optionals (!withScripting) [
     "-DKICAD_SCRIPTING_WXPYTHON=OFF"
   ]
-  ++ optional (!withNgspice) "-DKICAD_SPICE=OFF"
-  ++ optional (!withOCC) "-DKICAD_USE_OCC=OFF"
-  ++ optionals (withOCC) [
-    "-DKICAD_USE_OCC=ON"
-    "-DOCC_INCLUDE_DIR=${opencascade-occt}/include/opencascade"
+  ++ optionals (withI18n) [
+    "-DKICAD_BUILD_I18N=ON"
+  ]
+  ++ optionals (!doInstallCheck) [
+    "-DKICAD_BUILD_QA_TESTS=OFF"
   ]
   ++ optionals (debug) [
     "-DCMAKE_BUILD_TYPE=Debug"
     "-DKICAD_STDLIB_DEBUG=ON"
     "-DKICAD_USE_VALGRIND=ON"
   ]
-  ++ optionals (!doInstallCheck) [
-    "-DKICAD_BUILD_QA_TESTS=OFF"
-  ]
   ++ optionals (sanitizeAddress) [
     "-DKICAD_SANITIZE_ADDRESS=ON"
   ]
   ++ optionals (sanitizeThreads) [
     "-DKICAD_SANITIZE_THREADS=ON"
-  ]
-  ++ optionals (withI18n) [
-    "-DKICAD_BUILD_I18N=ON"
-  ]
-  ++ optionals (!withPCM && stable) [
-    "-DKICAD_PCM=OFF"
   ];
 
   nativeBuildInputs = [
@@ -117,7 +121,6 @@ stdenv.mkDerivation rec {
     doxygen
     graphviz
     pkg-config
-    lndir
   ]
   # wanted by configuration on linux, doesn't seem to affect performance
   # no effect on closure size
@@ -129,9 +132,10 @@ stdenv.mkDerivation rec {
     libdatrie
     libxkbcommon
     libepoxy
-    dbus.daemon
+    dbus
     at-spi2-core
     libXtst
+    pcre2
   ];
 
   buildInputs = [
@@ -140,7 +144,7 @@ stdenv.mkDerivation rec {
     zlib
     libX11
     wxGTK
-    wxGTK.gtk
+    gtk3
     pcre
     libXdmcp
     gettext
@@ -151,18 +155,18 @@ stdenv.mkDerivation rec {
     curl
     openssl
     boost
-    swig
+    swig4
     python
+    unixODBC
+    libdeflate
+    opencascade-occt
   ]
   ++ optional (withScripting) wxPython
   ++ optional (withNgspice) libngspice
-  ++ optional (withOCC) opencascade-occt
-  ++ optional (debug) valgrind
-  ;
+  ++ optional (debug) valgrind;
 
   # debug builds fail all but the python test
-  # stable release doesn't have the fix for upstream issue 9888 yet
-  doInstallCheck = !debug && !stable;
+  doInstallCheck = !(debug);
   installCheckTarget = "test";
 
   dontStrip = debug;
diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix
index 95e88ff14071..9b98a8231eb6 100644
--- a/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/kicad/default.nix
@@ -2,7 +2,8 @@
 , fetchFromGitLab
 , gnome
 , dconf
-, wxGTK31-gtk3
+, wxGTK32
+, gtk3
 , makeWrapper
 , gsettings-desktop-schemas
 , hicolor-icon-theme
@@ -13,8 +14,7 @@
 
 , pname ? "kicad"
 , stable ? true
-, withOCC ? true
-, withNgspice ? true
+, withNgspice ? !stdenv.isDarwin
 , libngspice
 , withScripting ? true
 , python3
@@ -23,8 +23,8 @@
 , sanitizeThreads ? false
 , with3d ? true
 , withI18n ? true
-, withPCM ? true # Plugin and Content Manager
 , srcs ? { }
+, symlinkJoin
 }:
 
 # The `srcs` parameter can be used to override the kicad source code
@@ -103,9 +103,9 @@ let
     if srcOverridep "libVersion" then srcs.libVersion
     else versionsImport.${baseName}.libVersion.version;
 
-  wxGTK = wxGTK31-gtk3;
+  wxGTK = wxGTK32;
   python = python3;
-  wxPython = python.pkgs.wxPython_4_1;
+  wxPython = python.pkgs.wxPython_4_2;
 
   inherit (lib) concatStringsSep flatten optionalString optionals;
 in
@@ -117,7 +117,7 @@ stdenv.mkDerivation rec {
     inherit stable baseName;
     inherit kicadSrc kicadVersion;
     inherit wxGTK python wxPython;
-    inherit withOCC withNgspice withScripting withI18n withPCM;
+    inherit withNgspice withScripting withI18n;
     inherit debug sanitizeAddress sanitizeThreads;
   };
 
@@ -131,34 +131,42 @@ stdenv.mkDerivation rec {
   dontFixup = true;
 
   pythonPath = optionals (withScripting)
-    [ wxPython python.pkgs.six ];
+    [ wxPython python.pkgs.six python.pkgs.requests ];
 
   nativeBuildInputs = [ makeWrapper ]
     ++ optionals (withScripting)
     [ python.pkgs.wrapPython ];
 
-  # We are emulating wrapGAppsHook, along with other variables to the
-  # wrapper
+  # KICAD7_TEMPLATE_DIR only works with a single path (it does not handle : separated paths)
+  # but it's used to find both the templates and the symbol/footprint library tables
+  # https://gitlab.com/kicad/code/kicad/-/issues/14792
+  template_dir = symlinkJoin {
+    name = "KiCad_template_dir";
+    paths = with passthru.libraries; [
+      "${templates}/share/kicad/template"
+      "${footprints}/share/kicad/template"
+      "${symbols}/share/kicad/template"
+    ];
+  };
+  # We are emulating wrapGAppsHook, along with other variables to the wrapper
   makeWrapperArgs = with passthru.libraries; [
     "--prefix XDG_DATA_DIRS : ${base}/share"
     "--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share"
     "--prefix XDG_DATA_DIRS : ${gnome.adwaita-icon-theme}/share"
-    "--prefix XDG_DATA_DIRS : ${wxGTK.gtk}/share/gsettings-schemas/${wxGTK.gtk.name}"
+    "--prefix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}"
     "--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
     # wrapGAppsHook did these two as well, no idea if it matters...
     "--prefix XDG_DATA_DIRS : ${cups}/share"
     "--prefix GIO_EXTRA_MODULES : ${dconf}/lib/gio/modules"
     # required to open a bug report link in firefox-wayland
     "--set-default MOZ_DBUS_REMOTE 1"
-    "--set-default KICAD6_FOOTPRINT_DIR ${footprints}/share/kicad/footprints"
-    "--set-default KICAD6_SYMBOL_DIR ${symbols}/share/kicad/symbols"
-    "--set-default KICAD6_TEMPLATE_DIR ${templates}/share/kicad/template"
-    "--prefix KICAD6_TEMPLATE_DIR : ${symbols}/share/kicad/template"
-    "--prefix KICAD6_TEMPLATE_DIR : ${footprints}/share/kicad/template"
+    "--set-default KICAD7_FOOTPRINT_DIR ${footprints}/share/kicad/footprints"
+    "--set-default KICAD7_SYMBOL_DIR ${symbols}/share/kicad/symbols"
+    "--set-default KICAD7_TEMPLATE_DIR ${template_dir}"
   ]
   ++ optionals (with3d)
   [
-    "--set-default KICAD6_3DMODEL_DIR ${packages3d}/share/kicad/3dmodels"
+    "--set-default KICAD7_3DMODEL_DIR ${packages3d}/share/kicad/3dmodels"
   ]
   ++ optionals (withNgspice) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ]
 
@@ -170,8 +178,9 @@ stdenv.mkDerivation rec {
   # $out and $program_PYTHONPATH don't exist when makeWrapperArgs gets set?
   installPhase =
     let
+      bin = if stdenv.isDarwin then "*.app/Contents/MacOS" else "bin";
       tools = [ "kicad" "pcbnew" "eeschema" "gerbview" "pcb_calculator" "pl_editor" "bitmap2component" ];
-      utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad2step" ];
+      utils = [ "dxf2idf" "idf2vrml" "idfcyl" "idfrect" "kicad-cli" ];
     in
     (concatStringsSep "\n"
       (flatten [
@@ -181,13 +190,13 @@ stdenv.mkDerivation rec {
 
         # wrap each of the directly usable tools
         (map
-          (tool: "makeWrapper ${base}/bin/${tool} $out/bin/${tool} $makeWrapperArgs"
+          (tool: "makeWrapper ${base}/${bin}/${tool} $out/bin/${tool} $makeWrapperArgs"
             + optionalString (withScripting) " --set PYTHONPATH \"$program_PYTHONPATH\""
           )
           tools)
 
         # link in the CLI utils
-        (map (util: "ln -s ${base}/bin/${util} $out/bin/${util}") utils)
+        (map (util: "ln -s ${base}/${bin}/${util} $out/bin/${util}") utils)
 
         "runHook postInstall"
       ])
@@ -213,7 +222,7 @@ stdenv.mkDerivation rec {
     description = (if (stable)
     then "Open Source Electronics Design Automation suite"
     else "Open Source EDA suite, development build")
-    + (if (!with3d) then ", without 3D models" else "");
+    + (lib.optionalString (!with3d) ", without 3D models");
     homepage = "https://www.kicad.org/";
     longDescription = ''
       KiCad is an open source software suite for Electronic Design Automation.
@@ -223,11 +232,7 @@ stdenv.mkDerivation rec {
     maintainers = with lib.maintainers; [ evils kiwi ];
     # kicad is cross platform
     platforms = lib.platforms.all;
-    # despite that, nipkgs' wxGTK for darwin is "wxmac"
-    # and wxPython_4_0 does not account for this
-    # adjusting this package to downgrade to python2Packages.wxPython (wxPython 3),
-    # seems like more trouble than fixing wxPython_4_0 would be
-    # additionally, libngspice is marked as linux only, though it should support darwin
+    broken = stdenv.isDarwin;
 
     hydraPlatforms = if (with3d) then [ ] else platforms;
     # We can't download the 3d models on Hydra,
@@ -235,5 +240,7 @@ stdenv.mkDerivation rec {
     # as long as the base and libraries (minus 3d) are build,
     # this wrapper does not need to get built
     # the kicad-*small "packages" cause this to happen
+
+    mainProgram = "kicad";
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh b/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh
index c51d32d39ac8..625b2962fa23 100755
--- a/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh
+++ b/nixpkgs/pkgs/applications/science/electronics/kicad/update.sh
@@ -65,7 +65,11 @@ tmp="${here}/,versions.nix.${RANDOM}"
 libs=( symbols templates footprints packages3d )
 
 get_rev() {
-  git ls-remote --tags "$@"
+  if [[ ${version} == "master" ]]; then
+    git ls-remote --heads "$@"
+  else
+    git ls-remote --tags "$@"
+  fi
 }
 
 gitlab="https://gitlab.com/kicad"
diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix b/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix
index eb8a2fd6dafd..f9f91856a98c 100644
--- a/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/kicad/versions.nix
@@ -3,45 +3,45 @@
 {
   "kicad" = {
     kicadVersion = {
-      version =			"6.0.7";
+      version =			"7.0.5";
       src = {
-        rev =			"77480857076960b2e8a70e01aee0b843db37f5f7";
-        sha256 =		"10bqn99nif9zyi5v0lkic3na2vac5lgacw01ayil359vaw7d0pzy";
+        rev =			"4d25ed10349077742994d7e985876b45a224a964";
+        sha256 =		"04mkvz4l6i8bb6mw4y0vmlkg2kvdhkj980w6y6sphb9xq8vzmcxs";
       };
     };
     libVersion = {
-      version =			"6.0.7";
+      version =			"7.0.5";
       libSources = {
-        symbols.rev =		"059abdef06a0b7b44994ae9948a4f98f7224cb1f";
-        symbols.sha256 =	"006ksx8r6cm6q7v701nalggivp21cmysj8p9zc18y3sch8n1mj4g";
-        templates.rev =		"16d1898d52f1277ce9bd75640a32f7d2c6d122bf";
-        templates.sha256 =	"08zxh83fbygh1x2jhca8nrp3f9kihf7kmg65qmyp95wvps4p5h8v";
-        footprints.rev =	"26e8be9805444cc25d03d2263277aa06620f5374";
-        footprints.sha256 =	"0c5fm4hlkka0ms43j02kbv7s9yrlkffn0jz6649ac3gpx6pk8lbf";
-        packages3d.rev =	"cd9551dfb37ab0c086cac63564e54a7bc7b611d8";
-        packages3d.sha256 =	"0rdhwyhknrc63sc5ykmq097rzrl36zibnkls7q5hf54lrhn0n3k4";
+        symbols.rev =		"22b3e34e9221d2fa165b6b5cccf5f162f070de01";
+        symbols.sha256 =	"15100z8g4x28sxz8097ay1vxfxz2c4a1nvvzyx5vjfmhydwqwk49";
+        templates.rev =		"33cda687a1af1e1907a9fcb916010436df9ab1ae";
+        templates.sha256 =	"1qi20mrsfn4fxmr1fyphmil2i9p2nzmwk5rlfchc5aq2194nj3lq";
+        footprints.rev =	"208252e63ade41c127b362c4cc676fd123dfeeb2";
+        footprints.sha256 =	"11d3mwmivi6rc778a2x118a5mk11d9mr8miadxmy1mbc41jbx2dh";
+        packages3d.rev =	"b7f731784124742a692008b3150662188ebc6193";
+        packages3d.sha256 =	"1bzb6b7llzwabjkdd0xsyan0x8kihccap4gwvipzydfg7gm5fjxm";
       };
     };
   };
   "kicad-unstable" = {
     kicadVersion = {
-      version =			"2022-06-21";
+      version =			"2023-04-14";
       src = {
-        rev =			"b54bb909755d39dcce38ef277c715d7f31ab8e00";
-        sha256 =		"0nzgrkkvc66hgqdrwfmh5fjw4ffr8gc3bw3n44sa6zjkkz5s6p48";
+        rev =			"4a3f77cd9dac9dc5921eb9beaa63d0d3c9c051e5";
+        sha256 =		"06dsiyvr7zn3cp13w0y63d1qmjlhzsqlvajkximg3pw5mmiljxrr";
       };
     };
     libVersion = {
-      version =			"2022-06-21";
+      version =			"2023-04-14";
       libSources = {
-        symbols.rev =		"a003b00f6f1056d726e32e911cd65b32946f5503";
-        symbols.sha256 =	"02z3vqhz1rlf57zi8vyrlxvvdl1hpsh447p41qdgcpn5dyjycb9d";
-        templates.rev =		"ae2b46f8756d79379b90fec01d4fdde1ccfd73c1";
-        templates.sha256 =	"08zxh83fbygh1x2jhca8nrp3f9kihf7kmg65qmyp95wvps4p5h8v";
-        footprints.rev =	"5df530ec44892407d6382d933ff9ad42dd19df0e";
-        footprints.sha256 =	"1phynxisha2pq2knbx5l1hkdz1bmjm0qxl3lcb4ab82h8d35r37c";
-        packages3d.rev =	"6bfd8dfa3adc6ac316b9857977c87f22282c6e24";
-        packages3d.sha256 =	"0ci9gxbpfnfqwah95ki4qcwlca78s1z6s7hckisnp58a1cm9siya";
+        symbols.rev =		"38d4e7e1ab6a9b5d9eee85f687e60467753b2135";
+        symbols.sha256 =	"0df6fx9b19v6sxrfyggbisw72y66kiwqi05k8mldsgiw6q55gbkc";
+        templates.rev =		"867eef383a0f61015cb69677d5c632d78a2ea01a";
+        templates.sha256 =	"1qi20mrsfn4fxmr1fyphmil2i9p2nzmwk5rlfchc5aq2194nj3lq";
+        footprints.rev =	"4da055a2d572ff87e7ecea97cf358ed8c1d46dfc";
+        footprints.sha256 =	"1xb84284dmcb7mbvzlrxb4v4km3ih7gq856h8cglf9jn8wzlnvrk";
+        packages3d.rev =	"0f43a0962437feb53bd2083e9f39efffb5a5dd90";
+        packages3d.sha256 =	"1nkk4325jh89vh52ykfnf9pz1k3jk5017gz6r2cia2v4b3jadi31";
       };
     };
   };
diff --git a/nixpkgs/pkgs/applications/science/electronics/kicad/writable.patch b/nixpkgs/pkgs/applications/science/electronics/kicad/writable.patch
new file mode 100644
index 000000000000..a2969f26f43b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/kicad/writable.patch
@@ -0,0 +1,49 @@
+commit 6a72fd032405515e468797be91b5a6ebcbbb5fd8
+Author: Evils <evils.devils@protonmail.com>
+Date:   Wed Nov 23 19:49:13 2022 +0100
+
+    ensure new projects are writable
+
+diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp
+index 7ee8090858..391514519c 100644
+--- a/kicad/kicad_manager_frame.cpp
++++ b/kicad/kicad_manager_frame.cpp
+@@ -638,6 +638,12 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxFileName& aProjectFileName,
+ 
+                 // wxFFile dtor will close the file
+             }
++
++            if( destFileName.IsOk() && !destFileName.IsFileWritable() )
++            {
++                destFileName.SetPermissions(0644);
++            }
++
+         }
+     }
+ 
+diff --git a/kicad/project_template.cpp b/kicad/project_template.cpp
+index bf951fcddb..2bef94326b 100644
+--- a/kicad/project_template.cpp
++++ b/kicad/project_template.cpp
+@@ -282,6 +282,21 @@ bool PROJECT_TEMPLATE::CreateProject( wxFileName& aNewProjectPath, wxString* aEr
+ 
+             result = false;
+         }
++	else if( !destFile.IsFileWritable() && !destFile.SetPermissions(0644) )
++        {
++            if( aErrorMsg )
++            {
++                if( !aErrorMsg->empty() )
++                    *aErrorMsg += "\n";
++
++                wxString msg;
++
++                msg.Printf( _( "Cannot make file writable: '%s'." ), destFile.GetFullPath() );
++                *aErrorMsg += msg;
++            }
++
++            result = false;
++	}
+     }
+ 
+     return result;
diff --git a/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix b/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix
index 15b64938b256..bd824ac28889 100644
--- a/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/librepcb/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "librepcb";
-  version = "0.1.6";
+  version = "0.1.7";
 
   src = fetchFromGitHub {
     owner  = pname;
     repo   = pname;
     rev    = version;
-    sha256 = "0gzf3asdgdicpikb412134ybqnbbark948yrfhvba2w4i9cwbk2r";
+    sha256 = "sha256-zqvvc3CHqdRWVUFt4BkH5Vq50/FKNvMNW2NvGyfWwFM=";
     fetchSubmodules = true;
   };
 
diff --git a/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix b/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix
index edee5946d946..fc68969bd498 100644
--- a/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/magic-vlsi/default.nix
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
     patchShebangs scripts/*
   '';
 
-  NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
+  env.NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
 
   patches = [
     ./0001-strip-bin-prefix.patch
diff --git a/nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix b/nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix
index 06b77294da7e..f65f5e5149ca 100644
--- a/nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/nanovna-saver/default.nix
@@ -2,29 +2,37 @@
   lib,
   python3,
   fetchFromGitHub,
-  wrapQtAppsHook,
+  fetchpatch,
+  qt6,
 }:
 python3.pkgs.buildPythonApplication rec {
   pname = "nanovna-saver";
-  version = "0.4.0";
+  version = "0.6.0";
 
   src = fetchFromGitHub {
     owner = "NanoVNA-Saver";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1n1bh46spdyk7kgvv95hyfy9f904czhzlvk41vliqkak56hj2ss1";
+    sha256 = "sha256-2vDjAdEL8eNje5bm/1m+Fdi+PCGxpXwpxe2KvlLYB58=";
   };
 
-  nativeBuildInputs = [ wrapQtAppsHook ];
+   nativeBuildInputs = [
+    qt6.wrapQtAppsHook
+    qt6.qtbase
+  ];
 
   propagatedBuildInputs = with python3.pkgs; [
     cython
     scipy
-    pyqt5
+    pyqt6
     pyserial
     numpy
+    setuptools
+    setuptools-scm
   ];
 
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
   doCheck = false;
 
   dontWrapGApps = true;
@@ -47,6 +55,6 @@ python3.pkgs.buildPythonApplication rec {
       generally display and analyze the resulting data.
     '';
     license = licenses.gpl3Only;
-    maintainers = with maintainers; [ zaninime ];
+    maintainers = with maintainers; [ zaninime tmarkus ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix b/nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix
deleted file mode 100644
index 8de5cb311488..000000000000
--- a/nixpkgs/pkgs/applications/science/electronics/ngspice/default.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ lib, stdenv
-, fetchurl
-, bison
-, flex
-, readline
-, libX11
-, libICE
-, libXaw
-, libXmu
-, libXext
-, libXt
-, fftw
-}:
-
-stdenv.mkDerivation rec {
-  pname = "ngspice";
-  version = "37";
-
-  src = fetchurl {
-    url = "mirror://sourceforge/ngspice/ngspice-${version}.tar.gz";
-    sha256 = "1gpcic6b6xk3g4956jcsqljf33kj5g43cahmydq6m8rn39sadvlv";
-  };
-
-  nativeBuildInputs = [ flex bison ];
-  buildInputs = [ readline libX11 libICE libXaw libXmu libXext libXt fftw ];
-
-  configureFlags = [ "--enable-x" "--with-x" "--with-readline" "--enable-xspice" "--enable-cider" ];
-
-  meta = with lib; {
-    description = "The Next Generation Spice (Electronic Circuit Simulator)";
-    homepage = "http://ngspice.sourceforge.net";
-    license = with licenses; [ "BSD" gpl2 ];
-    maintainers = with maintainers; [ bgamari rongcuid ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/nixpkgs/pkgs/applications/science/electronics/nvc/default.nix b/nixpkgs/pkgs/applications/science/electronics/nvc/default.nix
index 236f7df5d76b..cef614b57fdd 100644
--- a/nixpkgs/pkgs/applications/science/electronics/nvc/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/nvc/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , autoreconfHook
 , check
 , flex
@@ -8,19 +9,20 @@
 , which
 , elfutils
 , libelf
+, libffi
 , llvm
 , zlib
 }:
 
 stdenv.mkDerivation rec {
   pname = "nvc";
-  version = "1.7.0";
+  version = "1.9.2";
 
   src = fetchFromGitHub {
     owner = "nickg";
     repo = pname;
     rev = "r${version}";
-    sha256 = "sha256-U9VxpHzrAQPMqnSs0YcEnc9dlQUutTuZCJP5F1v7eaA=";
+    hash = "sha256-xB2COtYgbg00rrOWTbcBocRnqF5682jUG2eS7I71Ln4=";
   };
 
   nativeBuildInputs = [
@@ -32,17 +34,15 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
+    libffi
     llvm
     zlib
-  ] ++ [
-    (if stdenv.isLinux then elfutils else libelf)
+  ] ++ lib.optionals stdenv.isLinux [
+    elfutils
+  ] ++ lib.optionals (!stdenv.isLinux) [
+    libelf
   ];
 
-  # TODO: recheck me on next release
-  postPatch = lib.optionalString stdenv.isLinux ''
-    sed -i "/vhpi4/d" test/regress/testlist.txt
-  '';
-
   preConfigure = ''
     mkdir build
     cd build
@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
     description = "VHDL compiler and simulator";
     homepage = "https://www.nickg.me.uk/nvc/";
     license = licenses.gpl3Plus;
-    platforms = platforms.unix;
     maintainers = with maintainers; [ wegank ];
+    platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/openboardview/default.nix b/nixpkgs/pkgs/applications/science/electronics/openboardview/default.nix
index b2ae28baa92b..715a99cf4897 100644
--- a/nixpkgs/pkgs/applications/science/electronics/openboardview/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/openboardview/default.nix
@@ -9,26 +9,33 @@
 , fontconfig
 , gtk3
 , wrapGAppsHook
+, darwin
 }:
 
+let
+  inherit (darwin.apple_sdk.frameworks) Cocoa;
+in
 stdenv.mkDerivation rec {
   pname = "openboardview";
-  version = "9.0.3";
+  version = "9.95.0";
 
   src = fetchFromGitHub {
     owner = "OpenBoardView";
     repo = "OpenBoardView";
     rev = version;
-    sha256 = "sha256-0vxWFNM9KQ5zs+VDDV3mVMfHZau4pgNxQ1HhH2vktCM=";
+    sha256 = "sha256-sKDDOPpCagk7rBRlMlZhx+RYYbtoLzJsrnL8qKZMKW8=";
     fetchSubmodules = true;
   };
 
   nativeBuildInputs = [ cmake pkg-config python3 wrapGAppsHook ];
-  buildInputs = [ SDL2 fontconfig gtk3 ];
+  buildInputs = [ SDL2 fontconfig gtk3 ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+  ];
 
   postPatch = ''
     substituteInPlace src/openboardview/CMakeLists.txt \
       --replace "SDL2::SDL2main" ""
+    substituteInPlace CMakeLists.txt --replace "fixup_bundle" "#fixup_bundle"
   '';
 
   cmakeFlags = [
@@ -37,13 +44,15 @@ stdenv.mkDerivation rec {
   ];
 
   dontWrapGApps = true;
-  postFixup = ''
-    wrapGApp "$out/bin/${pname}" \
-      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk3 ]}
+  postFixup = lib.optionalString stdenv.isDarwin ''
+      mkdir -p "$out/Applications"
+      mv "$out/openboardview.app" "$out/Applications/OpenBoardView.app"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+      wrapGApp "$out/bin/${pname}" \
+        --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk3 ]}
   '';
 
   passthru.updateScript = gitUpdater {
-    inherit pname version;
     ignoredVersions = ''.*\.90\..*'';
   };
 
@@ -51,7 +60,7 @@ stdenv.mkDerivation rec {
     description = "Linux SDL/ImGui edition software for viewing .brd files";
     homepage = "https://github.com/OpenBoardView/OpenBoardView";
     license = licenses.mit;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ k3a ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/openems/default.nix b/nixpkgs/pkgs/applications/science/electronics/openems/default.nix
index e7b947450acc..083f01a42881 100644
--- a/nixpkgs/pkgs/applications/science/electronics/openems/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/openems/default.nix
@@ -10,7 +10,6 @@
 , zlib
 , cmake
 , octave
-, gl2ps
 , mpi
 , withQcsxcad ? true
 , withMPI ? false
diff --git a/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix b/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix
index 09d36094e7c9..f5ecbac9e852 100644
--- a/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/openhantek6022/default.nix
@@ -2,13 +2,13 @@
 
 mkDerivation rec {
   pname = "openhantek6022";
-  version = "3.2.5";
+  version = "3.3.2.2";
 
   src = fetchFromGitHub {
     owner = "OpenHantek";
     repo = "OpenHantek6022";
     rev = version;
-    sha256 = "sha256-QwJmbABAax4yCbcRONArtj5EUKO1gh3pVoLi2hF/WJI=";
+    sha256 = "sha256-0k9Q60+T28m1hPYf5viSdpt0s4d828lfjVo3GjLDm7c=";
   };
 
   nativeBuildInputs = [ cmake makeWrapper ];
diff --git a/nixpkgs/pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch b/nixpkgs/pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch
new file mode 100644
index 000000000000..0332ade17dc7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/openroad/0001-Fix-string-formatting-in-tests.patch
@@ -0,0 +1,53 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nicolas Benes <nbenes.gh@xandea.de>
+Date: Sun, 2 Apr 2023 01:24:51 +0200
+Subject: [PATCH] Fix string formatting in tests
+
+Hide the decimal point and digits after the decimal point when they are
+not needed.
+
+diff --git a/src/par/test/partition_gcd.ok b/src/par/test/partition_gcd.ok
+index 6c40c14..b9a42f6 100644
+--- a/src/par/test/partition_gcd.ok
++++ b/src/par/test/partition_gcd.ok
+@@ -9,7 +9,7 @@
+ ========================================
+ [INFO] Partitioning parameters**** 
+ [PARAM] Number of partitions = 2
+-[PARAM] UBfactor = 1.0
++[PARAM] UBfactor = 1
+ [PARAM] Vertex dimensions = 1
+ [PARAM] Hyperedge dimensions = 1
+ ========================================
+@@ -118,7 +118,7 @@ After Hyperedge Reduction :  num_vertices = 137, num_hyperedges = 251
+ [V-Refine] Level 2 :: 207, 301, 154.65254
+ [V-Refine] Level 3 :: 312, 370, 154.65254
+ [V-Refine] Level 4 :: 469, 451, 154.65254
+-[INFO] V-cycle refinement 1 delta cost 0.0
++[INFO] V-cycle refinement 1 delta cost 0
+ =========================================
+ [STATUS] Running FC multilevel coarsening 
+ =========================================
+@@ -133,7 +133,7 @@ After Hyperedge Reduction :  num_vertices = 137, num_hyperedges = 251
+ [V-Refine] Level 2 :: 207, 301, 154.65254
+ [V-Refine] Level 3 :: 312, 370, 154.65254
+ [V-Refine] Level 4 :: 469, 451, 154.65254
+-[INFO] V-cycle refinement 2 delta cost 0.0
++[INFO] V-cycle refinement 2 delta cost 0
+ [Cutcost of partition : 154.65254]
+ [Vertex balance of block_0 : 0.59249  ( 327.17993 )    
+ [Vertex balance of block_1 : 0.40751  ( 225.03609 )    
+diff --git a/src/pdn/test/design_width.ok b/src/pdn/test/design_width.ok
+index 381dca1..a102974 100644
+--- a/src/pdn/test/design_width.ok
++++ b/src/pdn/test/design_width.ok
+@@ -9,5 +9,5 @@
+ [INFO ODB-0130]     Created 54 pins.
+ [INFO ODB-0131]     Created 406 components and 1816 component-terminals.
+ [INFO ODB-0133]     Created 361 nets and 1004 connections.
+-[ERROR PDN-0185] Insufficient width (14.04 um) to add straps on layer M8 in grid "Core" with total strap width 6.0 um and offset 10.0 um.
++[ERROR PDN-0185] Insufficient width (14.04 um) to add straps on layer M8 in grid "Core" with total strap width 6 um and offset 10 um.
+ PDN-0185
+-- 
+2.38.4
+
diff --git a/nixpkgs/pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch b/nixpkgs/pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch
new file mode 100644
index 000000000000..f0b0666789a7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/openroad/0002-Ignore-warning-on-stderr.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nicolas Benes <nbenes.gh@xandea.de>
+Date: Sun, 2 Apr 2023 04:57:17 +0200
+Subject: [PATCH] Ignore warning on stderr
+
+The following warning is written to stderr, which causes the overall
+test to fail:
+
+```
+sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+```
+
+diff --git a/src/dst/test/cpp_tests.tcl b/src/dst/test/cpp_tests.tcl
+index 9087c2c..63d0cb7 100644
+--- a/src/dst/test/cpp_tests.tcl
++++ b/src/dst/test/cpp_tests.tcl
+@@ -4,7 +4,7 @@ set test_dir [pwd]
+ set openroad_dir [file dirname [file dirname [file dirname $test_dir]]]
+ set tests_path [file join $openroad_dir "build" "src" "dst" "test" "cpp"]
+ 
+-set tests_list [split [exec sh -c "find $tests_path -maxdepth 1 -name 'Test*'"] \n]
++set tests_list [split [exec -ignorestderr sh -c "find $tests_path -maxdepth 1 -name 'Test*'"] \n]
+ 
+ foreach test $tests_list {
+     set test_name [file tail $test]
+diff --git a/src/odb/test/cpp_tests.tcl b/src/odb/test/cpp_tests.tcl
+index 091d576..6811760 100644
+--- a/src/odb/test/cpp_tests.tcl
++++ b/src/odb/test/cpp_tests.tcl
+@@ -4,7 +4,7 @@ set test_dir [pwd]
+ set openroad_dir [file dirname [file dirname [file dirname $test_dir]]]
+ set tests_path [file join $openroad_dir "build" "src" "odb" "test" "cpp"]
+ 
+-set tests_list [split [exec sh -c "find $tests_path -maxdepth 1 -name 'Test*' ! -name '*.cmake'"] \n]
++set tests_list [split [exec -ignorestderr sh -c "find $tests_path -maxdepth 1 -name 'Test*' ! -name '*.cmake'"] \n]
+ 
+ foreach test $tests_list {
+     set test_name [file tail $test]
+-- 
+2.38.4
+
diff --git a/nixpkgs/pkgs/applications/science/electronics/openroad/default.nix b/nixpkgs/pkgs/applications/science/electronics/openroad/default.nix
index 636caec6902a..68e079e2f89b 100644
--- a/nixpkgs/pkgs/applications/science/electronics/openroad/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/openroad/default.nix
@@ -9,13 +9,20 @@
 , python3
 , swig4
 , boost17x
+, cbc       # for clp
 , cimg
+, clp       # for or-tools
 , eigen
+, glpk
+, gtest
 , lcov
 , lemon-graph
 , libjpeg
+, or-tools
 , pcre
+, pkg-config
 , qtbase
+, re2       # for or-tools
 , readline
 , spdlog
 , tcl
@@ -27,14 +34,14 @@
 
 mkDerivation rec {
   pname = "openroad";
-  version = "unstable-2022-07-19";
+  version = "unstable-2023-03-31";
 
   src = fetchFromGitHub {
     owner = "The-OpenROAD-Project";
     repo = "OpenROAD";
-    rev = "2610b3953ef62651825d89fb96917cf5d20af0f1";
+    rev = "cd03c5cf8a8eb78c0e07fe33a56b8e9d64672efe";
     fetchSubmodules = true;
-    sha256 = "sha256-BP0JSnxl1XyqHzDY4eITaGHevqd+rbjWZy/LAfDfELs=";
+    hash = "sha256-BWUvFCuWKWQpifErpak03J+A7ni0jZWIrCMhMdKIbD0=";
   };
 
   nativeBuildInputs = [
@@ -43,19 +50,25 @@ mkDerivation rec {
     doxygen
     flex
     git
+    pkg-config
     swig4
   ];
 
   buildInputs = [
     boost17x
+    cbc
     cimg
+    clp
     eigen
+    glpk
     lcov
     lemon-graph
     libjpeg
+    or-tools
     pcre
     python3
     qtbase
+    re2
     readline
     spdlog
     tcl
@@ -65,6 +78,11 @@ mkDerivation rec {
     zlib
   ];
 
+  patches = [
+    ./0001-Fix-string-formatting-in-tests.patch
+    ./0002-Ignore-warning-on-stderr.patch
+  ];
+
   postPatch = ''
     patchShebangs --build etc/find_messages.py
   '';
@@ -74,18 +92,22 @@ mkDerivation rec {
     "-DUSE_SYSTEM_BOOST=ON"
     "-DUSE_CIMG_LIB=ON"
     "-DOPENROAD_VERSION=${src.rev}"
+
+    # 2023-03-31: see discussion on fmt workaround in
+    # https://github.com/The-OpenROAD-Project/OpenROAD/pull/2696
+    "-DCMAKE_CXX_FLAGS=-DFMT_DEPRECATED_OSTREAM"
   ];
 
   # Resynthesis needs access to the Yosys binaries.
   qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ yosys ]}" ];
 
+  checkInputs = [ gtest ];
+
   # Upstream uses vendored package versions for some dependencies, so regression testing is prudent
   # to see if there are any breaking changes in unstable that should be vendored as well.
-  doCheck = false; # Disabled pending upstream release with fix for rcx log file creation.
+  doCheck = true;
   checkPhase = ''
-    # Regression tests must be run from the project root not from within the CMake build directory.
-    cd ..
-    test/regression
+    ../test/regression
   '';
 
   doInstallCheck = true;
diff --git a/nixpkgs/pkgs/applications/science/electronics/pcb/default.nix b/nixpkgs/pkgs/applications/science/electronics/pcb/default.nix
index d28f1d181215..f8623d9a7bf7 100644
--- a/nixpkgs/pkgs/applications/science/electronics/pcb/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/pcb/default.nix
@@ -8,7 +8,8 @@
 , netpbm
 , imagemagick
 , dbus
-, xlibsWrapper
+, freetype
+, fontconfig
 , libGLU
 , libGL
 , shared-mime-info
@@ -40,7 +41,9 @@ stdenv.mkDerivation rec {
   buildInputs = [
     gtk2
     dbus
-    xlibsWrapper
+    xorg.libXrender
+    freetype
+    fontconfig
     libGLU
     libGL
     tcl
diff --git a/nixpkgs/pkgs/applications/science/electronics/pulseview/default.nix b/nixpkgs/pkgs/applications/science/electronics/pulseview/default.nix
index af8daf71309a..7472fa30e7ff 100644
--- a/nixpkgs/pkgs/applications/science/electronics/pulseview/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/pulseview/default.nix
@@ -1,31 +1,37 @@
-{ mkDerivation, lib, fetchurl, fetchpatch, pkg-config, cmake, glib, boost, libsigrok
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, cmake, glib, boost, libsigrok
 , libsigrokdecode, libserialport, libzip, udev, libusb1, libftdi1, glibmm
-, pcre, librevisa, python3, qtbase, qtsvg, qttools
+, pcre, python3, qtsvg, qttools, wrapQtAppsHook, desktopToDarwinBundle
 }:
 
-mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "pulseview";
   version = "0.4.2";
 
   src = fetchurl {
-    url = "https://sigrok.org/download/source/pulseview/${pname}-${version}.tar.gz";
-    sha256 = "1jxbpz1h3m1mgrxw74rnihj8vawgqdpf6c33cqqbyd8v7rxgfhph";
+    url = "https://sigrok.org/download/source/pulseview/pulseview-${version}.tar.gz";
+    hash = "sha256-8EL3ej4bNb8wZmMw427Dj6uNJIw2k8N7fjXUAcO/q8s=";
   };
 
-  nativeBuildInputs = [ cmake pkg-config ];
+  nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ]
+    ++ lib.optional stdenv.isDarwin desktopToDarwinBundle;
 
   buildInputs = [
-    glib boost libsigrok libsigrokdecode libserialport libzip udev libusb1 libftdi1 glibmm
-    pcre librevisa python3
-    qtbase qtsvg qttools
-  ];
+    glib boost libsigrok libsigrokdecode libserialport libzip libusb1 libftdi1 glibmm
+    pcre python3
+    qtsvg
+  ] ++ lib.optional stdenv.isLinux udev;
 
   patches = [
     # Allow building with glib 2.68
     # PR at https://github.com/sigrokproject/pulseview/pull/39
     (fetchpatch {
       url = "https://github.com/sigrokproject/pulseview/commit/fb89dd11f2a4a08b73c498869789e38677181a8d.patch";
-      sha256 = "07ifsis9jlc0jjp2d11f7hvw9kaxcbk0a57h2m4xsv1d7vzl9yfh";
+      hash = "sha256-0PlE/z4tbN1JFfAUBeZiXc3ENzwuhCaulIBRmXTULh4=";
+    })
+    # Fixes replaced/obsolete Qt methods
+    (fetchpatch {
+      url = "https://github.com/sigrokproject/pulseview/commit/ae726b70a7ada9a4be5808e00f0c951318479684.patch";
+      hash = "sha256-6bFXFAnTO+MBUmslw55gWWSCCPwnejqKGpHeJOoH0e8=";
     })
   ];
 
@@ -34,6 +40,6 @@ mkDerivation rec {
     homepage = "https://sigrok.org/";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ bjornfor ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/qfsm/default.nix b/nixpkgs/pkgs/applications/science/electronics/qfsm/default.nix
index b2e3704cba70..e22138997bea 100644
--- a/nixpkgs/pkgs/applications/science/electronics/qfsm/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/qfsm/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Graphical editor for finite state machines";
-    homepage = "http://qfsm.sourceforge.net/";
+    homepage = "https://qfsm.sourceforge.net/";
     license = lib.licenses.gpl3Plus;
     platforms = lib.platforms.unix;
   };
diff --git a/nixpkgs/pkgs/applications/science/electronics/qucs-s/default.nix b/nixpkgs/pkgs/applications/science/electronics/qucs-s/default.nix
index 9c692865f6e3..d2898ebc7540 100644
--- a/nixpkgs/pkgs/applications/science/electronics/qucs-s/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/qucs-s/default.nix
@@ -1,27 +1,39 @@
-{ stdenv, lib, fetchFromGitHub, flex, bison, qt4, libX11, cmake, gperf, adms,
-ngspice, wrapGAppsHook,
-kernels ? [ ngspice ] }:
+{ stdenv
+, lib
+, fetchFromGitHub
+, flex
+, bison
+, qtbase
+, qttools
+, qtsvg
+, qtwayland
+, wrapQtAppsHook
+, libX11
+, cmake
+, gperf
+, adms
+, ngspice
+, kernels ? [ ngspice ]
+}:
 
 stdenv.mkDerivation rec {
   pname = "qucs-s";
-  version = "0.0.22";
+  version = "1.0.2";
 
   src = fetchFromGitHub {
     owner = "ra3xdh";
     repo = "qucs_s";
     rev = version;
-    sha256 = "0rrq2ddridc09m6fixdmbngn42xmv8cmdf6r8zzn2s98fqib5qd6";
+    sha256 = "sha256-2YyVeeUnLBS1Si9gwEsQLZVG98715dz/v+WCYjB3QlI=";
   };
 
-  nativeBuildInputs = [ wrapGAppsHook cmake ];
-  buildInputs = [ flex bison qt4 libX11 gperf adms ] ++ kernels;
+  nativeBuildInputs = [ flex bison wrapQtAppsHook cmake ];
+  buildInputs = [ qtbase qttools qtsvg qtwayland libX11 gperf adms ] ++ kernels;
 
-  preConfigure = ''
-    # Make custom kernels avaible from qucs-s
-    gappsWrapperArgs+=(--prefix PATH ":" ${lib.escapeShellArg (lib.makeBinPath kernels)})
-  '';
+  # Make custom kernels avaible from qucs-s
+  qtWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath kernels) ];
 
-  QTDIR=qt4;
+  QTDIR = qtbase.dev;
 
   doInstallCheck = true;
   installCheck = ''
diff --git a/nixpkgs/pkgs/applications/science/electronics/qucs/default.nix b/nixpkgs/pkgs/applications/science/electronics/qucs/default.nix
index a5f2cf394b44..eeb10b3a5a1d 100644
--- a/nixpkgs/pkgs/applications/science/electronics/qucs/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/qucs/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Integrated circuit simulator";
-    homepage = "http://qucs.sourceforge.net";
+    homepage = "https://qucs.sourceforge.net";
     license = lib.licenses.gpl2Plus;
     maintainers = with lib.maintainers; [viric];
     platforms = with lib.platforms; linux;
diff --git a/nixpkgs/pkgs/applications/science/electronics/systemc/default.nix b/nixpkgs/pkgs/applications/science/electronics/systemc/default.nix
new file mode 100644
index 000000000000..cdb489c6323b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/electronics/systemc/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "systemc";
+  version = "2.3.3";
+
+  src = fetchurl {
+    url = "https://www.accellera.org/images/downloads/standards/systemc/${pname}-${version}.tar.gz";
+    sha256 = "5781b9a351e5afedabc37d145e5f7edec08f3fd5de00ffeb8fa1f3086b1f7b3f";
+  };
+
+  meta = with lib; {
+    description = "The language for System-level design, modeling and verification";
+    homepage    = "https://systemc.org/";
+    license     = licenses.asl20;
+    maintainers = with maintainers; [ victormignot ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/electronics/verilator/default.nix b/nixpkgs/pkgs/applications/science/electronics/verilator/default.nix
index ee84c15a22cf..be196b6460a2 100644
--- a/nixpkgs/pkgs/applications/science/electronics/verilator/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/verilator/default.nix
@@ -1,35 +1,38 @@
 { lib, stdenv, fetchFromGitHub
 , perl, flex, bison, python3, autoconf
+, which, cmake, help2man
+, makeWrapper, glibcLocales
 }:
 
 stdenv.mkDerivation rec {
   pname = "verilator";
-  version = "4.224";
+  version = "5.010";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-Kn44yWkNcOLkc79HLDTxx5zQn/vqft+hhbvsoUAKR7I=";
+    hash = "sha256-NaWatK4sAc+MJolbQs4TDaD9TvY6VAj/KVZBkIq++sQ=";
   };
 
   enableParallelBuilding = true;
   buildInputs = [ perl ];
-  nativeBuildInputs = [ flex bison python3 autoconf ];
+  nativeBuildInputs = [ makeWrapper flex bison python3 autoconf help2man ];
+  nativeCheckInputs = [ which ];
 
-  # these tests need some interpreter paths patched early on...
-  # see https://github.com/NixOS/nix/issues/1205
-  doCheck = false;
+  doCheck = stdenv.isLinux; # darwin tests are broken for now...
   checkTarget = "test";
 
-  preConfigure = ''
-    autoconf
-  '';
+  preConfigure = "autoconf";
 
   postPatch = ''
-    patchShebangs \
-      src/flexfix \
-      src/vlcovgen
+    patchShebangs bin/* src/{flexfix,vlcovgen} test_regress/{driver.pl,t/*.pl}
+  '';
+
+  postInstall = lib.optionalString stdenv.isLinux ''
+    for x in $(ls $out/bin/verilator*); do
+      wrapProgram "$x" --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive"
+    done
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix b/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix
index 0aa9091a86d2..0a93759947d7 100644
--- a/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/verilog/default.nix
@@ -1,5 +1,6 @@
 { lib, stdenv
 , fetchFromGitHub
+, fetchpatch
 , autoconf
 , bison
 , bzip2
@@ -7,57 +8,62 @@
 , gperf
 , ncurses
 , perl
+, python3
 , readline
 , zlib
 }:
 
-let
-  iverilog-test = fetchFromGitHub {
-    owner  = "steveicarus";
-    repo   = "ivtest";
-    rev    = "253609b89576355b3bef2f91e90db62223ecf2be";
-    sha256 = "18i7jlr2csp7mplcrwjhllwvb6w3v7x7mnx7vdw48nd3g5scrydx";
-  };
-in
 stdenv.mkDerivation rec {
   pname   = "iverilog";
-  version = "11.0";
+  version = "12.0";
 
   src = fetchFromGitHub {
     owner  = "steveicarus";
     repo   = pname;
     rev    = "v${lib.replaceStrings ["."] ["_"] version}";
-    sha256 = "0nzcyi6l2zv9wxzsv9i963p3igyjds0n55x0ph561mc3pfbc7aqp";
+    hash   = "sha256-J9hedSmC6mFVcoDnXBtaTXigxrSCFa2AhhFd77ueo7I=";
   };
 
   nativeBuildInputs = [ autoconf bison flex gperf ];
 
+  CC_FOR_BUILD="${stdenv.cc}/bin/cc";
+  CXX_FOR_BUILD="${stdenv.cc}/bin/c++";
+
+  patches = [
+    # NOTE(jleightcap): `-Werror=format-security` warning patched shortly after release, backport the upstream fix
+    (fetchpatch {
+      name = "format-security";
+      url = "https://github.com/steveicarus/iverilog/commit/23e51ef7a8e8e4ba42208936e0a6a25901f58c65.patch";
+      hash = "sha256-fMWfBsCl2fuXe+6AR10ytb8QpC84bXlP5RSdrqsWzEk=";
+    })
+  ];
+
   buildInputs = [ bzip2 ncurses readline zlib ];
 
   preConfigure = "sh autoconf.sh";
 
   enableParallelBuilding = true;
 
-  # tests try to access /proc/ which does not exist on darwin
-  # Cannot locate IVL modules : couldn't get command path from OS.
-  doCheck = !stdenv.isDarwin;
+  # NOTE(jleightcap): the `make check` target only runs a "Hello, World"-esque sanity check.
+  # the tests in the doInstallCheck phase run a full regression test suite.
+  # however, these tests currently fail upstream on aarch64
+  # (see https://github.com/steveicarus/iverilog/issues/917)
+  # so disable the full suite for now.
+  doCheck = true;
+  doInstallCheck = !stdenv.isAarch64;
 
-  installCheckInputs = [ perl ];
+  nativeInstallCheckInputs = [
+    perl
+    (python3.withPackages (pp: with pp; [
+      docopt
+    ]))
+  ];
 
   installCheckPhase = ''
-    # copy tests to allow writing results
-    export TESTDIR=$(mktemp -d)
-    cp -r ${iverilog-test}/* $TESTDIR
-
-    pushd $TESTDIR
-
-    # Run & check tests
-    PATH=$out/bin:$PATH perl vvp_reg.pl
-    # Check the tests, will error if unexpected tests fail. Some failures MIGHT be normal.
-    diff regression_report-devel.txt regression_report.txt
-    PATH=$out/bin:$PATH perl vpi_reg.pl
-
-    popd
+    runHook preInstallCheck
+    export PATH="$PATH:$out/bin"
+    sh .github/test.sh
+    runHook postInstallCheck
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix b/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix
index 9fc65b739273..0ec14d282b4a 100644
--- a/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/vhd2vl/default.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , fetchFromGitHub
 , fetchpatch
 , bison
@@ -9,24 +10,15 @@
 
 stdenv.mkDerivation rec {
   pname = "vhd2vl";
-  version = "unstable-2018-09-01";
+  version = "unstable-2022-12-26";
 
   src = fetchFromGitHub {
     owner = "ldoolitt";
     repo = pname;
-    rev = "37e3143395ce4e7d2f2e301e12a538caf52b983c";
-    sha256 = "17va2pil4938j8c93anhy45zzgnvq3k71a7glj02synfrsv6fs8n";
+    rev = "869d442987dff6b9730bc90563ede89c1abfd28f";
+    sha256 = "sha256-Hz2XkT5m4ri5wVR2ciL9Gx73zr+RdW5snjWnUg300c8=";
   };
 
-  patches = lib.optionals (!stdenv.isAarch64) [
-    # fix build with verilog 11.0 - https://github.com/ldoolitt/vhd2vl/pull/15
-    # for some strange reason, this is not needed for aarch64
-    (fetchpatch {
-      url = "https://github.com/ldoolitt/vhd2vl/commit/ce9b8343ffd004dfe8779a309f4b5a594dbec45e.patch";
-      sha256 = "1qaqhm2mk66spb2dir9n91b385rarglc067js1g6pcg8mg5v3hhf";
-    })
-  ];
-
   nativeBuildInputs = [
     bison
     flex
diff --git a/nixpkgs/pkgs/applications/science/electronics/xcircuit/default.nix b/nixpkgs/pkgs/applications/science/electronics/xcircuit/default.nix
index eb2a29382e60..61b63ff1d7a4 100644
--- a/nixpkgs/pkgs/applications/science/electronics/xcircuit/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/xcircuit/default.nix
@@ -1,13 +1,15 @@
-{ lib, stdenv, fetchurl, autoreconfHook, automake, pkg-config
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, automake, pkg-config
 , cairo, ghostscript, ngspice, tcl, tk, xorg, zlib }:
 
 stdenv.mkDerivation rec {
-  version = "3.10.12";
+  version = "3.10.37";
   pname = "xcircuit";
 
-  src = fetchurl {
-    url = "http://opencircuitdesign.com/xcircuit/archive/xcircuit-${version}.tgz";
-    sha256 = "1h1ywc3mr7plvwnhdii2zgnnv5ih2nhyl4qbdjpi83dq0aq1s2mn";
+  src = fetchFromGitHub {
+    owner = "RTimothyEdwards";
+    repo = "XCircuit";
+    rev = "0056213308c92bec909e8469a0fa1515b72fc3d2";
+    sha256 = "sha256-LXU5VEkLF1aKYz9ynI1qQjJUwt/zKFMPYj153OgJOOI=";
   };
 
   nativeBuildInputs = [ autoreconfHook automake pkg-config ];
@@ -26,6 +28,6 @@ stdenv.mkDerivation rec {
     homepage = "http://opencircuitdesign.com/xcircuit";
     license = licenses.gpl2;
     platforms = platforms.linux;
-    maintainers = with maintainers; [ spacefrogg thoughtpolice ];
+    maintainers = with maintainers; [ john-shaffer spacefrogg thoughtpolice ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/electronics/xoscope/default.nix b/nixpkgs/pkgs/applications/science/electronics/xoscope/default.nix
index 7a9f58a0c6e3..9f9224b5543c 100644
--- a/nixpkgs/pkgs/applications/science/electronics/xoscope/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/xoscope/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Oscilloscope through the sound card";
-    homepage = "http://xoscope.sourceforge.net";
+    homepage = "https://xoscope.sourceforge.net";
     license = lib.licenses.gpl2Plus;
     maintainers = with lib.maintainers; [viric];
     platforms = with lib.platforms; linux;
diff --git a/nixpkgs/pkgs/applications/science/electronics/xyce/default.nix b/nixpkgs/pkgs/applications/science/electronics/xyce/default.nix
index 40c6408b666b..06872eae740f 100644
--- a/nixpkgs/pkgs/applications/science/electronics/xyce/default.nix
+++ b/nixpkgs/pkgs/applications/science/electronics/xyce/default.nix
@@ -33,7 +33,7 @@ assert withMPI -> trilinos.withMPI;
 
 stdenv.mkDerivation rec {
   pname = "xyce";
-  version = "7.4.0";
+  version = "7.6.0";
 
   srcs = [
     # useing fetchurl or fetchFromGitHub doesn't include the manuals
@@ -41,13 +41,13 @@ stdenv.mkDerivation rec {
     (fetchgit {
       url = "https://github.com/Xyce/Xyce.git";
       rev = "Release-${version}";
-      sha256 = "sha256-sOHjQEo4FqlDseTtxFVdLa0SI/VAf2OkwQV7QSL7SNM=";
+      sha256 = "sha256-HYIzmODMWXBuVRZhcC7LntTysuyXN5A9lb2DeCQQtVw=";
     })
     (fetchFromGitHub {
       owner = "Xyce";
       repo = "Xyce_Regression";
       rev = "Release-${version}";
-      sha256 = "sha256-kSGUaFarOHDNJ8kA/TAGkmzicm9O7cfJ7mGFZcbqCZM=";
+      sha256 = "sha256-uEoiKpYyHmdK7LZ1UNm2d3Jk8+sCwBwB0TCoHilIh74=";
     })
   ];
 
@@ -115,10 +115,9 @@ stdenv.mkDerivation rec {
     popd
   '';
 
-  checkInputs = [
+  nativeCheckInputs = [
     bc
     perl
-    perlPackages.DigestMD5
     (python3.withPackages (ps: with ps; [ numpy scipy ]))
   ] ++ lib.optionals withMPI [ mpi openssh ];
 
diff --git a/nixpkgs/pkgs/applications/science/engineering/strictdoc/conftest.py.patch b/nixpkgs/pkgs/applications/science/engineering/strictdoc/conftest.py.patch
deleted file mode 100644
index 2fadf242b7a3..000000000000
--- a/nixpkgs/pkgs/applications/science/engineering/strictdoc/conftest.py.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
-index 932747c..9b3d6ac 100644
---- a/tests/unit/conftest.py
-+++ b/tests/unit/conftest.py
-@@ -1,9 +1,7 @@
- import os
- import sys
- 
--STRICTDOC_ROOT_PATH = os.path.abspath(
--    os.path.join(__file__, "../../../../strictdoc")
--)
-+STRICTDOC_ROOT_PATH = "@strictdoc_root_path@"
- assert os.path.exists(STRICTDOC_ROOT_PATH), "does not exist: {}".format(
-     STRICTDOC_ROOT_PATH
- )
diff --git a/nixpkgs/pkgs/applications/science/engineering/strictdoc/default.nix b/nixpkgs/pkgs/applications/science/engineering/strictdoc/default.nix
index 3fc61b845156..54a4e21a3f60 100644
--- a/nixpkgs/pkgs/applications/science/engineering/strictdoc/default.nix
+++ b/nixpkgs/pkgs/applications/science/engineering/strictdoc/default.nix
@@ -1,83 +1,61 @@
 { lib
-, stdenv
-, buildPythonApplication
 , fetchFromGitHub
 , python3
-, pythonOlder
-, html5lib
-, invoke
-, openpyxl
-, poetry-core
-, tidylib
-, beautifulsoup4
-, dataclasses
-, datauri
-, docutils
-, jinja2
-, lxml
-, markupsafe
-, pygments
-, reqif
-, setuptools
-, textx
-, xlrd
-, XlsxWriter
-, pytestCheckHook
 }:
 
-buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "strictdoc";
-  version = "0.0.26";
+  version = "0.0.40";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "strictdoc-project";
     repo = pname;
-    rev = version;
-    sha256 = "sha256-SMAwji75AjW8CzXRKBDF+fR/a5++GhgIvkcuD+a/vp4=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-kZ8qVhroSPSGAcgUFZb1vRI6JoFyjeg/0qYosbRnwyc=";
   };
 
-  patches = [
-    ./conftest.py.patch
-  ];
-
   postPatch = ''
-    substituteInPlace ./tests/unit/conftest.py \
-      --replace @strictdoc_root_path@ "${placeholder "out"}/${python3.sitePackages}/strictdoc"
-
-    substituteInPlace requirements.txt \
-      --replace "jinja2 >= 2.11.2, <3.0" "jinja2 >= 2.11.2" \
-      --replace "reqif >= 0.0.18, == 0.*" "reqif>=0.0.8" \
-      --replace "==" ">=" \
-      --replace "~=" ">="
+    substituteInPlace pyproject.toml \
+      --replace '"textx >= 3.0.0, == 3.*"' '"textx"' \
+      --replace '"docutils >= 0.16, == 0.*"' '"docutils"' \
+      --replace '"pygments >= 2.10.0, == 2.*"' '"pygments"' \
+      --replace '"lxml >= 4.6.2, == 4.*"' '"lxml"' \
+      --replace '"beautifulsoup4 >= 4.12.0, == 4.*"' '"beautifulsoup4"' \
+      --replace '"python-datauri >= 0.2.9, == 0.*"' '"python-datauri"' \
+      --replace '"XlsxWriter >= 1.3.7, == 1.*"' '"XlsxWriter"' \
+      --replace '"xlrd >= 2.0.1, == 2.*"' '"xlrd"' \
+      --replace '"reqif >= 0.0.33, == 0.*"' '"reqif"' \
+      --replace '"pybtex >= 0.23.0, == 0.*"' '"pybtex"'
   '';
 
-  nativeBuildInputs = [
-    html5lib
-    invoke
-    openpyxl
-    poetry-core
-    tidylib
+  nativeBuildInputs = with python3.pkgs; [
+    hatchling
   ];
 
-  propagatedBuildInputs = [
+  propagatedBuildInputs = with python3.pkgs; [
     beautifulsoup4
     datauri
     docutils
+    fastapi
+    html5lib
     jinja2
     lxml
     markupsafe
+    pybtex
     pygments
+    python-multipart
     reqif
     setuptools
     textx
+    toml
+    uvicorn
+    websockets
     xlrd
-    XlsxWriter
-  ] ++ lib.optionals (pythonOlder "3.7") [
-    dataclasses
-  ];
+    xlsxwriter
+  ] ++ uvicorn.optional-dependencies.standard;
 
-  checkInputs = [
+  nativeCheckInputs = with python3.pkgs; [
     pytestCheckHook
   ];
 
@@ -90,10 +68,14 @@ buildPythonApplication rec {
     "test_001_load_from_files"
   ];
 
+  disabledTestPaths = [
+    "tests/end2end/"
+  ];
+
   meta = with lib; {
     description = "Software requirements specification tool";
     homepage = "https://github.com/strictdoc-project/strictdoc";
-    changelog = "https://github.com/strictdoc-project/strictdoc/releases";
+    changelog = "https://github.com/strictdoc-project/strictdoc/releases/tag/${version}";
     license = licenses.asl20;
     maintainers = with maintainers; [ yuu ];
   };
diff --git a/nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix b/nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix
index e5779478936e..79688e05fb80 100644
--- a/nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix
+++ b/nixpkgs/pkgs/applications/science/geometry/antiprism/default.nix
@@ -8,13 +8,13 @@
 
 stdenv.mkDerivation rec {
   pname = "antiprism";
-  version = "0.29";
+  version = "0.30";
 
   src = fetchFromGitHub {
     owner = "antiprism";
     repo = pname;
     rev = version;
-    sha256 = "sha256-MHzetkmRDLBXq3KrfXmUhxURY60/Y8z5zQsExT6N4cY=";
+    sha256 = "sha256-dD3MH+KectuuKOYF7bqWtGsBo5zz+UMyY/io1tgXbgU=";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
diff --git a/nixpkgs/pkgs/applications/science/geometry/drgeo/default.nix b/nixpkgs/pkgs/applications/science/geometry/drgeo/default.nix
index 59d7315ef413..0cc8bcb0fb38 100644
--- a/nixpkgs/pkgs/applications/science/geometry/drgeo/default.nix
+++ b/nixpkgs/pkgs/applications/science/geometry/drgeo/default.nix
@@ -13,8 +13,9 @@ stdenv.mkDerivation rec {
   };
   patches = [ ./struct.patch ];
 
+  nativeBuildInputs = [ pkg-config intltool ];
   buildInputs = [libglade gtk2 guile libxml2
-    perl intltool libtool pkg-config];
+    perl libtool ];
 
   prebuild = ''
     cp drgeo.desktop.in drgeo.desktop
diff --git a/nixpkgs/pkgs/applications/science/geometry/gama/default.nix b/nixpkgs/pkgs/applications/science/geometry/gama/default.nix
index 20d2513b877e..c00ab9c340b4 100644
--- a/nixpkgs/pkgs/applications/science/geometry/gama/default.nix
+++ b/nixpkgs/pkgs/applications/science/geometry/gama/default.nix
@@ -1,18 +1,18 @@
 { stdenv, fetchurl, lib, expat, octave, libxml2, texinfo, zip }:
 stdenv.mkDerivation rec {
   pname = "gama";
-  version = "2.21";
+  version = "2.24";
 
   src = fetchurl {
     url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "sha256-h+Mo+j/Kr7jmMY9fy4hHwn0FM1C9hMI7f7XY/xjBzHY=";
+    sha256 = "sha256-AIRqBSO71c26TeQwxjfAGIy8YQddF4tq+ZnWztroyRM=";
   };
 
   buildInputs = [ expat ];
 
   nativeBuildInputs = [ texinfo zip ];
 
-  checkInputs = [ octave libxml2 ];
+  nativeCheckInputs = [ octave libxml2 ];
   doCheck = true;
 
   meta = with lib ; {
diff --git a/nixpkgs/pkgs/applications/science/logic/abc/default.nix b/nixpkgs/pkgs/applications/science/logic/abc/default.nix
index 4f37651a171c..bea9381132fd 100644
--- a/nixpkgs/pkgs/applications/science/logic/abc/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/abc/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname   = "abc-verifier";
-  version = "2022.07.27";
+  version = "unstable-2023-02-23";
 
   src = fetchFromGitHub {
     owner = "yosyshq";
     repo  = "abc";
-    rev   = "7cc11f7f0c49d4ce7e0ed88950d1c4c8abb1cba4";
-    hash  = "sha256-6m8XpSYWT0uMpYHXm3ExnH7RMg923YqZAJPTBeFXMzg=";
+    rev   = "2c1c83f75b8078ced51f92c697da3e712feb3ac3";
+    hash  = "sha256-THcyEifIp9v1bOofFVm9NFPqgI6NfKKys+Ea2KyNpv8=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/applications/science/logic/abella/default.nix b/nixpkgs/pkgs/applications/science/logic/abella/default.nix
index 3d752b7d7b93..1d0c72359cfc 100644
--- a/nixpkgs/pkgs/applications/science/logic/abella/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/abella/default.nix
@@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-/eOiebMFHgrurtrSHPlgZO3xmmxBOUmyAzswXZLd3Yc=";
   };
 
-  buildInputs = [ rsync ] ++ (with ocamlPackages; [ ocaml ocamlbuild findlib ]);
+  strictDeps = true;
+
+  nativeBuildInputs = [ rsync ] ++ (with ocamlPackages; [ ocaml ocamlbuild findlib ]);
 
   installPhase = ''
     mkdir -p $out/bin
diff --git a/nixpkgs/pkgs/applications/science/logic/acgtk/default.nix b/nixpkgs/pkgs/applications/science/logic/acgtk/default.nix
index 1de21e09f806..693bc306f21e 100644
--- a/nixpkgs/pkgs/applications/science/logic/acgtk/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/acgtk/default.nix
@@ -1,20 +1,31 @@
-{ lib, stdenv, fetchurl, dune_2, ocamlPackages }:
+{ lib, stdenv, fetchFromGitLab, dune_3, ocamlPackages }:
 
 stdenv.mkDerivation {
 
   pname = "acgtk";
-  version = "1.5.2";
+  version = "1.5.4";
 
-  src = fetchurl {
-    url = "https://acg.loria.fr/software/acg-1.5.2-20201204.tar.gz";
-    sha256 = "09yax7dyw8kgwzlb69r9d20y7rrymzwi3bbq2dh0qdq01vjz2xwq";
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "acg";
+    repo = "dev/acgtk";
+    rev = "8e630b6d91bad022bd1d1a075e7768034065c428";
+    sha256 = "sha256-W/BDhbng5iYuiB7desMKvRtDFdhoaxiJNvNvtbLlA6E=";
   };
 
-  buildInputs = [ dune_2 ] ++ (with ocamlPackages; [
-    ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir menhirLib mtime yojson
-  ]);
+  strictDeps = true;
 
-  buildPhase = "dune build --profile=release";
+  nativeBuildInputs = with ocamlPackages; [ menhir ocaml findlib dune_3 ];
+
+  buildInputs = with ocamlPackages; [
+    ansiterminal cairo2 cmdliner fmt logs menhirLib mtime sedlex yojson
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    dune build --profile=release ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
+    runHook postBuild
+  '';
 
   installPhase = ''
     dune install --prefix $out --libdir $OCAMLFIND_DESTDIR
diff --git a/nixpkgs/pkgs/applications/science/logic/alt-ergo/default.nix b/nixpkgs/pkgs/applications/science/logic/alt-ergo/default.nix
index e5aee4d140aa..ce084c1f4a73 100644
--- a/nixpkgs/pkgs/applications/science/logic/alt-ergo/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/alt-ergo/default.nix
@@ -2,15 +2,15 @@
 
 let
   pname = "alt-ergo";
-  version = "2.4.2";
+  version = "2.4.3";
 
   configureScript = "ocaml unix.cma configure.ml";
 
   src = fetchFromGitHub {
     owner = "OCamlPro";
     repo = pname;
-    rev = version;
-    sha256 = "sha256-8pJ/1UAbheQaLFs5Uubmmf5D0oFJiPxF6e2WTZgRyAc=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-2XARGr8rLiPMOM0rBBoRv5tZvKYtkLkJctGqLYkMe7Q=";
   };
 in
 
@@ -20,7 +20,10 @@ let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
   configureFlags = [ pname ];
   nativeBuildInputs = [ which ];
   buildInputs = with ocamlPackages; [ dune-configurator ];
-  propagatedBuildInputs = with ocamlPackages; [ num ocplib-simplex seq stdlib-shims zarith ];
+  propagatedBuildInputs = with ocamlPackages; [ dune-build-info num ocplib-simplex seq stdlib-shims zarith ];
+  preBuild = ''
+    substituteInPlace src/lib/util/version.ml --replace 'version="dev"' 'version="${version}"'
+  '';
 }; in
 
 let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
@@ -38,7 +41,7 @@ ocamlPackages.buildDunePackage {
   configureFlags = [ pname ];
 
   nativeBuildInputs = [ which ocamlPackages.menhir ];
-  buildInputs = [ alt-ergo-parsers ocamlPackages.cmdliner_1_1 ];
+  buildInputs = [ alt-ergo-parsers ocamlPackages.cmdliner ];
 
   meta = {
     description = "High-performance theorem prover and SMT solver";
diff --git a/nixpkgs/pkgs/applications/science/logic/anders/default.nix b/nixpkgs/pkgs/applications/science/logic/anders/default.nix
index bb60b2b8321a..ccb81686cb32 100644
--- a/nixpkgs/pkgs/applications/science/logic/anders/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/anders/default.nix
@@ -4,7 +4,7 @@ ocamlPackages.buildDunePackage rec {
   pname = "anders";
   version = "1.1.1";
 
-  useDune2 = true;
+  duneVersion = "3";
 
   src = fetchFromGitHub {
     owner = "groupoid";
diff --git a/nixpkgs/pkgs/applications/science/logic/aspino/default.nix b/nixpkgs/pkgs/applications/science/logic/aspino/default.nix
index a9e39b3daf33..6b0e75de8066 100644
--- a/nixpkgs/pkgs/applications/science/logic/aspino/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/aspino/default.nix
@@ -23,8 +23,10 @@ stdenv.mkDerivation {
   postPatch = ''
     substituteInPlace Makefile \
       --replace "GCC = g++" "GCC = c++"
-
-    patchShebangs .
+    substituteInPlace src/main.cc \
+      --replace "defined(__linux__)" "defined(__linux__) && defined(__x86_64__)"
+    substituteInPlace src/MaxSatSolver.cc \
+      --replace "occ[i][sign(softLiterals[j])] > 0" "occ[i][sign(softLiterals[j])] != 0"
   '';
 
   preBuild = ''
@@ -45,9 +47,5 @@ stdenv.mkDerivation {
     platforms = platforms.unix;
     license = licenses.asl20;
     homepage = "https://alviano.net/software/maxino/";
-    # See pkgs/applications/science/logic/glucose/default.nix
-    badPlatforms = [ "aarch64-linux" ];
-    # src/MaxSatSolver.cc:280:62: error: ordered comparison between pointer and zero ('unsigned int *' and 'int')
-    broken = (stdenv.isDarwin && stdenv.isx86_64); # broken since 2019-05-07 on hydra
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/logic/avy/default.nix b/nixpkgs/pkgs/applications/science/logic/avy/default.nix
index fe2f30a55a33..38fef51c56e6 100644
--- a/nixpkgs/pkgs/applications/science/logic/avy/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/avy/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ zlib boost.out boost.dev ];
-  NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ]
+  env.NIX_CFLAGS_COMPILE = toString ([ "-Wno-narrowing" ]
     # Squelch endless stream of warnings on same few things
     ++ lib.optionals stdenv.cc.isClang [
       "-Wno-empty-body"
@@ -43,8 +43,5 @@ stdenv.mkDerivation rec {
     license     = lib.licenses.mit;
     maintainers = with lib.maintainers; [ thoughtpolice ];
     platforms   = lib.platforms.linux;
-    # See pkgs/applications/science/logic/glucose/default.nix
-    # (The error is different due to glucose-fenv.patch, but the same)
-    badPlatforms = [ "aarch64-linux" ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/logic/avy/glucose-fenv.patch b/nixpkgs/pkgs/applications/science/logic/avy/glucose-fenv.patch
index dd19f7ec80e7..eb0b196966b8 100644
--- a/nixpkgs/pkgs/applications/science/logic/avy/glucose-fenv.patch
+++ b/nixpkgs/pkgs/applications/science/logic/avy/glucose-fenv.patch
@@ -1,24 +1,15 @@
-From d6e0cb60270e8653bda3f339e3a07ce2cd2d6eb0 Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Tue, 17 Oct 2017 23:01:36 -0500
-Subject: [PATCH] glucose: use fenv to set double precision
-
----
- core/Main.cc   | 8 ++++++--
- simp/Main.cc   | 8 ++++++--
- utils/System.h | 2 +-
- 3 files changed, 13 insertions(+), 5 deletions(-)
-
 diff --git a/core/Main.cc b/core/Main.cc
-index c96aadd..994132b 100644
+index fd8fca1..37d2ed5 100644
 --- a/core/Main.cc
 +++ b/core/Main.cc
-@@ -96,8 +96,12 @@ int main(int argc, char** argv)
+@@ -95,9 +95,13 @@ int main(int argc, char** argv)
+         setUsageHelp("c USAGE: %s [options] <input-file> <result-output-file>\n\n  where input may be either in plain or gzipped DIMACS.\n");
          // printf("This is MiniSat 2.0 beta\n");
-         
- #if defined(__linux__)
+ 
+-#if defined(__linux__)
 -        fpu_control_t oldcw, newcw;
 -        _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
++#if defined(__linux__) && defined(__x86_64__)
 +        fenv_t fenv;
 +
 +        fegetenv(&fenv);
@@ -29,15 +20,17 @@ index c96aadd..994132b 100644
  #endif
          // Extra options:
 diff --git a/simp/Main.cc b/simp/Main.cc
-index 4f4772d..70c2e4b 100644
+index 4f4772d..c605f6e 100644
 --- a/simp/Main.cc
 +++ b/simp/Main.cc
-@@ -97,8 +97,12 @@ int main(int argc, char** argv)
+@@ -96,9 +96,13 @@ int main(int argc, char** argv)
+       setUsageHelp("c USAGE: %s [options] <input-file> <result-output-file>\n\n  where input may be either in plain or gzipped DIMACS.\n");
          
          
- #if defined(__linux__)
+-#if defined(__linux__)
 -        fpu_control_t oldcw, newcw;
 -        _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
++#if defined(__linux__) && defined(__x86_64__)
 +        fenv_t fenv;
 +
 +        fegetenv(&fenv);
@@ -48,18 +41,17 @@ index 4f4772d..70c2e4b 100644
  #endif
          // Extra options:
 diff --git a/utils/System.h b/utils/System.h
-index 004d498..a768e99 100644
+index 004d498..2f6d922 100644
 --- a/utils/System.h
 +++ b/utils/System.h
-@@ -22,7 +22,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
+@@ -21,8 +21,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
+ #ifndef Glucose_System_h
  #define Glucose_System_h
  
- #if defined(__linux__)
+-#if defined(__linux__)
 -#include <fpu_control.h>
++#if defined(__linux__) && defined(__x86_64__)
 +#include <fenv.h>
  #endif
  
  #include "glucose/mtl/IntTypes.h"
--- 
-2.14.2
-
diff --git a/nixpkgs/pkgs/applications/science/logic/avy/minisat-fenv.patch b/nixpkgs/pkgs/applications/science/logic/avy/minisat-fenv.patch
index 686d5a1c5b49..31e481bd6696 100644
--- a/nixpkgs/pkgs/applications/science/logic/avy/minisat-fenv.patch
+++ b/nixpkgs/pkgs/applications/science/logic/avy/minisat-fenv.patch
@@ -1,24 +1,15 @@
-From 7f1016ceab9b0f57a935bd51ca6df3d18439b472 Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Tue, 17 Oct 2017 22:57:02 -0500
-Subject: [PATCH] use fenv instead of non-standard fpu_control
-
----
- core/Main.cc   | 8 ++++++--
- simp/Main.cc   | 8 ++++++--
- utils/System.h | 2 +-
- 3 files changed, 13 insertions(+), 5 deletions(-)
-
 diff --git a/core/Main.cc b/core/Main.cc
-index 2b0d97b..8ad95fb 100644
+index 2b0d97b..9ba985d 100644
 --- a/core/Main.cc
 +++ b/core/Main.cc
-@@ -78,8 +78,12 @@ int main(int argc, char** argv)
+@@ -77,9 +77,13 @@ int main(int argc, char** argv)
+         setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n  where input may be either in plain or gzipped DIMACS.\n");
          // printf("This is MiniSat 2.0 beta\n");
          
- #if defined(__linux__)
+-#if defined(__linux__)
 -        fpu_control_t oldcw, newcw;
 -        _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
++#if defined(__linux__) && defined(__x86_64__)
 +        fenv_t fenv;
 +
 +        fegetenv(&fenv);
@@ -29,15 +20,17 @@ index 2b0d97b..8ad95fb 100644
  #endif
          // Extra options:
 diff --git a/simp/Main.cc b/simp/Main.cc
-index 2804d7f..39bfb71 100644
+index 2804d7f..7fbdb33 100644
 --- a/simp/Main.cc
 +++ b/simp/Main.cc
-@@ -79,8 +79,12 @@ int main(int argc, char** argv)
+@@ -78,9 +78,13 @@ int main(int argc, char** argv)
+         setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n  where input may be either in plain or gzipped DIMACS.\n");
          // printf("This is MiniSat 2.0 beta\n");
          
- #if defined(__linux__)
+-#if defined(__linux__)
 -        fpu_control_t oldcw, newcw;
 -        _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
++#if defined(__linux__) && defined(__x86_64__)
 +        fenv_t fenv;
 +
 +        fegetenv(&fenv);
@@ -48,18 +41,17 @@ index 2804d7f..39bfb71 100644
  #endif
          // Extra options:
 diff --git a/utils/System.h b/utils/System.h
-index 1758192..c0ad13a 100644
+index 1758192..840bee5 100644
 --- a/utils/System.h
 +++ b/utils/System.h
-@@ -22,7 +22,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
+@@ -21,8 +21,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
+ #ifndef Minisat_System_h
  #define Minisat_System_h
  
- #if defined(__linux__)
+-#if defined(__linux__)
 -#include <fpu_control.h>
++#if defined(__linux__) && defined(__x86_64__)
 +#include <fenv.h>
  #endif
  
  #include "mtl/IntTypes.h"
--- 
-2.14.2
-
diff --git a/nixpkgs/pkgs/applications/science/logic/beluga/default.nix b/nixpkgs/pkgs/applications/science/logic/beluga/default.nix
index 9af0cd694b70..19d296269f98 100644
--- a/nixpkgs/pkgs/applications/science/logic/beluga/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/beluga/default.nix
@@ -11,10 +11,10 @@ ocamlPackages.buildDunePackage rec {
     sha256 = "1ziqjfv8jwidl8lj2mid2shhgqhv31dfh5wad2zxjpvf6038ahsw";
   };
 
-  useDune2 = true;
+  duneVersion = "3";
 
   buildInputs = with ocamlPackages; [
-    gen sedlex ocaml_extlib dune-build-info linenoise
+    gen sedlex extlib dune-build-info linenoise
   ];
 
   postPatch = ''
@@ -22,7 +22,7 @@ ocamlPackages.buildDunePackage rec {
   '';
 
   checkPhase = "./TEST";
-  checkInputs = [ rsync ];
+  nativeCheckInputs = [ rsync ];
   doCheck = true;
 
   postInstall = ''
diff --git a/nixpkgs/pkgs/applications/science/logic/bitwuzla/default.nix b/nixpkgs/pkgs/applications/science/logic/bitwuzla/default.nix
index 82bfbd6dc3fe..4af4058339d9 100644
--- a/nixpkgs/pkgs/applications/science/logic/bitwuzla/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/bitwuzla/default.nix
@@ -5,6 +5,7 @@
 , cmake
 , lingeling
 , btor2tools
+, symfpu
 , gtest
 , gmp
 , cadical
@@ -19,13 +20,13 @@
 
 stdenv.mkDerivation rec {
   pname = "bitwuzla";
-  version = "unstable-2022-08-07";
+  version = "unstable-2022-10-03";
 
   src = fetchFromGitHub {
     owner = "bitwuzla";
     repo = "bitwuzla";
-    rev = "b6fb61736a5cf70cd0b35ec4aeeadf23971610ce";
-    hash = "sha256-T5VnnWrcZ8K1NjFf5eeg0TRpXBLRCxC67v8zWPwYF/Y=";
+    rev = "3bc0f9f1aca04afabe1aff53dd0937924618b2ad";
+    hash = "sha256-UXZERl7Nedwex/oUrcf6/GkDSgOQ537WDYm117RfvWo=";
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
@@ -35,6 +36,7 @@ stdenv.mkDerivation rec {
     picosat
     minisat
     btor2tools
+    symfpu
     gmp
     zlib
   ] ++ lib.optional withLingeling lingeling;
@@ -46,7 +48,7 @@ stdenv.mkDerivation rec {
     "-DBtor2Tools_LIBRARIES=${lib.getLib btor2tools}/lib/libbtor2parser${stdenv.hostPlatform.extensions.sharedLibrary}"
   ] ++ lib.optional doCheck "-DTESTING=YES";
 
-  checkInputs = [ python3 gtest ];
+  nativeCheckInputs = [ python3 gtest ];
   # two tests fail on darwin and 3 on aarch64-linux
   doCheck = stdenv.hostPlatform.isLinux && (!stdenv.hostPlatform.isAarch64);
   preCheck = let
diff --git a/nixpkgs/pkgs/applications/science/logic/boolector/default.nix b/nixpkgs/pkgs/applications/science/logic/boolector/default.nix
index 74927dd434d0..1d7e01c553b6 100644
--- a/nixpkgs/pkgs/applications/science/logic/boolector/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/boolector/default.nix
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
       "-DUSE_LINGELING=YES"
     ] ++ (lib.optional (gmp != null) "-DUSE_GMP=YES");
 
-  checkInputs = [ python3 ];
+  nativeCheckInputs = [ python3 ];
   doCheck = true;
   preCheck =
     let var = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
diff --git a/nixpkgs/pkgs/applications/science/logic/cadical/default.nix b/nixpkgs/pkgs/applications/science/logic/cadical/default.nix
index c6b1f6652451..a49aea8d40c8 100644
--- a/nixpkgs/pkgs/applications/science/logic/cadical/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cadical/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "cadical";
-  version = "1.4.1";
+  version = "1.5.3";
 
   src = fetchFromGitHub {
     owner = "arminbiere";
     repo = "cadical";
     rev = "rel-${version}";
-    sha256 = "0y44z3np4gssgdh4aj5qila7pshrbphycdxn2083i8ayyyjbxshp";
+    sha256 = "sha256-3H/vowWfE1jfomYg2hOi3B3zjWa4CaLHAJXnoKWzskU=";
   };
 
   outputs = [ "out" "dev" "lib" ];
diff --git a/nixpkgs/pkgs/applications/science/logic/cbmc/default.nix b/nixpkgs/pkgs/applications/science/logic/cbmc/default.nix
index 53a0330030cd..ddfa999fcc7e 100644
--- a/nixpkgs/pkgs/applications/science/logic/cbmc/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cbmc/default.nix
@@ -13,13 +13,13 @@
 
 stdenv.mkDerivation rec {
   pname = "cbmc";
-  version = "5.64.0";
+  version = "5.76.1";
 
   src = fetchFromGitHub {
     owner = "diffblue";
     repo = pname;
     rev = "${pname}-${version}";
-    sha256 = "sha256-FQoUNJV5eq/qGc6fdNlMHQADGipx9dxkb4EFRNX7h6w=";
+    sha256 = "sha256-OVOoAfoqev33c7pIzBGK9HD+zgji/+BWKD33RYJaSDc=";
   };
 
   nativeBuildInputs = [
@@ -60,9 +60,13 @@ stdenv.mkDerivation rec {
       --prefix PATH : "$out/share/cbmc" \
   '';
 
-  # fix "argument unused during compilation"
-  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
-    "-Wno-unused-command-line-argument";
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
+    # Needed with GCC 12 but breaks on darwin (with clang)
+    "-Wno-error=maybe-uninitialized"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    # fix "argument unused during compilation"
+    "-Wno-unused-command-line-argument"
+  ]);
 
   # TODO: add jbmc support
   cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ];
@@ -78,5 +82,7 @@ stdenv.mkDerivation rec {
     license = licenses.bsdOriginal;
     maintainers = with maintainers; [ jiegec ];
     platforms = platforms.unix;
+    # https://github.com/diffblue/cbmc/issues/7423
+    broken = stdenv.isLinux && stdenv.isAarch64;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/logic/cedille/default.nix b/nixpkgs/pkgs/applications/science/logic/cedille/default.nix
index 611bbbe979f8..4d026a2d9c7a 100644
--- a/nixpkgs/pkgs/applications/science/logic/cedille/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cedille/default.nix
@@ -4,7 +4,6 @@
 , alex
 , happy
 , Agda
-, buildPlatform
 , buildPackages
 , ghcWithPackages
 }:
@@ -30,7 +29,7 @@ stdenv.mkDerivation rec {
 
   LANG = "en_US.UTF-8";
   LOCALE_ARCHIVE =
-    lib.optionalString (buildPlatform.libc == "glibc")
+    lib.optionalString (stdenv.buildPlatform.libc == "glibc")
       "${buildPackages.glibcLocales}/lib/locale/locale-archive";
 
   postPatch = ''
diff --git a/nixpkgs/pkgs/applications/science/logic/coq/default.nix b/nixpkgs/pkgs/applications/science/logic/coq/default.nix
index 06d4a915c91d..81fab07ecbf8 100644
--- a/nixpkgs/pkgs/applications/science/logic/coq/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/coq/default.nix
@@ -7,7 +7,9 @@
 
 { lib, stdenv, fetchzip, writeText, pkg-config, gnumake42
 , customOCamlPackages ? null
-, ocamlPackages_4_05, ocamlPackages_4_09, ocamlPackages_4_10, ocamlPackages_4_12, ncurses
+, ocamlPackages_4_05, ocamlPackages_4_09, ocamlPackages_4_10, ocamlPackages_4_12
+, ocamlPackages_4_14
+, ncurses
 , buildIde ? null # default is true for Coq < 8.14 and false for Coq >= 8.14
 , glib, gnome, wrapGAppsHook, makeDesktopItem, copyDesktopItems
 , csdp ? null
@@ -49,7 +51,9 @@ let
    "8.15.0".sha256     = "sha256:0q7jl3bn0d1v9cwdkxykw4frccww6wbh1p8hdrfqw489mkxmh5jh";
    "8.15.1".sha256     = "sha256:1janvmnk3czimp0j5qmnfwx6509vhpjc2q7lcza1bc6dm6kn8n42";
    "8.15.2".sha256     = "sha256:0qibbvzrhsvs6w3zpkhyclndp29jnr6bs9i5skjlpp431jdjjfqd";
-   "8.16+rc1".sha256   = "sha256-hmZQ6rFIOZJwnAh23nKScJ3Nn+xqDRn5q2Tn82igpYE=";
+   "8.16.0".sha256   = "sha256-3V6kL9j2rn5FHBxq1mtmWWTZS9X5cAyvtUsS6DaM+is=";
+   "8.16.1".sha256   = "sha256-n7830+zfZeyYHEOGdUo57bH6bb2/SZs8zv8xJhV+iAc=";
+   "8.17.0".sha256   = "sha256-TGwm7S6+vkeZ8cidvp8pkiAd9tk008jvvPvYgfEOXhM=";
   };
   releaseRev = v: "V${v}";
   fetched = import ../../../../build-support/coq/meta-fetch/default.nix
@@ -62,17 +66,18 @@ let
   buildIde = args.buildIde or (!coqAtLeast "8.14");
   ideFlags = optionalString (buildIde && !coqAtLeast "8.10")
     "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt";
-  csdpPatch = if csdp != null then ''
+  csdpPatch = lib.optionalString (csdp != null) ''
     substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
     substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
-  '' else "";
-  ocamlPackages = if !isNull customOCamlPackages then customOCamlPackages
+  '';
+  ocamlPackages = if customOCamlPackages != null then customOCamlPackages
     else with versions; switch coq-version [
-      { case = range "8.14" "8.14"; out = ocamlPackages_4_12; }
+      { case = range "8.16" "8.17"; out = ocamlPackages_4_14; }
+      { case = range "8.14" "8.15"; out = ocamlPackages_4_12; }
       { case = range "8.11" "8.13"; out = ocamlPackages_4_10; }
       { case = range "8.7" "8.10";  out = ocamlPackages_4_09; }
       { case = range "8.5" "8.6";   out = ocamlPackages_4_05; }
-    ] ocamlPackages_4_12;
+    ] ocamlPackages_4_14;
   ocamlNativeBuildInputs = with ocamlPackages; [ ocaml findlib ]
     ++ optional (coqAtLeast "8.14") dune_2;
   ocamlPropagatedBuildInputs = [ ]
@@ -85,8 +90,8 @@ self = stdenv.mkDerivation {
 
   passthru = {
     inherit coq-version;
-    inherit ocamlPackages ocamlNativeNuildInputs;
-    inherit ocamlPropagatedBuildInputs ocamlPropagatedNativeBuildInputs;
+    inherit ocamlPackages ocamlNativeBuildInputs;
+    inherit ocamlPropagatedBuildInputs;
     # For compatibility
     inherit (ocamlPackages) ocaml camlp5 findlib num ;
     emacsBufferSetup = pkgs: ''
@@ -153,7 +158,7 @@ self = stdenv.mkDerivation {
     UNAME=$(type -tp uname)
     RM=$(type -tp rm)
     substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
-    ${if !coqAtLeast "8.7" then "substituteInPlace configure.ml --replace \"md5 -q\" \"md5sum\"" else ""}
+    ${lib.optionalString (!coqAtLeast "8.7") "substituteInPlace configure.ml --replace \"md5 -q\" \"md5sum\""}
     ${csdpPatch}
   '';
 
@@ -191,7 +196,7 @@ self = stdenv.mkDerivation {
     categories = [ "Development" "Science" "Math" "IDE" "GTK" ];
   });
 
-  postInstall = let suffix = if coqAtLeast "8.14" then "-core" else ""; in optionalString (!coqAtLeast "8.17") ''
+  postInstall = let suffix = optionalString (coqAtLeast "8.14") "-core"; in optionalString (!coqAtLeast "8.17") ''
     cp bin/votour $out/bin/
   '' + ''
     ln -s $out/lib/coq${suffix} $OCAMLFIND_DESTDIR/coq${suffix}
@@ -222,12 +227,12 @@ if coqAtLeast "8.17" then self.overrideAttrs(_: {
   buildPhase = ''
     runHook preBuild
     make dunestrap
-    dune build -p coq-core,coq-stdlib,coq,coqide-server${if buildIde then ",coqide" else ""} -j $NIX_BUILD_CORES
+    dune build -p coq-core,coq-stdlib,coq,coqide-server${lib.optionalString buildIde ",coqide"} -j $NIX_BUILD_CORES
     runHook postBuild
   '';
   installPhase = ''
     runHook preInstall
-    dune install --prefix $out coq-core coq-stdlib coq coqide-server${if buildIde then " coqide" else ""}
+    dune install --prefix $out coq-core coq-stdlib coq coqide-server${lib.optionalString buildIde " coqide"}
     runHook postInstall
   '';
 }) else self
diff --git a/nixpkgs/pkgs/applications/science/logic/cryptominisat/default.nix b/nixpkgs/pkgs/applications/science/logic/cryptominisat/default.nix
index 33de2d27dc90..cd04d612b529 100644
--- a/nixpkgs/pkgs/applications/science/logic/cryptominisat/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cryptominisat/default.nix
@@ -1,32 +1,30 @@
-{ lib, stdenv, fetchFromGitHub, cmake, python3, xxd, boost, fetchpatch }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+, boost
+}:
 
 stdenv.mkDerivation rec {
   pname = "cryptominisat";
-  version = "5.8.0";
+  version = "5.11.4";
 
   src = fetchFromGitHub {
-    owner  = "msoos";
-    repo   = "cryptominisat";
-    rev    = version;
-    sha256 = "00hmxdlyhn7pwk9jlvc5g0l5z5xqfchjzf5jgn3pkj9xhl8yqq50";
+    owner = "msoos";
+    repo = "cryptominisat";
+    rev = version;
+    hash = "sha256-7JNfFKSYWgyyNnWNzXGLqWRwSW+5r6PBMelKeAmx8sc=";
   };
 
-  patches = [
-    (fetchpatch {
-      # https://github.com/msoos/cryptominisat/pull/621
-      url = "https://github.com/msoos/cryptominisat/commit/11a97003b0bfbfb61ed6c4e640212110d390c28c.patch";
-      sha256 = "0hdy345bwcbxz0jl1jdxfa6mmfh77s2pz9rnncsr0jzk11b3j0cw";
-    })
-  ];
-
   buildInputs = [ python3 boost ];
-  nativeBuildInputs = [ cmake xxd ];
+  nativeBuildInputs = [ cmake ];
 
   meta = with lib; {
     description = "An advanced SAT Solver";
-    homepage    = "https://github.com/msoos/cryptominisat";
-    license     = licenses.mit;
+    homepage = "https://github.com/msoos/cryptominisat";
+    license = licenses.mit;
     maintainers = with maintainers; [ mic92 ];
-    platforms   = platforms.unix;
+    platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix b/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix
index 195dd98aa3b4..f056b3e433fb 100644
--- a/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix
@@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-F5eVN5ATYo9Ivpi2eYh96ktuTWUeoqgWMR4BqHu8EFs=";
   };
 
-  buildInputs = [ ocaml ];
+  strictDeps = true;
+
+  nativeBuildInputs = [ ocaml ];
 
   /* Fix up the frontend to load the 'default' cryptoverif library
   ** from under $out/libexec. By default, it expects to find the files
diff --git a/nixpkgs/pkgs/applications/science/logic/cubicle/default.nix b/nixpkgs/pkgs/applications/science/logic/cubicle/default.nix
index aa3fba635ffc..c9382c5d0f1a 100644
--- a/nixpkgs/pkgs/applications/science/logic/cubicle/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cubicle/default.nix
@@ -1,22 +1,43 @@
-{ lib, stdenv, fetchurl, ocamlPackages }:
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, which
+, ocamlPackages
+}:
 
 stdenv.mkDerivation rec {
   pname = "cubicle";
-  version = "1.1.2";
+  version = "1.2.0";
   src = fetchurl {
-    url = "http://cubicle.lri.fr/cubicle-${version}.tar.gz";
-    sha256 = "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q";
+    url = "https://github.com/cubicle-model-checker/cubicle/archive/refs/tags/${version}.tar.gz";
+    hash = "sha256-/EtbXpyXqRm0jGcMfGLAEwdr92061edjFys1V7/w6/Y=";
   };
 
-  postPatch = ''
-    substituteInPlace Makefile.in --replace "\\n" ""
-  '';
+  strictDeps = true;
 
-  buildInputs = with ocamlPackages; [ ocaml findlib functory ];
+  nativeBuildInputs = [
+    autoreconfHook
+    which
+  ] ++ (with ocamlPackages; [
+    findlib
+    ocaml
+  ]);
+
+  buildInputs = with ocamlPackages; [
+    functory
+    num
+  ];
+
+  # https://github.com/cubicle-model-checker/cubicle/issues/1
+  env = {
+    OCAMLC = "ocamlfind ocamlc -package num";
+    OCAMLOPT = "ocamlfind ocamlopt -package num";
+  };
 
   meta = with lib; {
     description = "An open source model checker for verifying safety properties of array-based systems";
-    homepage = "http://cubicle.lri.fr/";
+    homepage = "https://cubicle.lri.fr/";
     license = licenses.asl20;
     platforms = platforms.unix;
     maintainers = with maintainers; [ dwarfmaster ];
diff --git a/nixpkgs/pkgs/applications/science/logic/cvc3/default.nix b/nixpkgs/pkgs/applications/science/logic/cvc3/default.nix
index a7c49501672e..cfa8f62990c5 100644
--- a/nixpkgs/pkgs/applications/science/logic/cvc3/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cvc3/default.nix
@@ -16,10 +16,6 @@ stdenv.mkDerivation rec {
   # fails to configure on darwin due to gmp not found
   configureFlags = [ "LIBS=-L${gmp}/lib" "CXXFLAGS=-I${gmp.dev}/include" ];
 
-  # disable stackprotector on aarch64-darwin for now
-  # https://github.com/NixOS/nixpkgs/issues/127608
-  hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
-
   postPatch = ''
     sed -e "s@ /bin/bash@bash@g" -i Makefile.std
     find . -exec sed -e "s@/usr/bin/perl@${perl}/bin/perl@g" -i '{}' ';'
diff --git a/nixpkgs/pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch b/nixpkgs/pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch
new file mode 100644
index 000000000000..a97665c2f86c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/cvc4/cvc4-bash-patsub-replacement.patch
@@ -0,0 +1,39 @@
+Per https://bodhi.fedoraproject.org/updates/FEDORA-2022-dc47174c36:
+
+This update fixes a failure to build with source with bash 5.2. Bash's
+`patsub_replacement` feature makes ampersand a special character when doing
+variable substitution, which was not previously the case. This update instructs
+bash to turn off the new behavior.
+
+The patch itself is adapted from
+https://src.fedoraproject.org/rpms/cvc4/blob/f7c24c6ad72a8812d244313f13032fa23d393315/f/cvc4-bash-patsub-replacement.patch.
+--- a/src/expr/mkexpr	2020-06-19 10:59:27.000000000 -0600
++++ b/src/expr/mkexpr	2022-10-11 14:28:31.120453409 -0600
+@@ -16,6 +16,7 @@
+ #
+ 
+ copyright=2010-2014
++shopt -u patsub_replacement
+ 
+ filename=`basename "$1" | sed 's,_template,,'`
+ 
+--- a/src/expr/mkkind	2020-06-19 10:59:27.000000000 -0600
++++ b/src/expr/mkkind	2022-10-11 14:34:17.008996126 -0600
+@@ -15,6 +15,7 @@
+ #
+ 
+ copyright=2010-2014
++shopt -u patsub_replacement
+ 
+ filename=`basename "$1" | sed 's,_template,,'`
+ 
+--- a/src/expr/mkmetakind	2020-06-19 10:59:27.000000000 -0600
++++ b/src/expr/mkmetakind	2022-10-11 14:34:32.248020036 -0600
+@@ -18,6 +18,7 @@
+ #
+ 
+ copyright=2010-2014
++shopt -u patsub_replacement
+ 
+ cat <<EOF
+ /*********************                                                        */
diff --git a/nixpkgs/pkgs/applications/science/logic/cvc4/default.nix b/nixpkgs/pkgs/applications/science/logic/cvc4/default.nix
index 873c3ca57c0c..e9f04d2044dc 100644
--- a/nixpkgs/pkgs/applications/science/logic/cvc4/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cvc4/default.nix
@@ -28,6 +28,10 @@ stdenv.mkDerivation rec {
     patch -p1 -i ${./minisat-fenv.patch} -d src/prop/bvminisat
   '';
 
+  patches = [
+    ./cvc4-bash-patsub-replacement.patch
+  ];
+
   preConfigure = ''
     patchShebangs ./src/
   '';
diff --git a/nixpkgs/pkgs/applications/science/logic/cvc5/default.nix b/nixpkgs/pkgs/applications/science/logic/cvc5/default.nix
index 47c738f4cd60..23310163f279 100644
--- a/nixpkgs/pkgs/applications/science/logic/cvc5/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/cvc5/default.nix
@@ -1,18 +1,21 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, cadical, symfpu, gmp, git, python3, gtest, libantlr3c, antlr3_4, boost, jdk }:
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, flex, cadical, symfpu, gmp, python3, gtest, libantlr3c, antlr3_4, boost, jdk }:
 
 stdenv.mkDerivation rec {
   pname = "cvc5";
-  version = "1.0.1";
+  version = "1.0.5";
 
   src = fetchFromGitHub {
     owner  = "cvc5";
     repo   = "cvc5";
     rev    = "cvc5-${version}";
-    sha256 = "sha256-D3rexkDc78w/HObT/WYPBo8mTBx1MAkxPXJvddg97ic=";
+    hash  = "sha256-l+L59QLLrAEVkAZjhxICJpa+j+jr1k/7B61JlapXGRI=";
   };
 
-  nativeBuildInputs = [ pkg-config cmake ];
-  buildInputs = [ cadical.dev symfpu gmp git python3 python3.pkgs.toml gtest libantlr3c antlr3_4 boost jdk ];
+  nativeBuildInputs = [ pkg-config cmake flex ];
+  buildInputs = [
+    cadical.dev symfpu gmp gtest libantlr3c antlr3_4 boost jdk
+    (python3.withPackages (ps: with ps; [ pyparsing toml ]))
+  ];
 
   preConfigure = ''
     patchShebangs ./src/
diff --git a/nixpkgs/pkgs/applications/science/logic/dafny/default.nix b/nixpkgs/pkgs/applications/science/logic/dafny/default.nix
new file mode 100644
index 000000000000..962f9c8ae8cc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/dafny/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, buildDotnetModule
+, fetchFromGitHub
+, writeScript
+, jdk11
+, z3
+}:
+
+buildDotnetModule rec {
+  pname = "Dafny";
+  version = "4.0.0";
+
+  src = fetchFromGitHub {
+    owner = "dafny-lang";
+    repo = "dafny";
+    rev = "v${version}";
+    sha256 = "sha256-7mVFDORbu9KsJ4IH8PrrpXE7xFrWVTyBmRaL8Kt/ghY=";
+  };
+
+  postPatch = ''
+    cp ${writeScript "fake-gradlew-for-dafny" ''
+      mkdir -p build/libs/
+      javac $(find -name "*.java" | grep "^./src/main") -d classes
+      jar cf build/libs/DafnyRuntime.jar -C classes dafny
+    ''} Source/DafnyRuntime/DafnyRuntimeJava/gradlew
+
+    # Needed to fix
+    # "error NETSDK1129: The 'Publish' target is not supported without specifying a target framework. The current project targets multiple frameworks, you must specify the framework for the published application."
+    substituteInPlace Source/DafnyRuntime/DafnyRuntime.csproj \
+      --replace TargetFrameworks TargetFramework \
+      --replace "netstandard2.0;net452" net6.0
+  '';
+
+  buildInputs = [ jdk11 ];
+  nugetDeps = ./deps.nix;
+
+  # Build just these projects. Building Source/Dafny.sln includes a bunch of
+  # unnecessary components like tests.
+  projectFile = [
+    "Source/Dafny/Dafny.csproj"
+    "Source/DafnyRuntime/DafnyRuntime.csproj"
+    "Source/DafnyLanguageServer/DafnyLanguageServer.csproj"
+  ];
+
+  executables = [ "Dafny" ];
+
+  # Help Dafny find z3
+  makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ z3 ]}" ];
+
+  postFixup = ''
+    ln -s "$out/bin/Dafny" "$out/bin/dafny" || true
+  '';
+
+  meta = with lib; {
+    description = "A programming language with built-in specification constructs";
+    homepage = "https://research.microsoft.com/dafny";
+    maintainers = with maintainers; [ layus ];
+    license = licenses.mit;
+    platforms = with platforms; (linux ++ darwin);
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/logic/dafny/deps.nix b/nixpkgs/pkgs/applications/science/logic/dafny/deps.nix
new file mode 100644
index 000000000000..708ea37f91d4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/dafny/deps.nix
@@ -0,0 +1,184 @@
+# This file was automatically generated by passthru.fetch-deps.
+# Please dont edit it manually, your changes might get overwritten!
+
+{ fetchNuGet }: [
+  (fetchNuGet { pname = "Boogie"; version = "2.16.0"; sha256 = "1zcbbqhn7brxnywp3m5pfd7rcapg5w1xjr5pkfsqmmv8fk36nfja"; })
+  (fetchNuGet { pname = "Boogie.AbstractInterpretation"; version = "2.16.0"; sha256 = "05l8lfh25w0a92swhlgp01l62bp6d07191jjvhnnak1k184drqm4"; })
+  (fetchNuGet { pname = "Boogie.BaseTypes"; version = "2.16.0"; sha256 = "0qak5dzxja5ffprb0frgvbf88nlk232fr2m3lvg27qz3ai70p8xm"; })
+  (fetchNuGet { pname = "Boogie.CodeContractsExtender"; version = "2.16.0"; sha256 = "078b5hzllqw08g5wvgp63lq2qg1ywk0scph3wdgjn966q2yfqz84"; })
+  (fetchNuGet { pname = "Boogie.Concurrency"; version = "2.16.0"; sha256 = "1wcfqgnvinkfd26ig82gbj6ykn6b3f2iv8gr8h96q9jd6x9rmlkb"; })
+  (fetchNuGet { pname = "Boogie.Core"; version = "2.16.0"; sha256 = "00sgvjxx613ljmppb69abrw50gv2rv9kk96rc1dq8ymlw8b3imw7"; })
+  (fetchNuGet { pname = "Boogie.ExecutionEngine"; version = "2.16.0"; sha256 = "1kxyrbwcp5slgq3n26s2l69fs2hbda41v7jkxhpjh1yn9wb56b4n"; })
+  (fetchNuGet { pname = "Boogie.Graph"; version = "2.16.0"; sha256 = "1qhfdysbca63agb7lcclyhi4wvi6142ipcbh9ag0g9mdf0pkwiqv"; })
+  (fetchNuGet { pname = "Boogie.Houdini"; version = "2.16.0"; sha256 = "0rqhybfhbkb4cb14d546gknjabgrfl7pm1b87nzhmxpwzszw6ss3"; })
+  (fetchNuGet { pname = "Boogie.Model"; version = "2.16.0"; sha256 = "0k328lcnxqf06pc97sgmqdzr564zgdvacy6j2n1209w882xs43rg"; })
+  (fetchNuGet { pname = "Boogie.Provers.SMTLib"; version = "2.16.0"; sha256 = "19xx2x9ccr64rr7cldgdmd0d1xi56rz0skmvkqn1hdwcndh01n6a"; })
+  (fetchNuGet { pname = "Boogie.VCExpr"; version = "2.16.0"; sha256 = "0ysmw9sl713xdpbcij3w4bm2hkigkjw7c2j1a7wwax02gsvx8djw"; })
+  (fetchNuGet { pname = "Boogie.VCGeneration"; version = "2.16.0"; sha256 = "1g3ipl27qcy23g0pnsahyba9j90fvhm17wxczqx7hbgw0h183nji"; })
+  (fetchNuGet { pname = "CocoR"; version = "2014.12.24"; sha256 = "0ps8h7aawkcc1910qnh13llzb01pvgsjmg862pxp0p4wca2dn7a2"; })
+  (fetchNuGet { pname = "dotnet-format"; version = "5.1.250801"; sha256 = "1i0icx2yyp9141rjb2a221a71fvsy0knrfyvv631vb56r8fnsywh"; })
+  (fetchNuGet { pname = "JetBrains.Annotations"; version = "2021.1.0"; sha256 = "07pnhxxlgx8spmwmakz37nmbvgyb6yjrbrhad5rrn6y767z5r1gb"; })
+  (fetchNuGet { pname = "MediatR"; version = "8.1.0"; sha256 = "0cqx7yfh998xhsfk5pr6229lcjcs1jxxyqz7dwskc9jddl6a2akp"; })
+  (fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "1.1.1"; sha256 = "0a1ahssqds2ympr7s4xcxv5y8jgxs7ahd6ah6fbgglj4rki1f1vw"; })
+  (fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "6.0.0"; sha256 = "15gqy2m14fdlvy1g59207h5kisznm355kbw010gy19vh47z8gpz3"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.Analyzers"; version = "3.0.0"; sha256 = "0bbl0jpqywqmzz2gagld1p2gvdfldjfjmm25hil9wj2nq1zc4di8"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.Common"; version = "3.7.0"; sha256 = "0882492nx6x68b0pkh3q5xaawz0b2l5x35r40722ignyjnvjydph"; })
+  (fetchNuGet { pname = "Microsoft.CodeAnalysis.CSharp"; version = "3.7.0"; sha256 = "0adw6rcag8wxydzyiyhls2mxaqkay5qlz25z1fxrlv5qnchqn0n5"; })
+  (fetchNuGet { pname = "Microsoft.DotNet.PlatformAbstractions"; version = "2.0.4"; sha256 = "1fdzln4im9hb55agzwchbfgm3vmngigmbpci5j89b0gqcxixmv8j"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration"; version = "2.0.0"; sha256 = "0yssxq9di5h6xw2cayp5hj3l9b2p0jw9wcjz73rwk4586spac9s9"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration"; version = "5.0.0"; sha256 = "01m9vzlq0vg0lhckj2dimwq42niwny8g3lm13c9a401hlyg90z1p"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration.Abstractions"; version = "2.0.0"; sha256 = "1ilz2yrgg9rbjyhn6a5zh9pr51nmh11z7sixb4p7vivgydj9gxwf"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration.Abstractions"; version = "5.0.0"; sha256 = "0fqxkc9pjxkqylsdf26s9q21ciyk56h1w33pz3v1v4wcv8yv1v6k"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration.Binder"; version = "2.0.0"; sha256 = "1prvdbma6r18n5agbhhabv6g357p1j70gq4m9g0vs859kf44nrgc"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration.CommandLine"; version = "5.0.0"; sha256 = "084hnz5l0vr15ay23rksqipslqnz3pp30w9hsirpx1iqdm5688mc"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration.FileExtensions"; version = "5.0.0"; sha256 = "1wq229r3xcmm9wh9sqdpvmfv4qpbp2zms9x6xk7g7sbb8h32hnz3"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Configuration.Json"; version = "5.0.0"; sha256 = "0hq5i483bjbvprp1la9l3si82x1ydxbvkpfc7r3s7zgxg957fyp9"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection"; version = "2.0.0"; sha256 = "018izzgykaqcliwarijapgki9kp2c560qv8qsxdjywr7byws5apq"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection"; version = "5.0.0"; sha256 = "15sdwcyzz0qlybwbdq854bn3jk6kx7awx28gs864c4shhbqkppj4"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection.Abstractions"; version = "2.0.0"; sha256 = "1pwrfh9b72k9rq6mb2jab5qhhi225d5rjalzkapiayggmygc8nhz"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection.Abstractions"; version = "5.0.0"; sha256 = "17cz6s80va0ch0a6nqa1wbbbp3p8sqxb96lj4qcw67ivkp2yxiyj"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.DependencyModel"; version = "2.0.4"; sha256 = "041i1vlcibpzgalxxzdk81g5pgmqvmz2g61k0rqa2sky0wpvijx9"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.FileProviders.Abstractions"; version = "5.0.0"; sha256 = "01ahgd0b2z2zycrr2lcsq2cl59fn04bh51hdwdp9dcsdkpvnasj1"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.FileProviders.Physical"; version = "5.0.0"; sha256 = "00vii8148a6pk12l9jl0rhjp7apil5q5qcy7v1smnv17lj4p8szd"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.FileSystemGlobbing"; version = "5.0.0"; sha256 = "0lm6n9vbyjh0l17qcc2y9qwn1cns3dyjmkvbxjp0g9sll32kjpmb"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Logging"; version = "5.0.0"; sha256 = "1qa1l18q2jh9azya8gv1p8anzcdirjzd9dxxisb4911i9m1648i3"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Logging.Abstractions"; version = "5.0.0"; sha256 = "1yza38675dbv1qqnnhqm23alv2bbaqxp0pb7zinjmw8j2mr5r6wc"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "2.0.0"; sha256 = "0g4zadlg73f507krilhaaa7h0jdga216syrzjlyf5fdk25gxmjqh"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "5.0.0"; sha256 = "1rdmgpg770x8qwaaa6ryc27zh93p697fcyvn5vkxp0wimlhqkbay"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Options.ConfigurationExtensions"; version = "2.0.0"; sha256 = "1isc3rjbzz60f7wbmgcwslx5d10hm5hisnk7v54vfi2bz7132gll"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "2.0.0"; sha256 = "1xppr5jbny04slyjgngxjdm0maxdh47vq481ps944d7jrfs0p3mb"; })
+  (fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "5.0.0"; sha256 = "0swqcknyh87ns82w539z1mvy804pfwhgzs97cr3nwqk6g5s42gd6"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "2.1.2"; sha256 = "1507hnpr9my3z4w1r6xk5n0s1j3y6a2c2cnynj76za7cphxi1141"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "3.0.0"; sha256 = "1bk8r4r3ihmi6322jmcag14jmw11mjqys202azqjzglcx59pxh51"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; })
+  (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; })
+  (fetchNuGet { pname = "Microsoft.TestPlatform.Extensions.TrxLogger"; version = "17.0.0"; sha256 = "067vpfk5690j0d01lfy8mry42pkzz79l873cp2dby0hi8skfklaq"; })
+  (fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "16.11.0"; sha256 = "1fc0ghk1cny4i8w43b94pxhl0srxisv6kaflkkp30ncsa9szhkxh"; })
+  (fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "17.0.0"; sha256 = "1bh5scbvl6ndldqv20sl34h4y257irm9ziv2wyfc3hka6912fhn7"; })
+  (fetchNuGet { pname = "Microsoft.TestPlatform.TestHost"; version = "16.11.0"; sha256 = "0hp1vndf2jhyg1f3miq4g2068z5kpfzy6nmswm25vymghxp1ws4k"; })
+  (fetchNuGet { pname = "Microsoft.VisualStudio.Threading"; version = "16.7.56"; sha256 = "13x0xrsjxd86clf9cjjwmpzlyp8pkrf13riya7igs8zy93zw2qap"; })
+  (fetchNuGet { pname = "Microsoft.VisualStudio.Threading.Analyzers"; version = "16.7.56"; sha256 = "04v9df0k7bsc0rzgkw4mnvi43pdrh42vk6xdcwn9m6im33m0nnz2"; })
+  (fetchNuGet { pname = "Microsoft.VisualStudio.Validation"; version = "15.5.31"; sha256 = "1ah99rn922qa0sd2k3h64m324f2r32pw8cn4cfihgvwx4qdrpmgw"; })
+  (fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; })
+  (fetchNuGet { pname = "Microsoft.Win32.Registry"; version = "4.6.0"; sha256 = "0i4y782yrqqyx85pg597m20gm0v126w0j9ddk5z7xb3crx4z9f2s"; })
+  (fetchNuGet { pname = "Microsoft.Win32.SystemEvents"; version = "6.0.0"; sha256 = "0c6pcj088g1yd1vs529q3ybgsd2vjlk5y1ic6dkmbhvrp5jibl9p"; })
+  (fetchNuGet { pname = "Nerdbank.Streams"; version = "2.6.81"; sha256 = "06wihcaga8537ibh0mkj28m720m6vzkqk562zkynhca85nd236yi"; })
+  (fetchNuGet { pname = "Newtonsoft.Json"; version = "13.0.1"; sha256 = "0fijg0w6iwap8gvzyjnndds0q4b8anwxxvik7y8vgq97dram4srb"; })
+  (fetchNuGet { pname = "NuGet.Frameworks"; version = "5.0.0"; sha256 = "18ijvmj13cwjdrrm52c8fpq021531zaz4mj4b4zapxaqzzxf2qjr"; })
+  (fetchNuGet { pname = "OmniSharp.Extensions.JsonRpc"; version = "0.19.5"; sha256 = "0ilcv3cxcvjkd8ngiydi69pzll07rhqdv5nq9yjnhyj142ynw2cb"; })
+  (fetchNuGet { pname = "OmniSharp.Extensions.JsonRpc.Generators"; version = "0.19.5"; sha256 = "1mac4yx29ld8fyirg7n0vqn81hzdvcrl8w0l9w5xhnnm6bcd42v8"; })
+  (fetchNuGet { pname = "OmniSharp.Extensions.LanguageProtocol"; version = "0.19.5"; sha256 = "1clgrbw6dlh46iiiqhavwh15xqar41az352mb5r4ln8ql3wnmk1i"; })
+  (fetchNuGet { pname = "OmniSharp.Extensions.LanguageServer"; version = "0.19.5"; sha256 = "0cvxmc0r4ajnaah7lsppik61qickq7i0df4jwqaj6c6axiizhqlm"; })
+  (fetchNuGet { pname = "OmniSharp.Extensions.LanguageServer.Shared"; version = "0.19.5"; sha256 = "0cczmmsmn3pj74wpasgfhjay1a817sd0zgzgqvvnckxxzq3n463h"; })
+  (fetchNuGet { pname = "RangeTree"; version = "3.0.1"; sha256 = "19si88v2r0rc7kai1avwhigcvh3x3c916vrvqlyb59sn4f27pbm2"; })
+  (fetchNuGet { pname = "runtime.any.System.Collections"; version = "4.3.0"; sha256 = "0bv5qgm6vr47ynxqbnkc7i797fdi8gbjjxii173syrx14nmrkwg0"; })
+  (fetchNuGet { pname = "runtime.any.System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "00j6nv2xgmd3bi347k00m7wr542wjlig53rmj28pmw7ddcn97jbn"; })
+  (fetchNuGet { pname = "runtime.any.System.Globalization"; version = "4.3.0"; sha256 = "1daqf33hssad94lamzg01y49xwndy2q97i2lrb7mgn28656qia1x"; })
+  (fetchNuGet { pname = "runtime.any.System.IO"; version = "4.3.0"; sha256 = "0l8xz8zn46w4d10bcn3l4yyn4vhb3lrj2zw8llvz7jk14k4zps5x"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection"; version = "4.3.0"; sha256 = "02c9h3y35pylc0zfq3wcsvc5nqci95nrkq0mszifc0sjx7xrzkly"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection.Extensions"; version = "4.3.0"; sha256 = "0zyri97dfc5vyaz9ba65hjj1zbcrzaffhsdlpxc9bh09wy22fq33"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection.Primitives"; version = "4.3.0"; sha256 = "0x1mm8c6iy8rlxm8w9vqw7gb7s1ljadrn049fmf70cyh42vdfhrf"; })
+  (fetchNuGet { pname = "runtime.any.System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "03kickal0iiby82wa5flar18kyv82s9s6d4xhk5h4bi5kfcyfjzl"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.3.0"; sha256 = "1cqh1sv3h5j7ixyb7axxbdkqx6cxy00p4np4j91kpm492rf4s25b"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime.Handles"; version = "4.3.0"; sha256 = "0bh5bi25nk9w9xi8z23ws45q5yia6k7dg3i4axhfqlnj145l011x"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "0c3g3g3jmhlhw4klrc86ka9fjbl7i59ds1fadsb2l8nqf8z3kb19"; })
+  (fetchNuGet { pname = "runtime.any.System.Text.Encoding"; version = "4.3.0"; sha256 = "0aqqi1v4wx51h51mk956y783wzags13wa7mgqyclacmsmpv02ps3"; })
+  (fetchNuGet { pname = "runtime.any.System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "0lqhgqi0i8194ryqq6v2gqx0fb86db2gqknbm0aq31wb378j7ip8"; })
+  (fetchNuGet { pname = "runtime.any.System.Threading.Tasks"; version = "4.3.0"; sha256 = "03mnvkhskbzxddz4hm113zsch1jyzh2cs450dk3rgfjp8crlw1va"; })
+  (fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; })
+  (fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; })
+  (fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; })
+  (fetchNuGet { pname = "runtime.native.System"; version = "4.0.0"; sha256 = "1ppk69xk59ggacj9n7g6fyxvzmk1g5p4fkijm0d7xqfkig98qrkf"; })
+  (fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; })
+  (fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97"; })
+  (fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3"; })
+  (fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf"; })
+  (fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3"; })
+  (fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn"; })
+  (fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; })
+  (fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; })
+  (fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; })
+  (fetchNuGet { pname = "runtime.unix.Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0y61k9zbxhdi0glg154v30kkq7f8646nif8lnnxbvkjpakggd5id"; })
+  (fetchNuGet { pname = "runtime.unix.System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "1lps7fbnw34bnh3lm31gs5c0g0dh7548wfmb8zz62v0zqz71msj5"; })
+  (fetchNuGet { pname = "runtime.unix.System.IO.FileSystem"; version = "4.3.0"; sha256 = "14nbkhvs7sji5r1saj2x8daz82rnf9kx28d3v2qss34qbr32dzix"; })
+  (fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.3.0"; sha256 = "1jx02q6kiwlvfksq1q9qr17fj78y5v6mwsszav4qcz9z25d5g6vk"; })
+  (fetchNuGet { pname = "runtime.unix.System.Runtime.Extensions"; version = "4.3.0"; sha256 = "0pnxxmm8whx38dp6yvwgmh22smknxmqs5n513fc7m4wxvs1bvi4p"; })
+  (fetchNuGet { pname = "Serilog"; version = "2.10.0"; sha256 = "08bih205i632ywryn3zxkhb15dwgyaxbhmm1z3b5nmby9fb25k7v"; })
+  (fetchNuGet { pname = "Serilog.Extensions.Logging"; version = "3.0.1"; sha256 = "069qy7dm5nxb372ij112ppa6m99b4iaimj3sji74m659fwrcrl9a"; })
+  (fetchNuGet { pname = "Serilog.Settings.Configuration"; version = "3.1.0"; sha256 = "1cj5am4n073331gbfm2ylqb9cadl4q3ppzgwmm5c8m1drxpiwkb5"; })
+  (fetchNuGet { pname = "Serilog.Sinks.Debug"; version = "2.0.0"; sha256 = "1i7j870l47gan3gpnnlzkccn5lbm7518cnkp25a3g5gp9l0dbwpw"; })
+  (fetchNuGet { pname = "Serilog.Sinks.File"; version = "5.0.0"; sha256 = "097rngmgcrdfy7jy8j7dq3xaq2qky8ijwg0ws6bfv5lx0f3vvb0q"; })
+  (fetchNuGet { pname = "System.AppContext"; version = "4.1.0"; sha256 = "0fv3cma1jp4vgj7a8hqc9n7hr1f1kjp541s6z0q1r6nazb4iz9mz"; })
+  (fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; })
+  (fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; })
+  (fetchNuGet { pname = "System.Collections.Immutable"; version = "1.7.0"; sha256 = "1gik4sn9jsi1wcy1pyyp0r4sn2g17cwrsh24b2d52vif8p2h24zx"; })
+  (fetchNuGet { pname = "System.Collections.Immutable"; version = "1.7.1"; sha256 = "1nh4nlxfc7lbnbl86wwk1a3jwl6myz5j6hvgh5sp4krim9901hsq"; })
+  (fetchNuGet { pname = "System.Collections.NonGeneric"; version = "4.0.1"; sha256 = "19994r5y5bpdhj7di6w047apvil8lh06lh2c2yv9zc4fc5g9bl4d"; })
+  (fetchNuGet { pname = "System.Collections.Specialized"; version = "4.0.1"; sha256 = "1wbv7y686p5x169rnaim7sln67ivmv6r57falrnx8aap9y33mam9"; })
+  (fetchNuGet { pname = "System.CommandLine"; version = "2.0.0-beta4.22272.1"; sha256 = "1iy5hwwgvx911g3yq65p4zsgpy08w4qz9j3h0igcf7yci44vw8yd"; })
+  (fetchNuGet { pname = "System.Configuration.ConfigurationManager"; version = "6.0.0"; sha256 = "0sqapr697jbb4ljkq46msg0xx1qpmc31ivva6llyz2wzq3mpmxbw"; })
+  (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; })
+  (fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; })
+  (fetchNuGet { pname = "System.Drawing.Common"; version = "6.0.0"; sha256 = "02n8rzm58dac2np8b3xw8ychbvylja4nh6938l5k2fhyn40imlgz"; })
+  (fetchNuGet { pname = "System.Dynamic.Runtime"; version = "4.0.11"; sha256 = "1pla2dx8gkidf7xkciig6nifdsb494axjvzvann8g2lp3dbqasm9"; })
+  (fetchNuGet { pname = "System.Globalization"; version = "4.0.11"; sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d"; })
+  (fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; })
+  (fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.0.1"; sha256 = "0hjhdb5ri8z9l93bw04s7ynwrjrhx2n0p34sf33a9hl9phz69fyc"; })
+  (fetchNuGet { pname = "System.IO"; version = "4.1.0"; sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp"; })
+  (fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; })
+  (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.0.1"; sha256 = "0kgfpw6w4djqra3w5crrg8xivbanh1w9dh3qapb28q060wb9flp1"; })
+  (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; })
+  (fetchNuGet { pname = "System.IO.Pipelines"; version = "4.7.3"; sha256 = "0djp59x56klidi04xx8p5jc1nchv5zvd1d59diphqxwvgny3aawy"; })
+  (fetchNuGet { pname = "System.Linq"; version = "4.1.0"; sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5"; })
+  (fetchNuGet { pname = "System.Linq.Async"; version = "6.0.1"; sha256 = "10ira8hmv0i54yp9ggrrdm1c06j538sijfjpn1kmnh9j2xk5yzmq"; })
+  (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.1.0"; sha256 = "1gpdxl6ip06cnab7n3zlcg6mqp7kknf73s8wjinzi4p0apw82fpg"; })
+  (fetchNuGet { pname = "System.Memory"; version = "4.5.4"; sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y"; })
+  (fetchNuGet { pname = "System.Net.WebSockets"; version = "4.3.0"; sha256 = "1gfj800078kggcgl0xyl00a6y5k4wwh2k2qm69rjy22wbmq7fy4p"; })
+  (fetchNuGet { pname = "System.ObjectModel"; version = "4.0.12"; sha256 = "1sybkfi60a4588xn34nd9a58png36i0xr4y4v4kqpg8wlvy5krrj"; })
+  (fetchNuGet { pname = "System.Private.Uri"; version = "4.3.0"; sha256 = "04r1lkdnsznin0fj4ya1zikxiqr0h6r6a1ww2dsm60gqhdrf0mvx"; })
+  (fetchNuGet { pname = "System.Reactive"; version = "4.4.1"; sha256 = "0gx8jh3hny2y5kijz5k9pxiqw481d013787c04zlhps21ygklw4a"; })
+  (fetchNuGet { pname = "System.Reflection"; version = "4.1.0"; sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9"; })
+  (fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; })
+  (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.0.1"; sha256 = "0ydqcsvh6smi41gyaakglnv252625hf29f7kywy2c70nhii2ylqp"; })
+  (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.0.1"; sha256 = "1pcd2ig6bg144y10w7yxgc9d22r7c7ww7qn1frdfwgxr24j9wvv0"; })
+  (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.0.1"; sha256 = "1s4b043zdbx9k39lfhvsk68msv1nxbidhkq6nbm27q7sf8xcsnxr"; })
+  (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.0.1"; sha256 = "0m7wqwq0zqq9gbpiqvgk3sr92cbrw7cp3xn53xvw7zj6rz6fdirn"; })
+  (fetchNuGet { pname = "System.Reflection.Metadata"; version = "1.6.0"; sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4"; })
+  (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.0.1"; sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28"; })
+  (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; })
+  (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.1.0"; sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7"; })
+  (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.0.1"; sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi"; })
+  (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; })
+  (fetchNuGet { pname = "System.Runtime"; version = "4.1.0"; sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m"; })
+  (fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; })
+  (fetchNuGet { pname = "System.Runtime.Caching"; version = "6.0.0"; sha256 = "0wh98a77cby4i3h2mar241k01105x661kh03vlyd399shxkfk60a"; })
+  (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.4.0"; sha256 = "0a6ahgi5b148sl5qyfpyw383p3cb4yrkm802k29fsi4mxkiwir29"; })
+  (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.7.0"; sha256 = "16r6sn4czfjk8qhnz7bnqlyiaaszr0ihinb7mq9zzr1wba257r54"; })
+  (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.7.1"; sha256 = "119br3pd85lq8zcgh4f60jzmv1g976q1kdgi3hvqdlhfbw6siz2j"; })
+  (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.1.0"; sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z"; })
+  (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; })
+  (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.0.1"; sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g"; })
+  (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; })
+  (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.1.0"; sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1"; })
+  (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; })
+  (fetchNuGet { pname = "System.Runtime.InteropServices.RuntimeInformation"; version = "4.0.0"; sha256 = "0glmvarf3jz5xh22iy3w9v3wyragcm4hfdr17v90vs7vcrm7fgp6"; })
+  (fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; })
+  (fetchNuGet { pname = "System.Security.AccessControl"; version = "4.6.0"; sha256 = "1wl1dyghi0qhpap1vgfhg2ybdyyhy9vc2a7dpm1xb30vfgmlkjmf"; })
+  (fetchNuGet { pname = "System.Security.AccessControl"; version = "6.0.0"; sha256 = "0a678bzj8yxxiffyzy60z2w1nczzpi8v97igr4ip3byd2q89dv58"; })
+  (fetchNuGet { pname = "System.Security.Cryptography.ProtectedData"; version = "6.0.0"; sha256 = "05kd3a8w7658hjxq9vvszxip30a479fjmfq4bq1r95nrsvs4hbss"; })
+  (fetchNuGet { pname = "System.Security.Permissions"; version = "6.0.0"; sha256 = "0jsl4xdrkqi11iwmisi1r2f2qn5pbvl79mzq877gndw6ans2zhzw"; })
+  (fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.6.0"; sha256 = "1jmfzfz1n8hp63s5lja5xxpzkinbp6g59l3km9h8avjiisdrg5wm"; })
+  (fetchNuGet { pname = "System.Text.Encoding"; version = "4.0.11"; sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw"; })
+  (fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; })
+  (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.5.1"; sha256 = "1z21qyfs6sg76rp68qdx0c9iy57naan89pg7p6i3qpj8kyzn921w"; })
+  (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; })
+  (fetchNuGet { pname = "System.Threading"; version = "4.0.11"; sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls"; })
+  (fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; })
+  (fetchNuGet { pname = "System.Threading.Channels"; version = "4.7.1"; sha256 = "038fyrriypwzsj5fwgnkw79hm5ya0x63r724yizgahbxf512chr2"; })
+  (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.0.11"; sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5"; })
+  (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; })
+  (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.3"; sha256 = "0g7r6hm572ax8v28axrdxz1gnsblg6kszq17g51pj14a5rn2af7i"; })
+  (fetchNuGet { pname = "System.Windows.Extensions"; version = "6.0.0"; sha256 = "1wy9pq9vn1bqg5qnv53iqrbx04yzdmjw4x5yyi09y3459vaa1sip"; })
+]
diff --git a/nixpkgs/pkgs/applications/science/logic/easycrypt/default.nix b/nixpkgs/pkgs/applications/science/logic/easycrypt/default.nix
index da4ff212e294..abd2b0cb2758 100644
--- a/nixpkgs/pkgs/applications/science/logic/easycrypt/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/easycrypt/default.nix
@@ -11,11 +11,14 @@ stdenv.mkDerivation rec {
     sha256 = "sha256:09rdwcj70lkamkhd895p284rfpz4bcnsf55mcimhiqncd2a21ml7";
   };
 
-  # Fix build with Why3 1.5
-  patches = fetchpatch {
-    url = "https://github.com/EasyCrypt/easycrypt/commit/d226387432deb7f22738e1d5579346a2cbc9be7a.patch";
-    sha256 = "sha256:1zvxij35fnr3h9b5wdl8ml17aqfx3a39rd4mgwmdvkapbg3pa4lm";
-  };
+  patches = lib.lists.map fetchpatch [
+    # Fix build with Why3 1.5
+    { url = "https://github.com/EasyCrypt/easycrypt/commit/d226387432deb7f22738e1d5579346a2cbc9be7a.patch";
+      hash = "sha256:1zvxij35fnr3h9b5wdl8ml17aqfx3a39rd4mgwmdvkapbg3pa4lm"; }
+    # Fix build with Why3 1.6
+    { url = "https://github.com/EasyCrypt/easycrypt/commit/876f2ed50a0434afdf2fb20e7c50b8a3e26bb06e.patch";
+      hash = "sha256-UycfLZWYHNsppb7qHSRaAF4Y0UnwoFueEG0wUcBUPYE="; }
+  ];
 
   nativeBuildInputs = with ocamlPackages; [
     dune_3
diff --git a/nixpkgs/pkgs/applications/science/logic/easycrypt/runtest.nix b/nixpkgs/pkgs/applications/science/logic/easycrypt/runtest.nix
index 79a034b93693..c0d72d96e1d1 100644
--- a/nixpkgs/pkgs/applications/science/logic/easycrypt/runtest.nix
+++ b/nixpkgs/pkgs/applications/science/logic/easycrypt/runtest.nix
@@ -2,6 +2,7 @@
 
 python3Packages.buildPythonApplication rec {
   inherit (easycrypt) src version;
+  format = "other";
 
   pname = "easycrypt-runtest";
 
diff --git a/nixpkgs/pkgs/applications/science/logic/egglog/Cargo.lock b/nixpkgs/pkgs/applications/science/logic/egglog/Cargo.lock
new file mode 100644
index 000000000000..2c0a2b71f4db
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/egglog/Cargo.lock
@@ -0,0 +1,1026 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "ahash"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
+dependencies = [
+ "getrandom",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "ahash"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107"
+dependencies = [
+ "cfg-if 1.0.0",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "ascii-canvas"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6"
+dependencies = [
+ "term",
+]
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi 0.1.19",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bumpalo"
+version = "3.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
+
+[[package]]
+name = "cc"
+version = "1.0.77"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
+
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "clap"
+version = "4.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0acbd8d28a0a60d7108d7ae850af6ba34cf2d1257fc646980e5f97ce14275966"
+dependencies = [
+ "bitflags",
+ "clap_derive",
+ "clap_lex",
+ "is-terminal",
+ "once_cell",
+ "strsim",
+ "termcolor",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014"
+dependencies = [
+ "heck",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "console_error_panic_hook"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
+dependencies = [
+ "cfg-if 1.0.0",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "crunchy"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
+
+[[package]]
+name = "diff"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
+
+[[package]]
+name = "dirs-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
+dependencies = [
+ "cfg-if 1.0.0",
+ "dirs-sys-next",
+]
+
+[[package]]
+name = "dirs-sys-next"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "egg-smol"
+version = "0.1.0"
+dependencies = [
+ "clap",
+ "env_logger",
+ "glob",
+ "hashbrown 0.13.1",
+ "indexmap",
+ "instant",
+ "lalrpop",
+ "lalrpop-util",
+ "lazy_static",
+ "log",
+ "num-integer",
+ "num-rational",
+ "num-traits",
+ "ordered-float",
+ "regex",
+ "rustc-hash",
+ "smallvec",
+ "symbol_table",
+ "symbolic_expressions",
+ "thiserror",
+]
+
+[[package]]
+name = "either"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
+
+[[package]]
+name = "ena"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3"
+dependencies = [
+ "log",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
+dependencies = [
+ "humantime",
+ "is-terminal",
+ "log",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "errno"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "fixedbitset"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+
+[[package]]
+name = "getrandom"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
+dependencies = [
+ "cfg-if 1.0.0",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+dependencies = [
+ "ahash 0.7.6",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038"
+dependencies = [
+ "ahash 0.8.2",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "indexmap"
+version = "1.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if 1.0.0",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "io-lifetimes"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "is-terminal"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aae5bc6e2eb41c9def29a3e0f1306382807764b9b53112030eff57435667352d"
+dependencies = [
+ "hermit-abi 0.2.6",
+ "io-lifetimes",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lalrpop"
+version = "0.19.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823"
+dependencies = [
+ "ascii-canvas",
+ "atty",
+ "bit-set",
+ "diff",
+ "ena",
+ "itertools",
+ "lalrpop-util",
+ "petgraph",
+ "pico-args",
+ "regex",
+ "regex-syntax",
+ "string_cache",
+ "term",
+ "tiny-keccak",
+ "unicode-xid",
+]
+
+[[package]]
+name = "lalrpop-util"
+version = "0.19.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4"
+dependencies = [
+ "regex",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.137"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"
+
+[[package]]
+name = "lock_api"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if 1.0.0",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memory_units"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
+
+[[package]]
+name = "num-bigint"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
+dependencies = [
+ "autocfg",
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
+
+[[package]]
+name = "ordered-float"
+version = "3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d84eb1409416d254e4a9c8fa56cc24701755025b458f0fcd8e59e1f5f40c23bf"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "os_str_bytes"
+version = "6.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
+
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0"
+dependencies = [
+ "cfg-if 1.0.0",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-sys",
+]
+
+[[package]]
+name = "petgraph"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143"
+dependencies = [
+ "fixedbitset",
+ "indexmap",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pico-args"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468"
+
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
+dependencies = [
+ "getrandom",
+ "redox_syscall",
+ "thiserror",
+]
+
+[[package]]
+name = "regex"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustix"
+version = "0.36.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b1fbb4dfc4eb1d390c02df47760bb19a84bb80b301ecc947ab5406394d8223e"
+dependencies = [
+ "bitflags",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8"
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "siphasher"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
+
+[[package]]
+name = "smallvec"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+
+[[package]]
+name = "string_cache"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot",
+ "phf_shared",
+ "precomputed-hash",
+]
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "symbol_table"
+version = "0.2.0"
+source = "git+https://github.com/mwillsey/symbol_table?rev=acddcf8938d1b4ed2fce048c9d83c30203d404b9#acddcf8938d1b4ed2fce048c9d83c30203d404b9"
+dependencies = [
+ "ahash 0.7.6",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "symbolic_expressions"
+version = "5.0.3"
+source = "git+https://github.com/oflatt/symbolic-expressions?rev=4c0ea5ca008f972450b2af72387e64d2c1c6a791#4c0ea5ca008f972450b2af72387e64d2c1c6a791"
+
+[[package]]
+name = "syn"
+version = "1.0.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "term"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
+dependencies = [
+ "dirs-next",
+ "rustversion",
+ "winapi",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tiny-keccak"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
+dependencies = [
+ "crunchy",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
+dependencies = [
+ "cfg-if 1.0.0",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
+
+[[package]]
+name = "wasm-logger"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "074649a66bb306c8f2068c9016395fa65d8e08d2affcbf95acf3c24c3ab19718"
+dependencies = [
+ "log",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "web-demo"
+version = "0.1.0"
+dependencies = [
+ "console_error_panic_hook",
+ "egg-smol",
+ "js-sys",
+ "log",
+ "wasm-bindgen",
+ "wasm-logger",
+ "web-sys",
+ "wee_alloc",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "wee_alloc"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e"
+dependencies = [
+ "cfg-if 0.1.10",
+ "libc",
+ "memory_units",
+ "winapi",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
diff --git a/nixpkgs/pkgs/applications/science/logic/egglog/default.nix b/nixpkgs/pkgs/applications/science/logic/egglog/default.nix
new file mode 100644
index 000000000000..c05ea10db2bb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/egglog/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+}:
+
+rustPlatform.buildRustPackage {
+  pname = "egglog";
+  version = "unstable-2023-05-22";
+
+  src = fetchFromGitHub {
+    owner = "egraphs-good";
+    repo = "egglog";
+    rev = "5242b50051c339d55009860d4dff80125fdcedfd";
+    hash = "sha256-N04CfITLEr4D4s6bUi0eRQdAVy6Ztq3Ml0365of7i0U=";
+  };
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "symbol_table-0.2.0" = "sha256-f9UclMOUig+N5L3ibBXou0pJ4S/CQqtaji7tnebVbis=";
+      "symbolic_expressions-5.0.3" = "sha256-mSxnhveAItlTktQC4hM8o6TYjgtCUgkdZj7i6MR4Oeo=";
+    };
+  };
+
+  meta = with lib; {
+    description = "A fixpoint reasoning system that unifies Datalog and equality saturation";
+    homepage = "https://github.com/egraphs-good/egglog";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda ];
+    mainProgram = "egg-smol";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/logic/ekrhyper/default.nix b/nixpkgs/pkgs/applications/science/logic/ekrhyper/default.nix
index d6d9bb11a9a0..187cbc9a92ae 100644
--- a/nixpkgs/pkgs/applications/science/logic/ekrhyper/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/ekrhyper/default.nix
@@ -9,10 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-fEe0DIMGj7wO+79/BZf45kykgyTXpbZJsyFSt31XqpM=";
   };
 
-  buildInputs = [
-    ocaml
-    perl
-  ];
+  strictDeps = true;
+  nativeBuildInputs = [ ocaml perl ];
   setSourceRoot = "export sourceRoot=$(echo */ekrh/src/)";
   preInstall = "export INSTALLDIR=$out";
   postInstall = ''for i in "$out/casc"/*; do ln -s "$i" "$out/bin/ekrh-casc-$(basename $i)"; done '';
diff --git a/nixpkgs/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch b/nixpkgs/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch
index 768be10b6df3..74da9d854f34 100644
--- a/nixpkgs/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch
+++ b/nixpkgs/pkgs/applications/science/logic/elan/0001-dynamically-patchelf-binaries.patch
@@ -2,7 +2,7 @@ diff --git a/src/elan-dist/src/component/package.rs b/src/elan-dist/src/componen
 index c51e76d..ae8159e 100644
 --- a/src/elan-dist/src/component/package.rs
 +++ b/src/elan-dist/src/component/package.rs
-@@ -56,6 +56,30 @@ fn unpack_without_first_dir<R: Read>(archive: &mut tar::Archive<R>, path: &Path)
+@@ -56,6 +56,35 @@ fn unpack_without_first_dir<R: Read>(archive: &mut tar::Archive<R>, path: &Path)
          entry
              .unpack(&full_path)
              .chain_err(|| ErrorKind::ExtractingPackage)?;
@@ -30,6 +30,11 @@ index c51e76d..ae8159e 100644
 +LEAN_CC="${{LEAN_CC:-@cc@}}" exec -a "$0" {} "$@" -L {}/lib  # use bundled libraries, but not bundled compiler that doesn't know about NIX_LDFLAGS
 +"#, new_path.to_str().unwrap(), dest_path.parent().unwrap().parent().unwrap().to_str().unwrap()))?;
 +        ::std::fs::set_permissions(dest_path, ::std::fs::Permissions::from_mode(0o755))?;
++    }
++
++    if dest_path.file_name() == Some(::std::ffi::OsStr::new("llvm-ar")) {
++        ::std::fs::remove_file(dest_path)?;
++        ::std::os::unix::fs::symlink("@ar@", dest_path)?;
      }
  
      Ok(())
diff --git a/nixpkgs/pkgs/applications/science/logic/elan/default.nix b/nixpkgs/pkgs/applications/science/logic/elan/default.nix
index 1c16de8ad951..7600ecf7bacd 100644
--- a/nixpkgs/pkgs/applications/science/logic/elan/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/elan/default.nix
@@ -3,16 +3,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "elan";
-  version = "1.4.1";
+  version = "1.4.5";
 
   src = fetchFromGitHub {
     owner = "leanprover";
     repo = "elan";
     rev = "v${version}";
-    sha256 = "sha256-jHECNSXSATLuNHNSVwi7mBTI8l6+cLPDISc5T/4yHDg=";
+    sha256 = "sha256-KCRKVVNC2tJZWgqdQ8NPUzJHPexhF58cuO8Iyx81UJo=";
   };
 
-  cargoSha256 = "sha256-/XwlTmUboDbB6RTanhKyO6o2GBUhxpH/NQjeNsKpse0=";
+  cargoHash = "sha256-nFaDWDmDskZ0TKFG5KZk/vLn6ZzU3+mPD6y1wFxhLXg=";
 
   nativeBuildInputs = [ pkg-config makeWrapper ];
 
@@ -28,6 +28,7 @@ rustPlatform.buildRustPackage rec {
     (runCommand "0001-dynamically-patchelf-binaries.patch" {
         CC = stdenv.cc;
         cc = "${stdenv.cc}/bin/cc";
+        ar = "${stdenv.cc}/bin/ar";
         patchelf = patchelf;
         shell = runtimeShell;
       } ''
@@ -36,6 +37,7 @@ rustPlatform.buildRustPackage rec {
        --subst-var patchelf \
        --subst-var dynamicLinker \
        --subst-var cc \
+       --subst-var ar \
        --subst-var shell
     '')
   ];
diff --git a/nixpkgs/pkgs/applications/science/logic/fast-downward/default.nix b/nixpkgs/pkgs/applications/science/logic/fast-downward/default.nix
index 4025fd4e6d65..98db5682e7e7 100644
--- a/nixpkgs/pkgs/applications/science/logic/fast-downward/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/fast-downward/default.nix
@@ -9,19 +9,19 @@
 
 stdenv.mkDerivation rec {
   pname = "fast-downward";
-  version = "22.06.0";
+  version = "22.12.0";
 
   src = fetchFromGitHub {
     owner = "aibasel";
     repo = "downward";
     rev = "release-${version}";
-    sha256 = "sha256-WzxLUuwZy+oNqmgj0n4Pe1QBYXXAaJqYhT+JSLbmyiM=";
+    sha256 = "sha256-GwZ5BGzLRMgWNBaA7M2D2p9OxvdyWqm+sTwxGpcI/qY=";
   };
 
   nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
   buildInputs = [ python3 osi ];
 
-  cmakeFlags = lib.optional osi.withCplex [ "-DDOWNWARD_CPLEX_ROOT=${cplex}/cplex" ];
+  cmakeFlags = lib.optionals osi.withCplex [ "-DDOWNWARD_CPLEX_ROOT=${cplex}/cplex" ];
 
   configurePhase = ''
     python build.py release
diff --git a/nixpkgs/pkgs/applications/science/logic/formula/default.nix b/nixpkgs/pkgs/applications/science/logic/formula/default.nix
index 5b39e9153192..20267e6071c5 100644
--- a/nixpkgs/pkgs/applications/science/logic/formula/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/formula/default.nix
@@ -25,7 +25,6 @@ buildDotnetModule rec {
   passthru.updateScript = unstableGitUpdater { url = meta.homepage; };
 
   meta = with lib; {
-    broken = stdenv.isLinux && stdenv.isAarch64;
     description = "Formal Specifications for Verification and Synthesis";
     homepage = "https://github.com/VUISIS/formula-dotnet";
     license = licenses.mspl;
diff --git a/nixpkgs/pkgs/applications/science/logic/formula/nuget.nix b/nixpkgs/pkgs/applications/science/logic/formula/nuget.nix
index 40b9abe7fad9..e3b0fe67446b 100644
--- a/nixpkgs/pkgs/applications/science/logic/formula/nuget.nix
+++ b/nixpkgs/pkgs/applications/science/logic/formula/nuget.nix
@@ -1,23 +1,30 @@
+# This file was automatically generated by passthru.fetch-deps.
+# Please dont edit it manually, your changes might get overwritten!
+
 { fetchNuGet }: [
   (fetchNuGet { pname = "Antlr4.Runtime.Standard"; version = "4.7.2"; sha256 = "1pmrpsgqjfj0nzr1zqzk1m2fm0ynd4nklwq3dhvww08yjg5s0586"; })
-  (fetchNuGet { pname = "coverlet.collector"; version = "3.0.2"; sha256 = "1xf6z6izmsl4g8w3z1wbp4pa8f8qsf6sil4mf1c9fb22hq8c5hkg"; })
-  (fetchNuGet { pname = "Microsoft.Build.Framework"; version = "16.3.0"; sha256 = "1fdgymp11qpv4h152km2wmbykq1rb4b05cyy6d06naw01l61gdz8"; })
-  (fetchNuGet { pname = "Microsoft.Build.Utilities.Core"; version = "16.3.0"; sha256 = "17hqjzxqnx2hhp276kdlc6wnhd33dilk0bd41px37and2icl9shn"; })
-  (fetchNuGet { pname = "Microsoft.CodeCoverage"; version = "16.9.4"; sha256 = "11wiyy3ykgk1sa9amy3lgcsg2v7d1sz59ggw647vx8ibpjxijjpp"; })
-  (fetchNuGet { pname = "Microsoft.CSharp"; version = "4.0.1"; sha256 = "0zxc0apx1gcx361jlq8smc9pfdgmyjh6hpka8dypc9w23nlsh6yj"; })
-  (fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "16.9.4"; sha256 = "1jdx05zmrqj1s7xfgn3wgy10qb5cl1n1jcj5kz43zvkw1amc7ra4"; })
-  (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; })
   (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
-  (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; })
   (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; })
-  (fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "16.9.4"; sha256 = "1jizkbrnm4pv60zch29ki7gj8m7j5whk141x9cwx4kwsd6cfzwi6"; })
-  (fetchNuGet { pname = "Microsoft.TestPlatform.TestHost"; version = "16.9.4"; sha256 = "14110qzmypr72ywvx3npq7mf4n0gvdr4536v91z1xbapms65am6x"; })
   (fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; })
-  (fetchNuGet { pname = "Microsoft.Win32.Registry"; version = "4.3.0"; sha256 = "1gxyzxam8163vk1kb6xzxjj4iwspjsz9zhgn1w9rjzciphaz0ig7"; })
   (fetchNuGet { pname = "Microsoft.Z3.x64"; version = "4.8.7"; sha256 = "1wxlw29xm5x8vwji2s7gwk39wb88dkbpg76l9s9gq0hqpghwlmdz"; })
   (fetchNuGet { pname = "NETStandard.Library"; version = "1.6.1"; sha256 = "1z70wvsx2d847a2cjfii7b83pjfs34q05gb037fdjikv5kbagml8"; })
-  (fetchNuGet { pname = "Newtonsoft.Json"; version = "9.0.1"; sha256 = "0mcy0i7pnfpqm4pcaiyzzji4g0c8i3a5gjz28rrr28110np8304r"; })
-  (fetchNuGet { pname = "NuGet.Frameworks"; version = "5.0.0"; sha256 = "18ijvmj13cwjdrrm52c8fpq021531zaz4mj4b4zapxaqzzxf2qjr"; })
+  (fetchNuGet { pname = "runtime.any.System.Collections"; version = "4.3.0"; sha256 = "0bv5qgm6vr47ynxqbnkc7i797fdi8gbjjxii173syrx14nmrkwg0"; })
+  (fetchNuGet { pname = "runtime.any.System.Diagnostics.Tools"; version = "4.3.0"; sha256 = "1wl76vk12zhdh66vmagni66h5xbhgqq7zkdpgw21jhxhvlbcl8pk"; })
+  (fetchNuGet { pname = "runtime.any.System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "00j6nv2xgmd3bi347k00m7wr542wjlig53rmj28pmw7ddcn97jbn"; })
+  (fetchNuGet { pname = "runtime.any.System.Globalization"; version = "4.3.0"; sha256 = "1daqf33hssad94lamzg01y49xwndy2q97i2lrb7mgn28656qia1x"; })
+  (fetchNuGet { pname = "runtime.any.System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1ghhhk5psqxcg6w88sxkqrc35bxcz27zbqm2y5p5298pv3v7g201"; })
+  (fetchNuGet { pname = "runtime.any.System.IO"; version = "4.3.0"; sha256 = "0l8xz8zn46w4d10bcn3l4yyn4vhb3lrj2zw8llvz7jk14k4zps5x"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection"; version = "4.3.0"; sha256 = "02c9h3y35pylc0zfq3wcsvc5nqci95nrkq0mszifc0sjx7xrzkly"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection.Extensions"; version = "4.3.0"; sha256 = "0zyri97dfc5vyaz9ba65hjj1zbcrzaffhsdlpxc9bh09wy22fq33"; })
+  (fetchNuGet { pname = "runtime.any.System.Reflection.Primitives"; version = "4.3.0"; sha256 = "0x1mm8c6iy8rlxm8w9vqw7gb7s1ljadrn049fmf70cyh42vdfhrf"; })
+  (fetchNuGet { pname = "runtime.any.System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "03kickal0iiby82wa5flar18kyv82s9s6d4xhk5h4bi5kfcyfjzl"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.3.0"; sha256 = "1cqh1sv3h5j7ixyb7axxbdkqx6cxy00p4np4j91kpm492rf4s25b"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime.Handles"; version = "4.3.0"; sha256 = "0bh5bi25nk9w9xi8z23ws45q5yia6k7dg3i4axhfqlnj145l011x"; })
+  (fetchNuGet { pname = "runtime.any.System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "0c3g3g3jmhlhw4klrc86ka9fjbl7i59ds1fadsb2l8nqf8z3kb19"; })
+  (fetchNuGet { pname = "runtime.any.System.Text.Encoding"; version = "4.3.0"; sha256 = "0aqqi1v4wx51h51mk956y783wzags13wa7mgqyclacmsmpv02ps3"; })
+  (fetchNuGet { pname = "runtime.any.System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "0lqhgqi0i8194ryqq6v2gqx0fb86db2gqknbm0aq31wb378j7ip8"; })
+  (fetchNuGet { pname = "runtime.any.System.Threading.Tasks"; version = "4.3.0"; sha256 = "03mnvkhskbzxddz4hm113zsch1jyzh2cs450dk3rgfjp8crlw1va"; })
+  (fetchNuGet { pname = "runtime.any.System.Threading.Timer"; version = "4.3.0"; sha256 = "0aw4phrhwqz9m61r79vyfl5la64bjxj8l34qnrcwb28v49fg2086"; })
   (fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d"; })
   (fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59"; })
   (fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa"; })
@@ -34,69 +41,54 @@
   (fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3"; })
   (fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy"; })
   (fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5"; })
+  (fetchNuGet { pname = "runtime.unix.Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0y61k9zbxhdi0glg154v30kkq7f8646nif8lnnxbvkjpakggd5id"; })
+  (fetchNuGet { pname = "runtime.unix.System.Console"; version = "4.3.0"; sha256 = "1pfpkvc6x2if8zbdzg9rnc5fx51yllprl8zkm5npni2k50lisy80"; })
+  (fetchNuGet { pname = "runtime.unix.System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "1lps7fbnw34bnh3lm31gs5c0g0dh7548wfmb8zz62v0zqz71msj5"; })
+  (fetchNuGet { pname = "runtime.unix.System.IO.FileSystem"; version = "4.3.0"; sha256 = "14nbkhvs7sji5r1saj2x8daz82rnf9kx28d3v2qss34qbr32dzix"; })
+  (fetchNuGet { pname = "runtime.unix.System.Net.Primitives"; version = "4.3.0"; sha256 = "0bdnglg59pzx9394sy4ic66kmxhqp8q8bvmykdxcbs5mm0ipwwm4"; })
+  (fetchNuGet { pname = "runtime.unix.System.Net.Sockets"; version = "4.3.0"; sha256 = "03npdxzy8gfv035bv1b9rz7c7hv0rxl5904wjz51if491mw0xy12"; })
+  (fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.3.0"; sha256 = "1jx02q6kiwlvfksq1q9qr17fj78y5v6mwsszav4qcz9z25d5g6vk"; })
+  (fetchNuGet { pname = "runtime.unix.System.Runtime.Extensions"; version = "4.3.0"; sha256 = "0pnxxmm8whx38dp6yvwgmh22smknxmqs5n513fc7m4wxvs1bvi4p"; })
   (fetchNuGet { pname = "System.AppContext"; version = "4.3.0"; sha256 = "1649qvy3dar900z3g817h17nl8jp4ka5vcfmsr05kh0fshn7j3ya"; })
   (fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; })
-  (fetchNuGet { pname = "System.Collections"; version = "4.0.11"; sha256 = "1ga40f5lrwldiyw6vy67d0sg7jd7ww6kgwbksm19wrvq9hr0bsm6"; })
   (fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; })
   (fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; })
-  (fetchNuGet { pname = "System.Collections.Immutable"; version = "1.5.0"; sha256 = "1d5gjn5afnrf461jlxzawcvihz195gayqpcfbv6dd7pxa9ialn06"; })
   (fetchNuGet { pname = "System.Console"; version = "4.3.0"; sha256 = "1flr7a9x920mr5cjsqmsy9wgnv3lvd0h1g521pdr1lkb2qycy7ay"; })
-  (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.0.11"; sha256 = "0gmjghrqmlgzxivd2xl50ncbglb7ljzb66rlx8ws6dv8jm0d5siz"; })
   (fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; })
   (fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; })
-  (fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.0.1"; sha256 = "19cknvg07yhakcvpxg3cxa0bwadplin6kyxd8mpjjpwnp56nl85x"; })
   (fetchNuGet { pname = "System.Diagnostics.Tools"; version = "4.3.0"; sha256 = "0in3pic3s2ddyibi8cvgl102zmvp9r9mchh82ns9f0ms4basylw1"; })
   (fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; })
-  (fetchNuGet { pname = "System.Dynamic.Runtime"; version = "4.0.11"; sha256 = "1pla2dx8gkidf7xkciig6nifdsb494axjvzvann8g2lp3dbqasm9"; })
-  (fetchNuGet { pname = "System.Globalization"; version = "4.0.11"; sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d"; })
   (fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; })
   (fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; })
   (fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.3.0"; sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls"; })
-  (fetchNuGet { pname = "System.IO"; version = "4.1.0"; sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp"; })
   (fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; })
   (fetchNuGet { pname = "System.IO.Compression"; version = "4.3.0"; sha256 = "084zc82yi6yllgda0zkgl2ys48sypiswbiwrv7irb3r0ai1fp4vz"; })
   (fetchNuGet { pname = "System.IO.Compression.ZipFile"; version = "4.3.0"; sha256 = "1yxy5pq4dnsm9hlkg9ysh5f6bf3fahqqb6p8668ndy5c0lk7w2ar"; })
-  (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.0.1"; sha256 = "0kgfpw6w4djqra3w5crrg8xivbanh1w9dh3qapb28q060wb9flp1"; })
   (fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; })
-  (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.0.1"; sha256 = "1s0mniajj3lvbyf7vfb5shp4ink5yibsx945k6lvxa96r8la1612"; })
   (fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; })
-  (fetchNuGet { pname = "System.Linq"; version = "4.1.0"; sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5"; })
   (fetchNuGet { pname = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; })
-  (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.1.0"; sha256 = "1gpdxl6ip06cnab7n3zlcg6mqp7kknf73s8wjinzi4p0apw82fpg"; })
   (fetchNuGet { pname = "System.Linq.Expressions"; version = "4.3.0"; sha256 = "0ky2nrcvh70rqq88m9a5yqabsl4fyd17bpr63iy2mbivjs2nyypv"; })
   (fetchNuGet { pname = "System.Net.Http"; version = "4.3.0"; sha256 = "1i4gc757xqrzflbk7kc5ksn20kwwfjhw9w7pgdkn19y3cgnl302j"; })
+  (fetchNuGet { pname = "System.Net.NameResolution"; version = "4.3.0"; sha256 = "15r75pwc0rm3vvwsn8rvm2krf929mjfwliv0mpicjnii24470rkq"; })
   (fetchNuGet { pname = "System.Net.Primitives"; version = "4.3.0"; sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; })
   (fetchNuGet { pname = "System.Net.Sockets"; version = "4.3.0"; sha256 = "1ssa65k6chcgi6mfmzrznvqaxk8jp0gvl77xhf1hbzakjnpxspla"; })
-  (fetchNuGet { pname = "System.ObjectModel"; version = "4.0.12"; sha256 = "1sybkfi60a4588xn34nd9a58png36i0xr4y4v4kqpg8wlvy5krrj"; })
   (fetchNuGet { pname = "System.ObjectModel"; version = "4.3.0"; sha256 = "191p63zy5rpqx7dnrb3h7prvgixmk168fhvvkkvhlazncf8r3nc2"; })
-  (fetchNuGet { pname = "System.Reflection"; version = "4.1.0"; sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9"; })
+  (fetchNuGet { pname = "System.Private.Uri"; version = "4.3.0"; sha256 = "04r1lkdnsznin0fj4ya1zikxiqr0h6r6a1ww2dsm60gqhdrf0mvx"; })
   (fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; })
-  (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.0.1"; sha256 = "0ydqcsvh6smi41gyaakglnv252625hf29f7kywy2c70nhii2ylqp"; })
   (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.3.0"; sha256 = "11f8y3qfysfcrscjpjym9msk7lsfxkk4fmz9qq95kn3jd0769f74"; })
-  (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.0.1"; sha256 = "1pcd2ig6bg144y10w7yxgc9d22r7c7ww7qn1frdfwgxr24j9wvv0"; })
   (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.3.0"; sha256 = "0w1n67glpv8241vnpz1kl14sy7zlnw414aqwj4hcx5nd86f6994q"; })
-  (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.0.1"; sha256 = "1s4b043zdbx9k39lfhvsk68msv1nxbidhkq6nbm27q7sf8xcsnxr"; })
   (fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.3.0"; sha256 = "0ql7lcakycrvzgi9kxz1b3lljd990az1x6c4jsiwcacrvimpib5c"; })
-  (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.0.1"; sha256 = "0m7wqwq0zqq9gbpiqvgk3sr92cbrw7cp3xn53xvw7zj6rz6fdirn"; })
   (fetchNuGet { pname = "System.Reflection.Extensions"; version = "4.3.0"; sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq"; })
-  (fetchNuGet { pname = "System.Reflection.Metadata"; version = "1.6.0"; sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4"; })
-  (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.0.1"; sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28"; })
   (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; })
-  (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.1.0"; sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7"; })
   (fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.3.0"; sha256 = "0y2ssg08d817p0vdag98vn238gyrrynjdj4181hdg780sif3ykp1"; })
-  (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.0.1"; sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi"; })
   (fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; })
-  (fetchNuGet { pname = "System.Runtime"; version = "4.1.0"; sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m"; })
   (fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; })
-  (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.1.0"; sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z"; })
   (fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; })
-  (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.0.1"; sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g"; })
   (fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; })
-  (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.1.0"; sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1"; })
   (fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; })
   (fetchNuGet { pname = "System.Runtime.InteropServices.RuntimeInformation"; version = "4.3.0"; sha256 = "0q18r1sh4vn7bvqgd6dmqlw5v28flbpj349mkdish2vjyvmnb2ii"; })
   (fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; })
-  (fetchNuGet { pname = "System.Runtime.Serialization.Primitives"; version = "4.1.1"; sha256 = "042rfjixknlr6r10vx2pgf56yming8lkjikamg3g4v29ikk78h7k"; })
+  (fetchNuGet { pname = "System.Security.Claims"; version = "4.3.0"; sha256 = "0jvfn7j22l3mm28qjy3rcw287y9h65ha4m940waaxah07jnbzrhn"; })
   (fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; })
   (fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; })
   (fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; })
@@ -104,31 +96,16 @@
   (fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; })
   (fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; })
   (fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; })
-  (fetchNuGet { pname = "System.Text.Encoding"; version = "4.0.11"; sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw"; })
+  (fetchNuGet { pname = "System.Security.Principal"; version = "4.3.0"; sha256 = "12cm2zws06z4lfc4dn31iqv7072zyi4m910d4r6wm8yx85arsfxf"; })
+  (fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.3.0"; sha256 = "00a0a7c40i3v4cb20s2cmh9csb5jv2l0frvnlzyfxh848xalpdwr"; })
   (fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; })
-  (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "4.0.1"; sha256 = "00wpm3b9y0k996rm9whxprngm8l500ajmzgy2ip9pgwk0icp06y3"; })
-  (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.0.11"; sha256 = "08nsfrpiwsg9x5ml4xyl3zyvjfdi4mvbqf93kjdh11j4fwkznizs"; })
   (fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; })
-  (fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.1.0"; sha256 = "1mw7vfkkyd04yn2fbhm38msk7dz2xwvib14ygjsb8dq2lcvr18y7"; })
   (fetchNuGet { pname = "System.Text.RegularExpressions"; version = "4.3.0"; sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l"; })
-  (fetchNuGet { pname = "System.Threading"; version = "4.0.11"; sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls"; })
   (fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; })
-  (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.0.11"; sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5"; })
   (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; })
-  (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.0.0"; sha256 = "1cb51z062mvc2i8blpzmpn9d9mm4y307xrwi65di8ri18cz5r1zr"; })
   (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.3.0"; sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z"; })
-  (fetchNuGet { pname = "System.Threading.Thread"; version = "4.0.0"; sha256 = "1gxxm5fl36pjjpnx1k688dcw8m9l7nmf802nxis6swdaw8k54jzc"; })
+  (fetchNuGet { pname = "System.Threading.ThreadPool"; version = "4.3.0"; sha256 = "027s1f4sbx0y1xqw2irqn6x161lzj8qwvnh2gn78ciiczdv10vf1"; })
   (fetchNuGet { pname = "System.Threading.Timer"; version = "4.3.0"; sha256 = "1nx773nsx6z5whv8kaa1wjh037id2f1cxhb69pvgv12hd2b6qs56"; })
-  (fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.0.11"; sha256 = "0c6ky1jk5ada9m94wcadih98l6k1fvf6vi7vhn1msjixaha419l5"; })
   (fetchNuGet { pname = "System.Xml.ReaderWriter"; version = "4.3.0"; sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1"; })
-  (fetchNuGet { pname = "System.Xml.XDocument"; version = "4.0.11"; sha256 = "0n4lvpqzy9kc7qy1a4acwwd7b7pnvygv895az5640idl2y9zbz18"; })
   (fetchNuGet { pname = "System.Xml.XDocument"; version = "4.3.0"; sha256 = "08h8fm4l77n0nd4i4fk2386y809bfbwqb7ih9d7564ifcxr5ssxd"; })
-  (fetchNuGet { pname = "xunit"; version = "2.4.1"; sha256 = "0xf3kaywpg15flqaqfgywqyychzk15kz0kz34j21rcv78q9ywq20"; })
-  (fetchNuGet { pname = "xunit.abstractions"; version = "2.0.3"; sha256 = "00wl8qksgkxld76fgir3ycc5rjqv1sqds6x8yx40927q5py74gfh"; })
-  (fetchNuGet { pname = "xunit.analyzers"; version = "0.10.0"; sha256 = "15n02q3akyqbvkp8nq75a8rd66d4ax0rx8fhdcn8j78pi235jm7j"; })
-  (fetchNuGet { pname = "xunit.assert"; version = "2.4.1"; sha256 = "1imynzh80wxq2rp9sc4gxs4x1nriil88f72ilhj5q0m44qqmqpc6"; })
-  (fetchNuGet { pname = "xunit.core"; version = "2.4.1"; sha256 = "1nnb3j4kzmycaw1g76ii4rfqkvg6l8gqh18falwp8g28h802019a"; })
-  (fetchNuGet { pname = "xunit.extensibility.core"; version = "2.4.1"; sha256 = "103qsijmnip2pnbhciqyk2jyhdm6snindg5z2s57kqf5pcx9a050"; })
-  (fetchNuGet { pname = "xunit.extensibility.execution"; version = "2.4.1"; sha256 = "1pbilxh1gp2ywm5idfl0klhl4gb16j86ib4x83p8raql1dv88qia"; })
-  (fetchNuGet { pname = "xunit.runner.visualstudio"; version = "2.4.3"; sha256 = "0j1d0rbcm7pp6dypi61sjxp8l22sv261252z55b243l39jgv2rp3"; })
 ]
diff --git a/nixpkgs/pkgs/applications/science/logic/glucose/default.nix b/nixpkgs/pkgs/applications/science/logic/glucose/default.nix
index 5ba8208d6e18..512f0414f1c6 100644
--- a/nixpkgs/pkgs/applications/science/logic/glucose/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/glucose/default.nix
@@ -1,29 +1,48 @@
-{ lib, stdenv, fetchurl, zlib }:
+{ lib
+, stdenv
+, fetchurl
+, unzip
+, zlib
+, enableUnfree ? false
+}:
+
 stdenv.mkDerivation rec {
-  pname = "glucose";
-  version = "4.1";
+  pname = "glucose" + lib.optionalString enableUnfree "-syrup";
+  version = "4.2.1";
 
   src = fetchurl {
-    url = "http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-syrup-${version}.tgz";
-    sha256 = "0aahrkaq7n0z986fpqz66yz946nxardfi6dh8calzcfjpvqiraji";
+    url = "https://www.labri.fr/perso/lsimon/downloads/softwares/glucose-${version}.zip";
+    hash = "sha256-J0J9EKC/4cCiZr/y4lz+Hm7OcmJmMIIWzQ+4c+KhqXg=";
   };
 
+  sourceRoot = "glucose-${version}/sources/${if enableUnfree then "parallel" else "simp"}";
+
+  postPatch = ''
+    substituteInPlace Main.cc \
+      --replace "defined(__linux__)" "defined(__linux__) && defined(__x86_64__)"
+  '';
+
+  nativeBuildInputs = [ unzip ];
+
   buildInputs = [ zlib ];
 
-  sourceRoot = "glucose-syrup-${version}/simp";
   makeFlags = [ "r" ];
+
   installPhase = ''
-    install -Dm0755 glucose_release $out/bin/glucose
+    runHook preInstall
+
+    install -Dm0755 ${pname}_release $out/bin/${pname}
     mkdir -p "$out/share/doc/${pname}-${version}/"
     install -Dm0755 ../{LICEN?E,README*,Changelog*} "$out/share/doc/${pname}-${version}/"
+
+    runHook postInstall
   '';
 
   meta = with lib; {
-    description = "Modern, parallel SAT solver (sequential version)";
-    license = licenses.mit;
+    description = "Modern, parallel SAT solver (${if enableUnfree then "parallel" else "sequential"} version)";
+    homepage = "https://www.labri.fr/perso/lsimon/research/glucose/";
+    license = if enableUnfree then licenses.unfreeRedistributable else licenses.mit;
     platforms = platforms.unix;
     maintainers = with maintainers; [ gebner ];
-    # Build uses _FPU_EXTENDED macro
-    badPlatforms = [ "aarch64-linux" ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/logic/glucose/syrup.nix b/nixpkgs/pkgs/applications/science/logic/glucose/syrup.nix
deleted file mode 100644
index 17342858fb8f..000000000000
--- a/nixpkgs/pkgs/applications/science/logic/glucose/syrup.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ lib, stdenv, zlib, glucose }:
-stdenv.mkDerivation rec {
-  pname = "glucose-syrup";
-  version = glucose.version;
-
-  src = glucose.src;
-
-  buildInputs = [ zlib ];
-
-  sourceRoot = "glucose-syrup-${version}/parallel";
-  makeFlags = [ "r" ];
-  installPhase = ''
-    install -Dm0755 glucose-syrup_release $out/bin/glucose-syrup
-    mkdir -p "$out/share/doc/${pname}-${version}/"
-    install -Dm0755 ../{LICEN?E,README*,Changelog*} "$out/share/doc/${pname}-${version}/"
-  '';
-
-  meta = with lib; {
-    description = "Modern, parallel SAT solver (parallel version)";
-    license = licenses.unfreeRedistributable;
-    platforms = platforms.unix;
-    maintainers = with maintainers; [ gebner ];
-  };
-}
diff --git a/nixpkgs/pkgs/applications/science/logic/hol_light/default.nix b/nixpkgs/pkgs/applications/science/logic/hol_light/default.nix
index e66fe992e189..4c105a40e20d 100644
--- a/nixpkgs/pkgs/applications/science/logic/hol_light/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/hol_light/default.nix
@@ -38,7 +38,9 @@ stdenv.mkDerivation {
     })
   ];
 
-  buildInputs = [ ocaml camlp5 ];
+  strictDeps = true;
+
+  nativeBuildInputs = [ ocaml camlp5 ];
   propagatedBuildInputs = [ num ];
 
   installPhase = ''
diff --git a/nixpkgs/pkgs/applications/science/logic/iprover/default.nix b/nixpkgs/pkgs/applications/science/logic/iprover/default.nix
index ff88586e0353..6485681e3313 100644
--- a/nixpkgs/pkgs/applications/science/logic/iprover/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/iprover/default.nix
@@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
     sha256 = "0lik8p7ayhjwpkln1iwf0ri84ramhch74j5nj6z7ph6wfi92pgg8";
   };
 
-  buildInputs = [ ocaml eprover zlib ];
+  strictDeps = true;
+
+  nativeBuildInputs = [ ocaml eprover ];
+  buildInputs = [ zlib ];
 
   preConfigure = "patchShebangs .";
 
diff --git a/nixpkgs/pkgs/applications/science/logic/isabelle/components/isabelle-linter.nix b/nixpkgs/pkgs/applications/science/logic/isabelle/components/isabelle-linter.nix
index 7fca547f67c8..7587c4638c18 100644
--- a/nixpkgs/pkgs/applications/science/logic/isabelle/components/isabelle-linter.nix
+++ b/nixpkgs/pkgs/applications/science/logic/isabelle/components/isabelle-linter.nix
@@ -2,21 +2,34 @@
 
 stdenv.mkDerivation rec {
   pname = "isabelle-linter";
-  version = "Isabelle2021-1-v1.0.0";
+  version = "1.2.1";
 
   src = fetchFromGitHub {
     owner = "isabelle-prover";
     repo = "isabelle-linter";
-    rev = version;
-    sha256 = "0v6scc2rhj6bjv530gzz6i57czzcgpkw7a9iqnfdnm5gvs5qjk7a";
+    rev = "Isabelle2022-v${version}";
+    sha256 = "sha256-qlojNCsm3/49TtAVq6J31BbQipdIoDcn71pBotZyquY=";
   };
 
-  installPhase = import ./mkBuild.nix { inherit isabelle; path = "${pname}-${version}"; };
+  nativeBuildInputs = [ isabelle ];
+
+  buildPhase = ''
+    export HOME=$TMP
+    isabelle components -u $(pwd)
+    isabelle scala_build
+  '';
+
+  installPhase = ''
+    dir=$out/Isabelle${isabelle.version}/contrib/${pname}-${version}
+    mkdir -p $dir
+    cp -r * $dir/
+  '';
 
   meta = with lib; {
     description = "Linter component for Isabelle.";
     homepage = "https://github.com/isabelle-prover/isabelle-linter";
     maintainers = with maintainers; [ jvanbruegge ];
     license = licenses.mit;
+    platforms = platforms.all;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/logic/isabelle/components/mkBuild.nix b/nixpkgs/pkgs/applications/science/logic/isabelle/components/mkBuild.nix
deleted file mode 100644
index a05b5196b007..000000000000
--- a/nixpkgs/pkgs/applications/science/logic/isabelle/components/mkBuild.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ isabelle, path }:
-
-let
-  dir = "$out/isabelle/${isabelle.dirname}";
-  iDir = "${isabelle}/${isabelle.dirname}";
-in ''
-  shopt -s extglob
-  mkdir -p ${dir}/lib/classes
-
-  cDir=$out/${isabelle.dirname}/contrib/${path}
-  mkdir -p $cDir
-  cp -r !(isabelle) $cDir
-
-  cd ${dir}
-  ln -s ${iDir}/!(lib|bin) ./
-  ln -s ${iDir}/lib/!(classes) lib/
-  ln -s ${iDir}/lib/classes/* lib/classes/
-
-  mkdir bin/
-  cp ${iDir}/bin/* bin/
-
-  export HOME=$TMP
-  bin/isabelle components -u $cDir
-  bin/isabelle scala_build
-
-  cd lib/classes
-  for f in ${iDir}/lib/classes/*; do
-    rm $(basename $f)
-  done
-
-  lDir=$out/${isabelle.dirname}/lib/classes/
-  mkdir -p $lDir
-  cp -r * $lDir
-  cd $out
-  rm -rf isabelle
-''
diff --git a/nixpkgs/pkgs/applications/science/logic/isabelle/default.nix b/nixpkgs/pkgs/applications/science/logic/isabelle/default.nix
index 009af3463a25..2cb96bbc0a37 100644
--- a/nixpkgs/pkgs/applications/science/logic/isabelle/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/isabelle/default.nix
@@ -1,5 +1,22 @@
-{ lib, stdenv, fetchurl, coreutils, nettools, java, scala, polyml, z3, veriT, vampire, eprover-ho, naproche, rlwrap, perl, makeDesktopItem, isabelle-components, isabelle, symlinkJoin, fetchhg }:
-# nettools needed for hostname
+{ lib
+, stdenv
+, fetchurl
+, coreutils
+, nettools
+, java
+, scala_3
+, polyml
+, veriT
+, vampire
+, eprover-ho
+, naproche
+, rlwrap
+, perl
+, makeDesktopItem
+, isabelle-components
+, symlinkJoin
+, fetchhg
+}:
 
 let
   sha1 = stdenv.mkDerivation {
@@ -27,9 +44,9 @@ let
       cp libsha1.so $out/lib/
     '';
   };
-in stdenv.mkDerivation rec {
+in stdenv.mkDerivation (finalAttrs: rec {
   pname = "isabelle";
-  version = "2021-1";
+  version = "2022";
 
   dirname = "Isabelle${version}";
 
@@ -39,33 +56,37 @@ in stdenv.mkDerivation rec {
       fetchurl
         {
           url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_macos.tar.gz";
-          sha256 = "0n1ls9vwf0ps1x8zpb7c1xz1wkasgvc34h5bz280hy2z6iqwmwbc";
+          sha256 = "0b84rx9b7b5y8m1sg7xdp17j6yngd2dkx6v5bkd8h7ly102lai18";
         }
-    else
+    else if stdenv.hostPlatform.isx86
+    then
       fetchurl {
         url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz";
-        sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i";
+        sha256 = "1ih4gykkp1an43qdgc5xzyvf30fhs0dah3y0a5ksbmvmjsfnxyp7";
+      }
+    else
+      fetchurl {
+        url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux_arm.tar.gz";
+        hash = "sha256-qI/BR/KZwLjnkO5q/yYeW4lN4xyUe78VOM2INC/Z/io=";
       };
 
-  buildInputs = [ polyml z3 veriT vampire eprover-ho nettools ]
+  nativeBuildInputs = [ java ];
+
+  buildInputs = [ polyml veriT vampire eprover-ho nettools ]
     ++ lib.optionals (!stdenv.isDarwin) [ java ];
 
   sourceRoot = "${dirname}${lib.optionalString stdenv.isDarwin ".app"}";
 
-  postUnpack = if stdenv.isDarwin then ''
+  doCheck = stdenv.hostPlatform.system != "aarch64-linux";
+  checkPhase = "bin/isabelle build -v HOL-SMT_Examples";
+
+  postUnpack = lib.optionalString stdenv.isDarwin ''
     mv $sourceRoot ${dirname}
     sourceRoot=${dirname}
-  '' else null;
+  '';
 
   postPatch = ''
-    patchShebangs .
-
-    cat >contrib/z3*/etc/settings <<EOF
-      Z3_HOME=${z3}
-      Z3_VERSION=${z3.version}
-      Z3_SOLVER=${z3}/bin/z3
-      Z3_INSTALLED=yes
-    EOF
+    patchShebangs lib/Tools/ bin/
 
     cat >contrib/verit-*/etc/settings <<EOF
       ISABELLE_VERIT=${veriT}/bin/veriT
@@ -97,13 +118,15 @@ in stdenv.mkDerivation rec {
       ISABELLE_JDK_HOME=${java}
     EOF
 
+  '' + lib.optionalString stdenv.hostPlatform.isx86 ''
     rm contrib/naproche-*/x86*/Naproche-SAD
     ln -s ${naproche}/bin/Naproche-SAD contrib/naproche-*/x86*/
+  '' + ''
 
     echo ISABELLE_LINE_EDITOR=${rlwrap}/bin/rlwrap >>etc/settings
 
-    for comp in contrib/jdk* contrib/polyml-* contrib/z3-* contrib/verit-* contrib/vampire-* contrib/e-*; do
-      rm -rf $comp/x86*
+    for comp in contrib/jdk* contrib/polyml-* contrib/verit-* contrib/vampire-* contrib/e-*; do
+      rm -rf $comp/${if stdenv.hostPlatform.isx86 then "x86" else "arm"}*
     done
 
     substituteInPlace lib/Tools/env \
@@ -111,7 +134,8 @@ in stdenv.mkDerivation rec {
 
     substituteInPlace src/Tools/Setup/src/Environment.java \
       --replace 'cmd.add("/usr/bin/env");' "" \
-      --replace 'cmd.add("bash");' "cmd.add(\"$SHELL\");"
+      --replace 'cmd.add("bash");' "cmd.add(\"$SHELL\");" \
+      --replace 'private static read_file(path: Path): String =' 'private static String read_file(Path path) throws IOException'
 
     substituteInPlace src/Pure/General/sha1.ML \
       --replace '"$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so")' '"${sha1}/lib/libsha1.so"'
@@ -120,15 +144,19 @@ in stdenv.mkDerivation rec {
   '' + lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") ''
     substituteInPlace lib/scripts/isabelle-platform \
       --replace 'ISABELLE_APPLE_PLATFORM64=arm64-darwin' ""
-  '' + (if ! stdenv.isLinux then "" else ''
-    arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"}
-    for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS,zipperposition}; do
-      patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"
+  '' + lib.optionalString stdenv.isLinux ''
+    arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux"
+           else if stdenv.hostPlatform.isx86 then "x86-linux"
+           else "arm64-linux"}
+    for f in contrib/*/$arch/{z3,epclextract,nunchaku,SPASS,zipperposition}; do
+      patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"${lib.optionalString stdenv.isAarch64 " || true"}
     done
+    patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) contrib/bash_process-*/platform_$arch/bash_process
     for d in contrib/kodkodi-*/jni/$arch; do
       patchelf --set-rpath "${lib.concatStringsSep ":" [ "${java}/lib/openjdk/lib/server" "${stdenv.cc.cc.lib}/lib" ]}" $d/*.so
     done
-  '');
+    patchelf --set-rpath "${stdenv.cc.cc.lib}/lib" contrib/z3-*/$arch/z3
+  '';
 
   buildPhase = ''
     export HOME=$TMP # The build fails if home is not set
@@ -145,11 +173,12 @@ in stdenv.mkDerivation rec {
     do
       ARGS["''${#ARGS[@]}"]="src/Tools/Setup/$SRC"
     done
-    ${java}/bin/javac -d "$TARGET_DIR" -classpath ${scala}/lib/scala-compiler.jar "''${ARGS[@]}"
-    ${java}/bin/jar -c -f "$TARGET_DIR/isabelle_setup.jar" -e "isabelle.setup.Setup" -C "$TARGET_DIR" isabelle
+    echo "Building isabelle setup"
+    javac -d "$TARGET_DIR" -classpath "${scala_3.bare}/lib/scala3-interfaces-${scala_3.version}.jar:${scala_3.bare}/lib/scala3-compiler_3-${scala_3.version}.jar" "''${ARGS[@]}"
+    jar -c -f "$TARGET_DIR/isabelle_setup.jar" -e "isabelle.setup.Setup" -C "$TARGET_DIR" isabelle
     rm -rf "$TARGET_DIR/isabelle"
 
-    # Prebuild HOL Session
+    echo "Building HOL heap"
     bin/isabelle build -v -o system_heaps -b HOL
   '';
 
@@ -194,14 +223,15 @@ in stdenv.mkDerivation rec {
     maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ];
     platforms = platforms.unix;
   };
-} // {
-  withComponents = f:
+
+  passthru.withComponents = f:
     let
+      isabelle = finalAttrs.finalPackage;
       base = "$out/${isabelle.dirname}";
       components = f isabelle-components;
     in symlinkJoin {
       name = "isabelle-with-components-${isabelle.version}";
-      paths = [ isabelle ] ++ components;
+      paths = [ isabelle ] ++ (builtins.map (c: c.override { inherit isabelle; }) components);
 
       postBuild = ''
         rm $out/bin/*
@@ -219,4 +249,4 @@ in stdenv.mkDerivation rec {
         echo contrib/${c.pname}-${c.version} >> ${base}/etc/components
       '') components;
     };
-}
+})
diff --git a/nixpkgs/pkgs/applications/science/logic/kissat/default.nix b/nixpkgs/pkgs/applications/science/logic/kissat/default.nix
index 08be0740117a..48d986cd5f6d 100644
--- a/nixpkgs/pkgs/applications/science/logic/kissat/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/kissat/default.nix
@@ -4,19 +4,18 @@
 
 stdenv.mkDerivation rec {
   pname = "kissat";
-  version = "2.0.1";
+  version = "3.0.0";
 
   src = fetchFromGitHub {
     owner = "arminbiere";
     repo = "kissat";
-    # https://github.com/arminbiere/kissat/issues/18
-    rev = "abfa45fb782fa3b7c6e2eb6b939febe74d7270b7";
-    sha256 = "06pbmkjxgf2idhsrd1yzvbxr2wf8l06pjb38bzbygm6n9ami89b8";
+    rev = "rel-${version}";
+    sha256 = "sha256-C1lvkyYgFNhV7jGVLlrpJ5zZ8SFHg8g+iW1lDczhpBM=";
   };
 
   outputs = [ "out" "dev" "lib" ];
 
-  checkInputs = [ drat-trim p7zip ];
+  nativeCheckInputs = [ drat-trim p7zip ];
   doCheck = true;
 
   # 'make test' assumes that /etc/passwd is not writable.
diff --git a/nixpkgs/pkgs/applications/science/logic/klee/default.nix b/nixpkgs/pkgs/applications/science/logic/klee/default.nix
index ae4b7ee36636..a82d9c51e3be 100644
--- a/nixpkgs/pkgs/applications/science/logic/klee/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/klee/default.nix
@@ -1,9 +1,10 @@
 { lib
+, stdenv
 , callPackage
 , fetchFromGitHub
 , cmake
-, llvmPackages_11
 , clang
+, llvm
 , python3
 , zlib
 , z3
@@ -35,18 +36,14 @@
 }:
 
 let
-
   # Python used for KLEE tests.
   kleePython = python3.withPackages (ps: with ps; [ tabulate ]);
 
   # The klee-uclibc derivation.
   kleeuClibc = callPackage ./klee-uclibc.nix {
-    inherit clang llvmPackages_11 extraKleeuClibcConfig debugRuntime runtimeAsserts;
+    inherit stdenv clang llvm extraKleeuClibcConfig debugRuntime runtimeAsserts;
   };
-
-in
-clang.stdenv.mkDerivation rec {
-
+in stdenv.mkDerivation rec {
   pname = "klee";
   version = "2.3";
 
@@ -61,7 +58,7 @@ clang.stdenv.mkDerivation rec {
     cryptominisat
     gperftools
     lit # Configure phase checking for lit
-    llvmPackages_11.llvm
+    llvm
     sqlite
     stp
     z3
@@ -72,13 +69,13 @@ clang.stdenv.mkDerivation rec {
     cmake
   ];
 
-  checkInputs = [
+  nativeCheckInputs = [
     gtest
 
     # Should appear BEFORE lit, since lit passes through python rather
     # than the python environment we make.
     kleePython
-    (lit.override { python3 = kleePython; })
+    (lit.override { python = kleePython; })
   ];
 
   cmakeFlags = let
@@ -99,7 +96,7 @@ clang.stdenv.mkDerivation rec {
   ];
 
   # Silence various warnings during the compilation of fortified bitcode.
-  NIX_CFLAGS_COMPILE = ["-Wno-macro-redefined"];
+  env.NIX_CFLAGS_COMPILE = toString ["-Wno-macro-redefined"];
 
   prePatch = ''
     patchShebangs .
diff --git a/nixpkgs/pkgs/applications/science/logic/klee/klee-uclibc.nix b/nixpkgs/pkgs/applications/science/logic/klee/klee-uclibc.nix
index a794fe2eee8a..91086ae84627 100644
--- a/nixpkgs/pkgs/applications/science/logic/klee/klee-uclibc.nix
+++ b/nixpkgs/pkgs/applications/science/logic/klee/klee-uclibc.nix
@@ -1,10 +1,11 @@
 { lib
+, stdenv
 , fetchurl
 , fetchFromGitHub
 , which
 , linuxHeaders
 , clang
-, llvmPackages_11
+, llvm
 , python3
 , curl
 , debugRuntime ? true
@@ -23,8 +24,7 @@ let
     "RUNTIME_PREFIX" = "/";
     "DEVEL_PREFIX" = "/";
   });
-in
-clang.stdenv.mkDerivation rec {
+in stdenv.mkDerivation rec {
   pname = "klee-uclibc";
   version = "1.3";
   src = fetchFromGitHub {
@@ -37,7 +37,7 @@ clang.stdenv.mkDerivation rec {
   nativeBuildInputs = [
     clang
     curl
-    llvmPackages_11.llvm
+    llvm
     python3
     which
   ];
diff --git a/nixpkgs/pkgs/applications/science/logic/lean/default.nix b/nixpkgs/pkgs/applications/science/logic/lean/default.nix
index 4cbe6ac14484..d96bf665f2eb 100644
--- a/nixpkgs/pkgs/applications/science/logic/lean/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/lean/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "lean";
-  version = "3.46.0";
+  version = "3.51.0";
 
   src = fetchFromGitHub {
     owner  = "leanprover-community";
@@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
     # from. this is then used to check whether an olean file should be
     # rebuilt. don't use a tag as rev because this will get replaced into
     # src/githash.h.in in preConfigure.
-    rev    = "741670c439f1ca266bc7fe61ef7212cc9afd9dd8";
-    sha256 = "sha256-/4R9i9906e5WQnaKNqUqUyDDIbSW9DNKdGg4rlrvC6c=";
+    rev    = "9fc1dee97a72a3e34d658aefb4b8a95ecd3d477c";
+    hash   = "sha256-Vcsph4dTNLafeaTtVwJS8tWoWCgcP6pxF0ssZDE/YfM=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/applications/science/logic/leo2/default.nix b/nixpkgs/pkgs/applications/science/logic/leo2/default.nix
index cbc85c5544cc..a72444adbba0 100644
--- a/nixpkgs/pkgs/applications/science/logic/leo2/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/leo2/default.nix
@@ -9,8 +9,10 @@ stdenv.mkDerivation rec {
     sha256 = "sha256:1b2q7vsz6s9ighypsigqjm1mzjiq3xgnz5id5ssb4rh9zm190r82";
   };
 
-  nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ eprover ocaml camlp4 perl zlib ];
+  strictDeps = true;
+
+  nativeBuildInputs = [ makeWrapper eprover ocaml camlp4 perl ];
+  buildInputs = [ zlib ];
 
   patches = [ (fetchpatch {
       url = "https://github.com/niklasso/minisat/commit/7eb6015313561a2586032574788fcb133eeaa19f.patch";
@@ -29,6 +31,8 @@ stdenv.mkDerivation rec {
 
   buildFlags = [ "opt" ];
 
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-reserved-user-defined-literal";
+
   preInstall = "mkdir -p $out/bin";
 
   postInstall = ''
@@ -42,7 +46,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "A high-performance typed higher order prover";
     maintainers = [ maintainers.raskin ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     license = licenses.bsd3;
     homepage = "http://www.leoprover.org/";
   };
diff --git a/nixpkgs/pkgs/applications/science/logic/logisim-evolution/default.nix b/nixpkgs/pkgs/applications/science/logic/logisim-evolution/default.nix
index 9650d97814bf..affbfc170b90 100644
--- a/nixpkgs/pkgs/applications/science/logic/logisim-evolution/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/logisim-evolution/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "logisim-evolution";
-  version = "3.7.2";
+  version = "3.8.0";
 
   src = fetchurl {
     url = "https://github.com/logisim-evolution/logisim-evolution/releases/download/v${version}/logisim-evolution-${version}-all.jar";
-    sha256 = "sha256-RI+ioOHj13UAGuPzseAAy3oQBQYkja/ucjj4QMeRZhw=";
+    sha256 = "sha256-TFm+fa3CMp0OMhnKBc6cLIWGQbIG/OpOOCG7ea7wbCw=";
   };
 
   dontUnpack = true;
diff --git a/nixpkgs/pkgs/applications/science/logic/mcy/default.nix b/nixpkgs/pkgs/applications/science/logic/mcy/default.nix
index dc1094f3e27d..343b50dfd7ef 100644
--- a/nixpkgs/pkgs/applications/science/logic/mcy/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/mcy/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub
-, yosys, symbiyosys, python3
+, yosys, python3
 }:
 
 let
diff --git a/nixpkgs/pkgs/applications/science/logic/metis-prover/default.nix b/nixpkgs/pkgs/applications/science/logic/metis-prover/default.nix
index fca3c20cd853..5b17403dc7f4 100644
--- a/nixpkgs/pkgs/applications/science/logic/metis-prover/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/metis-prover/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Automatic theorem prover for first-order logic with equality";
-    homepage = "http://www.gilith.com/research/metis/";
+    homepage = "https://www.gilith.com/research/metis/";
     license = licenses.mit;
     maintainers = with maintainers; [ gebner ];
     platforms = platforms.unix;
diff --git a/nixpkgs/pkgs/applications/science/logic/monosat/default.nix b/nixpkgs/pkgs/applications/science/logic/monosat/default.nix
index 2709b16c5770..5b894d2c9376 100644
--- a/nixpkgs/pkgs/applications/science/logic/monosat/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/monosat/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchpatch, fetchFromGitHub, cmake, zlib, gmp, jdk8,
-  # The JDK we use on Darwin currenly makes extensive use of rpaths which are
+  # The JDK we use on Darwin currently makes extensive use of rpaths which are
   # annoying and break the python library, so let's not bother for now
   includeJava ? !stdenv.hostPlatform.isDarwin, includeGplCode ? true }:
 
@@ -89,7 +89,7 @@ let
         --replace 'library_dir = "../../../../"' 'library_dir = "${core}/lib/"'
     '';
 
-    checkInputs = [ pytestCheckHook ];
+    nativeCheckInputs = [ pytestCheckHook ];
 
     disabledTests = [
       "test_assertAtMostOne"
diff --git a/nixpkgs/pkgs/applications/science/logic/naproche/default.nix b/nixpkgs/pkgs/applications/science/logic/naproche/default.nix
index 047ed73262ee..ecc347080081 100644
--- a/nixpkgs/pkgs/applications/science/logic/naproche/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/naproche/default.nix
@@ -2,13 +2,13 @@
 
 with haskellPackages; mkDerivation {
   pname = "Naproche-SAD";
-  version = "2022-04-19";
+  version = "2022-10-24";
 
   src = fetchFromGitHub {
     owner = "naproche";
     repo = "naproche";
-    rev = "2514c04e715395b7a839e11b63046eafb9c6a1da";
-    sha256 = "1bdgyk4fk65xi7n778rbgddpg4zhggj8wjslxbizrzi81my9a3vm";
+    rev = "c8c4ca2d5fdb92bf17e0e54c99bd2a9691255d80";
+    sha256 = "0xvh6kkl5k5ygp2nrbq3k0snvzczbmcp1yrwdkah3fzhf9i3yykx";
   };
 
   isExecutable = true;
diff --git a/nixpkgs/pkgs/applications/science/logic/nusmv/default.nix b/nixpkgs/pkgs/applications/science/logic/nusmv/default.nix
new file mode 100644
index 000000000000..d3e3dc998cc0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/nusmv/default.nix
@@ -0,0 +1,37 @@
+{ stdenv
+, lib
+, fetchurl
+, autoPatchelfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "NuSMV";
+  version = "2.6.0";
+
+  src = with stdenv; fetchurl (
+    if isx86_64 && isLinux then {
+      url = "https://nusmv.fbk.eu/distrib/NuSMV-${version}-linux64.tar.gz";
+      sha256 = "1370x2vwjndv9ham5q399nn84hvhm1gj1k7pq576qmh4pi12xc8i";
+    } else if isx86_32 && isLinux then {
+      url = "https://nusmv.fbk.eu/distrib/NuSMV-${version}-linux32.tar.gz";
+      sha256 = "1qf41czwbqxlrmv0rv2daxgz2hljza5xks85sx3dhwpjy2iav9jb";
+    } else throw "only linux x86_64 and x86_32 are currently supported") ;
+
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  installPhase = ''
+    install -m755 -D bin/NuSMV $out/bin/NuSMV
+    install -m755 -D bin/ltl2smv $out/bin/ltl2smv
+    cp -r include $out/include
+    cp -r share $out/share
+  '';
+
+  meta = with lib; {
+    description = "A new symbolic model checker for the analysis of synchronous finite-state and infinite-state systems";
+    homepage = "https://nuxmv.fbk.eu/pmwiki.php";
+    maintainers = with maintainers; [ mgttlinger ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/logic/opensmt/default.nix b/nixpkgs/pkgs/applications/science/logic/opensmt/default.nix
index 6ab52ff9aa79..28fd83236845 100644
--- a/nixpkgs/pkgs/applications/science/logic/opensmt/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/opensmt/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "opensmt";
-  version = "2.4.1";
+  version = "2.5.1";
 
   src = fetchFromGitHub {
     owner = "usi-verification-and-security";
     repo = "opensmt";
     rev = "v${version}";
-    sha256 = "sha256-Hy+NCR0gbU06WnfIyKy6XTH94vd0CevwGbZ7KlXVvIQ=";
+    sha256 = "sha256-XwrhqxDunao4uyUyBhDgGdMjRlmetke77Zmb7za+Aes=";
   };
 
   nativeBuildInputs = [ cmake bison flex ];
diff --git a/nixpkgs/pkgs/applications/science/logic/ott/default.nix b/nixpkgs/pkgs/applications/science/logic/ott/default.nix
index 4b7166ad9986..a00c565fb4e0 100644
--- a/nixpkgs/pkgs/applications/science/logic/ott/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/ott/default.nix
@@ -1,18 +1,21 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, ocaml, opaline }:
+{ lib, stdenv, fetchFromGitHub, pkg-config, ocamlPackages, opaline }:
 
 stdenv.mkDerivation rec {
   pname = "ott";
-  version = "0.32";
+  version = "0.33";
 
   src = fetchFromGitHub {
     owner = "ott-lang";
     repo = "ott";
     rev = version;
-    sha256 = "sha256-vdDsfsIi1gRW1Sowf29VyQ4C5UKyQZaVgS2uTb8VeW4=";
+    hash = "sha256-GzeEiok5kigcmfqf/K/UxvlKkl55zy0vOyiRZ2HyMiE=";
   };
 
-  nativeBuildInputs = [ pkg-config opaline ];
-  buildInputs = [ ocaml ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ pkg-config opaline ] ++ (with ocamlPackages; [ findlib ocaml ]);
+  buildInputs = with ocamlPackages; [ ocamlgraph ];
 
   installTargets = "ott.install";
 
diff --git a/nixpkgs/pkgs/applications/science/logic/petrinizer/default.nix b/nixpkgs/pkgs/applications/science/logic/petrinizer/default.nix
index e28137dde75b..9fd20e3ed4af 100644
--- a/nixpkgs/pkgs/applications/science/logic/petrinizer/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/petrinizer/default.nix
@@ -1,7 +1,6 @@
 { mkDerivation
 , async, base, bytestring, containers, fetchFromGitLab, mtl
-, parallel-io, parsec, lib, stm, transformers, sbv_7_13, z3
-}:
+, parallel-io, parsec, lib, stm, transformers, sbv_7_13}:
 
 mkDerivation rec {
   pname = "petrinizer";
@@ -25,4 +24,8 @@ mkDerivation rec {
   license = lib.licenses.gpl3;
   maintainers = with lib.maintainers; [ raskin ];
   inherit (sbv_7_13.meta) platforms;
+
+  # dependency sbv no longer builds
+  hydraPlatforms = lib.platforms.none;
+  broken = true;
 }
diff --git a/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix b/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix
index 2238e490a603..e024ffb9364e 100644
--- a/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix
+++ b/nixpkgs/pkgs/applications/science/logic/potassco/clingcon.nix
@@ -7,19 +7,15 @@
 
 stdenv.mkDerivation rec {
   pname = "clingcon";
-  version = "5.0.0";
+  version = "5.2.0";
 
   src = fetchFromGitHub {
     owner = "potassco";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1g2xkz9nsgqnrw3fdf5jchl16f0skj5mm32va61scc2yrchll166";
+    sha256 = "sha256-wZfTneoQSqEnLAVE8WyPh9EABmOEhDgRm6yWAF1T7Nk=";
    };
 
-  patches = [
-    ./clingcon_limits.patch
-  ];
-
   postPatch = ''
     cp ${catch2}/include/catch2/catch.hpp libclingcon/tests/catch.hpp
   '';
diff --git a/nixpkgs/pkgs/applications/science/logic/potassco/clingcon_limits.patch b/nixpkgs/pkgs/applications/science/logic/potassco/clingcon_limits.patch
deleted file mode 100644
index 0343e10e2112..000000000000
--- a/nixpkgs/pkgs/applications/science/logic/potassco/clingcon_limits.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git i/libclingcon/clingcon/base.hh w/libclingcon/clingcon/base.hh
-index 2d449fe..0b5fa17 100644
---- i/libclingcon/clingcon/base.hh
-+++ w/libclingcon/clingcon/base.hh
-@@ -28,6 +28,7 @@
- #include <clingo.hh>
- #include <optional>
- #include <forward_list>
-+#include <limits>
- 
- //! @file clingcon/base.hh
- //! Basic data types.
-diff --git i/libclingcon/clingcon/util.hh w/libclingcon/clingcon/util.hh
-index df4cddd..308259e 100644
---- i/libclingcon/clingcon/util.hh
-+++ w/libclingcon/clingcon/util.hh
-@@ -30,6 +30,7 @@
- #include <map>
- #include <cstdlib>
- #include <stdexcept>
-+#include <limits>
- 
- //! @file clingcon/util.hh
- //! Very general utility functions.
diff --git a/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix b/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix
index 41c5eb5733e5..a3c324d0dbb8 100644
--- a/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix
+++ b/nixpkgs/pkgs/applications/science/logic/potassco/clingo.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "clingo";
-  version = "5.5.2";
+  version = "5.6.2";
 
   src = fetchFromGitHub {
     owner = "potassco";
     repo = "clingo";
     rev = "v${version}";
-    sha256 = "sha256-fBf7MRFkd5SfHDQ5OvWx4lP/N716SrF9uY4JF7SiWRk=";
+    sha256 = "sha256-2vOscD5jengY3z9gHoY9y9y6RLfdzUj7BNKLyppNRac=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/nixpkgs/pkgs/applications/science/logic/prooftree/default.nix b/nixpkgs/pkgs/applications/science/logic/prooftree/default.nix
index 2606b94f4bbb..4e65c018d1a2 100644
--- a/nixpkgs/pkgs/applications/science/logic/prooftree/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/prooftree/default.nix
@@ -9,9 +9,10 @@ stdenv.mkDerivation rec {
     sha256 = "0z1z4wqbqwgppkh2bm89fgy07a0y2m6g4lvcyzs09sm1ysklk2dh";
   };
 
-  nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ ncurses ] ++ (with ocamlPackages; [
-    ocaml findlib camlp5 lablgtk ]);
+  strictDeps = true;
+
+  nativeBuildInputs = [ pkg-config ] ++ (with ocamlPackages; [ ocaml findlib camlp5 ]);
+  buildInputs = [ ncurses ] ++ (with ocamlPackages; [ lablgtk ]);
 
   dontAddPrefix = true;
   configureFlags = [ "--prefix" "$(out)" ];
diff --git a/nixpkgs/pkgs/applications/science/logic/prover9/default.nix b/nixpkgs/pkgs/applications/science/logic/prover9/default.nix
index aa01469bfbb8..5c476be06e4e 100644
--- a/nixpkgs/pkgs/applications/science/logic/prover9/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/prover9/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     homepage = "https://www.cs.unm.edu/~mccune/mace4/";
-    license = licenses.gpl1;
+    license = licenses.gpl2Only;
     description = "Automated theorem prover for first-order and equational logic";
     longDescription = ''
       Prover9 is a resolution/paramodulation automated theorem prover
diff --git a/nixpkgs/pkgs/applications/science/logic/proverif/default.nix b/nixpkgs/pkgs/applications/science/logic/proverif/default.nix
index b6d15162fec3..57220aa523cf 100644
--- a/nixpkgs/pkgs/applications/science/logic/proverif/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/proverif/default.nix
@@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "sha256:0xgwnp59779xc40sb7ck8rmfn620pilxyq79l3bymj9m7z0mwvm9";
   };
 
-  buildInputs = with ocamlPackages; [ ocaml findlib ];
+  strictDeps = true;
+
+  nativeBuildInputs = with ocamlPackages; [ ocaml findlib ];
 
   buildPhase = "./build -nointeract";
   installPhase = ''
diff --git a/nixpkgs/pkgs/applications/science/logic/sad/default.nix b/nixpkgs/pkgs/applications/science/logic/sad/default.nix
deleted file mode 100644
index a509d70ed462..000000000000
--- a/nixpkgs/pkgs/applications/science/logic/sad/default.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ lib, stdenv, fetchurl, haskell, spass }:
-
-stdenv.mkDerivation rec {
-  pname = "system-for-automated-deduction";
-  version = "2.3.25";
-  src = fetchurl {
-    url = "http://nevidal.org/download/sad-${version}.tar.gz";
-    sha256 = "10jd93xgarik7xwys5lq7fx4vqp7c0yg1gfin9cqfch1k1v8ap4b";
-  };
-  buildInputs = [ haskell.compiler.ghc844 spass ];
-  patches = [
-    ./patch.patch
-    # Since the LTS 12.0 update, <> is an operator in Prelude, colliding with
-    # the <> operator with a different meaning defined by this package
-    ./monoid.patch
-  ];
-  postPatch = ''
-    substituteInPlace Alice/Main.hs --replace init.opt $out/init.opt
-  '';
-  installPhase = ''
-    mkdir -p $out/{bin,provers}
-    install alice $out/bin
-    install provers/moses $out/provers
-    substituteAll provers/provers.dat $out/provers/provers.dat
-    substituteAll init.opt $out/init.opt
-    cp -r examples $out
-  '';
-  inherit spass;
-  meta = {
-    description = "A program for automated proving of mathematical texts";
-    longDescription = ''
-      The system for automated deduction is intended for automated processing of formal mathematical texts
-      written in a special language called ForTheL (FORmal THEory Language) or in a traditional first-order language
-    '';
-    license = lib.licenses.gpl3Plus;
-    maintainers = [ lib.maintainers.schmitthenner ];
-    homepage = "http://nevidal.org/sad.en.html";
-    platforms = lib.platforms.linux;
-    broken = true; # ghc-8.4.4 is gone from Nixpkgs
-  };
-}
diff --git a/nixpkgs/pkgs/applications/science/logic/sad/monoid.patch b/nixpkgs/pkgs/applications/science/logic/sad/monoid.patch
deleted file mode 100644
index da9c21bcae91..000000000000
--- a/nixpkgs/pkgs/applications/science/logic/sad/monoid.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff --git a/Alice/Core/Check.hs b/Alice/Core/Check.hs
-index 0700fa0388f..69815864710 100644
---- a/Alice/Core/Check.hs
-+++ b/Alice/Core/Check.hs
-@@ -18,8 +18,12 @@
-  -  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-  -}
- 
-+{-# LANGUAGE NoImplicitPrelude #-}
-+
- module Alice.Core.Check (fillDef) where
- 
-+import Prelude hiding ((<>))
-+
- import Control.Monad
- import Data.Maybe
- 
-diff --git a/Alice/Core/Reason.hs b/Alice/Core/Reason.hs
-index c361bcf220d..4e493d8c91b 100644
---- a/Alice/Core/Reason.hs
-+++ b/Alice/Core/Reason.hs
-@@ -17,9 +17,12 @@
-  -  You should have received a copy of the GNU General Public License
-  -  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-  -}
-+{-# LANGUAGE NoImplicitPrelude #-}
- 
- module Alice.Core.Reason where
- 
-+import Prelude hiding ((<>))
-+
- import Control.Monad
- 
- import Alice.Core.Base
-diff --git a/Alice/Core/Verify.hs b/Alice/Core/Verify.hs
-index 4f8550bdf11..0f59d135b16 100644
---- a/Alice/Core/Verify.hs
-+++ b/Alice/Core/Verify.hs
-@@ -18,8 +18,12 @@
-  -  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-  -}
- 
-+{-# LANGUAGE NoImplicitPrelude #-}
-+
- module Alice.Core.Verify (verify) where
- 
-+import Prelude hiding ((<>))
-+
- import Control.Monad
- import Data.IORef
- import Data.Maybe
diff --git a/nixpkgs/pkgs/applications/science/logic/sad/patch.patch b/nixpkgs/pkgs/applications/science/logic/sad/patch.patch
deleted file mode 100644
index a5b1d6177083..000000000000
--- a/nixpkgs/pkgs/applications/science/logic/sad/patch.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-diff -aur serious/sad-2.3-25/Alice/Core/Base.hs sad-2.3-25/Alice/Core/Base.hs
---- serious/sad-2.3-25/Alice/Core/Base.hs	2008-03-29 18:24:12.000000000 +0000
-+++ sad-2.3-25/Alice/Core/Base.hs	2015-11-27 06:38:28.740840823 +0000
-@@ -21,6 +21,7 @@
- module Alice.Core.Base where
- 
- import Control.Monad
-+import Control.Applicative
- import Data.IORef
- import Data.List
- import Data.Time
-@@ -61,10 +62,21 @@
- type CRMC a b = IORef RState -> IO a -> (b -> IO a) -> IO a
- newtype CRM b = CRM { runCRM :: forall a . CRMC a b }
- 
-+instance Functor CRM where
-+  fmap = liftM
-+  
-+instance Applicative CRM where
-+  pure = return
-+  (<*>) = ap
-+
- instance Monad CRM where
-   return r  = CRM $ \ _ _ k -> k r
-   m >>= n   = CRM $ \ s z k -> runCRM m s z (\ r -> runCRM (n r) s z k)
- 
-+instance Alternative CRM where
-+  (<|>) = mplus
-+  empty = mzero
-+  
- instance MonadPlus CRM where
-   mzero     = CRM $ \ _ z _ -> z
-   mplus m n = CRM $ \ s z k -> runCRM m s (runCRM n s z k) k
-diff -aur serious/sad-2.3-25/Alice/Core/Thesis.hs sad-2.3-25/Alice/Core/Thesis.hs
---- serious/sad-2.3-25/Alice/Core/Thesis.hs	2008-03-05 13:10:50.000000000 +0000
-+++ sad-2.3-25/Alice/Core/Thesis.hs	2015-11-27 06:35:08.311015166 +0000
-@@ -21,6 +21,7 @@
- module Alice.Core.Thesis (thesis) where
- 
- import Control.Monad
-+import Control.Applicative
- import Data.List
- import Data.Maybe
- 
-@@ -126,11 +127,22 @@
- 
- newtype TM res = TM { runTM :: [String] -> [([String], res)] }
- 
-+instance Functor TM where
-+  fmap = liftM
-+
-+instance Applicative TM where
-+  pure = return
-+  (<*>) = ap
-+
- instance Monad TM where
-   return r  = TM $ \ s -> [(s, r)]
-   m >>= k   = TM $ \ s -> concatMap apply (runTM m s)
-     where apply (s, r) = runTM (k r) s
- 
-+instance Alternative TM where
-+  (<|>) = mplus
-+  empty = mzero
-+    
- instance MonadPlus TM where
-   mzero     = TM $ \ _ -> []
-   mplus m k = TM $ \ s -> runTM m s ++ runTM k s
-diff -aur serious/sad-2.3-25/Alice/Export/Base.hs sad-2.3-25/Alice/Export/Base.hs
---- serious/sad-2.3-25/Alice/Export/Base.hs	2008-03-09 09:36:39.000000000 +0000
-+++ sad-2.3-25/Alice/Export/Base.hs	2015-11-27 06:32:47.782738005 +0000
-@@ -39,7 +39,7 @@
- -- Database reader
- 
- readPrDB :: String -> IO [Prover]
--readPrDB file = do  inp <- catch (readFile file) $ die . ioeGetErrorString
-+readPrDB file = do  inp <- catchIOError (readFile file) $ die . ioeGetErrorString
- 
-                     let dws = dropWhile isSpace
-                         cln = reverse . dws . reverse . dws
-diff -aur serious/sad-2.3-25/Alice/Export/Prover.hs sad-2.3-25/Alice/Export/Prover.hs
---- serious/sad-2.3-25/Alice/Export/Prover.hs	2008-03-09 09:36:39.000000000 +0000
-+++ sad-2.3-25/Alice/Export/Prover.hs	2015-11-27 06:36:47.632919161 +0000
-@@ -60,7 +60,7 @@
-       when (askIB IBPdmp False ins) $ putStrLn tsk
- 
-       seq (length tsk) $ return $
--        do  (wh,rh,eh,ph) <- catch run
-+        do  (wh,rh,eh,ph) <- catchIOError run
-                 $ \ e -> die $ "run error: " ++ ioeGetErrorString e
- 
-             hPutStrLn wh tsk ; hClose wh
-diff -aur serious/sad-2.3-25/Alice/ForTheL/Base.hs sad-2.3-25/Alice/ForTheL/Base.hs
---- serious/sad-2.3-25/Alice/ForTheL/Base.hs	2008-03-09 09:36:39.000000000 +0000
-+++ sad-2.3-25/Alice/ForTheL/Base.hs	2015-11-27 06:31:51.921230428 +0000
-@@ -226,7 +226,7 @@
- varlist = do  vs <- chainEx (char ',') var
-               nodups vs ; return vs
- 
--nodups vs = unless (null $ dups vs) $
-+nodups vs = unless ((null :: [a] -> Bool) $ dups vs) $
-               fail $ "duplicate names: " ++ show vs
- 
- hidden  = askPS psOffs >>= \ n -> return ('h':show n)
-diff -aur serious/sad-2.3-25/Alice/Import/Reader.hs sad-2.3-25/Alice/Import/Reader.hs
---- serious/sad-2.3-25/Alice/Import/Reader.hs	2008-03-09 09:36:39.000000000 +0000
-+++ sad-2.3-25/Alice/Import/Reader.hs	2015-11-27 06:36:41.818866167 +0000
-@@ -24,7 +24,7 @@
- import Control.Monad
- import System.IO
- import System.IO.Error
--import System.Exit
-+import System.Exit hiding (die)
- 
- import Alice.Data.Text
- import Alice.Data.Instr
-@@ -44,7 +44,7 @@
- readInit ""   = return []
- 
- readInit file =
--  do  input <- catch (readFile file) $ die file . ioeGetErrorString
-+  do  input <- catchIOError (readFile file) $ die file . ioeGetErrorString
-       let tkn = tokenize input ; ips = initPS ()
-           inp = ips { psRest = tkn, psFile = file, psLang = "Init" }
-       liftM fst $ fireLPM instf inp
-@@ -74,7 +74,7 @@
- reader lb fs (ps:ss) [TI (InStr ISfile file)] =
-   do  let gfl = if null file  then hGetContents stdin
-                               else readFile file
--      input <- catch gfl $ die file . ioeGetErrorString
-+      input <- catchIOError gfl $ die file . ioeGetErrorString
-       let tkn = tokenize input
-           ips = initPS $ (psProp ps) { tvr_expr = [] }
-           sps = ips { psRest = tkn, psFile = file, psOffs = psOffs ps }
-diff -aur serious/sad-2.3-25/Alice/Parser/Base.hs sad-2.3-25/Alice/Parser/Base.hs
---- serious/sad-2.3-25/Alice/Parser/Base.hs	2008-03-09 09:36:40.000000000 +0000
-+++ sad-2.3-25/Alice/Parser/Base.hs	2015-11-27 06:14:28.616734527 +0000
-@@ -20,6 +20,7 @@
- 
- module Alice.Parser.Base where
- 
-+import Control.Applicative
- import Control.Monad
- import Data.List
- 
-@@ -45,11 +46,22 @@
- type CPMC a b c = (c -> CPMS a b) -> (String -> CPMS a b) -> CPMS a b
- newtype CPM a c = CPM { runCPM :: forall b . CPMC a b c }
- 
-+instance Functor (CPM a) where
-+  fmap = liftM
-+
-+instance Applicative (CPM a) where
-+  pure = return
-+  (<*>) = ap
-+
- instance Monad (CPM a) where
-   return r  = CPM $ \ k _ -> k r
-   m >>= n   = CPM $ \ k l -> runCPM m (\ b -> runCPM (n b) k l) l
-   fail e    = CPM $ \ _ l -> l e
- 
-+instance Alternative (CPM a) where
-+    (<|>) = mplus
-+    empty = mzero
-+  
- instance MonadPlus (CPM a) where
-   mzero     = CPM $ \ _ _ _ z -> z
-   mplus m n = CPM $ \ k l s -> runCPM m k l s . runCPM n k l s
-diff -aur serious/sad-2.3-25/init.opt sad-2.3-25/init.opt
---- serious/sad-2.3-25/init.opt	2007-10-11 15:25:45.000000000 +0000
-+++ sad-2.3-25/init.opt	2015-11-27 07:23:41.372816854 +0000
-@@ -1,6 +1,6 @@
- # Alice init options
--[library examples]
--[provers provers/provers.dat]
-+[library @out@/examples]
-+[provers @out@/provers/provers.dat]
- [prover spass]
- [timelimit 3]
- [depthlimit 7]
-diff -aur serious/sad-2.3-25/provers/provers.dat sad-2.3-25/provers/provers.dat
---- serious/sad-2.3-25/provers/provers.dat	2008-08-26 21:20:25.000000000 +0000
-+++ sad-2.3-25/provers/provers.dat	2015-11-27 07:24:18.878169702 +0000
-@@ -3,7 +3,7 @@
- Pmoses
- LMoses
- Fmoses
--Cprovers/moses
-+C@out@/provers/moses
- Yproved in
- Nfound unprovable in
- Utimeout in
-@@ -12,7 +12,7 @@
- Pspass
- LSPASS
- Fdfg
--Cprovers/SPASS -CNFOptSkolem=0 -PProblem=0 -PGiven=0 -Stdin -TimeLimit=%d
-+C@spass@/bin/SPASS -CNFOptSkolem=0 -PProblem=0 -PGiven=0 -Stdin -TimeLimit=%d
- YSPASS beiseite: Proof found.
- NSPASS beiseite: Completion found.
- USPASS beiseite: Ran out of time.
diff --git a/nixpkgs/pkgs/applications/science/logic/satallax/default.nix b/nixpkgs/pkgs/applications/science/logic/satallax/default.nix
index 7a523bbf24ef..af11cd0d6d8f 100644
--- a/nixpkgs/pkgs/applications/science/logic/satallax/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/satallax/default.nix
@@ -1,10 +1,13 @@
-{lib, stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq}:
+{ lib, stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq }:
 stdenv.mkDerivation rec {
   pname = "satallax";
   version = "2.7";
 
-  nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ocaml zlib which eprover coq];
+  strictDeps = true;
+
+  nativeBuildInputs = [ makeWrapper ocaml which eprover coq ];
+  buildInputs = [ zlib ];
+
   src = fetchurl {
     url = "https://www.ps.uni-saarland.de/~cebrown/satallax/downloads/${pname}-${version}.tar.gz";
     sha256 = "1kvxn8mc35igk4vigi5cp7w3wpxk2z3bgwllfm4n3h2jfs0vkpib";
@@ -15,6 +18,10 @@ stdenv.mkDerivation rec {
     ./fix-declaration-gcc9.patch
   ];
 
+  prePatch = ''
+    patch -p1 -i ${../avy/minisat-fenv.patch} -d minisat
+  '';
+
   preConfigure = ''
     mkdir fake-tools
     echo "echo 'Nix-build-host.localdomain'" > fake-tools/hostname
@@ -41,7 +48,8 @@ stdenv.mkDerivation rec {
     )
   '';
 
-  postBuild = "echo testing; ! (bash ./test | grep ERROR)";
+  # error: invalid suffix on literal; C++11 requires a space between literal and identifier
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-reserved-user-defined-literal";
 
   installPhase = ''
     mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax"
@@ -59,11 +67,22 @@ stdenv.mkDerivation rec {
     cp -r coq* "$out/lib/satallax/"
   '';
 
+  doCheck = stdenv.isLinux;
+
+  checkPhase = ''
+    runHook preCheck
+    if bash ./test | grep ERROR; then
+      echo "Tests failed"
+      exit 1
+    fi
+    runHook postCheck
+  '';
+
   meta = {
     description = "Automated theorem prover for higher-order logic";
-    license = lib.licenses.mit ;
-    maintainers = [lib.maintainers.raskin];
-    platforms = lib.platforms.linux;
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.raskin ];
+    platforms = lib.platforms.unix;
     downloadPage = "http://www.ps.uni-saarland.de/~cebrown/satallax/downloads.php";
     homepage = "http://www.ps.uni-saarland.de/~cebrown/satallax/index.php";
   };
diff --git a/nixpkgs/pkgs/applications/science/logic/sharpsat-td/default.nix b/nixpkgs/pkgs/applications/science/logic/sharpsat-td/default.nix
new file mode 100644
index 000000000000..2f2128d542f1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/sharpsat-td/default.nix
@@ -0,0 +1,83 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchzip
+, cmake
+, gmp
+, mpfr
+}:
+
+let
+  satlib-bmc = fetchzip {
+    url = "https://www.cs.ubc.ca/~hoos/SATLIB/Benchmarks/SAT/BMC/bmc.tar.gz";
+    stripRoot = false;
+    sha256 = "sha256-F1Jfrj4iMMf/3LFCShIDMs4JfLkJ51Z4wkL1FDT9b/A=";
+  };
+
+  # needed for mpfr 4.2.0+ support
+  mpreal = fetchFromGitHub {
+    owner = "advanpix";
+    repo = "mpreal";
+    rev = "mpfrc++-3.6.9";
+    sha256 = "sha256-l61SKEx4pBocADrEGPVacQ6F2ep9IuvNZ8W08dKeZKg=";
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "sharpsat-td";
+  version = "unstable-2021-09-05";
+
+  src = fetchFromGitHub {
+    owner = "Laakeri";
+    repo = pname;
+    rev = "b9bb015305ea5d4e1ac7141691d0fe55ca983d31";
+    sha256 = "sha256-FE+DUd58eRr5w9RFw0fMHfjIiNDWIcG7XbyWJ/pI28U=";
+  };
+
+  postPatch = ''
+    # just say no to bundled binaries
+    rm bin/*
+
+    # ensure resultant build calls its own binaries
+    substituteInPlace src/decomposition.cpp \
+      --replace '"../../../flow-cutter-pace17/flow_cutter_pace17"' '"'"$out"'/bin/flow_cutter_pace17"'
+    substituteInPlace src/preprocessor/treewidth.cpp \
+      --replace '"./flow_cutter_pace17"' '"'"$out"'/bin/flow_cutter_pace17"'
+
+    # replace bundled version of mpreal/mpfrc++
+    rm -r src/mpfr
+    cp -r ${mpreal} src/mpfr
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ gmp mpfr ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    install -Dm755 sharpSAT $out/bin/sharpSAT-td
+    install -Dm755 flow_cutter_pace17 $out/bin/flow_cutter_pace17
+
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    # "correct" answer from https://sites.google.com/site/marcthurley/sharpsat/benchmarks/collected-model-counts
+    $out/bin/sharpSAT-td -decot 1 -decow 100 -cs 3500 -tmpdir "$TMPDIR" \
+      ${satlib-bmc}/bmc-ibm-1.cnf | grep -F 'c s exact arb int 7333984412904350856728851870196181665291102236046537207120878033973328441091390427157620940515935993557837912658856672133150412904529478729364681871717139154252602322050981277183916105207406949425074710972297902317183503443350157267211568852295978718386711142950559533715161449971311118966214098944000'
+
+    runHook postInstallCheck
+  '';
+
+  meta = {
+    description = "A fast solver for the #SAT model counting problem";
+    homepage = "https://github.com/Laakeri/sharpsat-td";
+    license = with lib.licenses; [ mit asl20 ];
+    maintainers = with lib.maintainers; [ ris ];
+    # uses clhash, which is non-portable
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/logic/statverif/default.nix b/nixpkgs/pkgs/applications/science/logic/statverif/default.nix
index 07365eef33fa..1f6238977551 100644
--- a/nixpkgs/pkgs/applications/science/logic/statverif/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/statverif/default.nix
@@ -14,7 +14,9 @@ stdenv.mkDerivation rec {
     sha256 = "113jjhi1qkcggbsmbw8fa9ln8vs7vy2r288szks7rn0jjn0wxmbw";
   };
 
-  buildInputs = [ ocaml ];
+  strictDeps = true;
+
+  nativeBuildInputs = [ ocaml ];
 
   patchPhase = "patch -p1 < ${pf-patch}";
   buildPhase = "./build";
diff --git a/nixpkgs/pkgs/applications/science/logic/surelog/default.nix b/nixpkgs/pkgs/applications/science/logic/surelog/default.nix
new file mode 100644
index 000000000000..3b88ff3403e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/surelog/default.nix
@@ -0,0 +1,72 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+, pkg-config
+, libuuid
+, openjdk
+, gperftools
+, gtest
+, uhdm
+, antlr4
+, flatbuffers
+, capnproto
+}:
+
+stdenv.mkDerivation rec {
+  pname = "surelog";
+  version = "1.57";
+
+  src = fetchFromGitHub {
+    owner = "chipsalliance";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-Gty0OSNG5Nonyw7v2KiKP51LhiugMY7uqI6aJ6as0SQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    openjdk
+    (python3.withPackages (p: with p; [
+      psutil
+      orderedmultidict
+    ]))
+    gtest
+    antlr4
+  ];
+
+  buildInputs = [
+    libuuid
+    gperftools
+    flatbuffers
+    uhdm
+    capnproto
+    antlr4.runtime.cpp
+  ];
+
+  cmakeFlags = [
+    "-DSURELOG_USE_HOST_FLATBUFFERS=On"
+    "-DSURELOG_USE_HOST_UHDM=On"
+    "-DSURELOG_USE_HOST_GTEST=On"
+    "-DSURELOG_USE_HOST_ANTLR=On"
+    "-DANTLR_JAR_LOCATION=${antlr4.jarLocation}"
+  ];
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+    make -j $NIX_BUILD_CORES UnitTests
+    ctest --output-on-failure
+    runHook postCheck
+  '';
+
+  meta = {
+    description = "SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler";
+    homepage = "https://github.com/chipsalliance/Surelog";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ matthuszagh ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix b/nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix
index ffc61ed1d03b..19c021684b3f 100644
--- a/nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/symbiyosys/default.nix
@@ -48,7 +48,7 @@ stdenv.mkDerivation {
   '';
 
   doCheck = false; # not all provers are yet packaged...
-  checkInputs = [ python3 yosys boolector yices z3 aiger ];
+  nativeCheckInputs = [ python3 yosys boolector yices z3 aiger ];
   checkPhase = "make test";
 
   meta = {
diff --git a/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix b/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix
index 02e60b398c38..d5d6512c734a 100644
--- a/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/tamarin-prover/default.nix
@@ -1,6 +1,6 @@
-{ haskellPackages, mkDerivation, fetchFromGitHub, lib
+{ haskellPackages, mkDerivation, fetchFromGitHub, fetchpatch, lib, stdenv
 # the following are non-haskell dependencies
-, makeWrapper, which, maude, graphviz
+, makeWrapper, which, maude, graphviz, glibcLocales
 }:
 
 let
@@ -67,6 +67,27 @@ mkDerivation (common "tamarin-prover" src // {
   isLibrary = false;
   isExecutable = true;
 
+  patches = [
+    # Backport unreleased patch allowing maude 3.2.1
+    (fetchpatch {
+      name = "tamarin-prover-allow-maude-3.2.1.patch";
+      url = "https://github.com/tamarin-prover/tamarin-prover/commit/bfcf56909479e154a203f0eeefa767f4d91b600d.patch";
+      sha256 = "1zjqzyxwnfp7z3h3li8jrxn9732dx6lyq9q3w2dsphmxbzrs64dg";
+    })
+    # Backport unreleased patch allowing maude 3.2.2
+    (fetchpatch {
+      name = "tamarin-prover-allow-maude-3.2.2.patch";
+      url = "https://github.com/tamarin-prover/tamarin-prover/commit/df1aa9fc4fcc72b6cf0bed0f71844efe3d8ad238.patch";
+      sha256 = "1bkwvyyz5d660jjh08z8wq9c3l40s0rxd2nsbn20xnl2nynyvqpy";
+    })
+    # Backport proposed patch allowing maude 3.3 and 3.3.1
+    (fetchpatch {
+      name = "tamarin-prover-allow-maude-3.3.patch";
+      url = "https://github.com/tamarin-prover/tamarin-prover/pull/544/commits/d0313b1a1bac7c92130773f7ccdd890f8aec286d.patch";
+      sha256 = "1jhlz8vp9a3aahyhj24yjcv4l1389y9kg878yfnq0rkkgvk0m681";
+    })
+  ];
+
   # strip out unneeded deps manually
   doHaddock = false;
   enableSharedExecutables = false;
@@ -76,10 +97,15 @@ mkDerivation (common "tamarin-prover" src // {
   executableToolDepends = [ makeWrapper which maude graphviz ];
   postInstall = ''
     wrapProgram $out/bin/tamarin-prover \
+  '' + lib.optionalString stdenv.isLinux ''
+      --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" \
+  '' + ''
       --prefix PATH : ${lib.makeBinPath [ which maude graphviz ]}
     # so that the package can be used as a vim plugin to install syntax coloration
     install -Dt $out/share/vim-plugins/tamarin-prover/syntax/ etc/syntax/spthy.vim
     install etc/filetype.vim -D $out/share/vim-plugins/tamarin-prover/ftdetect/tamarin.vim
+    mkdir -p $out/share/nvim
+    ln -s $out/share/vim-plugins/tamarin-prover $out/share/nvim/site
     # Emacs SPTHY major mode
     install -Dt $out/share/emacs/site-lisp etc/spthy-mode.el
   '';
diff --git a/nixpkgs/pkgs/applications/science/logic/tlaplus/default.nix b/nixpkgs/pkgs/applications/science/logic/tlaplus/default.nix
index 4572a06d6337..abbcd417693e 100644
--- a/nixpkgs/pkgs/applications/science/logic/tlaplus/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/tlaplus/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "tlaplus";
-  version = "1.7.2";
+  version = "1.7.3";
 
   src = fetchurl {
     url = "https://github.com/tlaplus/tlaplus/releases/download/v${version}/tla2tools.jar";
-    sha256 = "sha256-+hhUPkTtWXSoW9LGDA3BZiCuEXaA6o5pPSaRmZ7ZCyI=";
+    sha256 = "sha256-5P8V6oH05voSXAgwBDclSxdxdMalrfaNpElkar4IUZ0=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/nixpkgs/pkgs/applications/science/logic/tlaplus/tlaps.nix b/nixpkgs/pkgs/applications/science/logic/tlaplus/tlaps.nix
index 14b3055ab36b..59afbc094e40 100644
--- a/nixpkgs/pkgs/applications/science/logic/tlaplus/tlaps.nix
+++ b/nixpkgs/pkgs/applications/science/logic/tlaplus/tlaps.nix
@@ -17,7 +17,9 @@ stdenv.mkDerivation rec {
     sha256 = "c296998acd14d5b93a8d5be7ee178007ef179957465966576bda26944b1b7fca";
   };
 
-  buildInputs = [ ocaml isabelle cvc3 perl wget which ];
+  strictDeps = true;
+
+  nativeBuildInputs = [ ocaml isabelle cvc3 perl wget which ];
 
   installPhase = ''
     mkdir -pv "$out"
diff --git a/nixpkgs/pkgs/applications/science/logic/uhdm/default.nix b/nixpkgs/pkgs/applications/science/logic/uhdm/default.nix
new file mode 100644
index 000000000000..2a667a8ac9d4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/logic/uhdm/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+, capnproto
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "UHDM";
+  version = "1.57";
+
+  src = fetchFromGitHub {
+    owner = "chipsalliance";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-z3vURlKXCW5W2naVwJjBXcn94u80JsBxlUOIy9ylsJw=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    (python3.withPackages (p: with p; [ orderedmultidict ]))
+    gtest
+  ];
+
+  buildInputs = [
+    capnproto
+  ];
+
+  cmakeFlags = [
+    "-DUHDM_USE_HOST_GTEST=On"
+    "-DUHDM_USE_HOST_CAPNP=On"
+  ];
+
+  doCheck = true;
+  checkPhase = "make test";
+
+  meta = {
+    description = "Universal Hardware Data Model";
+    homepage = "https://github.com/chipsalliance/UHDM";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ matthuszagh ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/logic/vampire/default.nix b/nixpkgs/pkgs/applications/science/logic/vampire/default.nix
index 92cad0c61e5a..253c88705aea 100644
--- a/nixpkgs/pkgs/applications/science/logic/vampire/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/vampire/default.nix
@@ -28,14 +28,12 @@ stdenv.mkDerivation rec {
       url = "https://github.com/vprover/vampire/pull/55.patch";
       sha256 = "1pwfpwpl23bqsgkmmvw6bnniyvp5j9v8l3z9s9pllfabnfcrcz9l";
     })
-    # https://github.com/vprover/vampire/pull/56
-    (fetchpatch {
-      name = "fenv.patch";
-      url = "https://github.com/vprover/vampire/pull/56.patch";
-      sha256 = "0xl3jcyqmk146mg3qj5hdd0pbja6wbq3250zmfhbxqrjh40mm40g";
-    })
   ];
 
+  postPatch = ''
+    patch -p1 -i ${../avy/minisat-fenv.patch} -d Minisat || true
+  '';
+
   enableParallelBuilding = true;
 
   fixupPhase = ''
@@ -47,7 +45,6 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    broken = (stdenv.isLinux && stdenv.isAarch64);
     homepage = "https://vprover.github.io/";
     description = "The Vampire Theorem Prover";
     platforms = platforms.unix;
diff --git a/nixpkgs/pkgs/applications/science/logic/why3/default.nix b/nixpkgs/pkgs/applications/science/logic/why3/default.nix
index ab5006e424e1..df8be359d123 100644
--- a/nixpkgs/pkgs/applications/science/logic/why3/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/why3/default.nix
@@ -1,17 +1,25 @@
-{ callPackage, fetchurl, fetchpatch, lib, stdenv
+{ callPackage, fetchurl, lib, stdenv
 , ocamlPackages, coqPackages, rubber, hevea, emacs }:
 
 stdenv.mkDerivation rec {
   pname = "why3";
-  version = "1.5.0";
+  version = "1.6.0";
 
   src = fetchurl {
     url = "https://why3.gitlabpages.inria.fr/releases/${pname}-${version}.tar.gz";
-    sha256 = "sha256:0qjh49pyqmg3xi09fn4lyzz23i6h18y9sgc8ayscvx3bwr3vcqhr";
+    hash = "sha256-hFvM6kHScaCtcHCc6Vezl9CR7BFbiKPoTEh7kj0ZJxw=";
   };
 
+  strictDeps = true;
+
+  nativeBuildInputs = with ocamlPackages;  [
+    ocaml findlib menhir
+    # Coq Support
+    coqPackages.coq
+  ];
+
   buildInputs = with ocamlPackages; [
-    ocaml findlib ocamlgraph zarith menhir
+    ocamlgraph zarith
     # Emacs compilation of why3.el
     emacs
     # Documentation
@@ -39,7 +47,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A platform for deductive program verification";
-    homepage    = "http://why3.lri.fr/";
+    homepage    = "https://why3.lri.fr/";
     license     = licenses.lgpl21;
     platforms   = platforms.unix;
     maintainers = with maintainers; [ thoughtpolice vbgl ];
diff --git a/nixpkgs/pkgs/applications/science/logic/why3/with-provers.nix b/nixpkgs/pkgs/applications/science/logic/why3/with-provers.nix
index 739064bb6169..95d5b95718dd 100644
--- a/nixpkgs/pkgs/applications/science/logic/why3/with-provers.nix
+++ b/nixpkgs/pkgs/applications/science/logic/why3/with-provers.nix
@@ -1,4 +1,4 @@
-{ stdenv, makeWrapper, runCommand, symlinkJoin, why3 }:
+{ stdenv, makeWrapper, runCommand, why3 }:
 provers:
 let configAwkScript = runCommand "why3-conf.awk" { inherit provers; }
   ''
@@ -13,6 +13,7 @@ let configAwkScript = runCommand "why3-conf.awk" { inherit provers; }
 in
 stdenv.mkDerivation {
   pname = "${why3.pname}-with-provers";
+  version = why3.version;
 
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ why3 ] ++ provers;
diff --git a/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix b/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix
index 5671317e30ef..da8d8ac9ea5e 100644
--- a/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/workcraft/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "workcraft";
-  version = "3.3.8";
+  version = "3.4.0";
 
   src = fetchurl {
     url = "https://github.com/workcraft/workcraft/releases/download/v${version}/workcraft-v${version}-linux.tar.gz";
-    sha256 = "sha256-T2rUEZsO8g/nk10LZvC+mXEC6IzutbjncERlmqg814g=";
+    sha256 = "sha256-iqHdyyZX3AcBAjPTpZAiJi0IHhEDWBtKp0e2LAdWGsQ=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/nixpkgs/pkgs/applications/science/logic/yices/default.nix b/nixpkgs/pkgs/applications/science/logic/yices/default.nix
index fb14723241b8..b97245cab476 100644
--- a/nixpkgs/pkgs/applications/science/logic/yices/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/yices/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
-    # musl las no ldconfig, create symlinks explicitly
+    # musl has no ldconfig, create symlinks explicitly
     ./linux-no-ldconfig.patch
   ];
   postPatch = "patchShebangs tests/regress/check.sh";
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A high-performance theorem prover and SMT solver";
-    homepage    = "http://yices.csl.sri.com";
+    homepage    = "https://yices.csl.sri.com";
     license     = licenses.gpl3;
     platforms   = with platforms; linux ++ darwin;
     maintainers = with maintainers; [ thoughtpolice ];
diff --git a/nixpkgs/pkgs/applications/science/logic/z3/4.4.0.nix b/nixpkgs/pkgs/applications/science/logic/z3/4.4.0.nix
deleted file mode 100644
index 857bbbdee5d0..000000000000
--- a/nixpkgs/pkgs/applications/science/logic/z3/4.4.0.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ lib, stdenv, fetchFromGitHub, python }:
-
-stdenv.mkDerivation rec {
-  pname = "z3";
-  version = "4.4.0";
-
-  src = fetchFromGitHub {
-    owner  = "Z3Prover";
-    repo   = "z3";
-    rev    = "7f6ef0b6c0813f2e9e8f993d45722c0e5b99e152";
-    sha256 = "1xllvq9fcj4cz34biq2a9dn2sj33bdgrzyzkj26hqw70wkzv1kzx";
-  };
-
-  buildInputs = [ python ];
-  enableParallelBuilding = true;
-
-  CXXFLAGS = if stdenv.isDarwin then "-std=gnu++98" else null;
-
-  configurePhase = "python scripts/mk_make.py --prefix=$out && cd build";
-
-  # z3's install phase is stupid because it tries to calculate the
-  # python package store location itself, meaning it'll attempt to
-  # write files into the nix store, and fail.
-  soext = stdenv.hostPlatform.extensions.sharedLibrary;
-  installPhase = ''
-    mkdir -p $out/bin $out/lib/${python.libPrefix}/site-packages $out/include
-    cp ../src/api/z3*.h       $out/include
-    cp ../src/api/c++/z3*.h   $out/include
-    cp z3                     $out/bin
-    cp libz3${soext}          $out/lib
-    cp libz3${soext}          $out/lib/${python.libPrefix}/site-packages
-    cp z3*.pyc                $out/lib/${python.libPrefix}/site-packages
-    cp ../src/api/python/*.py $out/lib/${python.libPrefix}/site-packages
-  '';
-
-  meta = {
-    description = "A high-performance theorem prover and SMT solver";
-    homepage    = "https://github.com/Z3Prover/z3";
-    license     = lib.licenses.mit;
-    platforms   = lib.platforms.x86_64;
-    maintainers = with lib.maintainers; [ thoughtpolice ttuegel ];
-  };
-}
diff --git a/nixpkgs/pkgs/applications/science/logic/z3/default.nix b/nixpkgs/pkgs/applications/science/logic/z3/default.nix
index 985df6a8f5f0..e2842d9d15a4 100644
--- a/nixpkgs/pkgs/applications/science/logic/z3/default.nix
+++ b/nixpkgs/pkgs/applications/science/logic/z3/default.nix
@@ -18,23 +18,26 @@ assert ocamlBindings -> ocaml != null && findlib != null && zarith != null;
 
 with lib;
 
-let common = { version, sha256, patches ? [ ] }:
+let common = { version, sha256, patches ? [ ], tag ? "z3" }:
   stdenv.mkDerivation rec {
     pname = "z3";
     inherit version sha256 patches;
     src = fetchFromGitHub {
       owner = "Z3Prover";
       repo = pname;
-      rev = "z3-${version}";
+      rev = "${tag}-${version}";
       sha256 = sha256;
     };
 
-    nativeBuildInputs = optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
-    buildInputs = [ python ]
+    strictDeps = true;
+
+    nativeBuildInputs = [ python ]
+      ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames
       ++ optional javaBindings jdk
-      ++ optionals ocamlBindings [ ocaml findlib zarith ]
+      ++ optionals ocamlBindings [ ocaml findlib ]
     ;
-    propagatedBuildInputs = [ python.pkgs.setuptools ];
+    propagatedBuildInputs = [ python.pkgs.setuptools ]
+      ++ optionals ocamlBindings [ zarith ];
     enableParallelBuilding = true;
 
     postPatch = optionalString ocamlBindings ''
@@ -44,7 +47,7 @@ let common = { version, sha256, patches ? [ ] }:
 
     configurePhase = concatStringsSep " "
       (
-        [ "${python.interpreter} scripts/mk_make.py --prefix=$out" ]
+        [ "${python.pythonForBuild.interpreter} scripts/mk_make.py --prefix=$out" ]
           ++ optional javaBindings "--java"
           ++ optional ocamlBindings "--ml"
           ++ optional pythonBindings "--python --pypkgdir=$out/${python.sitePackages}"
@@ -84,12 +87,17 @@ let common = { version, sha256, patches ? [ ] }:
   };
 in
 {
+  z3_4_11 = common {
+    version = "4.11.0";
+    sha256 = "sha256-ItmtZHDhCeLAVtN7K80dqyAh20o7TM4xk2sTb9QgHvk=";
+  };
   z3_4_8 = common {
-    version = "4.8.15";
-    sha256 = "0xkwqz0y5d1lfb6kfqy8wn8n2dqalzf4c8ghmjsajc1bpdl70yc5";
+    version = "4.8.17";
+    sha256 = "sha256-BSwjgOU9EgCcm18Zx0P9mnoPc9ZeYsJwEu0ffnACa+8=";
   };
-  z3_4_7 = common {
-    version = "4.7.1";
-    sha256 = "1s850r6qifwl83zzgvrb5l0jigvmymzpv18ph71hg2bcpk7kjw3d";
+  z3_4_8_5 = common {
+    tag = "Z3";
+    version = "4.8.5";
+    sha256 = "sha256-ytG5O9HczbIVJAiIGZfUXC/MuYH7d7yLApaeTRlKXoc=";
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/finalfrontier/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/finalfrontier/default.nix
index 1644ca3d1433..6b76eea33cef 100644
--- a/nixpkgs/pkgs/applications/science/machine-learning/finalfrontier/default.nix
+++ b/nixpkgs/pkgs/applications/science/machine-learning/finalfrontier/default.nix
@@ -11,16 +11,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "finalfrontier";
-  version = "0.9.4";
+  version = "unstable-2022-01-06";
 
   src = fetchFromGitHub {
     owner = "finalfusion";
     repo = pname;
-    rev = version;
-    sha256 = "1lvwv238p8hrl4sc5pmnvaargl2dd25p44gxl3kibq5ng03afd0n";
+    rev = "2461fb1dde13b73039926aa66606e470907a1b59";
+    sha256 = "sha256-bnRzXIYairlBjv2JxU16UXYc5BB3VeKZNiJ4+XDzub4=";
   };
 
-  cargoSha256 = "0lhcazcih48gc23q484h344bzz7p3lh189ljhswdyph2i11caarp";
+  cargoSha256 = "sha256-C/D9EPfifyajrCyXE8w/qRuzWEoyJJIcj4xii94/9l4=";
 
   nativeBuildInputs = [
     installShellFiles
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/openbugs/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/openbugs/default.nix
new file mode 100644
index 000000000000..8d49534a11f8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/machine-learning/openbugs/default.nix
@@ -0,0 +1,22 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "OpenBUGS";
+  version = "3.2.3";
+
+  src = fetchurl {
+    url = "https://www.mrc-bsu.cam.ac.uk/wp-content/uploads/2018/04/${pname}-${version}.tar.gz";
+    sha256 = "sha256-oonE2gxKw3H4ATImyF69Cp4d7F3puFiVDkhUy4FLTtg=";
+  };
+
+  meta = with lib; {
+    description = "Open source program for Bayesian modelling based on MCMC";
+    homepage = "https://www.mrc-bsu.cam.ac.uk/software/bugs/openbugs/";
+    maintainers = with maintainers; [ andresnav ];
+    license = licenses.gpl3Only;
+    platforms = [ "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/shogun/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/shogun/default.nix
index c7209d00af51..d25bc06385ea 100644
--- a/nixpkgs/pkgs/applications/science/machine-learning/shogun/default.nix
+++ b/nixpkgs/pkgs/applications/science/machine-learning/shogun/default.nix
@@ -50,21 +50,21 @@ let
 
   srcs = {
     toolbox = fetchFromGitHub {
-      owner = pname + "-toolbox";
-      repo = pname;
-      rev = pname + "_" + version;
-      sha256 = "05s9dclmk7x5d7wnnj4qr6r6c827m72a44gizcv09lxr28pr9inz";
+      owner = "shogun-toolbox";
+      repo = "shogun";
+      rev =  "shogun_${version}";
+      sha256 = "sha256-38aULxK50wQ2+/ERosSpRyBmssmYSGv5aaWfWSlrSRc=";
       fetchSubmodules = true;
     };
 
     # The CMake external projects expect the packed archives
     rxcpp = fetchurl {
       url = "https://github.com/Reactive-Extensions/RxCpp/archive/v${rxcppVersion}.tar.gz";
-      sha256 = "0y2isr8dy2n1yjr9c5570kpc9lvdlch6jv0jvw000amwn5d3krsh";
+      sha256 = "sha256-UOc5WrG8KgAA3xJsaSCjbdPE7gSnFJay9MEK31DWUXg=";
     };
     gtest = fetchurl {
       url = "https://github.com/google/googletest/archive/release-${gtestVersion}.tar.gz";
-      sha256 = "1n5p1m2m3fjrjdj752lf92f9wq3pl5cbsfrb49jqbg52ghkz99jq";
+      sha256 = "sha256-WKb0J3yivIVlIis7vVihd2CenEiOinJkk1m6UUUNt9g=";
     };
   };
 in
@@ -77,13 +77,6 @@ stdenv.mkDerivation rec {
   src = srcs.toolbox;
 
   patches = [
-    # Fix compile errors with json-c
-    # https://github.com/shogun-toolbox/shogun/pull/4104
-    (fetchpatch {
-      url = "https://github.com/shogun-toolbox/shogun/commit/365ce4c4c700736d2eec8ba6c975327a5ac2cd9b.patch";
-      sha256 = "158hqv4xzw648pmjbwrhxjp7qcppqa7kvriif87gn3zdn711c49s";
-    })
-
     # Fix compile errors with GCC 9+
     # https://github.com/shogun-toolbox/shogun/pull/4811
     (fetchpatch {
@@ -95,6 +88,20 @@ stdenv.mkDerivation rec {
       sha256 = "sha256-AgJJKQA8vc5oKaTQDqMdwBR4hT4sn9+uW0jLe7GteJw=";
     })
 
+    # Fix virtual destruction
+    (fetchpatch {
+      url = "https://github.com/shogun-toolbox/shogun/commit/ef0e4dc1cc4a33c9e6b17a108fa38a436de2d7ee.patch";
+      sha256 = "sha256-a9Rm0ytqkSAgC3dguv8m3SwOSipb+VByBHHdmV0d63w=";
+    })
+    ./fix-virtual-destruction.patch
+
+    # Fix compile errors with json-c
+    # https://github.com/shogun-toolbox/shogun/pull/4104
+    (fetchpatch {
+      url = "https://github.com/shogun-toolbox/shogun/commit/365ce4c4c700736d2eec8ba6c975327a5ac2cd9b.patch";
+      sha256 = "sha256-OhEWwrHtD/sOcjHmPY/C9zJ8ruww8yXrRcTw38nGEJU=";
+    })
+
     # Fix compile errors with Eigen 3.4
     ./eigen-3.4.patch
 
@@ -126,6 +133,16 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = let
     enableIf = cond: if cond then "ON" else "OFF";
+    excludeTestsRegex = lib.concatStringsSep "|" [
+      # sporadic segfault
+      "TrainedModelSerialization"
+      # broken by openblas 0.3.21
+      "mathematics_lapack"
+      # these take too long on CI
+      "evaluation_cross_validation"
+      "modelselection_combined_kernel"
+      "modelselection_grid_search"
+    ];
   in [
     "-DBUILD_META_EXAMPLES=ON"
     "-DCMAKE_DISABLE_FIND_PACKAGE_ARPACK=ON"
@@ -134,7 +151,7 @@ stdenv.mkDerivation rec {
     "-DCMAKE_DISABLE_FIND_PACKAGE_Mosek=ON"
     "-DCMAKE_DISABLE_FIND_PACKAGE_TFLogger=ON"
     "-DCMAKE_DISABLE_FIND_PACKAGE_ViennaCL=ON"
-    "-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;TrainedModelSerialization'"  # Sporadic segfault
+    "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;'${excludeTestsRegex}'"
     "-DENABLE_TESTING=${enableIf doCheck}"
     "-DDISABLE_META_INTEGRATION_TESTS=ON"
     "-DTRAVIS_DISABLE_META_CPP=ON"
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/shogun/fix-virtual-destruction.patch b/nixpkgs/pkgs/applications/science/machine-learning/shogun/fix-virtual-destruction.patch
new file mode 100644
index 000000000000..16a6041748fa
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/machine-learning/shogun/fix-virtual-destruction.patch
@@ -0,0 +1,20 @@
+From: Sebastián Mancilla <smancill@smancill.dev>
+Subject: Fix virtual destruction
+
+---
+ src/shogun/solver/LDASolver.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/shogun/solver/LDASolver.h b/src/shogun/solver/LDASolver.h
+index 9300a85c5..d500eca5d 100644
+--- a/src/shogun/solver/LDASolver.h
++++ b/src/shogun/solver/LDASolver.h
+@@ -87,7 +87,7 @@ namespace shogun
+ 			compute_within_cov();
+ 		}
+ 
+-		~LDASolver()
++		virtual ~LDASolver()
+ 		{
+ 			SG_UNREF(m_features)
+ 			SG_UNREF(m_labels)
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/starspace/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/starspace/default.nix
index 81e0ccc71d66..ab0c10efebce 100644
--- a/nixpkgs/pkgs/applications/science/machine-learning/starspace/default.nix
+++ b/nixpkgs/pkgs/applications/science/machine-learning/starspace/default.nix
@@ -1,8 +1,8 @@
-{ lib, stdenv, fetchFromGitHub, boost165, zlib }:
+{ lib, stdenv, fetchFromGitHub, boost, zlib }:
 
 stdenv.mkDerivation rec {
   pname = "starspace";
-  version = "unstable-2021-01-17";
+  version = "unstable-2019-12-13";
 
   src = fetchFromGitHub {
     owner = "facebookresearch";
@@ -11,11 +11,11 @@ stdenv.mkDerivation rec {
     sha256 = "0sc7a37z1skb9377a1qs8ggwrkz0nmpybx7sms38xj05b702kbvj";
   };
 
-  buildInputs = [ boost165 zlib ];
+  buildInputs = [ boost zlib ];
 
   makeFlags = [
     "CXX=${stdenv.cc.targetPrefix}c++"
-    "BOOST_DIR=${boost165.dev}/include"
+    "BOOST_DIR=${boost.dev}/include"
   ];
 
   preBuild = ''
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/streamlit/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/streamlit/default.nix
index 2b05566e2647..3db5356b4964 100755
--- a/nixpkgs/pkgs/applications/science/machine-learning/streamlit/default.nix
+++ b/nixpkgs/pkgs/applications/science/machine-learning/streamlit/default.nix
@@ -1,41 +1,37 @@
-{
-  # Nix
-  lib,
-  buildPythonApplication,
-  fetchPypi,
-
-  # Build inputs
-  altair,
-  blinker,
-  click,
-  cachetools,
-  GitPython,
-  importlib-metadata,
-  jinja2,
-  pillow,
-  pyarrow,
-  pydeck,
-  pympler,
-  protobuf,
-  requests,
-  rich,
-  semver,
-  setuptools,
-  toml,
-  tornado,
-  tzlocal,
-  validators,
-  watchdog,
+{ lib
+, altair
+, blinker
+, buildPythonApplication
+, cachetools
+, click
+, fetchPypi
+, gitpython
+, importlib-metadata
+, jinja2
+, pillow
+, protobuf3
+, pyarrow
+, pydeck
+, pympler
+, requests
+, rich
+, semver
+, setuptools
+, toml
+, tornado
+, tzlocal
+, validators
+, watchdog
 }:
 
 buildPythonApplication rec {
   pname = "streamlit";
-  version = "1.11.1";
-  format = "wheel";  # source currently requires pipenv
+  version = "1.21.0";
+  format = "wheel"; # source currently requires pipenv
 
   src = fetchPypi {
     inherit pname version format;
-    hash = "sha256-+GGuL3UngPDgLOGx9QXUdRJsTswhTg7d6zuvhpp0Mo0=";
+    hash = "sha256-BYYlmJUqkSbhZlLKpbyI7u6nsnc68lLi2szxyEzqrvQ=";
   };
 
   propagatedBuildInputs = [
@@ -43,11 +39,11 @@ buildPythonApplication rec {
     blinker
     cachetools
     click
-    GitPython
+    gitpython
     importlib-metadata
     jinja2
     pillow
-    protobuf
+    protobuf3
     pyarrow
     pydeck
     pympler
@@ -63,7 +59,7 @@ buildPythonApplication rec {
   ];
 
   postInstall = ''
-      rm $out/bin/streamlit.cmd # remove windows helper
+    rm $out/bin/streamlit.cmd # remove windows helper
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/uarmsolver/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/uarmsolver/default.nix
new file mode 100644
index 000000000000..a4de341166fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/machine-learning/uarmsolver/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "uarmsolver";
+  version = "0.2.5";
+
+  src = fetchFromGitHub {
+   owner = "firefly-cpp";
+   repo = "uARMSolver";
+   rev = version;
+   sha256 = "sha256-t5Nep99dH/TvJzI9woLSuBrAWSqXZvLncXl7/43Z7sA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  installPhase = ''
+    install -D -t $out/bin uARMSolver
+  '';
+
+  meta = with lib; {
+    description = "universal Association Rule Mining Solver";
+    homepage    = "https://github.com/firefly-cpp/uARMSolver";
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ firefly-cpp ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/machine-learning/vowpal-wabbit/default.nix b/nixpkgs/pkgs/applications/science/machine-learning/vowpal-wabbit/default.nix
index 8dd55efaeb52..88330a579015 100644
--- a/nixpkgs/pkgs/applications/science/machine-learning/vowpal-wabbit/default.nix
+++ b/nixpkgs/pkgs/applications/science/machine-learning/vowpal-wabbit/default.nix
@@ -1,42 +1,44 @@
-{ lib, stdenv, fetchFromGitHub, cmake, boost, flatbuffers, rapidjson, spdlog, zlib }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, eigen, rapidjson, spdlog, zlib }:
 
 stdenv.mkDerivation rec {
   pname = "vowpal-wabbit";
-  version = "9.0.1";
+  version = "9.6.0";
 
   src = fetchFromGitHub {
     owner = "VowpalWabbit";
     repo = "vowpal_wabbit";
     rev = version;
-    sha256 = "sha256-ZUurY2bmTKKIW4GR4oiIpLxb6DSRUNJI/EyNSOu9D9c=";
+    sha256 = "sha256-iSsxpeTRZjIhZaYBeoKLHl9j1aBIXWjONmAInmKvU/I=";
   };
 
+  patches = [
+    # Fix x86_64-linux build by adding missing include
+    # https://github.com/VowpalWabbit/vowpal_wabbit/pull/4275
+    (fetchpatch {
+      url = "https://github.com/VowpalWabbit/vowpal_wabbit/commit/0cb410dfc885ca1ecafd1f8a962b481574fb3b82.patch";
+      sha256 = "sha256-bX3eJ+vMTEMAo3EiESQTDryBP0h2GtnMa/Fz0rTeaNY=";
+    })
+  ];
+
   nativeBuildInputs = [ cmake ];
 
   buildInputs = [
     boost
-    flatbuffers
+    eigen
     rapidjson
     spdlog
     zlib
   ];
 
-  # -DBUILD_TESTS=OFF is set as both it saves time in the build and the default
-  # cmake flags appended by the builder include -DBUILD_TESTING=OFF for which
-  # this is the equivalent flag.
-  # Flatbuffers are an optional feature.
-  # BUILD_FLATBUFFERS=ON turns it on. This will still consume Flatbuffers as a
-  # system dependency
   cmakeFlags = [
     "-DVW_INSTALL=ON"
-    "-DBUILD_TESTS=OFF"
     "-DBUILD_JAVA=OFF"
     "-DBUILD_PYTHON=OFF"
-    "-DUSE_LATEST_STD=ON"
     "-DRAPIDJSON_SYS_DEP=ON"
     "-DFMT_SYS_DEP=ON"
     "-DSPDLOG_SYS_DEP=ON"
-    "-DBUILD_FLATBUFFERS=ON"
+    "-DVW_BOOST_MATH_SYS_DEP=ON"
+    "-DVW_EIGEN_SYS_DEP=ON"
   ];
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/math/4ti2/default.nix b/nixpkgs/pkgs/applications/science/math/4ti2/default.nix
index bb6a89385ce0..9424612c7587 100644
--- a/nixpkgs/pkgs/applications/science/math/4ti2/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/4ti2/default.nix
@@ -8,13 +8,13 @@
 
 stdenv.mkDerivation rec{
   pname = "4ti2";
-  version = "1.6.9";
+  version = "1.6.10";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "Release_${builtins.replaceStrings ["."] ["_"] version}";
-    hash = "sha256-cywneIM0sHt1iQsNfjyQDoDfdRjxpz4l3rfysi9YN20=";
+    hash = "sha256-Rz8O1Tf81kzpTGPq7dkZJvv444F1/VqKu7VuRvH59kQ=";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/applications/science/math/LiE/default.nix b/nixpkgs/pkgs/applications/science/math/LiE/default.nix
index 9b16fc1d67f6..d05cc90ca44c 100644
--- a/nixpkgs/pkgs/applications/science/math/LiE/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/LiE/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
     longDescription = ''
       LiE is a computer algebra system that is specialised in computations
       involving (reductive) Lie groups and their representations. It is
-      publically available for free in source code. For a description of its
+      publicly available for free in source code. For a description of its
       characteristics, we refer to the following sources of information.
     ''; # take from the website
 
diff --git a/nixpkgs/pkgs/applications/science/math/R/default.nix b/nixpkgs/pkgs/applications/science/math/R/default.nix
index 0d045c882864..98a3b192f645 100644
--- a/nixpkgs/pkgs/applications/science/math/R/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/R/default.nix
@@ -8,30 +8,33 @@
 # R as of writing does not support outputting both .so and .a files; it outputs:
 #     --enable-R-static-lib conflicts with --enable-R-shlib and will be ignored
 , static ? false
+, testers
 }:
 
 assert (!blas.isILP64) && (!lapack.isILP64);
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "R";
-  version = "4.2.1";
+  version = "4.3.0";
 
-  src = fetchurl {
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
     url = "https://cran.r-project.org/src/base/R-${lib.versions.major version}/${pname}-${version}.tar.gz";
-    sha256 = "sha256-TVLbSG0nhI5UYT1O6XetlS7AjOF4B+G1JbEM1ENsZD8=";
+    sha256 = "sha256-RdzEi2zyfTYQIPd/3ho5IJ6Ze4FAKzZjyhwBAFampgk=";
   };
 
   dontUseImakeConfigure = true;
 
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [
     bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses
     pango pcre2 perl readline texLive xz zlib less texinfo graphviz icu
-    pkg-config bison imake which blas lapack curl tcl tk jdk
+    bison imake which blas lapack curl tcl tk jdk tzdata
   ] ++ lib.optionals stdenv.isDarwin [ Cocoa Foundation libobjc libcxx ];
 
   patches = [
     ./no-usr-local-search-paths.patch
-    ./test-reg-packages.patch
   ];
 
   # Test of the examples for package 'tcltk' fails in Darwin sandbox. See:
@@ -70,6 +73,7 @@ stdenv.mkDerivation rec {
       FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
       JAVA_HOME="${jdk}"
       RANLIB=$(type -p ranlib)
+      r_cv_have_curl728=yes
       R_SHELL="${stdenv.shell}"
   '' + lib.optionalString stdenv.isDarwin ''
       --disable-R-framework
@@ -95,13 +99,10 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  # disable stackprotector on aarch64-darwin for now
-  # https://github.com/NixOS/nixpkgs/issues/158730
-  # see https://github.com/NixOS/nixpkgs/issues/127608 for a similar issue
-  hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
-
   setupHook = ./setup-hook.sh;
 
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
   meta = with lib; {
     homepage = "http://www.r-project.org/";
     description = "Free software environment for statistical computing and graphics";
@@ -126,8 +127,9 @@ stdenv.mkDerivation rec {
       user-defined recursive functions and input and output facilities.
     '';
 
+    pkgConfigModules = [ "libR" ];
     platforms = platforms.all;
 
     maintainers = with maintainers; [ jbedo ] ++ teams.sage.members;
   };
-}
+})
diff --git a/nixpkgs/pkgs/applications/science/math/R/test-reg-packages.patch b/nixpkgs/pkgs/applications/science/math/R/test-reg-packages.patch
deleted file mode 100644
index 0125565a7997..000000000000
--- a/nixpkgs/pkgs/applications/science/math/R/test-reg-packages.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upper bounds shifts due to extra warnings re. internet connectivity.
-
-diff --git a/tests/reg-packages.R b/tests/reg-packages.R
-index c9962ce..a40b0fa 100644
---- a/tests/reg-packages.R
-+++ b/tests/reg-packages.R
-@@ -260,7 +260,7 @@ stopifnot(exprs = {
-     (lenN <- length(print(iN <- grep("^[1-9][0-9]:", tlines)))) >= 2
-     iN - iw == seq_len(lenN) # these (3) lines come immediately after 'Warning',
-     ## and "related" to the some 'missing .. paren' above:
--    8 <= print(iw - i) & iw - i <= 20 # see ~14
-+    8 <= print(iw - i) & iw - i <= 22 # see ~14
- }) ## failed in R <= 4.1.1
-
-
diff --git a/nixpkgs/pkgs/applications/science/math/bcal/default.nix b/nixpkgs/pkgs/applications/science/math/bcal/default.nix
index b23b433becd3..fedb219a0c19 100644
--- a/nixpkgs/pkgs/applications/science/math/bcal/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/bcal/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  checkInputs = [ bc python3Packages.pytestCheckHook ];
+  nativeCheckInputs = [ bc python3Packages.pytestCheckHook ];
 
   pytestFlagsArray = [ "test.py" ];
 
diff --git a/nixpkgs/pkgs/applications/science/math/bliss/default.nix b/nixpkgs/pkgs/applications/science/math/bliss/default.nix
index fe68d9d245c5..4fccc3a46403 100644
--- a/nixpkgs/pkgs/applications/science/math/bliss/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/bliss/default.nix
@@ -32,6 +32,6 @@ stdenv.mkDerivation rec {
     description = "An open source tool for computing automorphism groups and canonical forms of graphs. It has both a command line user interface as well as C++ and C programming language APIs";
     homepage = "http://www.tcs.hut.fi/Software/bliss/";
     license = licenses.lgpl3;
-    platforms = [ "i686-linux" "x86_64-linux" ];
+    platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/caffe/default.nix b/nixpkgs/pkgs/applications/science/math/caffe/default.nix
index d6c95633dd52..4cd2511786b3 100644
--- a/nixpkgs/pkgs/applications/science/math/caffe/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/caffe/default.nix
@@ -21,7 +21,13 @@
 }:
 
 let
-  inherit (cudaPackages) cudatoolkit cudnn nccl;
+  inherit (cudaPackages) cudatoolkit nccl;
+  # The default for cudatoolkit 10.1 is CUDNN 8.0.5, the last version to support CUDA 10.1.
+  # However, this caffe does not build with CUDNN 8.x, so we use CUDNN 7.6.5 instead.
+  # Earlier versions of cudatoolkit use pre-8.x CUDNN, so we use the default.
+  cudnn = if lib.versionOlder cudatoolkit.version "10.1"
+    then cudaPackages.cudnn
+    else cudaPackages.cudnn_7_6;
 in
 
 assert leveldbSupport -> (leveldb != null && snappy != null);
@@ -78,7 +84,7 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = lib.optionals pythonSupport (
     # requirements.txt
     let pp = python.pkgs; in ([
-      pp.numpy pp.scipy pp.scikitimage pp.h5py
+      pp.numpy pp.scipy pp.scikit-image pp.h5py
       pp.matplotlib pp.ipython pp.networkx pp.nose
       pp.pandas pp.python-dateutil pp.protobuf pp.gflags
       pp.pyyaml pp.pillow pp.six
diff --git a/nixpkgs/pkgs/applications/science/math/calc/default.nix b/nixpkgs/pkgs/applications/science/math/calc/default.nix
index 41adb1cfbe6c..4f216a8aa3ac 100644
--- a/nixpkgs/pkgs/applications/science/math/calc/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/calc/default.nix
@@ -1,16 +1,23 @@
-{ stdenv, lib, fetchurl, util-linux, makeWrapper
-, enableReadline ? true, readline, ncurses }:
+{ lib
+, stdenv
+, fetchurl
+, makeWrapper
+, ncurses
+, readline
+, util-linux
+, enableReadline ? true
+}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "calc";
-  version = "2.14.1.0";
+  version = "2.14.1.6";
 
   src = fetchurl {
     urls = [
-      "https://github.com/lcn2/calc/releases/download/${version}/${pname}-${version}.tar.bz2"
-      "http://www.isthe.com/chongo/src/calc/${pname}-${version}.tar.bz2"
+      "https://github.com/lcn2/calc/releases/download/v${finalAttrs.version}/calc-${finalAttrs.version}.tar.bz2"
+      "http://www.isthe.com/chongo/src/calc/calc-${finalAttrs.version}.tar.bz2"
     ];
-    sha256 = "sha256-C1YWZS4x7htUWF3MhRLQIYChL4rdwJxASdPQjttUr0A=";
+    hash = "sha256-zlmzCCltGB3ipgWBF9vu2szmAZguPDiR2K3xdTnWf0A=";
   };
 
   postPatch = ''
@@ -19,9 +26,17 @@ stdenv.mkDerivation rec {
       --replace '-install_name ''${LIBDIR}/libcustcalc''${LIB_EXT_VERSION}' '-install_name ''${T}''${LIBDIR}/libcustcalc''${LIB_EXT_VERSION}'
   '';
 
-  nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ util-linux ]
-             ++ lib.optionals enableReadline [ readline ncurses ];
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  buildInputs = [
+    util-linux
+  ]
+  ++ lib.optionals enableReadline [
+    ncurses
+    readline
+  ];
 
   makeFlags = [
     "T=$(out)"
@@ -34,18 +49,22 @@ stdenv.mkDerivation rec {
 
     # Handle LDFLAGS defaults in calc
     "DEFAULT_LIB_INSTALL_PATH=$(out)/lib"
-  ] ++ lib.optionals enableReadline [
+  ]
+  ++ lib.optionals enableReadline [
     "READLINE_LIB=-lreadline"
     "USE_READLINE=-DUSE_READLINE"
   ];
 
-  meta = with lib; {
-    description = "C-style arbitrary precision calculator";
+  meta = {
     homepage = "http://www.isthe.com/chongo/tech/comp/calc/";
+    description = "C-style arbitrary precision calculator";
+    changelog = "https://github.com/lcn2/calc/blob/v${finalAttrs.version}/CHANGES";
     # The licensing situation depends on readline (see section 3 of the LGPL)
     # If linked against readline then GPLv2 otherwise LGPLv2.1
-    license = with licenses; if enableReadline then gpl2Only else lgpl21Only;
-    maintainers = with maintainers; [ matthewbauer ];
-    platforms = platforms.all;
+    license = if enableReadline
+              then lib.licenses.gpl2Only
+              else lib.licenses.lgpl21Only;
+    maintainers = with lib.maintainers; [ matthewbauer ];
+    platforms = lib.platforms.all;
   };
-}
+})
diff --git a/nixpkgs/pkgs/applications/science/math/calculix/default.nix b/nixpkgs/pkgs/applications/science/math/calculix/default.nix
index df943277a627..7a89fdd73c84 100644
--- a/nixpkgs/pkgs/applications/science/math/calculix/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/calculix/default.nix
@@ -1,5 +1,9 @@
 { lib, stdenv, fetchurl, gfortran, arpack, spooles, blas, lapack }:
 
+assert (blas.isILP64 == lapack.isILP64 &&
+        blas.isILP64 == arpack.isILP64 &&
+        !blas.isILP64);
+
 stdenv.mkDerivation rec {
   pname = "calculix";
   version = "2.19";
@@ -13,7 +17,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ arpack spooles blas lapack ];
 
-  NIX_CFLAGS_COMPILE = [
+  env.NIX_CFLAGS_COMPILE = toString [
     "-I${spooles}/include/spooles"
     "-std=legacy"
   ];
diff --git a/nixpkgs/pkgs/applications/science/math/cemu/default.nix b/nixpkgs/pkgs/applications/science/math/cemu-ti/default.nix
index 374b245e2499..2f2440eacfed 100644
--- a/nixpkgs/pkgs/applications/science/math/cemu/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/cemu-ti/default.nix
@@ -1,55 +1,43 @@
-{ fetchFromGitHub
+{ stdenv
 , lib
-, SDL2
-, libGL
-, libarchive
-, libusb-compat-0_1
-, qtbase
+, fetchFromGitHub
 , qmake
-, git
-, libpng
 , pkg-config
 , wrapQtAppsHook
-, stdenv
+, libarchive
+, libpng
 }:
 
 stdenv.mkDerivation rec {
   pname = "CEmu";
-  version = "1.3";
+  version = "unstable-2022-06-29";
   src = fetchFromGitHub {
     owner = "CE-Programming";
     repo = "CEmu";
-    rev = "v${version}";
-    sha256 = "1wcdnzcqscawj6jfdj5wwmw9g9vsd6a1rx0rrramakxzf8b7g47r";
+    rev = "880d391ba9f8b7b2ec36ab9b45a34e9ecbf744e9";
+    hash = "sha256-aFwGZJceh1jEP8cEajY5wYlSaFuNhYvSoZ/E1QDfJEI=";
     fetchSubmodules = true;
   };
 
   nativeBuildInputs = [
     qmake
-    git
     wrapQtAppsHook
     pkg-config
   ];
 
   buildInputs = [
-    SDL2
-    libGL
     libarchive
-    libusb-compat-0_1
-    qtbase
     libpng
   ];
 
   qmakeFlags = [
     "gui/qt"
-    "CONFIG+=ltcg"
   ];
 
   meta = with lib; {
-    changelog = "https://github.com/CE-Programming/CEmu/releases/tag/v${version}";
     description = "Third-party TI-84 Plus CE / TI-83 Premium CE emulator, focused on developer features";
     homepage = "https://ce-programming.github.io/CEmu";
-    license = licenses.gpl3;
+    license = licenses.gpl3Plus;
     maintainers = with maintainers; [ luc65r ];
     platforms = [ "x86_64-linux" "x86_64-darwin" ];
     broken = stdenv.isDarwin;
diff --git a/nixpkgs/pkgs/applications/science/math/clp/default.nix b/nixpkgs/pkgs/applications/science/math/clp/default.nix
index 26c277c2685f..c7d19f044d65 100644
--- a/nixpkgs/pkgs/applications/science/math/clp/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/clp/default.nix
@@ -1,19 +1,23 @@
-{ lib, stdenv, fetchurl, zlib }:
+{ lib, stdenv, fetchFromGitHub, pkg-config, coin-utils, zlib, osi }:
 
 stdenv.mkDerivation rec {
-  version = "1.17.6";
+  version = "1.17.8";
   pname = "clp";
-  src = fetchurl {
-    url = "https://www.coin-or.org/download/source/Clp/Clp-${version}.tgz";
-    sha256 = "0ap1f0lxppa6pnbc4bg7ih7a96avwaki482nig8w5fr3vg9wvkzr";
+  src = fetchFromGitHub {
+    owner = "coin-or";
+    repo = "Clp";
+    rev = "releases/${version}";
+    hash = "sha256-3Z6ysoCcDVB8UePiwbZNqvO/o/jgPcv6XFkpJZBK+Os=";
   };
 
-  propagatedBuildInputs = [ zlib ];
+  nativeBuildInputs = [ pkg-config ];
+
+  propagatedBuildInputs = [ zlib coin-utils osi ];
 
   doCheck = true;
 
   meta = with lib; {
-    license = licenses.epl10;
+    license = licenses.epl20;
     homepage = "https://github.com/coin-or/Clp";
     description = "An open-source linear programming solver written in C++";
     platforms = platforms.darwin ++ [ "x86_64-linux" ];
diff --git a/nixpkgs/pkgs/applications/science/math/cntk/default.nix b/nixpkgs/pkgs/applications/science/math/cntk/default.nix
index d39c04e8feec..f885dae444ba 100644
--- a/nixpkgs/pkgs/applications/science/math/cntk/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/cntk/default.nix
@@ -60,7 +60,7 @@ in stdenv.mkDerivation rec {
   OMPI_CXX = "g++";
 
   # Uses some deprecated tensorflow functions
-  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
 
   buildInputs = [ openblas opencv3 libzip boost protobuf mpi ]
              ++ lib.optional cudaSupport cudatoolkit
@@ -120,13 +120,14 @@ in stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    # Newer cub is included with cudatoolkit now and it breaks the build.
-    # https://github.com/Microsoft/CNTK/issues/3191
-    broken = cudaSupport;
     homepage = "https://github.com/Microsoft/CNTK";
     description = "An open source deep-learning toolkit";
     license = if onebitSGDSupport then licenses.unfreeRedistributable else licenses.mit;
     platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ abbradar ];
+    # Newer cub is included with cudatoolkit now and it breaks the build.
+    # https://github.com/Microsoft/CNTK/issues/3191
+    # broken = cudaSupport;
+    broken = true; # at 2022-11-23
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/eigenmath/default.nix b/nixpkgs/pkgs/applications/science/math/eigenmath/default.nix
new file mode 100644
index 000000000000..cb9692973158
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/eigenmath/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, buildPackages
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "eigenmath";
+  version = "unstable-2023-05-12";
+
+  src = fetchFromGitHub {
+    owner = "georgeweigt";
+    repo = pname;
+    rev = "a6de473ad8eb7cd7c2fba6a738881764dc2c5f83";
+    hash = "sha256-1fdGx6pYWnoyJ5ei1qZlXZG2mUEdjrRI7+X352XE/7A=";
+  };
+
+  checkPhase = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
+    runHook preCheck
+
+    for testcase in selftest1 selftest2; do
+      ${emulator} ./eigenmath "test/$testcase"
+    done
+
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm555 eigenmath "$out/bin/eigenmath"
+    runHook postInstall
+  '';
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = with lib;{
+    description = "Computer algebra system written in C";
+    homepage = "https://georgeweigt.github.io";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/math/eukleides/default.nix b/nixpkgs/pkgs/applications/science/math/eukleides/default.nix
index 507fa0815298..f682a57ec951 100644
--- a/nixpkgs/pkgs/applications/science/math/eukleides/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/eukleides/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchurl, bison, flex, makeWrapper, texinfo4, getopt, readline, texlive }:
 
-lib.fix (eukleides: stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: rec {
   pname = "eukleides";
   version = "1.5.4";
 
@@ -36,7 +36,7 @@ lib.fix (eukleides: stdenv.mkDerivation rec {
   # gcc-10. Otherwise build fails as:
   #   ld: eukleides_build/triangle.o:(.bss+0x28): multiple definition of `A';
   #     eukleides_build/quadrilateral.o:(.bss+0x18): first defined here
-  NIX_CFLAGS_COMPILE = "-fcommon";
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
 
   preInstall = ''
     mkdir -p $out/bin
@@ -49,10 +49,12 @@ lib.fix (eukleides: stdenv.mkDerivation rec {
 
   outputs = [ "out" "doc" "tex" ];
 
-  passthru.tlType = "run";
-  passthru.pkgs = [ eukleides.tex ]
+  passthru = {
+    tlType = "run";
     # packages needed by euktoeps, euktopdf and eukleides.sty
-    ++ (with texlive; collection-pstricks.pkgs ++ epstopdf.pkgs ++ iftex.pkgs ++ moreverb.pkgs);
+    tlDeps = with texlive; [ collection-pstricks epstopdf iftex moreverb ];
+    pkgs = [ finalAttrs.finalPackage.tex ];
+  };
 
   meta = {
     description = "Geometry Drawing Language";
diff --git a/nixpkgs/pkgs/applications/science/math/form/default.nix b/nixpkgs/pkgs/applications/science/math/form/default.nix
index 00f7d7e45365..c56ee432bdae 100644
--- a/nixpkgs/pkgs/applications/science/math/form/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/form/default.nix
@@ -1,13 +1,13 @@
 { lib, stdenv, fetchurl, gmp, zlib }:
 
 stdenv.mkDerivation {
-  version = "4.2.1";
+  version = "4.3.1";
   pname = "form";
 
   # This tarball is released by author, it is not downloaded from tag, so can't use fetchFromGitHub
   src = fetchurl {
-    url = "https://github.com/vermaseren/form/releases/download/v4.2.1/form-4.2.1.tar.gz";
-    sha256 = "0a0smc10gm85vxd85942n5azy88w5qs5avbqrw0lw0yb9injswpj";
+    url = "https://github.com/vermaseren/form/releases/download/v4.3.1/form-4.3.1.tar.gz";
+    sha256 = "sha256-8fUS3DT+m71rGfLf7wX8uZEt+0PINop1t5bsRy7ou84=";
   };
 
   buildInputs = [ gmp zlib ];
diff --git a/nixpkgs/pkgs/applications/science/math/fricas/default.nix b/nixpkgs/pkgs/applications/science/math/fricas/default.nix
index 8c2541fe4129..48c36b6677f5 100644
--- a/nixpkgs/pkgs/applications/science/math/fricas/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/fricas/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "fricas";
-  version = "1.3.7";
+  version = "1.3.8";
 
   src = fetchurl {
     url = "mirror://sourceforge/fricas/fricas/${version}/fricas-${version}-full.tar.bz2";
-    sha256 = "sha256-cOqMvSe3ef/ZeVy5cj/VU/aTRtxgfxZfRbE4lWE5TU4=";
+    sha256 = "sha256-amAGPLQo70nKATyZM7h3yX5mMUxCwOFwb/fTIWB5hUQ=";
   };
 
   buildInputs = [ sbcl libX11 libXpm libICE libSM libXt libXau libXdmcp ];
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   dontStrip = true;
 
   meta = {
-    homepage = "http://fricas.sourceforge.net/";
+    homepage = "https://fricas.sourceforge.net/";
     description = "An advanced computer algebra system";
     license = lib.licenses.bsd3;
 
diff --git a/nixpkgs/pkgs/applications/science/math/gap/default.nix b/nixpkgs/pkgs/applications/science/math/gap/default.nix
index c309423f142a..7a466f8c000c 100644
--- a/nixpkgs/pkgs/applications/science/math/gap/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/gap/default.nix
@@ -4,6 +4,7 @@
 , makeWrapper
 , readline
 , gmp
+, pari
 , zlib
 # one of
 # - "minimal" (~400M):
@@ -23,27 +24,31 @@ let
   # packages absolutely required for gap to start
   # `*` represents the version where applicable
   requiredPackages = [
-    "GAPDoc-*"
-    "primgrp-*"
-    "SmallGrp-*"
+    "gapdoc"
+    "primgrp"
+    "smallgrp"
     "transgrp"
   ];
-  # packages autoloaded by default if available
+  # packages autoloaded by default if available, and their dependencies
   autoloadedPackages = [
     "atlasrep"
-    "autpgrp-*"
-    "alnuth-*"
-    "crisp-*"
-    "ctbllib-*"
-    "FactInt-*"
+    "autpgrp"
+    "alnuth"
+    "crisp"
+    "ctbllib"
+    "factint"
     "fga"
-    "irredsol-*"
-    "laguna-*"
-    "polenta-*"
-    "polycyclic-*"
-    "resclasses-*"
-    "sophus-*"
-    "tomlib-*"
+    "irredsol"
+    "laguna"
+    "polenta"
+    "polycyclic"
+    "resclasses"
+    "sophus"
+    "tomlib"
+    "autodoc"  # dependency of atlasrep
+    "io"       # used by atlasrep to fetch data from online sources
+    "radiroot" # dependency of polenta
+    "utils"    # dependency of atlasrep
   ];
   keepAll = keepAllPackages || (packageSet == "full");
   packagesToKeep = requiredPackages ++ lib.optionals (packageSet == "standard") autoloadedPackages;
@@ -61,11 +66,11 @@ in
 stdenv.mkDerivation rec {
   pname = "gap";
   # https://www.gap-system.org/Releases/
-  version = "4.11.1";
+  version = "4.12.2";
 
   src = fetchurl {
     url = "https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz";
-    sha256 = "sha256-ZjXF2n2CdV+DOUhrnKwzdm9YcS8pfoI0+6QIGJAuowQ=";
+    sha256 = "sha256-ZyMIdF63iiIklO6N1nhu3VvDMUVvzGRWrAZL2yjVh6g=";
   };
 
   # remove all non-essential packages (which take up a lot of space)
@@ -83,9 +88,14 @@ stdenv.mkDerivation rec {
     makeWrapper
   ];
 
-  # "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";
+  propagatedBuildInputs = [
+    pari # used at runtime by the alnuth package
+  ];
+
+  # "teststandard" is a superset of the tests run by "check". it takes ~20min
+  # instead of ~1min. tests are run twice, once with all packages loaded and
+  # once without.
+  # installCheckTarget = "teststandard";
 
   doInstallCheck = true;
   installCheckTarget = "check";
@@ -104,34 +114,26 @@ stdenv.mkDerivation rec {
     # like the defaults the Makefile, but use gap from PATH instead of the
     # one from builddir
     installCheckFlagsArray+=(
-      "TESTGAP=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r -A"
-      "TESTGAPauto=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r"
+      "TESTGAPcore=gap --quitonbreak -b -q -r"
+      "TESTGAPauto=gap --quitonbreak -b -q -r -m 100m -o 1g -x 80"
+      "TESTGAP=gap --quitonbreak -b -q -r -m 100m -o 1g -x 80 -A"
     )
   '';
 
   postBuild = ''
     pushd pkg
-    bash ../bin/BuildPackages.sh
+    # failures are ignored unless --strict is set
+    bash ../bin/BuildPackages.sh ${lib.optionalString (!keepAll) "--strict"}
     popd
   '';
 
-  installTargets = [
-    "install-libgap"
-    "install-headers"
-  ];
-
-  # full `make install` is not yet implemented, just for libgap and headers
   postInstall = ''
-    # Install config.h, which is not currently handled by `make install-headers`
-    cp gen/config.h "$out/include/gap"
-
-    mkdir -p "$out/bin" "$out/share/gap/"
-
-    echo "Copying files to target directory"
-    cp -ar . "$out/share/gap/build-dir"
-
-    makeWrapper "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap" \
-      --set GAP_DIR $out/share/gap/build-dir
+    # make install creates an empty pkg dir. since we run "make check" on
+    # installCheckPhase to make sure the installed GAP finds its libraries, we
+    # also install the tst dir. this is probably excessively cautious, see
+    # https://github.com/NixOS/nixpkgs/pull/192548#discussion_r992824942
+    rm -r "$out/share/gap/pkg"
+    cp -ar pkg tst "$out/share/gap"
   '';
 
   preFixup = ''
@@ -141,14 +143,11 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Computational discrete algebra system";
-    maintainers = with maintainers;
-    [
-      raskin
-      chrisjefferson
-      timokau
-    ];
+    # We are also grateful to ChrisJefferson for previous work on the package,
+    # and to ChrisJefferson and fingolfin for help with GAP-related questions
+    # from the upstream point of view.
+    maintainers = teams.sage.members;
     platforms = platforms.all;
-    broken = stdenv.isDarwin;
     # keeping all packages increases the package size considerably, which is
     # why a local build is preferable in that situation. The timeframe is
     # reasonable and that way the binary cache doesn't get overloaded.
diff --git a/nixpkgs/pkgs/applications/science/math/geogebra/default.nix b/nixpkgs/pkgs/applications/science/math/geogebra/default.nix
index 43d1a3e2068b..cde4ed20c2d8 100644
--- a/nixpkgs/pkgs/applications/science/math/geogebra/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/geogebra/default.nix
@@ -1,11 +1,11 @@
 { lib, stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, unzip, language ? "en_US" }:
 let
   pname = "geogebra";
-  version = "5-0-706-0";
+  version = "5-0-745-0";
 
   srcIcon = fetchurl {
     url = "http://static.geogebra.org/images/geogebra-logo.svg";
-    sha256 = "01sy7ggfvck350hwv0cla9ynrvghvssqm3c59x4q5lwsxjsxdpjm";
+    hash = "sha256-Vd7Wteya04JJT4WNirXe8O1sfVKUgc0hKGOy7d47Xgc=";
   };
 
   desktopItem = makeDesktopItem {
@@ -45,9 +45,9 @@ let
     src = fetchurl {
       urls = [
         "https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
-        "https://web.archive.org/web/20220516130744/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
+        "https://web.archive.org/web/20221126102702/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"
       ];
-      sha256 = "d18f3d20baff693606331f035fa4bf73e7418d28090f038054da98444b06f69b";
+      hash = "sha256-DhZ9inK/6Cc/vunYNHhyP4tI/9/toUOgV4lZWmFIj3c=";
     };
 
     nativeBuildInputs = [ makeWrapper ];
@@ -76,9 +76,9 @@ let
     src = fetchurl {
       urls = [
         "https://download.geogebra.org/installers/5.0/GeoGebra-MacOS-Installer-withJava-${version}.zip"
-        "https://web.archive.org/web/20220516132502/https://download.geogebra.org/installers/5.0/GeoGebra-MacOS-Installer-withJava-${version}.zip"
+        "https://web.archive.org/web/20221126102602/https://download.geogebra.org/installers/5.0/GeoGebra-MacOS-Installer-withJava-${version}.zip"
       ];
-      sha256 = "0070ec8d8d5f79c921b5d7433048c2c114ec4b812d839bb04e67848fce24ee0a";
+      hash = "sha256-La7NzEoao4ExUw3mBGstvSHm94/JM5LHlhOE9ewJePY=";
     };
 
     dontUnpack = true;
diff --git a/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix b/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix
index e1b5bbaedc2b..22978347f4c0 100644
--- a/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix
+++ b/nixpkgs/pkgs/applications/science/math/geogebra/geogebra6.nix
@@ -1,15 +1,27 @@
 { lib, stdenv, unzip, fetchurl, electron, makeWrapper, geogebra }:
 let
   pname = "geogebra";
-  version = "6-0-676-0";
+  version = "6-0-745-0";
 
   srcIcon = geogebra.srcIcon;
   desktopItem = geogebra.desktopItem;
 
-  meta = with lib; geogebra.meta // {
-    license = licenses.geogebra;
+  meta = with lib; {
+    description = "Dynamic mathematics software with graphics, algebra and spreadsheets";
+    longDescription = ''
+      Dynamic mathematics software for all levels of education that brings
+      together geometry, algebra, spreadsheets, graphing, statistics and
+      calculus in one easy-to-use package.
+    '';
+    homepage = "https://www.geogebra.org/";
     maintainers = with maintainers; [ voidless sikmir ];
+    license = licenses.geogebra;
+    sourceProvenance = with sourceTypes; [
+      binaryBytecode
+      binaryNativeCode  # some jars include native binaries
+    ];
     platforms = with platforms; linux ++ darwin;
+    hydraPlatforms = [];
   };
 
   linuxPkg = stdenv.mkDerivation {
@@ -18,9 +30,9 @@ let
     src = fetchurl {
       urls = [
         "https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip"
-        "https://web.archive.org/web/20211123222708/https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip"
+        "https://web.archive.org/web/20221126110648/https://download.geogebra.org/installers/6.0/GeoGebra-Linux64-Portable-${version}.zip"
       ];
-      sha256 = "0wn90n2nd476rkf83gk9vvcpbjflkrvyri50pnmv52j76n023hmm";
+      hash = "sha256-UksHZt7bEs/aRzFiJrT1Quz/SFSvA88sdhoi1IEVdBc=";
     };
 
     dontConfigure = true;
@@ -53,9 +65,9 @@ let
     src = fetchurl {
       urls = [
         "https://download.geogebra.org/installers/6.0/GeoGebra-Classic-6-MacOS-Portable-${version}.zip"
-        "https://web.archive.org/web/20211124143625/https://download.geogebra.org/installers/6.0/GeoGebra-Classic-6-MacOS-Portable-${version}.zip"
+        "https://web.archive.org/web/20221126111123/https://download.geogebra.org/installers/6.0/GeoGebra-Classic-6-MacOS-Portable-${version}.zip"
       ];
-      sha256 = "1dwv2f94a1c2y10lmy0i66cafynalp7dkqgnpk4f0mk6pir2fdgj";
+      hash = "sha256-Qn2MD3W5icX45Tfs19oRV8J3lYmL8T+hp7A+crRb9tQ=";
     };
 
     dontUnpack = true;
diff --git a/nixpkgs/pkgs/applications/science/math/giac/default.nix b/nixpkgs/pkgs/applications/science/math/giac/default.nix
index 434291861d67..c7ae890c0738 100644
--- a/nixpkgs/pkgs/applications/science/math/giac/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/giac/default.nix
@@ -9,11 +9,11 @@ assert (!blas.isILP64) && (!lapack.isILP64);
 
 stdenv.mkDerivation rec {
   pname = "giac${lib.optionalString enableGUI "-with-xcas"}";
-  version = "1.9.0-5"; # TODO try to remove preCheck phase on upgrade
+  version = "1.9.0-43"; # TODO try to remove preCheck phase on upgrade
 
   src = fetchurl {
     url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz";
-    sha256 = "sha256-EP8wRi8QZPrr1lfKN6da87s1FCy8AuDYbzcvsJCWyLE=";
+    sha256 = "sha256-466jB8ZRqHkU5XCY+j0Fh7Dq/mMaOu10rHECKbtNGrs=";
   };
 
   patches = [
@@ -22,13 +22,24 @@ stdenv.mkDerivation rec {
       url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/pari_2_11.patch?id=21ba7540d385a9864b44850d6987893dfa16bfc0";
       sha256 = "sha256-vEo/5MNzMdYRPWgLFPsDcMT1W80Qzj4EPBjx/B8j68k=";
     })
+
+    # giac calls scanf/printf with non-constant first arguments, which
+    # the compiler rightfully warns about (with an error nowadays).
+    (fetchpatch {
+      name = "fix-string-compiler-error.patch";
+      url = "https://salsa.debian.org/science-team/giac/-/raw/9ca8dbf4bb16d9d96948aa4024326d32485d7917/debian/patches/fix-string-compiler-error.patch";
+      sha256 = "sha256-r+M+9MRPRqhHcdhYWI6inxyNvWbXUbBcPCeDY7aulvk=";
+    })
+
+    # increase pari stack size for test chk_fhan{4,6}
+    ./increase-pari-stack-size.patch
   ] ++ lib.optionals (!enableGUI) [
     # when enableGui is false, giac is compiled without fltk. That
     # means some outputs differ in the make check. Patch around this:
     (fetchpatch {
       name = "nofltk-check.patch";
       url = "https://git.sagemath.org/sage.git/plain/build/pkgs/giac/patches/nofltk-check.patch?id=7553a3c8dfa7bcec07241a07e6a4e7dcf5bb4f26";
-      sha256 = "0xkmfc028vg5w6va04gp2x2iv31n8v4shd6vbyvk4blzgfmpj2cw";
+      sha256 = "sha256-nAl5q3ufLjK3X9s0qMlGNowdRRf3EaC24eVtJABzdXY=";
     })
   ];
 
@@ -85,14 +96,18 @@ stdenv.mkDerivation rec {
     "--enable-ao" "--enable-ecm" "--enable-glpk"
   ] ++ lib.optionals enableGUI [
     "--enable-gui" "--with-x"
-  ] ++ lib.optional (!enableMicroPy) "--disable-micropy";
+  ] ++ lib.optionals (!enableGUI) [
+    "--disable-fltk"
+  ] ++ lib.optionals (!enableMicroPy) [
+    "--disable-micropy"
+  ];
 
   postInstall = ''
     # example Makefiles contain the full path to some commands
     # notably texlive, and we don't want texlive to become a runtime
     # dependency
     for file in $(find $out -name Makefile) ; do
-      sed -i "s@/nix/store/[^/]*/bin/@@" "$file" ;
+      sed -i "s@${builtins.storeDir}/[^/]*/bin/@@" "$file" ;
     done;
 
     # reference cycle
@@ -114,6 +129,7 @@ stdenv.mkDerivation rec {
     homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html";
     license = licenses.gpl3Plus;
     platforms = platforms.linux ++ (optionals (!enableGUI) platforms.darwin);
+    broken = stdenv.isDarwin && stdenv.isAarch64;
     maintainers = [ maintainers.symphorien ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/giac/increase-pari-stack-size.patch b/nixpkgs/pkgs/applications/science/math/giac/increase-pari-stack-size.patch
new file mode 100644
index 000000000000..b12b4b7fad66
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/giac/increase-pari-stack-size.patch
@@ -0,0 +1,18 @@
+diff -ur a/check/chk_fhan4 b/check/chk_fhan4
+--- a/check/chk_fhan4	2018-03-13 19:27:11.000000000 +0100
++++ b/check/chk_fhan4	2023-05-20 16:31:30.349063063 +0200
+@@ -1,4 +1,5 @@
+ #! /bin/sh
+ unset LANG
++export PARI_SIZE=2048000
+ ../src/icas TP04-sol.cas > TP04.tst
+ diff TP04.tst TP04-sol.cas.out1
+diff -ur a/check/chk_fhan6 b/check/chk_fhan6
+--- a/check/chk_fhan6	2018-03-13 19:27:21.000000000 +0100
++++ b/check/chk_fhan6	2023-05-20 16:32:04.199407065 +0200
+@@ -1,4 +1,5 @@
+ #! /bin/sh
+ unset LANG
++export PARI_SIZE=2048000
+ ../src/icas TP06-sol.cas > TP06.tst
+ diff TP06.tst TP06-sol.cas.out1
diff --git a/nixpkgs/pkgs/applications/science/math/ginac/default.nix b/nixpkgs/pkgs/applications/science/math/ginac/default.nix
index 2e18801a8812..057b242e609b 100644
--- a/nixpkgs/pkgs/applications/science/math/ginac/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/ginac/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "ginac";
-  version = "1.8.3";
+  version = "1.8.6";
 
   src = fetchurl {
     url = "https://www.ginac.de/ginac-${version}.tar.bz2";
-    sha256 = "sha256-d8caWGrfb8C12rVzQ08wz/FXkVPNd8broCKS4Xj3pJA=";
+    sha256 = "sha256-ALMgsRFsrlt7QzZNv/t5EkcdFx9ITYJ2RgXXFYWNl1s=";
   };
 
   propagatedBuildInputs = [ cln ];
diff --git a/nixpkgs/pkgs/applications/science/math/glsurf/default.nix b/nixpkgs/pkgs/applications/science/math/glsurf/default.nix
index 808d89ef9636..b4e8c6fb23db 100644
--- a/nixpkgs/pkgs/applications/science/math/glsurf/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/glsurf/default.nix
@@ -40,7 +40,8 @@ stdenv.mkDerivation rec {
   ] ++ (with ocamlPackages; [
     camlp4
     lablgl
-    camlimages_4_2_4
+    camlimages
+    num
   ]);
 
   postPatch = ''
@@ -48,6 +49,9 @@ stdenv.mkDerivation rec {
       substituteInPlace "$f" --replace "+camlp4" \
         "${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4"
     done
+
+    # Fatal error: exception Sys_error("Mutex.unlock: Operation not permitted")
+    sed -i "/gl_started/d" src/draw.ml* src/main.ml
   '';
 
   installPhase = ''
@@ -63,5 +67,6 @@ stdenv.mkDerivation rec {
     homepage = "https://raffalli.eu/~christophe/glsurf/";
     description = "A program to draw implicit surfaces and curves";
     license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.all;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/gmsh/default.nix b/nixpkgs/pkgs/applications/science/math/gmsh/default.nix
index 03a427e06cc2..4d9b3afe31ca 100644
--- a/nixpkgs/pkgs/applications/science/math/gmsh/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/gmsh/default.nix
@@ -1,15 +1,17 @@
 { lib, stdenv, fetchurl, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg
-, zlib, libGL, libGLU, xorg, opencascade-occt }:
+, zlib, libGL, libGLU, xorg, opencascade-occt
+, python ? null, enablePython ? false }:
 
 assert (!blas.isILP64) && (!lapack.isILP64);
+assert enablePython -> (python != null);
 
 stdenv.mkDerivation rec {
   pname = "gmsh";
-  version = "4.10.5";
+  version = "4.11.1";
 
   src = fetchurl {
     url = "https://gmsh.info/src/gmsh-${version}-source.tgz";
-    sha256 = "sha256-zAMMWu5l59WPhQuLb1WmiUXIm8hx+U4SOSefWiEPxOo=";
+    sha256 = "sha256-xf4bfL1AOIioFJKfL9D11p4nYAIioYx4bbW3boAFs2U=";
   };
 
   buildInputs = [
@@ -18,10 +20,31 @@ stdenv.mkDerivation rec {
     libGL libGLU xorg.libXrender xorg.libXcursor xorg.libXfixes
     xorg.libXext xorg.libXft xorg.libXinerama xorg.libX11 xorg.libSM
     xorg.libICE
+  ] ++ lib.optional enablePython python;
+
+  enableParallelBuilding = true;
+
+  patches = [ ./fix-python.patch ];
+
+  postPatch = ''
+    substituteInPlace api/gmsh.py --subst-var-by LIBPATH ${placeholder "out"}/lib/libgmsh.so
+  '';
+
+  # N.B. the shared object is used by bindings
+  cmakeFlags = [
+    "-DENABLE_BUILD_SHARED=ON"
+    "-DENABLE_BUILD_DYNAMIC=ON"
+    "-DENABLE_OPENMP=ON"
   ];
 
   nativeBuildInputs = [ cmake gfortran ];
 
+  postFixup = lib.optionalString enablePython ''
+    mkdir -p $out/lib/python${python.pythonVersion}/site-packages
+    mv $out/lib/gmsh.py $out/lib/python${python.pythonVersion}/site-packages
+    mv $out/lib/*.dist-info $out/lib/python${python.pythonVersion}/site-packages
+  '';
+
   doCheck = true;
 
   meta = {
diff --git a/nixpkgs/pkgs/applications/science/math/gmsh/fix-python.patch b/nixpkgs/pkgs/applications/science/math/gmsh/fix-python.patch
new file mode 100644
index 000000000000..ac07c169c99b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/gmsh/fix-python.patch
@@ -0,0 +1,50 @@
+diff --git a/api/gmsh.py b/api/gmsh.py
+index 747acb203..02004da5d 100644
+--- a/api/gmsh.py
++++ b/api/gmsh.py
+@@ -44,44 +44,7 @@ moduledir = os.path.dirname(os.path.realpath(__file__))
+ parentdir1 = os.path.dirname(moduledir)
+ parentdir2 = os.path.dirname(parentdir1)
+ 
+-if platform.system() == "Windows":
+-    libname = "gmsh-4.11.dll"
+-elif platform.system() == "Darwin":
+-    libname = "libgmsh.4.11.dylib"
+-else:
+-    libname = "libgmsh.so.4.11"
+-
+-# check if the library is in the same directory as the module...
+-libpath = os.path.join(moduledir, libname)
+-
+-# ... or in the parent directory or its lib or Lib subdirectory
+-if not os.path.exists(libpath):
+-    libpath = os.path.join(parentdir1, libname)
+-if not os.path.exists(libpath):
+-    libpath = os.path.join(parentdir1, "lib", libname)
+-if not os.path.exists(libpath):
+-    libpath = os.path.join(parentdir1, "Lib", libname)
+-
+-# ... or in the parent of the parent directory or its lib or Lib subdirectory
+-if not os.path.exists(libpath):
+-    libpath = os.path.join(parentdir2, libname)
+-if not os.path.exists(libpath):
+-    libpath = os.path.join(parentdir2, "lib", libname)
+-if not os.path.exists(libpath):
+-    libpath = os.path.join(parentdir2, "Lib", libname)
+-
+-# if we couldn't find it, use ctype's find_library utility...
+-if not os.path.exists(libpath):
+-    if platform.system() == "Windows":
+-        libpath = find_library("gmsh-4.11")
+-        if not libpath:
+-            libpath = find_library("gmsh")
+-    else:
+-        libpath = find_library("gmsh")
+-
+-# ... and print a warning if everything failed
+-if not os.path.exists(libpath):
+-    print("Warning: could not find Gmsh shared library " + libname)
++libpath = "@LIBPATH@"
+ 
+ lib = CDLL(libpath)
+ 
diff --git a/nixpkgs/pkgs/applications/science/math/gretl/default.nix b/nixpkgs/pkgs/applications/science/math/gretl/default.nix
index 5e1ac5d17733..64e2b9f91313 100644
--- a/nixpkgs/pkgs/applications/science/math/gretl/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/gretl/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   pname = "gretl";
-  version = "2022b";
+  version = "2023a";
 
   src = fetchurl {
     url = "mirror://sourceforge/gretl/${pname}-${version}.tar.xz";
-    sha256 = "sha256-A+LyWPSUBBvnnyBrVSAUCiny24UAztUwy1nmRoDaGjI=";
+    sha256 = "sha256-T1UwQhw/Tr/juYqVJBkst2LRBCIXPLvVd0N+QCJcVtM=";
   };
 
   buildInputs = [
@@ -28,6 +28,10 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkg-config ];
 
   enableParallelBuilding = true;
+  # Missing install depends:
+  #  cp: cannot stat '...-gretl-2022c/share/gretl/data/plotbars': Not a directory
+  #  make[1]: *** [Makefile:73: install_datafiles] Error 1
+  enableParallelInstalling = false;
 
   meta = with lib; {
     description = "A software package for econometric analysis";
@@ -35,7 +39,7 @@ stdenv.mkDerivation rec {
       gretl is a cross-platform software package for econometric analysis,
       written in the C programming language.
     '';
-    homepage = "http://gretl.sourceforge.net";
+    homepage = "https://gretl.sourceforge.net";
     license = licenses.gpl3;
     maintainers = with maintainers; [ dmrauh ];
     platforms = with platforms; all;
diff --git a/nixpkgs/pkgs/applications/science/math/jags/default.nix b/nixpkgs/pkgs/applications/science/math/jags/default.nix
index 1acc6a287ca5..087807013694 100644
--- a/nixpkgs/pkgs/applications/science/math/jags/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/jags/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "JAGS";
-  version = "4.3.1";
+  version = "4.3.2";
 
   src = fetchurl {
     url = "mirror://sourceforge/mcmc-jags/JAGS-${version}.tar.gz";
-    sha256 = "sha256-+SWDVbXp6xO9M8X6cg8MvrrOp9CkpCtxsPsUUB7hQik=";
+    sha256 = "sha256-hx9VavQDp8LOag8C8Vz4WlcnY+CT0mZY66xVxKtHL8g=";
   };
 
   nativeBuildInputs = [ gfortran ];
diff --git a/nixpkgs/pkgs/applications/science/math/labplot/default.nix b/nixpkgs/pkgs/applications/science/math/labplot/default.nix
new file mode 100644
index 000000000000..0105148d9628
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/labplot/default.nix
@@ -0,0 +1,107 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, extra-cmake-modules
+, shared-mime-info
+, wrapQtAppsHook
+
+, qtbase
+
+, karchive
+, kcompletion
+, kconfig
+, kcoreaddons
+, kcrash
+, kdoctools
+, ki18n
+, kiconthemes
+, kio
+, knewstuff
+, kparts
+, ktextwidgets
+, kxmlgui
+, syntax-highlighting
+
+, gsl
+
+, poppler
+, fftw
+, hdf5
+, netcdf
+, cfitsio
+, libcerf
+, cantor
+, zlib
+, lz4
+, readstat
+, matio
+, qtserialport
+, discount
+}:
+
+stdenv.mkDerivation rec {
+  pname = "labplot";
+  version = "2.10.0";
+
+  src = fetchurl {
+    url = "https://download.kde.org/stable/labplot/labplot-${version}.tar.xz";
+    sha256 = "sha256-XfxnQxCQSkOHXWnj4mCh/t2WjmwbHs2rp1WrGqOMupA=";
+  };
+
+  cmakeFlags = [
+    # Disable Vector BLF since it depends on DBC parser which fails to be detected
+    "-DENABLE_VECTOR_BLF=OFF"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    shared-mime-info
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+
+    karchive
+    kcompletion
+    kconfig
+    kcoreaddons
+    kcrash
+    kdoctools
+    ki18n
+    kiconthemes
+    kio
+    knewstuff
+    kparts
+    ktextwidgets
+    kxmlgui
+
+    syntax-highlighting
+    gsl
+
+    poppler
+    fftw
+    hdf5
+    netcdf
+    cfitsio
+    libcerf
+    cantor
+    zlib
+    lz4
+    readstat
+    matio
+    qtserialport
+    discount
+  ];
+
+  meta = with lib; {
+    description = "LabPlot is a FREE, open source and cross-platform Data Visualization and Analysis software accessible to everyone";
+    homepage = "https://labplot.kde.org";
+    license = with licenses; [ asl20 bsd3 cc-by-30 cc0 gpl2Only gpl2Plus gpl3Only gpl3Plus lgpl3Plus mit ];
+    maintainers = with maintainers; [ hqurve ];
+    mainProgram = "labplot2";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/math/lp_solve/default.nix b/nixpkgs/pkgs/applications/science/math/lp_solve/default.nix
index f4c117267d56..6a1bc86abced 100644
--- a/nixpkgs/pkgs/applications/science/math/lp_solve/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/lp_solve/default.nix
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A Mixed Integer Linear Programming (MILP) solver";
-    homepage = "http://lpsolve.sourceforge.net";
+    homepage = "https://lpsolve.sourceforge.net";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ smironov ];
     platforms = platforms.unix;
diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/10.nix b/nixpkgs/pkgs/applications/science/math/mathematica/10.nix
index d1397d228df0..e5ab259b8f70 100644
--- a/nixpkgs/pkgs/applications/science/math/mathematica/10.nix
+++ b/nixpkgs/pkgs/applications/science/math/mathematica/10.nix
@@ -74,7 +74,8 @@ stdenv.mkDerivation rec {
     + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux")
       (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs);
 
-  phases = "unpackPhase installPhase fixupPhase";
+  dontConfigure = true;
+  dontBuild = true;
 
   unpackPhase = ''
     echo "=== Extracting makeself archive ==="
diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/11.nix b/nixpkgs/pkgs/applications/science/math/mathematica/11.nix
index 50f2644a10b7..5b9460f76e06 100644
--- a/nixpkgs/pkgs/applications/science/math/mathematica/11.nix
+++ b/nixpkgs/pkgs/applications/science/math/mathematica/11.nix
@@ -75,7 +75,8 @@ stdenv.mkDerivation rec {
     + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux")
       (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs);
 
-  phases = "unpackPhase installPhase fixupPhase";
+  dontConfigure = true;
+  dontBuild = true;
 
   unpackPhase = ''
     echo "=== Extracting makeself archive ==="
diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/9.nix b/nixpkgs/pkgs/applications/science/math/mathematica/9.nix
index c3d74d8a0027..c2fc07c532fc 100644
--- a/nixpkgs/pkgs/applications/science/math/mathematica/9.nix
+++ b/nixpkgs/pkgs/applications/science/math/mathematica/9.nix
@@ -64,7 +64,8 @@ stdenv.mkDerivation rec {
     + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux")
     (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs);
 
-  phases = "unpackPhase installPhase fixupPhase";
+  dontConfigure = true;
+  dontBuild = true;
 
   unpackPhase = ''
     echo "=== Extracting makeself archive ==="
diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/default.nix b/nixpkgs/pkgs/applications/science/math/mathematica/default.nix
index a3f6a83efab1..c0f370d88457 100644
--- a/nixpkgs/pkgs/applications/science/math/mathematica/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/mathematica/default.nix
@@ -4,7 +4,26 @@
 , cudaPackages
 , cudaSupport ? config.cudaSupport or false
 , lang ? "en"
+, webdoc ? false
 , version ? null
+/*
+If you wish to completely override the src, use:
+my_mathematica = mathematica.override {
+  source = pkgs.requireFile {
+    name = "Mathematica_XX.X.X_BNDL_LINUX.sh";
+    # Get this hash via a command similar to this:
+    # nix-store --query --hash \
+    # $(nix store add-path Mathematica_XX.X.X_BNDL_LINUX.sh --name 'Mathematica_XX.X.X_BNDL_LINUX.sh')
+    sha256 = "0000000000000000000000000000000000000000000000000000";
+    message = ''
+      Your override for Mathematica includes a different src for the installer,
+      and it is missing.
+    '';
+    hashMode = "recursive";
+  };
+}
+*/
+, source ? null
 }:
 
 let versions = callPackage ./versions.nix { };
@@ -12,16 +31,20 @@ let versions = callPackage ./versions.nix { };
     matching-versions =
       lib.sort (v1: v2: lib.versionAtLeast v1.version v2.version) (lib.filter
         (v: v.lang == lang
-            && (if version == null then true else isMatching v.version version))
+            && (version == null || isMatching v.version version)
+            && matchesDoc v)
         versions);
 
     found-version =
       if matching-versions == []
       then throw ("No registered Mathematica version found to match"
-                  + " version=${version} and language=${lang}")
+                  + " version=${toString version} and language=${lang},"
+                  + " ${if webdoc
+                        then "using web documentation"
+                        else "and with local documentation"}")
       else lib.head matching-versions;
 
-    specific-drv = ./. + "/(lib.versions.major found-version.version).nix";
+    specific-drv = ./. + "/${lib.versions.major found-version.version}.nix";
 
     real-drv = if lib.pathExists specific-drv
                then specific-drv
@@ -34,11 +57,17 @@ let versions = callPackage ./versions.nix { };
           sublist = l: lib.sublist 0 n l;
       in lib.compareLists lib.compare (sublist as) (sublist bs) == 0;
 
+    matchesDoc = v:
+      builtins.match (if webdoc
+                      then ".*[0-9]_LINUX.sh"
+                      else ".*[0-9]_BNDL_LINUX.sh") v.src.name != null;
+
 in
 
 callPackage real-drv {
   inherit cudaSupport cudaPackages;
-  inherit (found-version) version lang src;
+  inherit (found-version) version lang;
+  src = if source == null then found-version.src else source;
   name = ("mathematica"
           + lib.optionalString cudaSupport "-cuda"
           + "-${found-version.version}"
diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix b/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix
index b081640c97d5..f8e6555d7632 100644
--- a/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix
+++ b/nixpkgs/pkgs/applications/science/math/mathematica/generic.nix
@@ -41,6 +41,8 @@
 , pciutils
 , tre
 , unixODBC
+, xcbutilimage
+, xcbutilkeysyms
 , xkeyboard_config
 , xorg
 , zlib
@@ -94,6 +96,8 @@ in stdenv.mkDerivation {
     pciutils
     tre
     unixODBC
+    xcbutilimage
+    xcbutilkeysyms
     xkeyboard_config
   ] ++ (with xorg; [
     libICE
diff --git a/nixpkgs/pkgs/applications/science/math/mathematica/versions.nix b/nixpkgs/pkgs/applications/science/math/mathematica/versions.nix
index 8f056a234270..5fd879b13338 100644
--- a/nixpkgs/pkgs/applications/science/math/mathematica/versions.nix
+++ b/nixpkgs/pkgs/applications/science/math/mathematica/versions.nix
@@ -1,7 +1,55 @@
 { lib, requireFile }:
 
+/*
+ * To calculate the hash of an installer, use a command like this:
+ *
+ *   nix --extra-experimental-features nix-command hash file <installer-file>
+ */
+
 let versions = [
   {
+    version = "13.2.1";
+    lang = "en";
+    language = "English";
+    sha256 = "sha256-GA2k+jvE4mTJsIbMHce5c516h/glHLnXdthEfnNmk0w=";
+    installer = "Mathematica_13.2.1_LINUX.sh";
+  }
+  {
+    version = "13.2.1";
+    lang = "en";
+    language = "English";
+    sha256 = "sha256-ZvgG2W/gjQIo4hyXHsGta5FyTslrz/ltOe/ZK/U2Sx8=";
+    installer = "Mathematica_13.2.1_BNDL_LINUX.sh";
+  }
+  {
+    version = "13.2.0";
+    lang = "en";
+    language = "English";
+    sha256 = "sha256-T9XOXA6jpgN6bcO/do9sw1L73ABtyxuZCLzftv4Cl6o=";
+    installer = "Mathematica_13.2.0_LINUX.sh";
+  }
+  {
+    version = "13.2.0";
+    lang = "en";
+    language = "English";
+    sha256 = "sha256-YRUvl2H9SwpwDZx04ugd7ZnK5G+t88bzAObXsGGVhk0=";
+    installer = "Mathematica_13.2.0_BNDL_LINUX.sh";
+  }
+  {
+    version = "13.1.0";
+    lang = "en";
+    language = "English";
+    sha256 = "sha256-GZyUYslx/M4aFI3Pj9Osw3/w79/Jp/4T3mRE277pNuM=";
+    installer = "Mathematica_13.1.0_LINUX.sh";
+  }
+  {
+    version = "13.1.0";
+    lang = "en";
+    language = "English";
+    sha256 = "sha256-LIpGAJ3uTkZgjc0YykwusyyHQKlCnTvrZGStFfSOz60=";
+    installer = "Mathematica_13.1.0_BNDL_LINUX.sh";
+  }
+  {
     version = "13.0.1";
     lang = "en";
     language = "English";
diff --git a/nixpkgs/pkgs/applications/science/math/maxima/default.nix b/nixpkgs/pkgs/applications/science/math/maxima/default.nix
index 8bad09f17880..9d1b5c09b825 100644
--- a/nixpkgs/pkgs/applications/science/math/maxima/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/maxima/default.nix
@@ -20,11 +20,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "maxima";
-  version = "5.45.1";
+  version = "5.46.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "sha256-/pAWJ2lwvvIUoaJENIVYZEUU1/36pPyLnQ6Hr8u059w=";
+    sha256 = "sha256-c5Dwa0jaZckDPosvYpuXi5AFZFSlQCLbfecOIiWqiwc=";
   };
 
   nativeBuildInputs = [
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  checkInputs = [
+  nativeCheckInputs = [
     gnuplot
   ];
 
@@ -79,12 +79,6 @@ stdenv.mkDerivation rec {
       url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/undoing_true_false_printing_patch.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
       sha256 = "0fvi3rcjv6743sqsbgdzazy9jb6r1p1yq63zyj9fx42wd1hgf7yx";
     })
-  ] ++ lib.optionals (lisp-compiler.pname == "ecl") [
-    # build fasl, needed for ECL support
-    (fetchpatch {
-      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/maxima.system.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
-      sha256 = "18zafig8vflhkr80jq2ivk46k92dkszqlyq8cfmj0b2vcfjwwbar";
-    })
   ];
 
   # The test suite is disabled since 5.42.2 because of the following issues:
diff --git a/nixpkgs/pkgs/applications/science/math/mxnet/default.nix b/nixpkgs/pkgs/applications/science/math/mxnet/default.nix
index abff55413cec..240a1759397f 100644
--- a/nixpkgs/pkgs/applications/science/math/mxnet/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/mxnet/default.nix
@@ -2,36 +2,36 @@
 , opencv3, gtest, blas, gomp, llvmPackages, perl
 , cudaSupport ? config.cudaSupport or false, cudaPackages ? {}, nvidia_x11
 , cudnnSupport ? cudaSupport
-, cudaCapabilities ? [ "3.7" "5.0" "6.0" "7.0" "7.5" "8.0" "8.6" ]
 }:
 
 let
-  inherit (cudaPackages) cudatoolkit cudnn;
+  inherit (cudaPackages) cudatoolkit cudaFlags cudnn;
 in
 
 assert cudnnSupport -> cudaSupport;
 
 stdenv.mkDerivation rec {
   pname = "mxnet";
-  version = "1.8.0";
+  version = "1.9.1";
 
   src = fetchurl {
     name = "apache-mxnet-src-${version}-incubating.tar.gz";
     url = "https://dlcdn.apache.org/incubator/mxnet/${version}/apache-mxnet-src-${version}-incubating.tar.gz";
-    hash = "sha256-la/5hYlaukCcCNVRRRCuOLiEkM+2KBqzpf8PWCbI21Q=";
+    hash = "sha256-EephMoF02MKblvNBl34D3rC/Sww3rOZY+T442euMkyI=";
   };
 
   patches = [
-    # Fix build error https://github.com/apache/incubator-mxnet/issues/19405
+    # Remove the following two patches when updating mxnet to 2.0.
     (fetchpatch {
-      name = "mxnet-fix-gcc-linker-error-1.patch";
-      url = "https://github.com/apache/incubator-mxnet/commit/78e31d66d19e385ca4ef73245ce79a47e375d8d1.diff";
-      sha256 = "sha256-UfmGhh4RbvrEOXe6IJxHm1Aqpy1gS6gHxrX5KQBXjv4=";
+      name = "1-auto-disable-sse-for-non-x86.patch";
+      url = "https://github.com/apache/incubator-mxnet/commit/55e69871d4cadec51a8bbb6700131065388cb0b9.patch";
+      hash = "sha256-uaMpM0F9HRtEBXz2ewB/dlbuKaY5/RineCPUE2T6CHU=";
     })
     (fetchpatch {
-      name = "mxnet-fix-gcc-linker-error-2.patch";
-      url = "https://github.com/apache/incubator-mxnet/commit/9bfe3116aabd01049fdbd90855cb245a30b795df.diff";
-      sha256 = "sha256-BL7Zf7Bgn0qpai9HbQ6LBxZNa3iLjVJSe5nxZgqI/fw=";
+      name = "2-auto-disable-sse-for-non-x86.patch";
+      url = "https://github.com/apache/incubator-mxnet/commit/c1b96f562f55dfa024ac941d7b104f00e239ee0f.patch";
+      excludes = ["ci/docker/runtime_functions.sh"];
+      hash = "sha256-r1LbC8ueRooW5tTNakAlRSJ+9aR4WXXoEKx895DgOs4=";
     })
   ];
 
@@ -50,10 +50,16 @@ stdenv.mkDerivation rec {
       "-DUSE_OLDCMAKECUDA=ON"  # see https://github.com/apache/incubator-mxnet/issues/10743
       "-DCUDA_ARCH_NAME=All"
       "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
-      "-DMXNET_CUDA_ARCH=${lib.concatStringsSep ";" cudaCapabilities}"
+      "-DMXNET_CUDA_ARCH=${builtins.concatStringsSep ";" cudaFlags.realArches}"
     ] else [ "-DUSE_CUDA=OFF" ])
     ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
 
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=maybe-uninitialized"
+    "-Wno-error=uninitialized"
+  ];
+
   postPatch = ''
     substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \
       --replace "/bin/bash" "${bash}/bin/bash"
diff --git a/nixpkgs/pkgs/applications/science/math/nasc/default.nix b/nixpkgs/pkgs/applications/science/math/nasc/default.nix
index 3e7a8b56af1c..d25f0ad34496 100644
--- a/nixpkgs/pkgs/applications/science/math/nasc/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/nasc/default.nix
@@ -1,7 +1,6 @@
 { lib, stdenv
 , fetchFromGitHub
 , pkg-config
-, fetchpatch
 , python3
 , meson
 , ninja
@@ -61,12 +60,12 @@ stdenv.mkDerivation rec {
     substituteInPlace subprojects/libqalculate/libqalculate/Calculator-plot.cc \
       --replace 'commandline = "gnuplot"' 'commandline = "${gnuplot}/bin/gnuplot"' \
       --replace '"gnuplot - ' '"${gnuplot}/bin/gnuplot - '
+    substituteInPlace subprojects/libqalculate/libqalculate/meson.build \
+      --replace "link_with: 'libqalculate_lib_static'" "link_with: libqalculate_lib_static"
   '';
 
   passthru = {
-    updateScript = nix-update-script {
-      attrPath = pname;
-    };
+    updateScript = nix-update-script { };
   };
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/math/pagsuite/default.nix b/nixpkgs/pkgs/applications/science/math/pagsuite/default.nix
new file mode 100644
index 000000000000..6994712e18fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/pagsuite/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, unzip
+, gmp
+, scalp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pagsuite";
+  version = "1.80";
+
+  src = fetchurl {
+    url = "https://gitlab.com/kumm/pagsuite/-/raw/master/releases/pagsuite_${lib.replaceStrings ["."] ["_"] version}.zip";
+    hash = "sha256-TYd+dleVPWEWU9Cb3XExd7ixJZyiUAp9QLtorYJSIbQ=";
+  };
+
+  sourceRoot = "pagsuite_${lib.replaceStrings ["."] ["_"] version}";
+
+  nativeBuildInputs = [
+    cmake
+    unzip
+  ];
+
+  buildInputs = [
+    gmp
+    scalp
+  ];
+
+  meta = with lib; {
+    description = "Optimization tools for the (P)MCM problem";
+    homepage = "https://gitlab.com/kumm/pagsuite";
+    maintainers = with maintainers; [ wegank ];
+    license = licenses.unfree;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/math/pari/default.nix b/nixpkgs/pkgs/applications/science/math/pari/default.nix
index 9f13914474c1..ee3caaff1277 100644
--- a/nixpkgs/pkgs/applications/science/math/pari/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/pari/default.nix
@@ -1,19 +1,21 @@
 { lib
 , stdenv
 , fetchurl
+, fetchpatch
 , gmp
 , libX11
+, libpthreadstubs
 , perl
 , readline
 , tex
-, withThread ? true, libpthreadstubs
+, withThread ? true
 }:
 
 assert withThread -> libpthreadstubs != null;
 
 stdenv.mkDerivation rec {
   pname = "pari";
-  version = "2.13.4";
+  version = "2.15.3";
 
   src = fetchurl {
     urls = [
@@ -21,9 +23,19 @@ stdenv.mkDerivation rec {
       # old versions are at the url below
       "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz"
     ];
-    hash = "sha256-vN6ezq4VkoFDgcFpfNtwY1Z7ZQQgGxvke7WJIPO84YU=";
+    hash = "sha256-rfWlhjjNr9cqi0i8n0RJcrIzKcjVRaHT7Ru+sbZWkmg=";
   };
 
+  patches = [
+    # https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2466
+    (fetchpatch {
+      name = "incorrect-result-from-qfbclassno.patch";
+      url = "https://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=pari.git;a=commitdiff_plain;h=7ca0c2eae87def89fa7253c60e4791a8ef26629d";
+      excludes = [ "src/test/32/quadclassunit" "CHANGES" ];
+      hash = "sha256-CQRkIYDFMrWHCoSWGsIydPjGk3w09zzghajlNuq29Jk=";
+    })
+  ];
+
   buildInputs = [
     gmp
     libX11
@@ -39,17 +51,12 @@ stdenv.mkDerivation rec {
     "--with-gmp=${lib.getDev gmp}"
     "--with-readline=${lib.getDev readline}"
   ]
-  ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin"
   ++ lib.optional withThread "--mt=pthread";
 
   preConfigure = ''
     export LD=$CC
   '';
 
-  postConfigure = lib.optionalString stdenv.isDarwin ''
-    echo 'echo x86_64-darwin' > config/arch-osname
-  '';
-
   makeFlags = [ "all" ];
 
   meta = with lib; {
@@ -80,9 +87,8 @@ stdenv.mkDerivation rec {
     '';
     downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
     license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ ertes AndersonTorres ] ++ teams.sage.members;
+    maintainers = with maintainers; [ ertes ] ++ teams.sage.members;
     platforms = platforms.linux ++ platforms.darwin;
-    broken = stdenv.isDarwin && stdenv.isAarch64;
     mainProgram = "gp";
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix b/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix
index 7f31543a925f..512aaba78d54 100644
--- a/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix
+++ b/nixpkgs/pkgs/applications/science/math/pari/gp2c.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "gp2c";
-  version = "0.0.12";
+  version = "0.0.13";
 
   src = fetchurl {
     url = "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/${pname}-${version}.tar.gz";
-    sha256 = "039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf";
+    hash = "sha256-JhN07Kc+vXbBEqlZPcootkgSqnYlYf2lpLLCzXmmnTY=";
   };
 
   buildInputs = [
@@ -25,10 +25,9 @@ stdenv.mkDerivation rec {
   ];
 
   meta = with lib; {
-    description =  "A compiler to translate GP scripts to PARI programs";
     homepage = "http://pari.math.u-bordeaux.fr/";
+    description =  "A compiler to translate GP scripts to PARI programs";
     downloadPage = "http://pari.math.u-bordeaux.fr/download.html";
-    license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ AndersonTorres ];
+    inherit (pari.meta) license maintainers platforms broken;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/perseus/default.nix b/nixpkgs/pkgs/applications/science/math/perseus/default.nix
index 4545203dacca..bbfc8aed4428 100644
--- a/nixpkgs/pkgs/applications/science/math/perseus/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/perseus/default.nix
@@ -8,12 +8,12 @@ stdenv.mkDerivation {
   hardeningDisable = [ "stackprotector" ];
 
   src = fetchurl {
-    url = "http://www.sas.upenn.edu/~vnanda/source/perseus_4_beta.zip";
-    sha256 = "09brijnqabhgfjlj5wny0bqm5dwqcfkp1x5wif6yzdmqh080jybj";
+    url = "http://people.maths.ox.ac.uk/nanda/source/perseus_4_beta.zip";
+    sha256 = "sha256-cnkJEIC4tu+Ni7z0cKdjmLdS8QLe8iKpdA8uha2MeSU=";
   };
 
   sourceRoot = ".";
-
+  env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
   buildPhase = ''
     g++ Pers.cpp -O3 -fpermissive -o perseus
   '';
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
       around datasets arising from point samples, images, distance
       matrices and so forth.
     '';
-    homepage = "http://www.sas.upenn.edu/~vnanda/perseus/index.html";
+    homepage = "http://people.maths.ox.ac.uk/nanda/perseus/index.html";
     license = lib.licenses.gpl3;
     maintainers = with lib.maintainers; [ erikryb ];
     platforms = lib.platforms.linux;
diff --git a/nixpkgs/pkgs/applications/science/math/polymake/default.nix b/nixpkgs/pkgs/applications/science/math/polymake/default.nix
index d132a98dcb9a..4dc11db532fd 100644
--- a/nixpkgs/pkgs/applications/science/math/polymake/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/polymake/default.nix
@@ -1,7 +1,20 @@
-{ lib, stdenv, fetchurl
-, perl, gmp, mpfr, flint, boost
-, bliss, ppl, singular, cddlib, lrs, nauty
-, ninja, ant, openjdk
+{ lib
+, stdenv
+, fetchurl
+, perl
+, gmp
+, mpfr
+, flint
+, boost
+, bliss
+, ppl
+, singular
+, cddlib
+, lrs
+, nauty
+, ninja
+, ant
+, openjdk
 , perlPackages
 , makeWrapper
 }:
@@ -12,27 +25,42 @@
 
 stdenv.mkDerivation rec {
   pname = "polymake";
-  version = "4.6";
+  version = "4.9";
 
   src = fetchurl {
     # "The minimal version is a packager friendly version which omits
     # the bundled sources of cdd, lrs, libnormaliz, nauty and jReality."
     url = "https://polymake.org/lib/exe/fetch.php/download/polymake-${version}-minimal.tar.bz2";
-    sha256 = "sha256-QjpE3e8R6uqEV6sV3V2G3beovMbJuxF3b54pWNfc+dA=";
+    sha256 = "sha256-BMkLgms6JsWmPhi+MZv/Eqie8BKL+KaPtk3xBZSyWfM=";
   };
 
+  nativeBuildInputs = [
+    makeWrapper
+    ninja
+    ant
+    perl
+  ];
+
   buildInputs = [
-    perl gmp mpfr flint boost
-    bliss ppl singular cddlib lrs nauty
+    perl
+    gmp
+    mpfr
+    flint
+    boost
+    bliss
+    ppl
+    singular
+    cddlib
+    lrs
+    nauty
     openjdk
   ] ++ (with perlPackages; [
-    JSON TermReadLineGnu TermReadKey XMLSAX
+    JSON
+    TermReadLineGnu
+    TermReadKey
+    XMLSAX
   ]);
 
-  nativeBuildInputs = [
-    makeWrapper ninja ant perl
-  ];
-
   ninjaFlags = [ "-C" "build/Opt" ];
 
   postInstall = ''
@@ -43,9 +71,10 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Software for research in polyhedral geometry";
+    homepage = "https://www.polymake.org/doku.php";
+    changelog = "https://github.com/polymake/polymake/blob/V${version}/ChangeLog";
     license = licenses.gpl2Plus;
     maintainers = teams.sage.members;
     platforms = platforms.linux;
-    homepage = "https://www.polymake.org/doku.php";
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/primecount/default.nix b/nixpkgs/pkgs/applications/science/math/primecount/default.nix
index a5ecd42a8e49..6b050f0f4fce 100644
--- a/nixpkgs/pkgs/applications/science/math/primecount/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/primecount/default.nix
@@ -7,18 +7,22 @@
 
 stdenv.mkDerivation rec {
   pname = "primecount";
-  version = "7.4";
+  version = "7.8";
 
   src = fetchFromGitHub {
     owner = "kimwalisch";
     repo = "primecount";
     rev = "v${version}";
-    hash = "sha256-ZKrTeeDJgVy+6Q0twFW9+bQulUmOL1dxznYK9nWd07Y=";
+    hash = "sha256-yKk+zXvA/MI7y9gCMwJNYHRYIYgeWyJHjyPi1uNWVnM=";
   };
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [
+    cmake
+  ];
 
-  buildInputs = [ primesieve ];
+  buildInputs = [
+    primesieve
+  ];
 
   cmakeFlags = [
     "-DBUILD_LIBPRIMESIEVE=ON"
@@ -30,6 +34,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     homepage = "https://github.com/kimwalisch/primecount";
+    changelog = "https://github.com/kimwalisch/primecount/blob/v${version}/ChangeLog";
     description = "Fast prime counting function implementations";
     longDescription = ''
       primecount is a command-line program and C/C++ library that counts the
diff --git a/nixpkgs/pkgs/applications/science/math/primesieve/default.nix b/nixpkgs/pkgs/applications/science/math/primesieve/default.nix
index e43538e9babc..24f583a3346b 100644
--- a/nixpkgs/pkgs/applications/science/math/primesieve/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/primesieve/default.nix
@@ -6,19 +6,20 @@
 
 stdenv.mkDerivation rec {
   pname = "primesieve";
-  version = "8.0";
+  version = "11.1";
 
   src = fetchFromGitHub {
     owner = "kimwalisch";
     repo = "primesieve";
     rev = "v${version}";
-    hash = "sha256-sqHNQXWeo+Iktq3gyiDLblBq/9QNlUQDvi1oHcZ2XYM=";
+    hash = "sha256-b6X3zhoJsO3UiWfeW4zbKsaoofIWArJi5usof3efQ0k=";
   };
 
   nativeBuildInputs = [ cmake ];
 
   meta = with lib; {
     homepage = "https://primesieve.org/";
+    changelog = "https://github.com/kimwalisch/primesieve/blob/v${version}/ChangeLog";
     description = "Fast C/C++ prime number generator";
     longDescription = ''
       primesieve is a command-line program and C/C++ library for quickly
diff --git a/nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix b/nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix
index e9c7cb985cb9..ee48a1d0f1a3 100644
--- a/nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/programmer-calculator/default.nix
@@ -2,13 +2,13 @@
 
 gccStdenv.mkDerivation rec {
   pname = "programmer-calculator";
-  version = "2.2";
+  version = "3.0";
 
   src = fetchFromGitHub {
     owner = "alt-romes";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-JQcYCYKdjdy8U2XMFzqTH9kAQ7CFv0r+sC1YfuAm7p8=";
+    sha256 = "sha256-9mv8Jac6j3fKWLLCu1Bd/T5dbegUB8rRgsj9MaQhFDw=";
   };
 
   buildInputs = [ ncurses ];
diff --git a/nixpkgs/pkgs/applications/science/math/pspp/default.nix b/nixpkgs/pkgs/applications/science/math/pspp/default.nix
index 6e9ff90315cd..dbc5c8a0f179 100644
--- a/nixpkgs/pkgs/applications/science/math/pspp/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/pspp/default.nix
@@ -13,10 +13,10 @@ stdenv.mkDerivation rec {
     sha256 = "0lqrash677b09zxdlxp89z6k02y4i23mbqg83956dwl69wc53dan";
   };
 
-  nativeBuildInputs = [ pkg-config texinfo python3 ];
+  nativeBuildInputs = [ pkg-config texinfo python3 makeWrapper ];
   buildInputs = [ libxml2 readline zlib perl cairo gtk3 gsl
     gtksourceview pango gettext
-    makeWrapper gsettings-desktop-schemas hicolor-icon-theme ssw
+    gsettings-desktop-schemas hicolor-icon-theme ssw
   ];
 
   doCheck = false;
diff --git a/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
index fc4e822e208a..573b42c39f62 100644
--- a/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/qalculate-gtk/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "qalculate-gtk";
-  version = "4.2.0";
+  version = "4.6.1";
 
   src = fetchFromGitHub {
     owner = "qalculate";
     repo = "qalculate-gtk";
     rev = "v${version}";
-    sha256 = "sha256-SphruQ/b8z5S/wKb9yhbEy9/pwiY+frZltdIYj0CJBM=";
+    sha256 = "sha256-eBclDq9Uiu5rA74tlBkOiP3fRwAZn84F3LPA2cKkuw8=";
   };
 
   hardeningDisable = [ "format" ];
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "The ultimate desktop calculator";
     homepage = "http://qalculate.github.io";
-    maintainers = with maintainers; [ gebner doronbehar ];
+    maintainers = with maintainers; [ gebner doronbehar alyaeanyx ];
     license = licenses.gpl2Plus;
     platforms = platforms.all;
   };
diff --git a/nixpkgs/pkgs/applications/science/math/qalculate-qt/default.nix b/nixpkgs/pkgs/applications/science/math/qalculate-qt/default.nix
new file mode 100644
index 000000000000..21ab877b7a0c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/qalculate-qt/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, intltool, pkg-config, qmake, wrapQtAppsHook, libqalculate, qtbase, qttools, qtsvg, qtwayland }:
+
+stdenv.mkDerivation rec {
+  pname = "qalculate-qt";
+  version = "4.6.1";
+
+  src = fetchFromGitHub {
+    owner = "qalculate";
+    repo = "qalculate-qt";
+    rev = "v${version}";
+    hash = "sha256-9DT1U0iKj5C/Tc9MggEr/RwHhVr4GSOJQVhTiLFk9NY=";
+  };
+
+  nativeBuildInputs = [ qmake intltool pkg-config wrapQtAppsHook ];
+  buildInputs = [ libqalculate qtbase qttools qtsvg ]
+    ++ lib.optionals stdenv.isLinux [ qtwayland ];
+
+  postPatch = ''
+    substituteInPlace qalculate-qt.pro\
+      --replace "LRELEASE" "${qttools.dev}/bin/lrelease"
+  '';
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    mkdir -p $out/Applications
+    mv $out/bin/qalculate-qt.app $out/Applications
+    makeWrapper $out/{Applications/qalculate-qt.app/Contents/MacOS,bin}/qalculate-qt
+  '';
+
+  meta = with lib; {
+    description = "The ultimate desktop calculator";
+    homepage = "http://qalculate.github.io";
+    maintainers = with maintainers; [ _4825764518 ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/math/ratpoints/default.nix b/nixpkgs/pkgs/applications/science/math/ratpoints/default.nix
index dd8258a3456d..44c68ebcdcea 100644
--- a/nixpkgs/pkgs/applications/science/math/ratpoints/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/ratpoints/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ gmp ];
 
   makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
-  buildFlags = lib.optional stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"];
+  buildFlags = lib.optionals stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"];
   installFlags = [ "INSTALL_DIR=$(out)" ];
 
   preInstall = ''mkdir -p "$out"/{bin,share,lib,include}'';
diff --git a/nixpkgs/pkgs/applications/science/math/readstat/default.nix b/nixpkgs/pkgs/applications/science/math/readstat/default.nix
new file mode 100644
index 000000000000..efbf80ba16ed
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/readstat/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "readstat";
+  version = "1.1.9";
+
+  src = fetchFromGitHub {
+    owner = "WizardMac";
+    repo = "ReadStat";
+    rev = "v${version}";
+    sha256 = "sha256-4lRJgZPB2gfaQ9fQKvDDpGhy1eDNT/nT1QmeZlCmCis=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  buildInputs = [ libiconv ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "https://github.com/WizardMac/ReadStat";
+    description = "Command-line tool (+ C library) for converting SAS, Stata, and SPSS files";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ swflint ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix b/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix
index 78943457d3b2..6b15073675f7 100644
--- a/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/rofi-calc/default.nix
@@ -12,13 +12,13 @@
 
 stdenv.mkDerivation rec {
   pname = "rofi-calc";
-  version = "2.1.0";
+  version = "2.2.0";
 
   src = fetchFromGitHub {
     owner = "svenstaro";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-sfUcBSUYf/+neBAhEd5LAtMOfIbdXM/ieUOztjk8Pwg=";
+    sha256 = "sha256-SGDORHX+lk6PS5/sPAmKZLfZD99/A7XvDPDnuAygDAM=";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/applications/science/math/sage/README.md b/nixpkgs/pkgs/applications/science/math/sage/README.md
index c3a81c2109ee..c4de5da45dbf 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/README.md
+++ b/nixpkgs/pkgs/applications/science/math/sage/README.md
@@ -10,7 +10,7 @@ First you should find out which change to nixpkgs is at fault (if you don't alre
 
 If the build broke as a result of a package update, try those solutions in order:
 
-- search the [sage trac](https://trac.sagemath.org/) for keywords like "Upgrade <package>". Maybe somebody has already proposed a patch that fixes the issue. You can then add a `fetchpatch` to `sage-src.nix`.
+- search the [sage GitHub repo](https://github.com/sagemath/sage) for keywords like "Upgrade <package>". Maybe somebody has already proposed a patch that fixes the issue. You can then add a `fetchpatch` to `sage-src.nix`.
 
 - check if [gentoo](https://github.com/cschwan/sage-on-gentoo/tree/master/sci-mathematics/sage), [debian](https://salsa.debian.org/science-team/sagemath/tree/master/debian) or [arch linux](https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/sagemath) already solved the problem. You can then again add a `fetchpatch` to `sage-src.nix`. If applicable you should also [propose the patch upstream](#proposing-a-sage-patch).
 
@@ -19,7 +19,7 @@ If the build broke as a result of a package update, try those solutions in order
 ```
 [user@localhost ~]$ git clone https://github.com/sagemath/sage.git
 [user@localhost ~]$ cd sage
-[user@localhost sage]$ git checkout 8.2 # substitute the relevant version here
+[user@localhost sage]$ git checkout 9.8 # substitute the relevant version here
 ```
 
 Then make the needed changes and generate a patch with `git diff`:
@@ -29,42 +29,10 @@ Then make the needed changes and generate a patch with `git diff`:
 [user@localhost ~]$ git diff -u > /path/to/nixpkgs/pkgs/applications/science/math/sage/patches/name-of-patch.patch
 ```
 
-Now just add the patch to `sage-src.nix` and test your changes. If they fix the problem, [propose them upstream](#proposing-a-sage-patch) and add a link to the trac ticket.
+Now just add the patch to `sage-src.nix` and test your changes. If they fix the problem, submit a PR upstream (refer to sages [Developer's Guide](http://doc.sagemath.org/html/en/developer/index.html) for further details).
 
 - pin the package version in `default.nix` and add a note that explains why that is necessary.
 
-
-## Proposing a sage patch
-
-You can [login the sage trac using GitHub](https://trac.sagemath.org/login). Your username will then be `gh-<your-github-name>`. The only other way is to request a trac account via email. After that refer to [git the hard way](http://doc.sagemath.org/html/en/developer/manual_git.html#chapter-manual-git) in the sage documentation. The "easy way" requires a non-GitHub account (requested via email) and a special tool. The "hard way" is really not all that hard if you're a bit familiar with git.
-
-Here's the gist, assuming you want to use ssh key authentication. First, [add your public ssh key](https://trac.sagemath.org/prefs/sshkeys). Then:
-
-```
-[user@localhost ~]$ git clone https://github.com/sagemath/sage.git
-[user@localhost ~]$ cd sage
-[user@localhost sage]$ git remote add trac git@trac.sagemath.org:sage.git -t master
-[user@localhost sage]$ git checkout -b u/gh-<your-github-username>/<your-branch-name> develop
-[user@localhost sage]$ <make changes>
-[user@localhost sage]$ git add .
-[user@localhost sage]$ git commit
-[user@localhost sage]$ git show # review your changes
-[user@localhost sage]$ git push --set-upstream trac u/gh-<your-github-username>/<your-branch-name>
-```
-
-You now created a branch on the trac server (you *must* follow the naming scheme as you only have push access to branches with the `u/gh-<your-github-username>/` prefix).
-Now you can [create a new trac ticket](https://trac.sagemath.org/newticket).
-- Write a description of the change
-- set the type and component as appropriate
-- write your real name in the "Authors" field
-- write `u/gh-<your-github-username>/<your-branch-name>` in the "Branch" field
-- click "Create ticket"
-- click "Modify" on the top right of your ticket (for some reason you can only change the ticket status after you have created it)
-- set the ticket status from `new` to `needs_review`
-- click "Save changes"
-
-Refer to sages [Developer's Guide](http://doc.sagemath.org/html/en/developer/index.html) for further details.
-
 ## I want to update sage
 
 You'll need to change the `version` field in `sage-src.nix`. Afterwards just try to build and let nix tell you which patches no longer apply (hopefully because they were adopted upstream). Remove those.
@@ -74,5 +42,5 @@ If the problem is not obvious, you can try to first update sage to an intermedia
 
 ## Well, that didn't help!
 
-If you couldn't fix the problem, create a GitHub issue on the nixpkgs repo and ping @timokau (or whoever is listed in the `maintainers` list of the sage package).
+If you couldn't fix the problem, create a GitHub issue on the nixpkgs repo and ping the sage maintainers (as listed in the sage package).
 Describe what you did and why it didn't work. Afterwards it would be great if you help the next guy out and improve this documentation!
diff --git a/nixpkgs/pkgs/applications/science/math/sage/default.nix b/nixpkgs/pkgs/applications/science/math/sage/default.nix
index eced57706d27..d4b678d36f97 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/default.nix
@@ -128,7 +128,7 @@ let
 
   singular = pkgs.singular.override { inherit flint; };
 
-  maxima = pkgs.maxima.override {
+  maxima = pkgs.maxima-ecl.override {
     lisp-compiler = pkgs.ecl.override {
       # "echo syntax error | ecl > /dev/full 2>&1" segfaults in
       # ECL. We apply a patch to fix it (write_error.patch), but it
diff --git a/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix b/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix
index 45a4799d1a03..39d358a1f9a8 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/env-locations.nix
@@ -35,7 +35,8 @@ writeTextFile rec {
     export GRAPHS_DATA_DIR='${graphs}/share/graphs'
     export ELLCURVE_DATA_DIR='${elliptic_curves}/share/ellcurves'
     export POLYTOPE_DATA_DIR='${polytopes_db}/share/reflexive_polytopes'
-    export GAP_ROOT_DIR='${gap}/share/gap/build-dir'
+    export GAP_LIB_DIR='${gap}/lib/gap'
+    export GAP_SHARE_DIR='${gap}/share/gap'
     export ECLDIR='${maxima.lisp-compiler}/lib/${maxima.lisp-compiler.pname}-${maxima.lisp-compiler.version}/'
     export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs"
     export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona"
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch
deleted file mode 100644
index ca01eba29a2b..000000000000
--- a/nixpkgs/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/src/sage/repl/configuration.py b/src/sage/repl/configuration.py
-index 67d7d2accf..18279581e2 100644
---- a/src/sage/repl/configuration.py
-+++ b/src/sage/repl/configuration.py
-@@ -9,10 +9,11 @@ the IPython simple prompt is being used::
-     sage: cmd = 'print([sys.stdin.isatty(), sys.stdout.isatty()])'
-     sage: import pexpect
-     sage: output = pexpect.run(
--    ....:     'bash -c \'echo "{0}" | sage\''.format(cmd),
-+    ....:     'bash -c \'export SAGE_BANNER=no; echo "{0}" | sage\''.format(cmd),
-     ....: ).decode('utf-8', 'surrogateescape')
--    sage: 'sage: [False, True]' in output
--    True
-+    sage: print(output)
-+    sage...[False, True]
-+    ...
- """
- 
- #*****************************************************************************
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/disable-slow-glpk-test.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/disable-slow-glpk-test.patch
new file mode 100644
index 000000000000..c04463e7e99c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/math/sage/patches/disable-slow-glpk-test.patch
@@ -0,0 +1,17 @@
+diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py
+index 0070705f78..ac19818f1b 100644
+--- a/src/sage/graphs/generic_graph.py
++++ b/src/sage/graphs/generic_graph.py
+@@ -6699,12 +6699,6 @@ class GenericGraph(GenericGraph_pyx):
+             sage: G = DiGraph(d6, format='dig6')
+             sage: G.edge_connectivity()
+             5
+-            sage: G.edge_disjoint_spanning_trees(5)  # long time
+-            [Digraph on 28 vertices,
+-             Digraph on 28 vertices,
+-             Digraph on 28 vertices,
+-             Digraph on 28 vertices,
+-             Digraph on 28 vertices]
+ 
+         Small cases::
+ 
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
deleted file mode 100644
index 90a23f94cb5f..000000000000
--- a/nixpkgs/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-diff --git a/src/sage/env.py b/src/sage/env.py
-index c4953cfa65..47b880f9ad 100644
---- a/src/sage/env.py
-+++ b/src/sage/env.py
-@@ -244,81 +244,8 @@ os.environ['MPMATH_SAGE'] = '1'
- SAGE_BANNER = var("SAGE_BANNER", "")
- SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes")
- 
--
--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
--    Python sysconfig.
--
--    This can also be passed more than one library name (e.g. for cases where
--    some library may have multiple names depending on the platform) in which
--    case the first one found is returned.
--
--    This supports most *NIX variants (in which ``lib<libname>.so`` is found
--    under ``$SAGE_LOCAL/lib``), macOS (same, but with the ``.dylib``
--    extension), and Cygwin (under ``$SAGE_LOCAL/bin/cyg<libname>.dll``,
--    or ``$SAGE_LOCAL/bin/cyg<libname>-*.dll`` for versioned DLLs).
--
--    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 no matching library file could be found.
--
--    EXAMPLES::
--
--        sage: from sage.env import _get_shared_lib_path
--        sage: "gap" in _get_shared_lib_path("gap")
--        True
--        sage: _get_shared_lib_path("an_absurd_lib") is None
--        True
--
--    """
--
--    for libname in libnames:
--        search_directories: List[Path] = []
--        patterns: List[str] = []
--        if sys.platform == 'cygwin':
--            # Later down we take the first matching DLL found, so search
--            # SAGE_LOCAL first so that it takes precedence
--            if SAGE_LOCAL:
--                search_directories.append(Path(SAGE_LOCAL) / 'bin')
--            search_directories.append(Path(sysconfig.get_config_var('BINDIR')))
--            # 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
--            # will only ever be one version
--            patterns = [f'cyg{libname}.dll', f'cyg{libname}-*.dll']
--        else:
--            if sys.platform == 'darwin':
--                ext = 'dylib'
--            else:
--                ext = 'so'
--
--            if SAGE_LOCAL:
--                search_directories.append(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),
--
--            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 libgap shared object
--GAP_SO = var("GAP_SO", _get_shared_lib_path("gap", ""))
-+GAP_SO = var("GAP_SO", '/default')
- 
- # post process
- if DOT_SAGE is not None and ' ' in DOT_SAGE:
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/fix-ecl-race.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/fix-ecl-race.patch
deleted file mode 100644
index 6056416c3a28..000000000000
--- a/nixpkgs/pkgs/applications/science/math/sage/patches/fix-ecl-race.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py
-index 02e18e67e7..2ebf6eb35f 100644
---- a/src/sage/doctest/forker.py
-+++ b/src/sage/doctest/forker.py
-@@ -1075,6 +1075,14 @@ class SageDocTestRunner(doctest.DocTestRunner, object):
-             sage: set(ex2.predecessors) == set([ex0,ex1])
-             True
-         """
-+
-+        # Fix ECL dir race conditions by using a separate dir for each process
-+        # (https://trac.sagemath.org/ticket/26968)
-+        os.environ['MAXIMA_USERDIR'] = "{}/sage-maxima-{}".format(
-+            tempfile.gettempdir(),
-+            os.getpid()
-+        )
-+
-         if isinstance(globs, RecordingDict):
-             globs.start()
-         example.sequence_number = len(self.history)
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch
index 3e7e37508ff4..2bfac780dfca 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch
+++ b/nixpkgs/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch
@@ -1,8 +1,8 @@
-diff --git a/src/sage_docbuild/__init__.py b/src/sage_docbuild/__init__.py
-index b12d56a3c9..df9d949ed1 100644
---- a/src/sage_docbuild/__init__.py
-+++ b/src/sage_docbuild/__init__.py
-@@ -88,30 +88,6 @@ def builder_helper(type):
+diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py
+index c5be38600a..e1d15f62d3 100644
+--- a/src/sage_docbuild/builders.py
++++ b/src/sage_docbuild/builders.py
+@@ -105,31 +105,6 @@ def builder_helper(type):
      """
      Return a function which builds the documentation for
      output type ``type``.
@@ -11,7 +11,8 @@ index b12d56a3c9..df9d949ed1 100644
 -
 -    Check that :trac:`25161` has been resolved::
 -
--        sage: from sage_docbuild import DocBuilder, setup_parser
+-        sage: from sage_docbuild.builders import DocBuilder
+-        sage: from sage_docbuild.__main__ import setup_parser
 -        sage: DocBuilder._options = setup_parser().parse_args([]) # builder_helper needs _options to be set
 -
 -        sage: import sage_docbuild.sphinxbuild
@@ -22,8 +23,8 @@ index b12d56a3c9..df9d949ed1 100644
 -        sage: from sage.misc.temporary_file import tmp_dir
 -        sage: os.environ['SAGE_DOC'] = tmp_dir()
 -        sage: sage.env.var('SAGE_DOC') # random
--        sage: from sage_docbuild import builder_helper, build_ref_doc
--        sage: from sage_docbuild import _build_many as build_many
+-        sage: from sage_docbuild.builders import builder_helper, build_ref_doc
+-        sage: from sage_docbuild.builders import _build_many as build_many
 -        sage: helper = builder_helper("html")
 -        sage: try:  # optional - sagemath_doc_html
 -        ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
@@ -33,7 +34,7 @@ index b12d56a3c9..df9d949ed1 100644
      """
      def f(self, *args, **kwds):
          output_dir = self._output_dir(type)
-@@ -139,10 +115,9 @@ def builder_helper(type):
+@@ -157,10 +132,9 @@ def builder_helper(type):
          logger.debug(build_command)
  
          # Run Sphinx with Sage's special logger
@@ -44,13 +45,13 @@ index b12d56a3c9..df9d949ed1 100644
 -            runsphinx()
 +            subprocess.check_call(args)
          except Exception:
-             if ABORT_ON_ERROR:
+             if build_options.ABORT_ON_ERROR:
                  raise
 diff --git a/src/sage_docbuild/sphinxbuild.py b/src/sage_docbuild/sphinxbuild.py
-index a39c99ffe9..73be823684 100644
+index 07c584de55..b83283a9ee 100644
 --- a/src/sage_docbuild/sphinxbuild.py
 +++ b/src/sage_docbuild/sphinxbuild.py
-@@ -330,3 +330,8 @@ def runsphinx():
+@@ -331,3 +331,8 @@ def runsphinx():
          sys.stderr = saved_stderr
          sys.stdout.flush()
          sys.stderr.flush()
diff --git a/nixpkgs/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch b/nixpkgs/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch
deleted file mode 100644
index 5fea88309036..000000000000
--- a/nixpkgs/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git a/src/sage/interfaces/tachyon.py b/src/sage/interfaces/tachyon.py
-index 3f1dcdb538..b6fa8d1fbd 100644
---- a/src/sage/interfaces/tachyon.py
-+++ b/src/sage/interfaces/tachyon.py
-@@ -261,13 +261,13 @@ written in the sequence they are listed in the examples in this section.
-   The {\bf PROJECTION} keyword must be followed by one of the supported
- camera projection mode identifiers {\bf PERSPECTIVE}, {\bf PERSPECTIVE_DOF},
- {\bf ORTHOGRAPHIC}, or {\bf FISHEYE}.  The {\bf FISHEYE} projection mode
--requires two extra parameters {\bf FOCALLENGTH} and {\bf APERTURE}
-+requires two extra parameters {\bf FOCALDIST} and {\bf APERTURE}
- which precede the regular camera options.
- 
- \begin{verbatim}
- Camera
-   projection perspective_dof
--  focallength 0.75
-+  focaldist 0.75
-   aperture 0.02
-   Zoom 0.666667
-   Aspectratio 1.000000
-diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py
-index 08caf38d67..3e827411ce 100644
---- a/src/sage/plot/plot3d/tachyon.py
-+++ b/src/sage/plot/plot3d/tachyon.py
-@@ -92,7 +92,7 @@ angle, right angle)::
- Finally there is the ``projection='perspective_dof'`` option. ::
- 
-     sage: T = Tachyon(xres=800, antialiasing=4, raydepth=10,
--    ....: projection='perspective_dof', focallength='1.0', aperture='.0025')
-+    ....: projection='perspective_dof', focaldist='1.0', aperture='.0025')
-     sage: T.light((0,5,7), 1.0, (1,1,1))
-     sage: T.texture('t1', opacity=1, specular=.3)
-     sage: T.texture('t2', opacity=1, specular=.3, color=(0,0,1))
-@@ -186,7 +186,7 @@ class Tachyon(WithEqualityById, SageObject):
-       or ``'fisheye'``.
-     - ``frustum`` - (default ''), otherwise list of four numbers. Only
-       used with projection='fisheye'.
--    - ``focallength`` - (default ''), otherwise a number. Only used
-+    - ``focaldist`` - (default ''), otherwise a number. Only used
-       with projection='perspective_dof'.
-     - ``aperture`` - (default ''), otherwise a number.  Only used
-       with projection='perspective_dof'.
-@@ -331,7 +331,7 @@ class Tachyon(WithEqualityById, SageObject):
-     Use of the ``projection='perspective_dof'`` option.  This may not be
-     implemented correctly. ::
- 
--        sage: T = Tachyon(xres=800,antialiasing=4, raydepth=10, projection='perspective_dof', focallength='1.0', aperture='.0025')
-+        sage: T = Tachyon(xres=800,antialiasing=4, raydepth=10, projection='perspective_dof', focaldist='1.0', aperture='.0025')
-         sage: T.light((0,5,7), 1.0, (1,1,1))
-         sage: T.texture('t1', opacity=1, specular=.3)
-         sage: T.texture('t2', opacity=1, specular=.3, color=(0,0,1))
-@@ -365,7 +365,7 @@ class Tachyon(WithEqualityById, SageObject):
-                  look_at=[0, 0, 0],
-                  viewdir=None,
-                  projection='PERSPECTIVE',
--                 focallength='',
-+                 focaldist='',
-                  aperture='',
-                  frustum=''):
-         r"""
-@@ -391,7 +391,7 @@ class Tachyon(WithEqualityById, SageObject):
-             self._camera_position = (-3, 0, 0) # default value
-         self._updir = updir
-         self._projection = projection
--        self._focallength = focallength
-+        self._focaldist = focaldist
-         self._aperture = aperture
-         self._frustum = frustum
-         self._objects = []
-@@ -624,9 +624,9 @@ class Tachyon(WithEqualityById, SageObject):
-         camera_out = r"""
-            camera
-               projection %s""" % (tostr(self._projection))
--        if self._focallength != '':
-+        if self._focaldist != '':
-             camera_out = camera_out + r"""
--              focallength %s""" % (float(self._focallength))
-+              focaldist %s""" % (float(self._focaldist))
-         if self._aperture != '':
-             camera_out = camera_out + r"""
-               aperture %s""" % (float(self._aperture))
diff --git a/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix b/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix
index b0f40bf06587..fb8c3ec8a204 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-docbuild.nix
@@ -1,8 +1,9 @@
 { lib
 , buildPythonPackage
 , sage-src
-, sphinx
 , jupyter-sphinx
+, sphinx
+, sphinx-copybutton
 }:
 
 buildPythonPackage rec {
@@ -11,8 +12,9 @@ buildPythonPackage rec {
   src = sage-src;
 
   propagatedBuildInputs = [
-    sphinx
     jupyter-sphinx
+    sphinx
+    sphinx-copybutton
   ];
 
   preBuild = ''
diff --git a/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-setup.nix b/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-setup.nix
index 50346153123d..e1c497678d50 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-setup.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/python-modules/sage-setup.nix
@@ -1,6 +1,8 @@
 { lib
 , buildPythonPackage
 , sage-src
+, cython
+, jinja2
 , pkgconfig # the python module, not the pkg-config alias
 }:
 
@@ -9,9 +11,9 @@ buildPythonPackage rec {
   pname = "sage-setup";
   src = sage-src;
 
-  buildInputs = [
-    pkgconfig
-  ];
+  nativeBuildInputs = [ cython ];
+  buildInputs = [ pkgconfig ];
+  propagatedBuildInputs = [ jinja2 ];
 
   preBuild = ''
     cd pkgs/sage-setup
diff --git a/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix b/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix
index 514cbb66ea7d..4f533a822de7 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/sage-src.nix
@@ -1,7 +1,6 @@
 { stdenv
 , fetchFromGitHub
 , fetchpatch
-, runtimeShell
 }:
 
 # This file is responsible for fetching the sage source and adding necessary patches.
@@ -9,87 +8,41 @@
 # This is done because multiple derivations rely on these sources and they should
 # all get the same sources with the same patches applied.
 
-let
-  # Fetch a diff between `base` and `rev` on sage's git server.
-  # Used to fetch trac tickets by setting the `base` to the last release and the
-  # `rev` to the last commit of the ticket.
-  #
-  # We don't use sage's own build system (which builds all its
-  # dependencies), so we exclude changes to "build/" from patches by
-  # default to avoid conflicts.
-  fetchSageDiff = { base, name, rev, sha256, squashed ? false, excludes ? [ "build/*" ]
-                  , ...}@args: (
-    fetchpatch ({
-      inherit name sha256 excludes;
-
-      # There are three places to get changes from:
-      #
-      # 1) From Sage's Trac. Contains all release tags (like "9.4") and all developer
-      # branches (wip patches from tickets), but exports each commit as a separate
-      # patch, so merge commits can lead to conflicts. Used if squashed == false.
-      #
-      # The above is the preferred option. To use it, find a Trac ticket and pass the
-      # "Commit" field from the ticket as "rev", choosing "base" as an appropriate
-      # release tag, i.e. a tag that doesn't cause the patch to include a lot of
-      # unrelated changes. If there is no such tag (due to nonlinear history, for
-      # example), there are two other options, listed below.
-      #
-      # 2) From GitHub's sagemath/sage repo. This lets us use a GH feature that allows
-      # us to choose between a .patch file, with one patch per commit, or a .diff file,
-      # which squashes all commits into a single diff. This is used if squashed ==
-      # true. This repo has all release tags. However, it has no developer branches, so
-      # this option can't be used if a change wasn't yet shipped in a (possibly beta)
-      # release.
-      #
-      # 3) From GitHub's sagemath/sagetrac-mirror repo. Mirrors all developer branches,
-      # but has no release tags. The only use case not covered by 1 or 2 is when we need
-      # to apply a patch from an open ticket that contains merge commits.
-      #
-      # Item 3 could cover all use cases if the sagemath/sagetrack-mirror repo had
-      # release tags, but it requires a sha instead of a release number in "base", which
-      # is inconvenient.
-      urls = if squashed
-             then [
-               "https://github.com/sagemath/sage/compare/${base}...${rev}.diff"
-               "https://github.com/sagemath/sagetrac-mirror/compare/${base}...${rev}.diff"
-             ]
-             else [ "https://git.sagemath.org/sage.git/patch?id2=${base}&id=${rev}" ];
-    } // builtins.removeAttrs args [ "rev" "base" "sha256" "squashed" "excludes" ])
-  );
-in
 stdenv.mkDerivation rec {
-  version = "9.6";
+  version = "10.0";
   pname = "sage-src";
 
   src = fetchFromGitHub {
     owner = "sagemath";
     repo = "sage";
     rev = version;
-    sha256 = "sha256-QY8Yga3hD1WhSCtA2/PVry8hHlMmC31J8jCBFtWgIU0=";
+    sha256 = "sha256-zN/Lo/GBCjYGemuaYpgG3laufN8te3wPjXMQ+Me9zgY=";
   };
 
   # Patches needed because of particularities of nix or the way this is packaged.
   # The goal is to upstream all of them and get rid of this list.
   nixPatches = [
-    # Fixes a potential race condition which can lead to transient doctest failures.
-    ./patches/fix-ecl-race.patch
-
-    # Not necessary since library location is set explicitly
-    # https://trac.sagemath.org/ticket/27660#ticket
-    ./patches/do-not-test-find-library.patch
-
     # Parallelize docubuild using subprocesses, fixing an isolation issue. See
     # https://groups.google.com/forum/#!topic/sage-packaging/YGOm8tkADrE
     ./patches/sphinx-docbuild-subprocesses.patch
+
+    # After updating smypow to (https://github.com/sagemath/sage/issues/3360)
+    # we can now set the cache dir to be within the .sage directory. This is
+    # not strictly necessary, but keeps us from littering in the user's HOME.
+    ./patches/sympow-cache.patch
   ];
 
   # Since sage unfortunately does not release bugfix releases, packagers must
   # fix those bugs themselves. This is for critical bugfixes, where "critical"
   # == "causes (transient) doctest failures / somebody complained".
   bugfixPatches = [
-    # To help debug the transient error in
-    # https://trac.sagemath.org/ticket/23087 when it next occurs.
-    ./patches/configurationpy-error-verbose.patch
+    # Sage uses mixed integer programs (MIPs) to find edge disjoint
+    # spanning trees. For some reason, aarch64 glpk takes much longer
+    # than x86_64 glpk to solve such MIPs. Since the MIP formulation
+    # has "numerous problems" and will be replaced by a polynomial
+    # algorithm soon, disable this test for now.
+    # https://github.com/sagemath/sage/issues/34575
+    ./patches/disable-slow-glpk-test.patch
   ];
 
   # Patches needed because of package updates. We could just pin the versions of
@@ -99,32 +52,32 @@ stdenv.mkDerivation rec {
   # should come from or be proposed to upstream. This list will probably never
   # be empty since dependencies update all the time.
   packageUpgradePatches = [
-    # After updating smypow to (https://trac.sagemath.org/ticket/3360) we can
-    # now set the cache dir to be within the .sage directory. This is not
-    # strictly necessary, but keeps us from littering in the user's HOME.
-    ./patches/sympow-cache.patch
-
-    # Upstream will wait until Sage 9.7 to upgrade to linbox 1.7 because it
-    # does not support gcc 6. We can upgrade earlier.
-    # https://trac.sagemath.org/ticket/32959
-    ./patches/linbox-1.7-upgrade.patch
+    # https://github.com/sagemath/sage/pull/35584, positively reviewed
+    (fetchpatch {
+      name = "networkx-3.1-upgrade.patch";
+      url = "https://github.com/sagemath/sage/compare/10.0.rc2..e599562cf5fdfb9799a5412fac40c2f8e9f97341.diff";
+      sha256 = "sha256-3A90kXqNR0c7+k8xrZXAt5wqWg/VFAPNhQujwTdOyhI=";
+    })
 
-    # adapted from https://trac.sagemath.org/ticket/23712#comment:22
-    ./patches/tachyon-renamed-focallength.patch
+    # https://github.com/sagemath/sage/pull/35612, positively reviewed
+    (fetchpatch {
+      name = "linbox-1.7-upgrade.patch";
+      url = "https://github.com/sagemath/sage/compare/10.0.rc2..9c8796c7b677e3a056348e3510331ea8b8c3c42e.diff";
+      sha256 = "sha256-/TpvIQZUqmbUuz6wvp3ni9oRir5LBA2FKDJcmnHI1r4=";
+    })
 
-    (fetchSageDiff {
-      name = "eclib-20220621-update.patch";
-      base = "9.7.beta4";
-      rev = "9b65d73399b33043777ba628a4d318638aec6e0e";
-      sha256 = "sha256-pcb9Q9a0ROCZTyfT7TRMtgEqCom8SgrtAaZ8ATgeqVI=";
+    # https://github.com/sagemath/sage/pull/35619
+    (fetchpatch {
+      name = "maxima-5.46.0-upgrade.patch";
+      url = "https://github.com/sagemath/sage/compare/10.0.rc3..7e86af5dae8f89868b25a6f57189bb5ca618da89.diff";
+      sha256 = "sha256-pxSxdJ2lyHoMUIxhlIn1nTHaddRxGvvTj9IbwFCTBFU=";
     })
 
-    # https://trac.sagemath.org/ticket/34149
-    (fetchSageDiff {
-      name = "sphinx-5-update.patch";
-      base = "9.7.beta6";
-      rev = "6f9ceb7883376a1cacda51d84ec7870121860482";
-      sha256 = "sha256-prTCwBfl/wNXIkdjKLiMSe/B64wCXOjOTr4AVNiFruw=";
+    # https://github.com/sagemath/sage/pull/35635, positively reviewed
+    (fetchpatch {
+      name = "sympy-1.12-upgrade.patch";
+      url = "https://github.com/sagemath/sage/compare/10.0.rc2..aa4193cdc8ec9fb7bd7c49696b7f914668f7913a.diff";
+      sha256 = "sha256-UAmYCxHvnE5p+H2DySNZTPFVm915jHtOEoG+tZz5n7I=";
     })
   ];
 
@@ -139,19 +92,6 @@ stdenv.mkDerivation rec {
     sed -i \
       "s|var(\"SAGE_ROOT\".*|var(\"SAGE_ROOT\", \"$out\")|" \
       src/sage/env.py
-
-    # 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/nixpkgs/pkgs/applications/science/math/sage/sage-tests.nix b/nixpkgs/pkgs/applications/science/math/sage/sage-tests.nix
index 451edb8f085e..4910f5e8bf1d 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/sage-tests.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/sage-tests.nix
@@ -18,7 +18,7 @@ let
   src = sage-with-env.env.lib.src;
   runAllTests = files == null;
   testArgs = if runAllTests then "--all" else testFileList;
-  patienceSpecifier = if longTests then "--long" else "";
+  patienceSpecifier = lib.optionalString longTests "--long";
   timeSpecifier = if timeLimit == null then "" else "--short ${toString timeLimit}";
   relpathToArg = relpath: lib.escapeShellArg "${src}/${relpath}"; # paths need to be absolute
   testFileList = lib.concatStringsSep " " (map relpathToArg files);
@@ -28,8 +28,8 @@ stdenv.mkDerivation {
   pname = "sage-tests";
   inherit src;
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
-    makeWrapper
     sage-with-env
   ];
 
diff --git a/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix b/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix
index df3a1467d53c..7632b851773c 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/sage-with-env.nix
@@ -28,10 +28,9 @@ assert (!blas.isILP64) && (!lapack.isILP64);
 # executable sage. No tests are run yet and no documentation is built.
 
 let
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [
     pythonEnv # for patchShebangs
-    makeWrapper
-    pkg-config
     blas lapack
     singular
     three
@@ -73,7 +72,7 @@ let
       []
     );
 
-  allInputs = lib.remove null (buildInputs ++ pythonEnv.extraLibs);
+  allInputs = lib.remove null (nativeBuildInputs ++ buildInputs ++ pythonEnv.extraLibs ++ [ makeWrapper ]);
   transitiveDeps = lib.unique (builtins.concatLists (map transitiveClosure allInputs ));
   # fix differences between spkg and sage names
   # (could patch sage instead, but this is more lightweight and also works for packages depending on sage)
@@ -92,7 +91,7 @@ stdenv.mkDerivation rec {
   pname = "sage-with-env";
   src = sage-env.lib.src;
 
-  inherit buildInputs;
+  inherit nativeBuildInputs buildInputs;
 
   configurePhase = "#do nothing";
 
diff --git a/nixpkgs/pkgs/applications/science/math/sage/sage.nix b/nixpkgs/pkgs/applications/science/math/sage/sage.nix
index 87f3e1137b19..2cd6336675c3 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/sage.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/sage.nix
@@ -17,9 +17,8 @@ stdenv.mkDerivation rec {
   pname = "sage";
   src = sage-with-env.env.lib.src;
 
-  buildInputs = [
-    makeWrapper
-  ] ++ lib.optionals requireSageTests [
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = lib.optionals requireSageTests [
     # This is a hack to make sure sage-tests is evaluated. It doesn't acutally
     # produce anything of value, it just decouples the tests from the build.
     sage-tests
@@ -50,6 +49,7 @@ stdenv.mkDerivation rec {
     quicktest = sage-tests.override { longTests = false; timeLimit = 600; }; # as many tests as possible in ~10m
     doc = sagedoc;
     lib = sage-with-env.env.lib;
+    with-env = sage-with-env;
     kernelspec = jupyter-kernel-definition;
   };
 
@@ -58,5 +58,6 @@ stdenv.mkDerivation rec {
     homepage = "https://www.sagemath.org";
     license = licenses.gpl2Plus;
     maintainers = teams.sage.members;
+    platforms = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix b/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix
index 650b6d3b141a..228b5aa2c609 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/sagedoc.nix
@@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
+  nativeBuildInputs = [
+    # for patchShebangs below
+    python3
+  ];
+
   unpackPhase = ''
     export SAGE_DOC_OVERRIDE="$PWD/share/doc/sage"
     export SAGE_DOC_SRC_OVERRIDE="$PWD/docsrc"
@@ -24,15 +29,25 @@ stdenv.mkDerivation rec {
     export HOME="$TMPDIR/sage_home"
     mkdir -p "$HOME"
 
+    # run bootstrap script to generate Sage spkg docs, because unfortunately some unrelated doc
+    # pages link to them. it needs a few ugly (but self-contained) hacks for a standalone run.
+    cp -r "${src}/build" "$HOME"
+    chmod -R 755 "$HOME/build"
+    sed -i "/assert/d" "$HOME/build/sage_bootstrap/env.py"
+    sed -i "s|sage-bootstrap-python|python3|" "$HOME/build/bin/sage-package"
+    patchShebangs "$HOME/build/bin/sage-package"
+    pushd "$SAGE_DOC_SRC_OVERRIDE"
+    sed -i "s|OUTPUT_DIR=\"src/doc/|OUTPUT_DIR=\"$SAGE_DOC_SRC_OVERRIDE/|" bootstrap
+    PATH="$HOME/build/bin:$PATH" SAGE_ROOT="${src}" ./bootstrap
+    popd
+
+    # adapted from src/doc/Makefile (doc-src target), which tries to call Sage from PATH
+    mkdir -p $SAGE_DOC_SRC_OVERRIDE/en/reference/repl
+    ${sage-with-env}/bin/sage -advanced > $SAGE_DOC_SRC_OVERRIDE/en/reference/repl/options.txt
+
     # 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 (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"
-
     # jupyter-sphinx calls the sagemath jupyter kernel during docbuild
     export JUPYTER_PATH=${jupyter-kernel-specs}
 
diff --git a/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix b/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix
index 8f864d136928..d8d5586e2193 100644
--- a/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix
+++ b/nixpkgs/pkgs/applications/science/math/sage/sagelib.nix
@@ -1,75 +1,83 @@
 { sage-src
 , env-locations
-, perl
+, python
 , buildPythonPackage
 , m4
+, perl
+, pkg-config
+, sage-setup
+, gd
+, iml
+, libpng
+, readline
 , arb
 , blas
-, lapack
+, boost
 , brial
 , cliquer
-, cypari2
-, cysignals
-, cython
-, lisp-compiler
 , eclib
 , ecm
+, fflas-ffpack
 , flint
-, gd
+, gap
 , giac
 , givaro
 , glpk
 , gsl
-, iml
-, jinja2
+, lapack
 , lcalc
-, lrcalc
-, gap
+, libbraiding
+, libhomfly
+, libmpc
 , linbox
+, lisp-compiler
+, lrcalc
 , m4ri
 , m4rie
-, memory-allocator
-, libmpc
 , mpfi
+, mpfr
 , ntl
-, numpy
 , pari
-, pkgconfig # the python module, not the pkg-config alias
-, pkg-config
 , planarity
 , ppl
-, primecountpy
-, python
-, ratpoints
-, readline
 , rankwidth
-, symmetrica
-, zn_poly
-, fflas-ffpack
-, boost
+, ratpoints
 , singular
-, pip
-, jupyter_core
-, sage-setup
-, libhomfly
-, libbraiding
-, gmpy2
-, pplpy
 , sqlite
-, jupyter-client
+, symmetrica
+, cvxopt
+, cypari2
+, cysignals
+, cython
+, fpylll
+, gmpy2
+, importlib-metadata
+, importlib-resources
+, ipykernel
+, ipython
 , ipywidgets
+, jinja2
+, jupyter-client
+, jupyter-core
+, lrcalc-python
+, matplotlib
+, memory-allocator
 , mpmath
+, networkx
+, numpy
+, pexpect
+, pillow
+, pip
+, pkgconfig
+, pplpy
+, primecountpy
+, ptyprocess
+, requests
 , rpy2
-, fpylll
 , scipy
+, sphinx
 , sympy
-, matplotlib
-, pillow
-, ipykernel
-, networkx
-, ptyprocess
-, lrcalc-python
-, sphinx # TODO: this is in setup.cfg, should we override it?
+, typing-extensions
 }:
 
 assert (!blas.isILP64) && (!lapack.isILP64);
@@ -86,82 +94,93 @@ buildPythonPackage rec {
 
   nativeBuildInputs = [
     iml
+    lisp-compiler
+    m4
     perl
-    jupyter_core
+    pip # needed to query installed packages
     pkg-config
     sage-setup
-    pip # needed to query installed packages
-    lisp-compiler
-    m4
   ];
 
   buildInputs = [
     gd
-    readline
     iml
+    libpng
+    readline
   ];
 
   propagatedBuildInputs = [
-    cypari2
-    jinja2
-    numpy
-    pkgconfig
-    boost
+    # native dependencies (TODO: determine which ones need to be propagated)
     arb
+    blas
+    boost
     brial
     cliquer
-    lisp-compiler
     eclib
     ecm
     fflas-ffpack
     flint
+    gap
     giac
     givaro
     glpk
     gsl
+    lapack
     lcalc
-    gap
+    libbraiding
+    libhomfly
     libmpc
     linbox
+    lisp-compiler
     lrcalc
     m4ri
     m4rie
-    memory-allocator
     mpfi
+    mpfr
     ntl
-    blas
-    lapack
     pari
     planarity
     ppl
-    primecountpy
     rankwidth
     ratpoints
     singular
+    sqlite
     symmetrica
-    zn_poly
-    pip
-    cython
+
+    # from src/sage/setup.cfg and requirements.txt
+    cvxopt
+    cypari2
     cysignals
-    libhomfly
-    libbraiding
+    cython
+    fpylll
     gmpy2
-    pplpy
-    sqlite
-    mpmath
-    rpy2
-    scipy
-    sympy
-    matplotlib
-    pillow
+    importlib-metadata
+    importlib-resources
     ipykernel
-    fpylll
-    networkx
-    jupyter-client
+    ipython
     ipywidgets
-    ptyprocess
+    jinja2
+    jupyter-client
+    jupyter-core
     lrcalc-python
+    matplotlib
+    memory-allocator
+    mpmath
+    networkx
+    numpy
+    pexpect
+    pillow
+    pip
+    pkgconfig
+    pplpy
+    primecountpy
+    ptyprocess
+    requests
+    rpy2
+    scipy
     sphinx
+    sympy
+    typing-extensions
   ];
 
   preBuild = ''
diff --git a/nixpkgs/pkgs/applications/science/math/scalp/default.nix b/nixpkgs/pkgs/applications/science/math/scalp/default.nix
index 05261701fc28..4145407d7aaa 100644
--- a/nixpkgs/pkgs/applications/science/math/scalp/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/scalp/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   src = fetchgit {
     url = "https://digidev.digi.e-technik.uni-kassel.de/git/scalp.git";
-    # mirrored at https://github.com/wegank/scalp.git
+    # mirrored at https://git.sr.ht/~weijia/scalp
     rev = "185b84e4ff967f42cf2de5db4db4e6fa0cc18fb8";
     sha256 = "sha256-NyMZdJwdD3FR6uweYCclJjfcf3Y24Bns1ViwsmJ5izg=";
   };
diff --git a/nixpkgs/pkgs/applications/science/math/scilab-bin/default.nix b/nixpkgs/pkgs/applications/science/math/scilab-bin/default.nix
index 327472e88c75..f6da20531385 100644
--- a/nixpkgs/pkgs/applications/science/math/scilab-bin/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/scilab-bin/default.nix
@@ -1,100 +1,103 @@
-{ stdenv, fetchurl, lib, xorg }:
+{ lib
+, stdenv
+, fetchurl
+, makeWrapper
+, undmg
+, autoPatchelfHook
+, alsa-lib
+, ncurses5
+, xorg
+}:
 
 let
-  badArch = throw "scilab-bin requires i686-linux or x86_64-linux";
-
-  architecture =
-    if stdenv.hostPlatform.system == "i686-linux" then
-      "i686"
-    else if stdenv.hostPlatform.system == "x86_64-linux" then
-      "x86_64"
-    else
-      badArch;
-in
-stdenv.mkDerivation rec {
   pname = "scilab-bin";
   version = "6.1.1";
 
-  src = fetchurl {
-    url = "https://www.scilab.org/download/${version}/scilab-${version}.bin.linux-${architecture}.tar.gz";
-    sha256 =
-      if stdenv.hostPlatform.system == "i686-linux" then
-        "0fgjc2ak3b2qi6yin3fy50qwk2bcj0zbz1h4lyyic9n1n1qcliib"
-      else if stdenv.hostPlatform.system == "x86_64-linux" then
-        "sha256-PuGnz2YdAhriavwnuf5Qyy0cnCeRHlWC6dQzfr7bLHk="
-      else
-        badArch;
+  srcs = {
+    aarch64-darwin = fetchurl {
+      url = "https://www.utc.fr/~mottelet/scilab/download/${version}/scilab-${version}-accelerate-arm64.dmg";
+      sha256 = "sha256-L4dxD8R8bY5nd+4oDs5Yk0LlNsFykLnAM+oN/O87SRI=";
+    };
+    x86_64-darwin = fetchurl {
+      url = "https://www.utc.fr/~mottelet/scilab/download/${version}/scilab-${version}-x86_64.dmg";
+      sha256 = "sha256-tBeqzllMuogrGcJxGqEl2DdNXaiwok3yhzWSdlWY5Fc=";
+    };
+    x86_64-linux = fetchurl {
+      url = "https://www.scilab.org/download/${version}/scilab-${version}.bin.linux-x86_64.tar.gz";
+      sha256 = "sha256-PuGnz2YdAhriavwnuf5Qyy0cnCeRHlWC6dQzfr7bLHk=";
+    };
   };
+  src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
 
-  libPath = lib.makeLibraryPath [
-    stdenv.cc.cc
-    xorg.libX11
-    xorg.libXext
-    xorg.libXi
-    xorg.libXrender
-    xorg.libXtst
-    xorg.libXxf86vm
-  ];
-
-  fixupPhase = ''
-    sed -i 's|\$(/bin/|$(|g' bin/scilab
-    sed -i 's|/usr/bin/||g' bin/scilab
-
-    sci="$out/opt/scilab-${version}"
-    fullLibPath="$sci/lib/scilab:$sci/lib/thirdparty:$libPath"
-    fullLibPath="$fullLibPath:$sci/lib/thirdparty/redist"
-
-    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
-             --set-rpath "$fullLibPath" bin/scilab-bin
-    find . -name '*.so' -type f | while read file; do
-      patchelf --set-rpath "$fullLibPath" "$file" 2>/dev/null
-    done
-  '';
-
-  installPhase = ''
-    mkdir -p "$out/opt/scilab-${version}"
-    cp -r . "$out/opt/scilab-${version}/"
-
-    # Create bin/ dir
-    mkdir "$out/bin"
-
-    # Creating executable symlinks
-    ln -s "$out/opt/scilab-${version}/bin/scilab" "$out/bin/scilab"
-    ln -s "$out/opt/scilab-${version}/bin/scilab-cli" "$out/bin/scilab-cli"
-    ln -s "$out/opt/scilab-${version}/bin/scilab-adv-cli" "$out/bin/scilab-adv-cli"
+  meta = {
+    homepage = "http://www.scilab.org/";
+    description = "Scientific software package for numerical computations (Matlab lookalike)";
+    platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ];
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    license = lib.licenses.gpl2Only;
+    mainProgram = "scilab";
+  };
 
-    # Creating desktop config dir
-    mkdir -p "$out/share/applications"
+  darwin = stdenv.mkDerivation rec {
+    inherit pname version src meta;
 
-    # Moving desktop config files
-    mv $out/opt/scilab-${version}/share/applications/*.desktop $out/share/applications
+    nativeBuildInputs = [
+      makeWrapper
+      undmg
+    ];
 
-    # Fixing Exec paths and launching each app with a terminal
-    sed -i -e "s|Exec=|Exec=$out/opt/scilab-${version}/bin/|g" \
-           -e "s|Terminal=.*$|Terminal=true|g" $out/share/applications/*.desktop
+    sourceRoot = "scilab-${version}.app";
 
-    # Moving icons to the appropriate locations
-    for path in $out/opt/scilab-${version}/share/icons/hicolor/*/*/*
-    do
-      newpath=$(echo $path | sed 's|/opt/scilab-${version}||g')
-      filename=$(echo $path | sed 's|.*/||g')
-      dir=$(echo $newpath | sed "s|$filename||g")
-      mkdir -p $dir
-      mv $path $newpath
-    done
+    installPhase = ''
+      runHook preInstall
 
-    # Removing emptied folders
-    rm -rf $out/opt/scilab-${version}/share/{applications,icons}
+      mkdir -p $out/{Applications/scilab.app,bin}
+      cp -R . $out/Applications/scilab.app
+      makeWrapper $out/{Applications/scilab.app/Contents/MacOS,bin}/scilab
 
-    # Moving other share/ folders
-    mv $out/opt/scilab-${version}/share/{appdata,locale,mime} $out/share
-  '';
+      runHook postInstall
+    '';
+  };
 
-  meta = {
-    homepage = "http://www.scilab.org/";
-    description = "Scientific software package for numerical computations (Matlab lookalike)";
-    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
-    # see http://www.scilab.org/legal_notice
-    license = "Scilab";
+  linux = stdenv.mkDerivation rec {
+    inherit pname version src meta;
+
+    nativeBuildInputs = [
+      autoPatchelfHook
+    ];
+
+    buildInputs = [
+      alsa-lib
+      ncurses5
+      stdenv.cc.cc
+    ] ++ (with xorg; [
+      libX11
+      libXcursor
+      libXext
+      libXft
+      libXi
+      libXrandr
+      libXrender
+      libXtst
+      libXxf86vm
+    ]);
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p $out
+      mv -t $out bin include lib share thirdparty
+      sed -i \
+        -e 's|\$(/bin/|$(|g' \
+        -e 's|/usr/bin/||g' \
+        $out/bin/{scilab,xcos}
+      sed -i \
+        -e "s|Exec=|Exec=$out/bin/|g" \
+        -e "s|Terminal=.*$|Terminal=true|g" \
+        $out/share/applications/*.desktop
+
+      runHook postInstall
+    '';
   };
-}
+in
+if stdenv.isDarwin then darwin else linux
diff --git a/nixpkgs/pkgs/applications/science/math/singular/default.nix b/nixpkgs/pkgs/applications/science/math/singular/default.nix
index c1ada27d581e..c67057d3ac59 100644
--- a/nixpkgs/pkgs/applications/science/math/singular/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/singular/default.nix
@@ -18,13 +18,13 @@
 # want it to match the upstream format because sage depends on it.
 , texinfo4
 , texlive
-, enableDocs ? true
+, enableDocs ? !stdenv.isDarwin
 , enableGfanlib ? true
 }:
 
 stdenv.mkDerivation rec {
   pname = "singular";
-  version = "4.3.1";
+  version = "4.3.2p1";
 
   # since the tarball does not contain tests, we fetch from GitHub.
   src = fetchFromGitHub {
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
     # if a release is tagged (which sometimes does not happen), it will
     # be in the format below.
     rev = "Release-${lib.replaceStrings ["."] ["-"] version}";
-    sha256 = "sha256-3r3epwaVbyveyYtmfxuevO4Q52J6FbI6RRqiaHQGJIk=";
+    sha256 = "sha256-fprlqJ/3vhnUBnopOhWi4TWMKjcJ4qDQGq8vaaGzy2E=";
 
     # the repository's .gitattributes file contains the lines "/Tst/
     # export-ignore" and "/doc/ export-ignore" so some directories are
@@ -165,7 +165,7 @@ stdenv.mkDerivation rec {
     # 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";
+    homepage = "https://www.singular.uni-kl.de";
     downloadPage = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/";
     mainProgram = "Singular";
   };
diff --git a/nixpkgs/pkgs/applications/science/math/speedcrunch/default.nix b/nixpkgs/pkgs/applications/science/math/speedcrunch/default.nix
index 239b5fd6d367..98bc6b031f19 100644
--- a/nixpkgs/pkgs/applications/science/math/speedcrunch/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/speedcrunch/default.nix
@@ -31,7 +31,6 @@ mkDerivation rec {
     '';
     maintainers = with maintainers; [ gebner j0hax ];
     inherit (qtbase.meta) platforms;
-    # works with qt 5.6 and qt 5.8
-    broken = builtins.compareVersions qtbase.version "5.7.0" == 0 || stdenv.isDarwin;
+    broken = stdenv.isDarwin;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix b/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix
index ed9e64347a87..eea34fb77885 100644
--- a/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/symmetrica/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchFromGitLab
-, fetchpatch
 , autoreconfHook
 }:
 stdenv.mkDerivation rec {
diff --git a/nixpkgs/pkgs/applications/science/math/weka/default.nix b/nixpkgs/pkgs/applications/science/math/weka/default.nix
index 9d18763aa32d..004060f832c2 100644
--- a/nixpkgs/pkgs/applications/science/math/weka/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/weka/default.nix
@@ -2,17 +2,17 @@
 
 stdenv.mkDerivation rec {
   pname = "weka";
-  version = "3.9.2";
+  version = "3.9.6";
 
   src = fetchurl {
-    url = "mirror://sourceforge/weka/${lib.replaceChars ["."]["-"] "${pname}-${version}"}.zip";
-    sha256 = "0zwmhspmqb0a7cm6k6i0s6q3w19ws1g9dx3cp2v3g3vsif6cdh31";
+    url = "mirror://sourceforge/weka/${lib.replaceStrings ["."]["-"] "${pname}-${version}"}.zip";
+    sha256 = "sha256-8fVN4MXYqXNEmyVtXh1IrauHTBZWgWG8AvsGI5Y9Aj0=";
   };
 
   nativeBuildInputs = [ makeWrapper unzip ];
 
   # The -Xmx1000M comes suggested from their download page:
-  # http://www.cs.waikato.ac.nz/ml/weka/downloading.html
+  # https://www.cs.waikato.ac.nz/ml/weka/downloading.html
   installPhase = ''
     mkdir -pv $out/share/weka
     cp -Rv * $out/share/weka
@@ -21,11 +21,12 @@ stdenv.mkDerivation rec {
       --add-flags "-Xmx1000M -jar $out/share/weka/weka.jar"
   '';
 
-  meta = {
-    homepage = "http://www.cs.waikato.ac.nz/ml/weka/";
+  meta = with lib; {
+    homepage = "https://www.cs.waikato.ac.nz/ml/weka/";
     description = "Collection of machine learning algorithms for data mining tasks";
-    license = lib.licenses.gpl2Plus;
-    maintainers = [ lib.maintainers.mimame ];
-    platforms = lib.platforms.unix;
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.mimame ];
+    platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/math/wolfram-engine/default.nix b/nixpkgs/pkgs/applications/science/math/wolfram-engine/default.nix
index acb92766910d..685bc1bff3b1 100644
--- a/nixpkgs/pkgs/applications/science/math/wolfram-engine/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/wolfram-engine/default.nix
@@ -24,6 +24,7 @@
 , lang ? "en"
 , libGL
 , libGLU
+, wrapQtAppsHook
 }:
 
 let
@@ -39,8 +40,9 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     autoPatchelfHook
     installShellFiles
-    makeWrapper
+    wrapQtAppsHook
   ];
+  dontWrapQtApps = true;
 
   buildInputs = [
     alsa-lib
@@ -120,11 +122,16 @@ stdenv.mkDerivation rec {
       makeWrapper $out/libexec/${dirName}/SystemFiles/Kernel/Binaries/Linux-x86-64/$path $out/bin/$path --set LD_LIBRARY_PATH "${zlib}/lib:${stdenv.cc.cc.lib}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}"
     done
 
-    # ... and xkeyboard config path for Qt
+    wrapQtApp "$out/libexec/${dirName}/SystemFiles/FrontEnd/Binaries/Linux-x86-64/WolframPlayer" \
+      --set LD_LIBRARY_PATH "${zlib}/lib:${stdenv.cc.cc.lib}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}" \
+      --set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb"
+    if ! isELF "$out/libexec/${dirName}/SystemFiles/FrontEnd/Binaries/Linux-x86-64/WolframPlayer"; then
+      substituteInPlace $out/libexec/${dirName}/SystemFiles/FrontEnd/Binaries/Linux-x86-64/WolframPlayer \
+        --replace "TopDirectory=" "TopDirectory=$out/libexec/${dirName} #";
+    fi
+
     for path in WolframPlayer wolframplayer; do
-      makeWrapper $out/libexec/${dirName}/Executables/$path $out/bin/$path \
-        --set LD_LIBRARY_PATH "${zlib}/lib:${stdenv.cc.cc.lib}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}" \
-        --set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb"
+      makeWrapper $out/libexec/${dirName}/Executables/$path $out/bin/$path
     done
 
     # Install man pages
diff --git a/nixpkgs/pkgs/applications/science/math/wolfram-engine/l10ns.nix b/nixpkgs/pkgs/applications/science/math/wolfram-engine/l10ns.nix
index 9bee8052c6e3..5a2963301603 100644
--- a/nixpkgs/pkgs/applications/science/math/wolfram-engine/l10ns.nix
+++ b/nixpkgs/pkgs/applications/science/math/wolfram-engine/l10ns.nix
@@ -8,6 +8,20 @@ let allVersions = with lib; flip map
   # N.B. Versions in this list should be ordered from newest to oldest.
   [
     {
+      version = "13.2.0";
+      lang = "en";
+      language = "English";
+      sha256 = "1xvg1n64iq52jxnk9y551m5iwkkz6cxzwyw28h8d0kq36aaiky24";
+      installer = "WolframEngine_13.2.0_LINUX.sh";
+    }
+    {
+      version = "13.1.0";
+      lang = "en";
+      language = "English";
+      sha256 = "1659kyp38a8xknic95pynx9fsgn96i8jn9lnk89pc8n6vydw1460";
+      installer = "WolframEngine_13.1.0_LINUX.sh";
+    }
+    {
       version = "13.0.1";
       lang = "en";
       language = "English";
diff --git a/nixpkgs/pkgs/applications/science/math/wxmaxima/default.nix b/nixpkgs/pkgs/applications/science/math/wxmaxima/default.nix
index aea24b84d1d4..ee2f62317c0c 100644
--- a/nixpkgs/pkgs/applications/science/math/wxmaxima/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/wxmaxima/default.nix
@@ -7,17 +7,18 @@
 , maxima
 , wxGTK
 , gnome
+, glib
 }:
 
 stdenv.mkDerivation rec {
   pname = "wxmaxima";
-  version = "22.05.0";
+  version = "23.02.1";
 
   src = fetchFromGitHub {
     owner = "wxMaxima-developers";
     repo = "wxmaxima";
     rev = "Version-${version}";
-    sha256 = "sha256-pcKnEjJmvMXCBpjtOSLyl4I0x3fjh0os9Sdp39I2Re0=";
+    sha256 = "sha256-Lrj/oJNmKlCkNbnCGY2TewCospwajKdWgmKkreHzEIU=";
   };
 
   buildInputs = [
@@ -25,6 +26,8 @@ stdenv.mkDerivation rec {
     maxima
     # So it won't embed svg files into headers.
     gnome.adwaita-icon-theme
+    # So it won't crash under Sway.
+    glib
   ];
 
   nativeBuildInputs = [
@@ -33,6 +36,10 @@ stdenv.mkDerivation rec {
     gettext
   ];
 
+  cmakeFlags = [
+    "-DwxWidgets_LIBRARIES=${wxGTK}/lib"
+  ];
+
   preConfigure = ''
     gappsWrapperArgs+=(--prefix PATH ":" ${maxima}/bin)
   '';
diff --git a/nixpkgs/pkgs/applications/science/math/yacas/default.nix b/nixpkgs/pkgs/applications/science/math/yacas/default.nix
index f7dc2a344e18..7fa2fe1a6075 100644
--- a/nixpkgs/pkgs/applications/science/math/yacas/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/yacas/default.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
   preCheck = ''
     patchShebangs ../tests/test-yacas
   '';
-  checkInputs = [
+  nativeCheckInputs = [
     gtest
   ];
   doCheck = true;
diff --git a/nixpkgs/pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch b/nixpkgs/pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch
new file mode 100644
index 000000000000..053edac85b21
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/medicine/dcmtk/0001-Fix-cmake.patch
@@ -0,0 +1,12 @@
+diff --git a/CMake/dcmtk.pc.in b/CMake/dcmtk.pc.in
+index 13c79c0d5..b1edf725c 100644
+--- a/CMake/dcmtk.pc.in
++++ b/CMake/dcmtk.pc.in
+@@ -1,6 +1,6 @@
+  prefix="@CMAKE_INSTALL_PREFIX@"
+  exec_prefix="${prefix}"
+- libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@"
++ libdir=@CMAKE_INSTALL_FULL_LIBDIR@"
+  includedir="${prefix}/include/"
+ 
+  Name: DCMTK
diff --git a/nixpkgs/pkgs/applications/science/medicine/dcmtk/default.nix b/nixpkgs/pkgs/applications/science/medicine/dcmtk/default.nix
index a1f4b455ce79..878f62c666e2 100644
--- a/nixpkgs/pkgs/applications/science/medicine/dcmtk/default.nix
+++ b/nixpkgs/pkgs/applications/science/medicine/dcmtk/default.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv, fetchFromGitHub, zlib, libtiff, libxml2, openssl, libiconv, libpng, cmake }:
+{ lib, stdenv, fetchFromGitHub, zlib, libtiff, libxml2, openssl, libiconv
+, libpng, cmake, fetchpatch }:
 
 with lib;
 stdenv.mkDerivation rec {
@@ -14,8 +15,14 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ];
   buildInputs = [ libpng zlib libtiff libxml2 openssl libiconv ];
 
+  # This is only needed until https://github.com/DCMTK/dcmtk/pull/75/files is merged
+  patches = [ ./0001-Fix-cmake.patch ];
+
+  doCheck = true;
+
   meta = {
-    description = "Collection of libraries and applications implementing large parts of the DICOM standard";
+    description =
+      "Collection of libraries and applications implementing large parts of the DICOM standard";
     longDescription = ''
       DCMTK is a collection of libraries and applications implementing large parts of the DICOM standard.
       It includes software for examining, constructing and converting DICOM image files, handling offline media,
diff --git a/nixpkgs/pkgs/applications/science/medicine/xmedcon/default.nix b/nixpkgs/pkgs/applications/science/medicine/xmedcon/default.nix
index 2050517894b9..5a0f3877cdbf 100644
--- a/nixpkgs/pkgs/applications/science/medicine/xmedcon/default.nix
+++ b/nixpkgs/pkgs/applications/science/medicine/xmedcon/default.nix
@@ -10,11 +10,11 @@
 
 stdenv.mkDerivation rec {
   pname = "xmedcon";
-  version = "0.22.0";
+  version = "0.23.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
-    sha256 = "sha256-Ui7XoLSzTMPIFW/3nARCmvlGF+1l7pmcnKsnvn3NFJE=";
+    sha256 = "sha256-g1CRJDokLDzB+1YIuVQNByBLx01CI47EwGeluqVDujk=";
   };
 
   buildInputs = [
diff --git a/nixpkgs/pkgs/applications/science/misc/bada-bib/default.nix b/nixpkgs/pkgs/applications/science/misc/bada-bib/default.nix
index 2304e9f77f4c..7ad542402b58 100644
--- a/nixpkgs/pkgs/applications/science/misc/bada-bib/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/bada-bib/default.nix
@@ -20,15 +20,14 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "bada-bib";
-  version = "0.7.2";
+  version = "0.8.0";
   format = "other";
-  strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943
 
   src = fetchFromGitHub {
     owner = "RogerCrocker";
     repo = "BadaBib";
     rev = "refs/tags/v${version}";
-    sha256 = "sha256-+b4Ko2srWZUs8zsH9jU+aiKQYZti3z2Bil8PogfpPlc=";
+    sha256 = "sha256-mdAoJh3qOwtPX8cMCYw7MDDNy10GdhynnS8gtszJROI=";
   };
 
   nativeBuildInputs = [
@@ -49,7 +48,7 @@ python3Packages.buildPythonApplication rec {
     libadwaita
   ];
 
-  checkInputs = [
+  nativeCheckInputs = [
     appstream-glib
     desktop-file-utils
   ];
diff --git a/nixpkgs/pkgs/applications/science/misc/boinc/default.nix b/nixpkgs/pkgs/applications/science/misc/boinc/default.nix
index aa7431504add..625de3a3a8b3 100644
--- a/nixpkgs/pkgs/applications/science/misc/boinc/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/boinc/default.nix
@@ -1,29 +1,60 @@
-{ fetchFromGitHub, lib, stdenv, autoconf, automake, pkg-config, m4, curl,
-libGLU, libGL, libXmu, libXi, freeglut, libjpeg, libtool, wxGTK30, xcbutil,
-sqlite, gtk2, patchelf, libXScrnSaver, libnotify, libX11, libxcb }:
-
-let
-  majorVersion = "7.20";
-  minorVersion = "2";
-in
+{ fetchFromGitHub
+, lib
+, stdenv
+, autoconf
+, automake
+, pkg-config
+, m4
+, curl
+, libGLU
+, libGL
+, libXmu
+, libXi
+, freeglut
+, libjpeg
+, libtool
+, wxGTK32
+, xcbutil
+, sqlite
+, gtk3
+, patchelf
+, libXScrnSaver
+, libnotify
+, libX11
+, libxcb
+}:
 
 stdenv.mkDerivation rec {
-  version = "${majorVersion}.${minorVersion}";
   pname = "boinc";
+  version = "7.22.2";
 
   src = fetchFromGitHub {
     name = "${pname}-${version}-src";
     owner = "BOINC";
     repo = "boinc";
-    rev = "client_release/${majorVersion}/${version}";
-    sha256 = "sha256-vMb5Vq/6I6lniG396wd7+FfslsByedMRPIpiItp1d1s=";
+    rev = "client_release/${lib.versions.majorMinor version}/${version}";
+    hash = "sha256-9GgvyYiDfppRuDFfxn50e+YZeSX0SLKSfo31lWx2FBs=";
   };
 
   nativeBuildInputs = [ libtool automake autoconf m4 pkg-config ];
 
   buildInputs = [
-    curl libGLU libGL libXmu libXi freeglut libjpeg wxGTK30 sqlite gtk2 libXScrnSaver
-    libnotify patchelf libX11 libxcb xcbutil
+    curl
+    libGLU
+    libGL
+    libXmu
+    libXi
+    freeglut
+    libjpeg
+    wxGTK32
+    sqlite
+    gtk3
+    libXScrnSaver
+    libnotify
+    patchelf
+    libX11
+    libxcb
+    xcbutil
   ];
 
   NIX_LDFLAGS = "-lX11";
@@ -45,11 +76,7 @@ stdenv.mkDerivation rec {
     description = "Free software for distributed and grid computing";
     homepage = "https://boinc.berkeley.edu/";
     license = licenses.lgpl2Plus;
-    platforms = platforms.linux;  # arbitrary choice
-    # checking for gcc options needed to detect all undeclared functions... cannot detect
-    # configure: error: in `/build/boinc-7.18.1-src':
-    # configure: error: cannot make gcc report undeclared builtins
-    broken = stdenv.isAarch64;
+    platforms = platforms.linux;
     maintainers = with maintainers; [ Luflosi ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/misc/cwltool/default.nix b/nixpkgs/pkgs/applications/science/misc/cwltool/default.nix
index 6a1bdc3de160..7c28f65f3bf7 100644
--- a/nixpkgs/pkgs/applications/science/misc/cwltool/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/cwltool/default.nix
@@ -7,19 +7,19 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "cwltool";
-  version = "3.1.20220224085855";
+  version = "3.1.20230213100550";
   format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "common-workflow-language";
     repo = pname;
-    rev = version;
-    sha256 = "sha256-7+1xOV5Lodqtku0wX1urAEHsCcYKM3Vcd5RDg4DdVow=";
+    rev = "refs/tags/${version}";
+    hash = "sha256-BtHkIVadcccnYYX8lRqiCzO+/qFeBaZfdUuu6qrjysk=";
   };
 
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "ruamel.yaml >= 0.15, < 0.17.18" "ruamel.yaml" \
+      --replace "ruamel.yaml >= 0.15, < 0.17.22" "ruamel.yaml" \
       --replace "prov == 1.5.1" "prov" \
       --replace "setup_requires=PYTEST_RUNNER," ""
   '';
@@ -32,6 +32,7 @@ python3.pkgs.buildPythonApplication rec {
     argcomplete
     bagit
     coloredlogs
+    cwl-utils
     mypy-extensions
     prov
     psutil
@@ -44,10 +45,11 @@ python3.pkgs.buildPythonApplication rec {
     typing-extensions
   ];
 
-  checkInputs = with python3.pkgs; [
+  nativeCheckInputs = with python3.pkgs; [
     mock
     nodejs
     pytest-mock
+    pytest-httpserver
     pytest-xdist
     pytestCheckHook
   ];
@@ -56,6 +58,7 @@ python3.pkgs.buildPythonApplication rec {
     "test_content_types"
     "test_env_filtering"
     "test_http_path_mapping"
+    "test_modification_date"
   ];
 
   disabledTestPaths = [
@@ -70,6 +73,7 @@ python3.pkgs.buildPythonApplication rec {
   meta = with lib; {
     description = "Common Workflow Language reference implementation";
     homepage = "https://www.commonwl.org";
+    changelog = "https://github.com/common-workflow-language/cwltool/releases/tag/${version}";
     license = with licenses; [ asl20 ];
     maintainers = with maintainers; [ veprbl ];
   };
diff --git a/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix b/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix
index a907a5f8c169..52cfc7210c6c 100644
--- a/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/cytoscape/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "cytoscape";
-  version = "3.9.1";
+  version = "3.10.0";
 
   src = fetchurl {
     url = "https://github.com/cytoscape/cytoscape/releases/download/${version}/${pname}-unix-${version}.tar.gz";
-    sha256 = "sha256-I4C2yGiIygnFUkRBC4LBSQFgjZlVKCoQGRphynVpscw=";
+    sha256 = "sha256-xfEVNOXptMpcrisr+a62JruXki1V0YjA/j4US7X8mXA=";
   };
 
   patches = [
diff --git a/nixpkgs/pkgs/applications/science/misc/fityk/default.nix b/nixpkgs/pkgs/applications/science/misc/fityk/default.nix
index 6bc65e644b21..5ec7973065d2 100644
--- a/nixpkgs/pkgs/applications/science/misc/fityk/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/fityk/default.nix
@@ -1,22 +1,43 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, boost, lua, zlib, bzip2
-, xylib, readline, gnuplot, swig3 }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, wxGTK32
+, boost
+, lua
+, zlib
+, bzip2
+, xylib
+, readline
+, gnuplot
+, swig3
+}:
 
 stdenv.mkDerivation rec {
   pname = "fityk";
-  version = "1.3.1";
+  version = "1.3.2";
 
   src = fetchFromGitHub {
     owner = "wojdyr";
     repo = "fityk";
     rev = "v${version}";
-    sha256 = "0kmrjjjwrh6xgw590awcd52b86kksmv6rfgih75zvpiavr1ygwsi";
+    sha256 = "sha256-m2RaZMYT6JGwa3sOUVsBIzCdZetTbiygaInQWoJ4m1o=";
   };
 
   nativeBuildInputs = [ autoreconfHook ];
-  buildInputs = [ wxGTK30 boost lua zlib bzip2 xylib readline
-    gnuplot swig3 ];
+  buildInputs = [
+    wxGTK32
+    boost
+    lua
+    zlib
+    bzip2
+    xylib
+    readline
+    gnuplot
+    swig3
+  ];
 
-  NIX_CFLAGS_COMPILE = [
+  env.NIX_CFLAGS_COMPILE = toString [
     "-std=c++11"
   ];
 
diff --git a/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix b/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix
index 6ebc72cc7da4..c927df9a5491 100644
--- a/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix
+++ b/nixpkgs/pkgs/applications/science/misc/foldingathome/client.nix
@@ -1,6 +1,6 @@
 { lib, stdenv
 , autoPatchelfHook
-, buildFHSUserEnv
+, buildFHSEnv
 , dpkg
 , fetchurl
 , gcc-unwrapped
@@ -10,7 +10,7 @@
 }:
 let
   majMin = lib.versions.majorMinor version;
-  version = "7.6.13";
+  version = "7.6.21";
 
   fahclient = stdenv.mkDerivation rec {
     inherit version;
@@ -18,7 +18,7 @@ let
 
     src = fetchurl {
       url = "https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v${majMin}/fahclient_${version}_amd64.deb";
-      sha256 = "1j2cnsyassvifp6ymwd9kxwqw09hks24834gf7nljfncyy9g4g0i";
+      sha256 = "2827f05f1c311ee6c7eca294e4ffb856c81957e8f5bfc3113a0ed27bb463b094";
     };
 
     nativeBuildInputs = [
@@ -35,7 +35,7 @@ let
     installPhase = "cp -ar usr $out";
   };
 in
-buildFHSUserEnv {
+buildFHSEnv {
   name = fahclient.name;
 
   targetPkgs = pkgs': [
diff --git a/nixpkgs/pkgs/applications/science/misc/gephi/default.nix b/nixpkgs/pkgs/applications/science/misc/gephi/default.nix
index bb17fcc9c283..a5bf1a2da2b6 100644
--- a/nixpkgs/pkgs/applications/science/misc/gephi/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/gephi/default.nix
@@ -1,20 +1,20 @@
-{ lib, stdenv, fetchFromGitHub, jdk, maven, javaPackages }:
+{ lib, stdenv, fetchFromGitHub, jdk11, maven, javaPackages }:
 
 let
-  version = "0.9.6";
+  version = "0.10.1";
 
   src = fetchFromGitHub {
     owner = "gephi";
     repo = "gephi";
     rev = "v${version}";
-    sha256 = "sha256-3+tOwcE7TUeexJCugFsx9SgsKeb7ApNqbMEIi9QaKPE=";
+    hash = "sha256-ZNSEaiD32zFfF2ISKa1CmcT9Nq6r5i2rNHooQAcVbn4=";
   };
 
   # perform fake build to make a fixed-output derivation out of the files downloaded from maven central (120MB)
   deps = stdenv.mkDerivation {
     name = "gephi-${version}-deps";
     inherit src;
-    buildInputs = [ jdk maven ];
+    buildInputs = [ jdk11 maven ];
     buildPhase = ''
       while mvn package -Dmaven.repo.local=$out/.m2 -Dmaven.wagon.rto=5000; [ $? = 1 ]; do
         echo "timeout, restart maven to continue downloading"
@@ -24,7 +24,7 @@ let
     installPhase = ''find $out/.m2 -type f -regex '.+\(\.lastUpdated\|resolver-status\.properties\|_remote\.repositories\)' -delete'';
     outputHashAlgo = "sha256";
     outputHashMode = "recursive";
-    outputHash = "sha256-kIPsZN0alRAgiMbckQnMWKOKtCZ37D/6MgT17VYcr+s=";
+    outputHash = "sha256-OdW4M5nGEkYkmHpRLM4cBQtk4SJII2uqM8TXb6y4eXk=";
   };
 in
 stdenv.mkDerivation {
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
 
   inherit src;
 
-  buildInputs = [ jdk maven ];
+  buildInputs = [ jdk11 maven ];
 
   buildPhase = ''
     # 'maven.repo.local' must be writable so copy it out of nix store
@@ -49,10 +49,10 @@ stdenv.mkDerivation {
 
     # use self-compiled JOGL to avoid patchelf'ing .so inside jars
     rm $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-{jogl,gluegen}/*.jar
-    cp ${javaPackages.jogl_2_3_2}/share/java/jogl*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-jogl/
-    cp ${javaPackages.jogl_2_3_2}/share/java/glue*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-gluegen/
+    cp ${javaPackages.jogl_2_4_0}/share/java/jogl*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-jogl/
+    cp ${javaPackages.jogl_2_4_0}/share/java/glue*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-gluegen/
 
-    echo "jdkhome=${jdk}" >> $out/etc/gephi.conf
+    printf "\n\njdkhome=${jdk11}\n" >> $out/etc/gephi.conf
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/misc/graphia/default.nix b/nixpkgs/pkgs/applications/science/misc/graphia/default.nix
index ce712ef182b0..b06cfaae66b5 100644
--- a/nixpkgs/pkgs/applications/science/misc/graphia/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/graphia/default.nix
@@ -2,6 +2,7 @@
 , lib
 , cmake
 , fetchFromGitHub
+, fetchpatch
 , wrapQtAppsHook
 , qtbase
 , qtquickcontrols2
@@ -10,13 +11,13 @@
 
 stdenv.mkDerivation rec {
   pname = "graphia";
-  version = "3.1";
+  version = "3.2";
 
   src = fetchFromGitHub {
     owner = "graphia-app";
     repo = "graphia";
     rev = version;
-    sha256 = "sha256-mqoK5y2h0JSiE9VtwawCgc1+qETzuefLVUpgFPcNFnk=";
+    sha256 = "sha256-9kohXLXF4F/qoHm8qmvPM1y9ak0Thb4xvgKJlVuOPTg=";
   };
 
   patches = [
@@ -24,6 +25,12 @@ stdenv.mkDerivation rec {
     # https://github.com/pytorch/pytorch/issues/70297
     # https://github.com/google/breakpad/commit/605c51ed96ad44b34c457bbca320e74e194c317e
     ./breakpad-sigstksz.patch
+
+    # FIXME: backport patch fixing build with Qt 5.15, remove for next release
+    (fetchpatch {
+      url = "https://github.com/graphia-app/graphia/commit/4b51bb8d465afa7ed0b2b30cb1c5e1c6af95976f.patch";
+      hash = "sha256-GDJAFLxQlRWKvcOgqqPYV/aVTRM7+KDjW7Zp9l7SuyM=";
+    })
   ];
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/applications/science/misc/megam/default.nix b/nixpkgs/pkgs/applications/science/misc/megam/default.nix
index 6c55027d3c6f..cae0fe9b26fd 100644
--- a/nixpkgs/pkgs/applications/science/misc/megam/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/megam/default.nix
@@ -1,9 +1,13 @@
-{ fetchurl, lib, stdenv, ocaml, makeWrapper, ncurses }:
+{ lib
+, stdenv
+, fetchurl
+, ocaml
+, ncurses
+}:
 
-let version = "0.92"; in
 stdenv.mkDerivation {
   pname = "megam";
-  inherit version;
+  version = "0.92";
 
   src = fetchurl {
     url = "http://hal3.name/megam/megam_src.tgz";
@@ -12,36 +16,50 @@ stdenv.mkDerivation {
 
   patches = [ ./ocaml-includes.patch ./ocaml-3.12.patch ];
 
-  buildInputs = [ ocaml ncurses ];
+  postPatch = ''
+    # Deprecated in ocaml 3.10 https://github.com/ocaml/ocaml/commit/f6190f3d0c49c5220d443ee8d03ca5072d68aa87
+    # Deprecated in ocaml 3.08 https://github.com/ocaml/ocaml/commit/0c7aecb88dc696f66f49f3bed54a037361a26b8d
+    substituteInPlace fastdot_c.c --replace copy_double caml_copy_double --replace Bigarray_val Caml_ba_array_val --replace caml_bigarray caml_ba_array
+    # They were already deprecated in 3.12 https://v2.ocaml.org/releases/3.12/htmlman/libref/Array.html
+    substituteInPlace abffs.ml main.ml --replace create_matrix make_matrix
+    substituteInPlace intHashtbl.ml --replace Array.create Array.make
+  '';
+  strictDeps = true;
+
+  nativeBuildInputs = [ ocaml ];
 
-  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ ncurses ];
 
-  makeFlags = [ "CAML_INCLUDES=${ocaml}/lib/ocaml/caml" ];
+  makeFlags = [
+    "CAML_INCLUDES=${ocaml}/lib/ocaml/caml"
+    ("WITHBIGARRAY=" + lib.optionalString (lib.versionOlder ocaml.version "4.08.0") "bigarray.cma")
+    "all"
+    "opt"
+  ];
 
   # see https://bugzilla.redhat.com/show_bug.cgi?id=435559
   dontStrip = true;
 
   installPhase = ''
-    mkdir -pv $out/bin
-    cp -Rv megam $out/bin
-  '';
+    runHook preInstall
 
+    install -Dm755 megam $out/bin/megam
+    install -Dm755 megam.opt $out/bin/megam.opt
 
-  meta = {
-    description = "MEGA Model Optimization Package";
-
-    longDescription =
-      ''  The software here is an implementation of maximum likelihood
-          and maximum a posterior optimization of the parameters of
-          these models.  The algorithms used are much more efficient
-          than the iterative scaling techniques used in almost every
-          other maxent package out there.  '';
+    runHook postInstall
+  '';
 
+  meta = with lib; {
+    description = "MEGA Model Optimization Package";
+    longDescription = ''
+      The software here is an implementation of maximum likelihood and maximum a
+      posterior optimization of the parameters of these models. The algorithms
+      used are much more efficient than the iterative scaling techniques used in
+      almost every other maxent package out there.
+    '';
     homepage = "http://www.umiacs.umd.edu/~hal/megam";
-
     license = "non-commercial";
-
-    maintainers = [ ];
-    platforms = lib.platforms.gnu ++ lib.platforms.linux;  # arbitrary choice
+    maintainers = with maintainers; [ leixb ];
+    platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/misc/megam/ocaml-includes.patch b/nixpkgs/pkgs/applications/science/misc/megam/ocaml-includes.patch
index b3a56643448c..d4f38949b4d3 100644
--- a/nixpkgs/pkgs/applications/science/misc/megam/ocaml-includes.patch
+++ b/nixpkgs/pkgs/applications/science/misc/megam/ocaml-includes.patch
@@ -15,7 +15,7 @@ diff -ru megam_0.92/Makefile megam_0.92-b/Makefile
  
  #WITHCLIBS =-I /usr/lib/ocaml/3.09.2/caml
 -WITHCLIBS =-I /usr/lib/ocaml/caml
-+WITHCLIBS =-I $(CAML_INCLUDES) 
++WITHCLIBS =-I $(CAML_INCLUDES) -I +unix -I +str
  
  ################ End of user's variables #####################
  
diff --git a/nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix b/nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix
index 8f168ab83839..78e21dcd8788 100644
--- a/nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/nextinspace/default.nix
@@ -25,7 +25,7 @@ python3.pkgs.buildPythonApplication rec {
     colorama
   ];
 
-  checkInputs = with python3.pkgs; [
+  nativeCheckInputs = with python3.pkgs; [
     pytest-lazy-fixture
     pytestCheckHook
     requests-mock
diff --git a/nixpkgs/pkgs/applications/science/misc/openmodelica/combined/default.nix b/nixpkgs/pkgs/applications/science/misc/openmodelica/combined/default.nix
index 0c2220b7ea28..bc6bc9620215 100644
--- a/nixpkgs/pkgs/applications/science/misc/openmodelica/combined/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/openmodelica/combined/default.nix
@@ -11,7 +11,7 @@ symlinkJoin {
     omshell
   ];
 
-  buildInputs = [ gnumake makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   postBuild = ''
     wrapProgram $out/bin/OMEdit \
diff --git a/nixpkgs/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix b/nixpkgs/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix
index 088fa83b7d92..ffa0a158ac95 100644
--- a/nixpkgs/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/openmodelica/mkderivation/default.nix
@@ -16,7 +16,7 @@ let
   # getAttr-like helper for optional append to string:
   # "Hello" + appendByAttr "a" " " {a = "world";} = "Hello world"
   # "Hello" + appendByAttr "a" " " {} = "Hello"
-  appendByAttr = attr: sep: x: if hasAttr attr x then sep + (getAttr attr x) else "";
+  appendByAttr = attr: sep: x: lib.optionalString (hasAttr attr x) (sep + (getAttr attr x));
 
   # Are there any OM dependencies at all?
   ifDeps = length pkg.omdeps != 0;
diff --git a/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix b/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix
index a89b73eb8664..6821e33d1a62 100644
--- a/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/default.nix
@@ -2,9 +2,6 @@
 , stdenv
 , fetchgit
 , bash
-, pkg-config
-, jre8
-, libuuid
 , openmodelica
 , mkOpenModelicaDerivation
 }:
diff --git a/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix b/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix
index fdbc79aae599..cad21c2a6e44 100644
--- a/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix
+++ b/nixpkgs/pkgs/applications/science/misc/openmodelica/omlibrary/fakegit.nix
@@ -13,7 +13,7 @@ let
 
   hashname = r:
     let
-      rpl = lib.replaceChars [ ":" "/" ] [ "_" "_" ];
+      rpl = lib.replaceStrings [ ":" "/" ] [ "_" "_" ];
     in
     (rpl r.url) + "-" + (rpl r.rev);
 
diff --git a/nixpkgs/pkgs/applications/science/misc/openmvg/default.nix b/nixpkgs/pkgs/applications/science/misc/openmvg/default.nix
index 81c377a91c78..f9bcfa5df73c 100644
--- a/nixpkgs/pkgs/applications/science/misc/openmvg/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/openmvg/default.nix
@@ -1,25 +1,27 @@
-{ lib, stdenv, fetchFromGitHub, pkg-config, cmake
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, cereal, openmp
 , libjpeg ? null
 , zlib ? null
 , libpng ? null
 , eigen ? null
 , libtiff ? null
+, ceres-solver
+, enableShared ? !stdenv.hostPlatform.isStatic
 , enableExamples ? false
 , enableDocs ? false }:
 
 stdenv.mkDerivation rec {
-  version = "2.0";
+  version = "unstable-2022-12-30";
   pname = "openmvg";
 
   src = fetchFromGitHub {
     owner = "openmvg";
     repo = "openmvg";
-    rev = "v${version}";
-    sha256 = "sha256-6F/xUgZpqY+v6CpwTBhIXI4JdT8HVB0P5JzOL66AVd8=";
+    rev = "e1bbfe801986cd7171f36443a1573b0f69f3702d";
+    sha256 = "sha256-DngfmejNFw5pogTo7Ec5aUey2LUQIojvJybLmtCfvVY=";
     fetchSubmodules = true;
   };
 
-  buildInputs = [ libjpeg zlib libpng eigen libtiff ];
+  buildInputs = [ libjpeg zlib libpng eigen libtiff cereal openmp ceres-solver ];
 
   nativeBuildInputs = [ cmake pkg-config ];
 
@@ -27,7 +29,8 @@ stdenv.mkDerivation rec {
     "-DCMAKE_CXX_FLAGS=-std=c++11"
     "-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}"
     "-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}"
-  ];
+    "-DTARGET_ARCHITECTURE=generic"
+  ] ++ lib.optional enableShared "-DOpenMVG_BUILD_SHARED=ON";
 
   cmakeDir = "./src";
 
@@ -40,11 +43,11 @@ stdenv.mkDerivation rec {
   hardeningDisable = [ "all" ];
 
   meta = {
-    broken = (stdenv.isLinux && stdenv.isAarch64);
+    broken = stdenv.isDarwin && stdenv.isx86_64;
     description = "A library for computer-vision scientists and targeted for the Multiple View Geometry community";
     homepage = "https://openmvg.readthedocs.io/en/latest/";
     license = lib.licenses.mpl20;
-    platforms = lib.platforms.linux;
-    maintainers = with lib.maintainers; [ mdaiter ];
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ mdaiter bouk ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/misc/openmvs/default.nix b/nixpkgs/pkgs/applications/science/misc/openmvs/default.nix
new file mode 100644
index 000000000000..fde756181cca
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/misc/openmvs/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, boost
+, breakpad
+, ceres-solver
+, cgal
+, cmake
+, eigen
+, fetchFromGitHub
+, glfw
+, gmp
+, libjpeg
+, libpng
+, libtiff
+, mpfr
+, opencv
+, openmp
+, pkg-config
+, stdenv
+, vcg
+, zstd
+}:
+
+let
+  boostWithZstd = boost.overrideAttrs (old: {
+    buildInputs = old.buildInputs ++ [ zstd ];
+  });
+in
+stdenv.mkDerivation rec {
+  version = "2.1.0";
+  pname = "openmvs";
+
+  src = fetchFromGitHub {
+    owner = "cdcseacave";
+    repo = "openmvs";
+    rev = "v${version}";
+    sha256 = "sha256-eqNprBgR0hZnbLKLZLJqjemKxHhDtGblmaSxYlmegsc=";
+    fetchSubmodules = true;
+  };
+
+  # SSE is enabled by default
+  cmakeFlags = lib.optional (!stdenv.isx86_64) "-DOpenMVS_USE_SSE=OFF";
+
+  buildInputs = [
+    boostWithZstd
+    breakpad
+    ceres-solver
+    cgal
+    eigen
+    glfw
+    gmp
+    libjpeg
+    libpng
+    libtiff
+    mpfr
+    opencv
+    openmp
+    vcg
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  postInstall = ''
+    mv $out/bin/OpenMVS/* $out/bin
+    rmdir $out/bin/OpenMVS
+    rm $out/bin/Tests
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+    ctest
+    runHook postCheck
+  '';
+
+  meta = {
+    description = "Open Multi-View Stereo reconstruction library";
+    homepage = "https://github.com/cdcseacave/openMVS";
+    license = lib.licenses.agpl3Only;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ bouk ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/misc/root/5.nix b/nixpkgs/pkgs/applications/science/misc/root/5.nix
index 84443645865e..ef7037eea3ad 100644
--- a/nixpkgs/pkgs/applications/science/misc/root/5.nix
+++ b/nixpkgs/pkgs/applications/science/misc/root/5.nix
@@ -5,7 +5,7 @@
 , cmake
 , pcre
 , pkg-config
-, python2
+, python3
 , libX11
 , libXpm
 , libXft
@@ -14,9 +14,10 @@
 , libGL
 , zlib
 , libxml2
+, libxcrypt
 , lz4
 , xz
-, gsl_1
+, gsl
 , xxHash
 , Cocoa
 , OpenGL
@@ -33,7 +34,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ pcre python2 zlib libxml2 lz4 xz gsl_1 xxHash ]
+  buildInputs = [ pcre python3 zlib libxml2 lz4 xz gsl xxHash libxcrypt ]
     ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
     ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
   ;
@@ -58,6 +59,11 @@ stdenv.mkDerivation rec {
       url = "https://github.com/root-project/root/commit/3c243b18768d3c3501faf3ca4e4acfc071021350.diff";
       sha256 = "1hjmgnp4zx6im8ps78673x0rrhmfyy1nffhgxjlfl1r2z8cq210z";
     })
+    (fetchpatch {
+      name = "root5-python37-fix.patch";
+      url = "https://github.com/root-project/root/commit/c75458024082de0cc35b45505c652b8460a9e71b.patch";
+      sha256 = "sha256-A5zEjQE9OGPFp/L1HUs4NIdxQMRiwbwCRNWOLN2ENrM=";
+    })
   ];
 
   preConfigure = ''
@@ -143,6 +149,7 @@ stdenv.mkDerivation rec {
     homepage = "https://root.cern.ch/";
     description = "A data analysis framework";
     platforms = platforms.unix;
+    broken = !stdenv.isx86_64;
     maintainers = with maintainers; [ veprbl ];
     license = licenses.lgpl21;
   };
diff --git a/nixpkgs/pkgs/applications/science/misc/root/default.nix b/nixpkgs/pkgs/applications/science/misc/root/default.nix
index b4e0a35184a8..1f8a2d3b8d54 100644
--- a/nixpkgs/pkgs/applications/science/misc/root/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/root/default.nix
@@ -1,13 +1,18 @@
 { stdenv
 , lib
+, callPackage
 , fetchurl
 , fetchpatch
 , makeWrapper
 , cmake
+, coreutils
 , git
+, davix
 , ftgl
 , gl2ps
 , glew
+, gnugrep
+, gnused
 , gsl
 , lapack
 , libX11
@@ -16,15 +21,21 @@
 , libXext
 , libGLU
 , libGL
+, libxcrypt
 , libxml2
 , llvm_9
+, lsof
 , lz4
 , xz
+, man
 , openblas
+, openssl
 , pcre
 , nlohmann_json
 , pkg-config
+, procps
 , python
+, which
 , xxHash
 , zlib
 , zstd
@@ -33,7 +44,11 @@
 , libjpeg
 , libtiff
 , libpng
+, patchRcPathCsh
+, patchRcPathFish
+, patchRcPathPosix
 , tbb
+, xrootd
 , Cocoa
 , CoreSymbolication
 , OpenGL
@@ -43,7 +58,7 @@
 let
 
   _llvm_9 = llvm_9.overrideAttrs (prev: {
-    patches = (prev.patches or []) ++ [
+    patches = (prev.patches or [ ]) ++ [
       (fetchpatch {
         url = "https://github.com/root-project/root/commit/a9c961cf4613ff1f0ea50f188e4a4b0eb749b17d.diff";
         stripLen = 3;
@@ -56,15 +71,23 @@ in
 
 stdenv.mkDerivation rec {
   pname = "root";
-  version = "6.26.06";
+  version = "6.26.10";
+
+  passthru = {
+    tests = import ./tests { inherit callPackage; };
+  };
 
   src = fetchurl {
     url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
-    hash = "sha256-sfc8l2pYClxWyMigFSWCod/FYLTdgOG3VFI3tl5sics=";
+    hash = "sha256-jla+w5cQQBeqVPnrVU3noaE0R0/gs7sPQ6cPxPq9Yl8=";
   };
 
   nativeBuildInputs = [ makeWrapper cmake pkg-config git ];
+  propagatedBuildInputs = [
+    nlohmann_json
+  ];
   buildInputs = [
+    davix
     ftgl
     gl2ps
     glew
@@ -72,21 +95,26 @@ stdenv.mkDerivation rec {
     zlib
     zstd
     lapack
+    libxcrypt
     libxml2
     _llvm_9
     lz4
     xz
     gsl
     openblas
+    openssl
     xxHash
     libAfterImage
     giflib
     libjpeg
     libtiff
     libpng
-    nlohmann_json
+    patchRcPathCsh
+    patchRcPathFish
+    patchRcPathPosix
     python.pkgs.numpy
     tbb
+    xrootd
   ]
   ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
   ++ lib.optionals (stdenv.isDarwin) [ Cocoa CoreSymbolication OpenGL ]
@@ -94,6 +122,12 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./sw_vers.patch
+  ] ++ lib.optionals (python.pkgs.pythonAtLeast "3.11") [
+    # Fix build against Python 3.11
+    (fetchpatch {
+      url = "https://github.com/root-project/root/commit/484deb056dacf768aba4954073b41105c431bffc.patch";
+      hash = "sha256-4qur2e3SxMIPgOg4IjlvuULR2BObuP7xdvs+LmNT2/s=";
+    })
   ];
 
   # Fix build against vanilla LLVM 9
@@ -123,6 +157,8 @@ stdenv.mkDerivation rec {
     # Eliminate impure reference to /System/Library/PrivateFrameworks
     substituteInPlace core/CMakeLists.txt \
       --replace "-F/System/Library/PrivateFrameworks" ""
+  '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
   '';
 
   cmakeFlags = [
@@ -138,12 +174,13 @@ stdenv.mkDerivation rec {
     "-Dcastor=OFF"
     "-Dchirp=OFF"
     "-Dclad=OFF"
-    "-Ddavix=OFF"
+    "-Ddavix=ON"
     "-Ddcache=OFF"
     "-Dfail-on-missing=ON"
     "-Dfftw3=OFF"
     "-Dfitsio=OFF"
     "-Dfortran=OFF"
+    "-Dgnuinstall=ON"
     "-Dimt=ON"
     "-Dgfal=OFF"
     "-Dgviz=OFF"
@@ -162,12 +199,12 @@ stdenv.mkDerivation rec {
     "-Drfio=OFF"
     "-Droot7=OFF"
     "-Dsqlite=OFF"
-    "-Dssl=OFF"
+    "-Dssl=ON"
     "-Dtmva=ON"
     "-Dvdt=OFF"
     "-Dwebgui=OFF"
     "-Dxml=ON"
-    "-Dxrootd=OFF"
+    "-Dxrootd=ON"
   ]
   ++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"
   ++ lib.optionals stdenv.isDarwin [
@@ -179,14 +216,66 @@ stdenv.mkDerivation rec {
     "-Druntime_cxxmodules=OFF"
   ];
 
+  # Workaround the xrootd runpath bug #169677 by prefixing [DY]LD_LIBRARY_PATH with ${lib.makeLibraryPath xrootd}.
+  # TODO: Remove the [DY]LDLIBRARY_PATH prefix for xrootd when #200830 get merged.
   postInstall = ''
     for prog in rootbrowse rootcp rooteventselector rootls rootmkdir rootmv rootprint rootrm rootslimtree; do
       wrapProgram "$out/bin/$prog" \
         --set PYTHONPATH "$out/lib" \
-        --set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib"
+        --set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib:${lib.makeLibraryPath [ xrootd ]}"
     done
+
+    # Make ldd and sed available to the ROOT executable by prefixing PATH.
+    wrapProgram "$out/bin/root" \
+      --prefix PATH : "${lib.makeBinPath [
+        gnused # sed
+        stdenv.cc # c++ ld etc.
+        stdenv.cc.libc # ldd
+      ]}" \
+      --prefix ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xrootd ]}"
+
+    # Patch thisroot.{sh,csh,fish}
+
+    # The main target of `thisroot.sh` is "bash-like shells",
+    # but it also need to support Bash-less POSIX shell like dash,
+    # as they are mentioned in `thisroot.sh`.
+
+    # `thisroot.sh` would include commands `lsof` and `procps` since ROOT 6.28.
+    # See https://github.com/root-project/root/pull/10332
+
+    patchRcPathPosix "$out/bin/thisroot.sh" "${lib.makeBinPath [
+      coreutils # dirname tail
+      gnugrep # grep
+      gnused # sed
+      lsof # lsof # for ROOT (>=6.28)
+      man # manpath
+      procps # ps # for ROOT (>=6.28)
+      which # which
+    ]}"
+    patchRcPathCsh "$out/bin/thisroot.csh" "${lib.makeBinPath [
+      coreutils
+      gnugrep
+      gnused
+      lsof # lsof # for ROOT (>=6.28)
+      man
+      which
+    ]}"
+    patchRcPathFish "$out/bin/thisroot.fish" "${lib.makeBinPath [
+      coreutils
+      man
+      which
+    ]}"
   '';
 
+  # To use the debug information on the fly (without installation)
+  # add the outPath of root.debug into NIX_DEBUG_INFO_DIRS (in PATH-like format)
+  # and make sure that gdb from Nixpkgs can be found in PATH.
+  #
+  # Darwin currently fails to support it (#203380)
+  # we set it to true hoping to benefit from the future fix.
+  # Before that, please make sure if root.debug exists before using it.
+  separateDebugInfo = true;
+
   setupHook = ./setup-hook.sh;
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/misc/root/setup-hook.sh b/nixpkgs/pkgs/applications/science/misc/root/setup-hook.sh
index b26cf9b779f8..34c9bfdcebbd 100644
--- a/nixpkgs/pkgs/applications/science/misc/root/setup-hook.sh
+++ b/nixpkgs/pkgs/applications/science/misc/root/setup-hook.sh
@@ -11,3 +11,9 @@ thisroot () {
 }
 
 postHooks+=(thisroot)
+
+addRootInludePath() {
+    addToSearchPath ROOT_INCLUDE_PATH $1/include
+}
+
+addEnvHooks "$targetOffset" addRootInludePath
diff --git a/nixpkgs/pkgs/applications/science/misc/root/tests/default.nix b/nixpkgs/pkgs/applications/science/misc/root/tests/default.nix
new file mode 100644
index 000000000000..9d2da2533f7f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/misc/root/tests/default.nix
@@ -0,0 +1,4 @@
+{ callPackage }:
+{
+  test-thisroot = callPackage ./test-thisroot.nix { };
+}
diff --git a/nixpkgs/pkgs/applications/science/misc/root/tests/test-thisroot.nix b/nixpkgs/pkgs/applications/science/misc/root/tests/test-thisroot.nix
new file mode 100644
index 000000000000..3540dde8c913
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/misc/root/tests/test-thisroot.nix
@@ -0,0 +1,49 @@
+{ lib
+, runCommand
+, root
+, bash
+, fish
+, ksh
+, tcsh
+, zsh
+}: runCommand "test-thisroot"
+{
+  meta = with lib; {
+    description = "Test for root thisroot.* sourcing";
+    maintainers = unique ((with maintainers; [ ShamrockLee ]) ++ root.meta.maintainers);
+  };
+}
+  ''
+    set -eu -o pipefail
+    declare -a shellNameArray shellOutpathArray sourcefileNameArray sourceCommandArray
+    shellNameArray=( bash zsh tcsh fish )
+    shellOutpathArray=( "${bash}" "${zsh}" "${tcsh}" "${fish}")
+    sourcefileNameArray=( thisroot.sh thisroot.sh thisroot.csh thisroot.fish )
+    sourceCommandArray=( "source" "source" "source" "source" )
+    debugFlagstrArray=( "-e" "-e" "-e" "" )
+    nShellToTest="''${#shellNameArray[@]}"
+    if [[ "''${#shellOutpathArray[@]}" -ne "$nShellToTest" ]] \
+      || [[ "''${#sourcefileNameArray[@]}" -ne "$nShellToTest" ]] \
+      || [[ "''${#sourceCommandArray[@]}" -ne "$nShellToTest" ]] \
+      || [[ "''${#debugFlagstrArray[@]}" -ne "$nShellToTest" ]]
+    then
+      echo "error: Lengths of test parameter arrays doesn't match." >&2
+      exit 1
+    fi
+    typePExpect="${root}/bin/root"
+    for ((i=0; i<$nShellToTest; ++i)); do
+      tryCommand="''${sourceCommandArray[$i]} \"${root}/bin/''${sourcefileNameArray[$i]}\""
+      echo "Testing ''${shellNameArray[$i]} $tryCommand"
+      # Home directory for Fish
+      HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
+      binPATHGot="$(PATH="''${shellOutpathArray[$i]}/bin" HOME=$HOME_TEMP "''${shellNameArray[$i]}" ''${debugFlagstrArray[$i]} -c "$tryCommand && echo \"\$PATH\"")"
+      rm -r "$HOME_TEMP"
+      typePGot="$(PATH="$binPATHGot" type -p root)"
+      if [[ "$typePGot" != "$typePExpect" ]]; then
+        echo "error: Got PATH \"$binPATHGot\", in which the root executable path is \"$typePGot\". Expect root executable path \"$typePExpect\"." >&2
+        exit 1
+      fi
+    done
+    echo "test-thisroot pass!"
+    touch "$out"
+  ''
diff --git a/nixpkgs/pkgs/applications/science/misc/sasview/default.nix b/nixpkgs/pkgs/applications/science/misc/sasview/default.nix
index 51dea2755785..ddc0cdfa4e5b 100644
--- a/nixpkgs/pkgs/applications/science/misc/sasview/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/sasview/default.nix
@@ -1,7 +1,7 @@
 { lib
 , python3
 , fetchFromGitHub
-, which
+, fetchpatch
 , wrapQtAppsHook
 }:
 
@@ -16,6 +16,21 @@ python3.pkgs.buildPythonApplication rec {
     hash = "sha256-TjcchqA6GCvkr59ZgDuGglan2RxLp+aMjJk28XhvoiY=";
   };
 
+  patches = [
+    # Fix `asscalar` numpy API removal.
+    # See https://github.com/SasView/sasview/pull/2178
+    (fetchpatch {
+      url = "https://github.com/SasView/sasview/commit/b1ab08c2a4e8fdade7f3e4cfecf3dfec38b8f3c5.patch";
+      hash = "sha256-IH8g4XPziVAnkmBdzLH1ii8vN6kyCmOgrQlH2HEbm5o=";
+    })
+  ];
+
+  # AttributeError: module 'numpy' has no attribute 'float'.
+  postPatch = ''
+    substituteInPlace src/sas/sascalc/pr/p_invertor.py \
+      --replace "dtype=np.float)" "dtype=float)"
+  '';
+
   nativeBuildInputs = [
     python3.pkgs.pyqt5
     wrapQtAppsHook
@@ -46,7 +61,7 @@ python3.pkgs.buildPythonApplication rec {
     "\${qtWrapperArgs[@]}"
   ];
 
-  checkInputs = with python3.pkgs; [
+  nativeCheckInputs = with python3.pkgs; [
     pytestCheckHook
     unittest-xml-reporting
   ];
diff --git a/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix b/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix
index 8db9245ed33e..31aee617c44d 100644
--- a/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/simgrid/default.nix
@@ -20,14 +20,14 @@ in
 
 stdenv.mkDerivation rec {
   pname = "simgrid";
-  version = "3.31";
+  version = "3.32";
 
   src = fetchFromGitLab {
     domain = "framagit.org";
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-K6YkkCMxc2lqxHIwyuLiwcp3m49sqbEtOlwZh4L1YJg=";
+    sha256 = "sha256-o25wOROkUm07JPdNTJQcJw6apeoysnjd+YBMHlPpAYI=";
   };
 
   propagatedBuildInputs = [ boost ];
diff --git a/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix b/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix
index 89a967678aa5..f38281761319 100644
--- a/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/snakemake/default.nix
@@ -5,14 +5,14 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "snakemake";
-  version = "7.12.1";
+  version = "7.25.3";
   format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "snakemake";
     repo = pname;
     rev = "refs/tags/v${version}";
-    hash = "sha256-QfSk6K/Vpj3+k+5w0thiP9O4CTvL8JDRwj4lDSt2NnU=";
+    hash = "sha256-KrstajTocVX5Tw7aiPoJ9vxJ0nKF+jqJcYJKrJvBt0Q=";
   };
 
   propagatedBuildInputs = with python3.pkgs; [
@@ -21,22 +21,20 @@ python3.pkgs.buildPythonApplication rec {
     connection-pool
     datrie
     docutils
-    filelock
-    GitPython
+    gitpython
+    humanfriendly
     jinja2
     jsonschema
     nbformat
-    networkx
     psutil
     pulp
-    pygraphviz
     pyyaml
-    ratelimiter
     requests
-    retry
+    reretry
     smart-open
     stopit
     tabulate
+    throttler
     toposort
     wrapt
     yte
@@ -44,16 +42,17 @@ python3.pkgs.buildPythonApplication rec {
 
   # See
   # https://github.com/snakemake/snakemake/blob/main/.github/workflows/main.yml#L99
-  # for the current basic test suite. Tibanna and Tes require extra
+  # for the current basic test suite. Slurm, Tibanna and Tes require extra
   # setup.
 
-  checkInputs = with python3.pkgs; [
+  nativeCheckInputs = with python3.pkgs; [
     pandas
     pytestCheckHook
     requests-mock
   ];
 
   disabledTestPaths = [
+    "tests/test_slurm.py"
     "tests/test_tes.py"
     "tests/test_tibanna.py"
     "tests/test_linting.py"
diff --git a/nixpkgs/pkgs/applications/science/misc/toil/default.nix b/nixpkgs/pkgs/applications/science/misc/toil/default.nix
index b13ad0ad10ca..7fc070f4f9f7 100644
--- a/nixpkgs/pkgs/applications/science/misc/toil/default.nix
+++ b/nixpkgs/pkgs/applications/science/misc/toil/default.nix
@@ -1,33 +1,51 @@
 { lib
 , fetchFromGitHub
 , python3
+, rsync
 }:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "toil";
-  version = "5.6.0";
+  version = "5.7.1";
   format = "setuptools";
 
-  src = python3.pkgs.fetchPypi {
-    inherit pname version;
-    sha256 = "sha256-m6tzrRCCLULO+wB8htUlt0KESLm/vdIeTzBrihnAo/I=";
+  src = fetchFromGitHub {
+    owner = "DataBiosphere";
+    repo = pname;
+    rev = "refs/tags/releases/${version}";
+    hash = "sha256-m+XvNyzd0ly2YqKhgxezgGaCXLs3CmupJMnp5RIZqNI=";
   };
 
+  postPatch = ''
+    substituteInPlace requirements.txt \
+      --replace "docker>=3.7.2, <6" "docker"
+  '';
+
   propagatedBuildInputs = with python3.pkgs; [
     addict
+    dill
     docker
-    pytz
-    pyyaml
     enlighten
     psutil
     py-tes
+    pypubsub
     python-dateutil
-    dill
+    pytz
+    pyyaml
+    requests
+    typing-extensions
   ];
 
-  checkInputs = with python3.pkgs; [
+  nativeCheckInputs = [
+    rsync
+  ] ++ (with python3.pkgs; [
+    boto
+    botocore
+    flask
+    mypy-boto3-s3
     pytestCheckHook
-  ];
+    stubserver
+  ]);
 
   pytestFlagsArray = [
     "src/toil/test"
@@ -37,6 +55,34 @@ python3.pkgs.buildPythonApplication rec {
     "toil"
   ];
 
+  disabledTestPaths = [
+    # Tests are reaching their timeout
+    "src/toil/test/docs/scriptsTest.py"
+    "src/toil/test/jobStores/jobStoreTest.py"
+    "src/toil/test/provisioners/aws/awsProvisionerTest.py"
+    "src/toil/test/src"
+    "src/toil/test/wdl"
+    "src/toil/test/utils/utilsTest.py"
+  ];
+
+  disabledTests = [
+    # Tests fail starting with 5.7.1
+    "testServices"
+    "testConcurrencyWithDisk"
+    "testJobConcurrency"
+    "testNestedResourcesDoNotBlock"
+    "test_omp_threads"
+    "testFileSingle"
+    "testFileSingle10000"
+    "testFileSingleCheckpoints"
+    "testFileSingleNonCaching"
+    "testFetchJobStoreFiles"
+    "testFetchJobStoreFilesWSymlinks"
+    "testJobStoreContents"
+    "test_cwl_on_arm"
+    "test_cwl_toil_kill"
+  ];
+
   meta = with lib; {
     description = "Workflow engine written in pure Python";
     homepage = "https://toil.ucsc-cgl.org/";
diff --git a/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
index 8d253e0bcc7a..d08c15dd8a6a 100644
--- a/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
@@ -19,11 +19,11 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "gromacs";
-  version = "2022.2";
+  version = "2023.1";
 
   src = fetchurl {
     url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-${version}.tar.gz";
-    sha256 = "1gq1bvscngsbf8231laam6z0v38lmy95nakxr5225ynjhkw08r35";
+    sha256 = "sha256-7vK7Smy2MUz52kfybfKg0nr0v3swmXI9Q2AQc6sKQvQ=";
   };
 
   nativeBuildInputs = [ cmake ];
@@ -63,8 +63,14 @@ in stdenv.mkDerivation rec {
      ]
   ) ++ lib.optional enableCuda "-DGMX_GPU=CUDA";
 
+  postFixup = ''
+    substituteInPlace "$out"/lib/pkgconfig/*.pc \
+      --replace '=''${prefix}//' '=/' \
+      --replace "$out/$out/" "$out/"
+  '';
+
   meta = with lib; {
-    homepage = "http://www.gromacs.org";
+    homepage = "https://www.gromacs.org";
     license = licenses.gpl2;
     description = "Molecular dynamics software package";
     longDescription = ''
@@ -84,7 +90,7 @@ in stdenv.mkDerivation rec {
       reference or manual for details), but there are also quite a
       few features that make it stand out from the competition.
 
-      See: http://www.gromacs.org/About_Gromacs for details.
+      See: https://www.gromacs.org/About_Gromacs for details.
     '';
     platforms = platforms.unix;
     maintainers = with maintainers; [ sheepforce markuskowa ];
diff --git a/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix
index c377d961820e..e8ad77f7d4dc 100644
--- a/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/lammps/default.nix
@@ -1,53 +1,80 @@
-{ lib, stdenv, fetchFromGitHub
-, libpng, gzip, fftw, blas, lapack
+{ lib
+, stdenv
+, fetchFromGitHub
+, libpng
+, gzip
+, fftw
+, blas
+, lapack
 , withMPI ? false
 , mpi
+, cmake
+# Available list of packages can be found near here:
+# https://github.com/lammps/lammps/blob/develop/cmake/CMakeLists.txt#L222
+, packages ? {
+  ASPHERE = true;
+  BODY = true;
+  CLASS2 = true;
+  COLLOID = true;
+  COMPRESS = true;
+  CORESHELL = true;
+  DIPOLE = true;
+  GRANULAR = true;
+  KSPACE = true;
+  MANYBODY = true;
+  MC = true;
+  MISC = true;
+  MOLECULE = true;
+  OPT = true;
+  PERI = true;
+  QEQ = true;
+  REPLICA = true;
+  RIGID = true;
+  SHOCK = true;
+  ML-SNAP = true;
+  SRD = true;
+  REAXFF = true;
+}
 }:
-let packages = [
-     "asphere" "body" "class2" "colloid" "compress" "coreshell"
-     "dipole" "granular" "kspace" "manybody" "mc" "misc" "molecule"
-     "opt" "peri" "qeq" "replica" "rigid" "shock" "snap" "srd" "user-reaxc"
-    ];
-    lammps_includes = "-DLAMMPS_EXCEPTIONS -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64";
-in
+
 stdenv.mkDerivation rec {
   # LAMMPS has weird versioning converted to ISO 8601 format
-  version = "stable_29Oct2020";
+  version = "23Jun2022_update4";
   pname = "lammps";
 
   src = fetchFromGitHub {
     owner = "lammps";
     repo = "lammps";
-    rev = version;
-    sha256 = "1rmi9r5wj2z49wg43xyhqn9sm37n95cyli3g7vrqk3ww35mmh21q";
+    rev = "stable_${version}";
+    hash = "sha256-zGztc+iUFNIa0KKtfpAhwitInvMmXeTHp1XsOLibfzM=";
   };
+  preConfigure = ''
+    cd cmake
+  '';
+  nativeBuildInputs = [
+    cmake
+  ];
 
   passthru = {
     inherit mpi;
     inherit packages;
   };
+  cmakeFlags = [
+  ] ++ (builtins.map (p: "-DPKG_${p}=ON") (builtins.attrNames (lib.filterAttrs (n: v: v) packages)));
 
-  buildInputs = [ fftw libpng blas lapack gzip ]
-    ++ (lib.optionals withMPI [ mpi ]);
-
-  configurePhase = ''
-    cd src
-    for pack in ${lib.concatStringsSep " " packages}; do make "yes-$pack" SHELL=$SHELL; done
-  '';
-
-  # Must do manual build due to LAMMPS requiring a seperate build for
-  # the libraries and executable. Also non-typical make script
-  buildPhase = ''
-    make mode=exe ${if withMPI then "mpi" else "serial"} SHELL=$SHELL LMP_INC="${lammps_includes}" FFT_PATH=-DFFT_FFTW3 FFT_LIB=-lfftw3 JPG_LIB=-lpng
-    make mode=shlib ${if withMPI then "mpi" else "serial"} SHELL=$SHELL LMP_INC="${lammps_includes}" FFT_PATH=-DFFT_FFTW3 FFT_LIB=-lfftw3 JPG_LIB=-lpng
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin $out/include $out/lib
+  buildInputs = [
+    fftw
+    libpng
+    blas
+    lapack
+    gzip
+  ] ++ lib.optionals withMPI [
+    mpi
+  ];
 
-    cp -v lmp_* $out/bin/
-    cp -v *.h $out/include/
-    cp -v liblammps* $out/lib/
+  # For backwards compatibility
+  postInstall = ''
+    ln -s $out/bin/lmp $out/bin/lmp_serial
   '';
 
   meta = with lib; {
@@ -62,6 +89,10 @@ stdenv.mkDerivation rec {
     homepage = "https://lammps.sandia.gov";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
-    maintainers = [ maintainers.costrouc ];
+    # compiling lammps with 64 bit support blas and lapack might cause runtime
+    # segfaults. In anycase both blas and lapack should have the same #bits
+    # support.
+    broken = (blas.isILP64 && lapack.isILP64);
+    maintainers = [ maintainers.costrouc maintainers.doronbehar ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/data.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/data.nix
new file mode 100644
index 000000000000..bcc9dc3b372e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/data.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenvNoCC
+, gzip
+, raspa
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "raspa-data";
+  inherit (raspa) version src;
+
+  outputs = [ "out" "doc" ];
+
+  nativeBuildInpuhs = [ gzip ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p "$out/share/raspa"
+    mv examples "$out/share/raspa"
+    mkdir -p "$doc/share/raspa"
+    mv -T "Docs" "$doc/share/raspa/doc"
+    runHook postInstall
+  '';
+
+  # Keep the shebangs of the examples from being patched
+  dontPatchShebangs = true;
+
+  meta = with lib; {
+    inherit (raspa.meta) homepage license maintainers;
+    description = "Example packs and documentation of RASPA";
+    outputsToInstall = [ "out" "doc" ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/default.nix
new file mode 100644
index 000000000000..149db0504bf1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/raspa/default.nix
@@ -0,0 +1,79 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, makeWrapper
+, fftw
+, lapack
+, openblas
+, runCommandLocal
+, raspa
+, raspa-data
+}:
+stdenv.mkDerivation rec {
+  pname = "raspa";
+  version = "2.0.47";
+
+  src = fetchFromGitHub {
+    owner = "iRASPA";
+    repo = "RASPA2";
+    rev = "v${version}";
+    hash = "sha256-i8Y+pejiOuyPNJto+/0CmRoAnMljCrnDFx8qDh4I/68=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    makeWrapper
+  ];
+
+  buildInputs = [
+    fftw
+    lapack
+    openblas
+  ];
+
+  # Prepare for the Python binding packaging.
+  strictDeps = true;
+
+  enableParallelBuilding = true;
+
+  preAutoreconf = ''
+    mkdir "m4"
+  '';
+
+  postAutoreconf = ''
+    automake --add-missing
+    autoconf
+  '';
+
+  doCheck = true;
+
+  # Wrap with RASPA_DIR
+  # so that users can run $out/bin/simulate directly
+  # without the need of a `run` srcipt.
+  postInstall = ''
+    wrapProgram "$out/bin/simulate" \
+      --set RASPA_DIR "$out"
+  '';
+
+  passthru.tests.run-an-example = runCommandLocal "raspa-test-run-an-example" { }
+    ''
+      set -eu -o pipefail
+      exampleDir="${raspa-data}/share/raspa/examples/Basic/1_MC_Methane_in_Box"
+      exampleDirWritable="$(basename "$exampleDir")"
+      cp -rT "$exampleDir" "./$exampleDirWritable"
+      chmod u+rw -R "$exampleDirWritable"
+      cd "$exampleDirWritable"
+      ${raspa}/bin/simulate
+      touch "$out"
+    '';
+
+  meta = with lib; {
+    description = "A general purpose classical molecular simulation package";
+    homepage = "https://iraspa.org/raspa/";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ShamrockLee ];
+    mainProgram = "simulate";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/molecular-dynamics/viennarna/default.nix b/nixpkgs/pkgs/applications/science/molecular-dynamics/viennarna/default.nix
index 1629a6bba268..3d20eeabe268 100644
--- a/nixpkgs/pkgs/applications/science/molecular-dynamics/viennarna/default.nix
+++ b/nixpkgs/pkgs/applications/science/molecular-dynamics/viennarna/default.nix
@@ -9,11 +9,11 @@
 
 stdenv.mkDerivation rec {
   pname = "ViennaRNA";
-  version = "2.4.18";
+  version = "2.5.1";
 
   src = fetchurl {
-    url = "https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_4_x/${pname}-${version}.tar.gz";
-    sha256 = "17b0mcfkms0gn1a3faa4cakig65k9nk282x6mdh1mmjwbqzp5akw";
+    url = "https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_5_x/${pname}-${version}.tar.gz";
+    sha256 = "sha256-BUAEN88VWV4QsaJd9snEiFbzVhMPnR44D6iGa20n9Fc=";
   };
 
   buildInputs = [
@@ -34,7 +34,5 @@ stdenv.mkDerivation rec {
     license = licenses.unfree;
     maintainers = with maintainers; [ prusnak ];
     platforms = platforms.unix;
-    # Perl bindings fail on aarch64-darwin with "Undefined symbols for architecture arm64"
-    broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/networking/sumo/default.nix b/nixpkgs/pkgs/applications/science/networking/sumo/default.nix
index 9cdf576b9c68..c6cf73da3690 100644
--- a/nixpkgs/pkgs/applications/science/networking/sumo/default.nix
+++ b/nixpkgs/pkgs/applications/science/networking/sumo/default.nix
@@ -1,17 +1,17 @@
-{ lib, bzip2, cmake, eigen, fetchFromGitHub, ffmpeg, fox_1_6, gdal,
+{ lib, bzip2, cmake, eigen, fetchFromGitHub, ffmpeg_4, fox_1_6, gdal,
   git, gl2ps, gpp , gtest, jdk, libGL, libGLU, libX11, libjpeg,
-  libpng, libtiff, openscenegraph , proj, python3, python37Packages,
-  stdenv, swig, xercesc, xorg, zlib }:
+  libpng, libtiff, libxcrypt, openscenegraph , proj, python3,
+  python3Packages, stdenv, swig, xercesc, xorg, zlib }:
 
 stdenv.mkDerivation rec {
   pname = "sumo";
-  version = "1.9.2";
+  version = "1.17.0";
 
   src = fetchFromGitHub {
     owner = "eclipse";
     repo = "sumo";
     rev = "v${lib.replaceStrings ["."] ["_"] version}";
-    sha256 = "0zpd331vy1kfi4hfiszv3m8wl4m0wdfr3zzza200kkaakw5hjxhs";
+    sha256 = "sha256-Br5ugEyGu3zLeylCvoVE92zOCpB5cuXLv1dGLpM3FwI=";
     fetchSubmodules = true;
   };
 
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     bzip2
     eigen
-    ffmpeg
+    ffmpeg_4
     fox_1_6
     gdal
     gl2ps
@@ -36,9 +36,10 @@ stdenv.mkDerivation rec {
     libjpeg
     libpng
     libtiff
+    libxcrypt
     openscenegraph
     proj
-    python37Packages.setuptools
+    python3Packages.setuptools
     xercesc
     zlib
     python3
diff --git a/nixpkgs/pkgs/applications/science/physics/crystfel/0002-fix-ftbfs-with-gcc-10.patch b/nixpkgs/pkgs/applications/science/physics/crystfel/0002-fix-ftbfs-with-gcc-10.patch
deleted file mode 100644
index ddd91aec9a6e..000000000000
--- a/nixpkgs/pkgs/applications/science/physics/crystfel/0002-fix-ftbfs-with-gcc-10.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Description: Fixing argument mismatches in Fortran code, addressing #957430.
-Author: Andrius Merkys <merkys@debian.org>
-Forwarded: ccp4-dev@dl.ac.uk
---- a/fortran/pack_f.f
-+++ b/fortran/pack_f.f
-@@ -106,7 +106,7 @@
-          endif
-  10   continue
-       filnarray(len(filn) + 1) = 0
--      call pack_wordimage_f(data, x, y, filnarray)
-+      call pack_longimage_f(data, x, y, filnarray)
-       return
-       end
- 
-@@ -138,7 +138,7 @@
-          endif
-  10   continue
-       filnarray(len(filn) + 1) = 0
--      call v2pack_wordimage_f(data, x, y, filnarray)
-+      call v2pack_longimage_f(data, x, y, filnarray)
-       return
-       end
- 
---- a/fortran/lgglib.f
-+++ b/fortran/lgglib.f
-@@ -1236,7 +1236,7 @@
-       B3(2) = XYZ(2) * CELL(2)
-       B3(3) = XYZ(3) * CELL(3)
- C
--      CALL matmult(3,3,3,1,ORTH,B3,XYZ,B1)
-+      CALL matmult(3,3,3,1,ORTH,B3,XYZ)
-       END
- c
- c
-@@ -1274,7 +1274,7 @@
-       B3(1) = XYZ(1)
-       B3(2) = XYZ(2)
-       B3(3) = XYZ(3)
--      CALL matmult(3,3,3,1,ORTH,B3,XYZ,B1)
-+      CALL matmult(3,3,3,1,ORTH,B3,XYZ)
-       END
-       character*80 function getnam(filnam)
-       character*(*) filnam
diff --git a/nixpkgs/pkgs/applications/science/physics/crystfel/default.nix b/nixpkgs/pkgs/applications/science/physics/crystfel/default.nix
index 85b18eb82fd7..aac1e8c424ce 100644
--- a/nixpkgs/pkgs/applications/science/physics/crystfel/default.nix
+++ b/nixpkgs/pkgs/applications/science/physics/crystfel/default.nix
@@ -2,14 +2,14 @@
 , stdenv
 , fetchurl
 , fetchFromGitHub
+, fetchpatch
+, fetchzip
 , cmake
 , lz4
 , bzip2
-, gfortran
 , m4
 , hdf5
 , gsl
-, slurm
 , unzip
 , makeWrapper
 , meson
@@ -38,14 +38,12 @@
 let
   libccp4 = stdenv.mkDerivation rec {
     pname = "libccp4";
-    version = "6.5.1";
+    version = "8.0.0";
     src = fetchurl {
-      # Original mirror, now times out
-      # url = "ftp://ftp.ccp4.ac.uk/opensource/${pname}-${version}.tar.gz";
-      url = "https://deb.debian.org/debian/pool/main/libc/${pname}/${pname}_${version}.orig.tar.gz";
-      sha256 = "1rfvjliny29vy5bdi6rrjaw9hhhhh72pw536xwvqipqcjlylf2r8";
+      url = "https://ftp.ccp4.ac.uk/opensource/${pname}-${version}.tar.gz";
+      hash = "sha256-y4E66GYSoIZjKd6rfO6W6sVz2BvlskA0HUD5rVMi/y0=";
     };
-    nativeBuildInputs = [ gfortran m4 ];
+    nativeBuildInputs = [ meson ninja ];
     buildInputs = [ hdf5 gsl ];
 
     configureFlags = [ "FFLAGS=-fallow-argument-mismatch" ];
@@ -53,16 +51,22 @@ let
     # libccp4 tries to read syminfo.lib by looking at an environment variable, which hinders reproducibility.
     # We hard-code this by providing a little patch and then passing the absolute path to syminfo.lib as a
     # preprocessor flag.
-    preBuild = ''
-      makeFlagsArray+=(CFLAGS='-DNIX_PROVIDED_SYMOP_FILE=\"$out/share/syminfo.lib\"')
-      export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS";
-    '';
-    makeFlags = [ "CFLAGS='-DNIX_PROVIDED_SYMOP_FILE=\"${placeholder "out"}/share/syminfo.lib\"" ];
+    env.NIX_CFLAGS_COMPILE = "-DNIX_PROVIDED_SYMOP_FILE=\"${placeholder "out"}/share/ccp4/syminfo.lib\"";
 
     patches = [
       ./libccp4-use-hardcoded-syminfo-lib.patch
-      ./0002-fix-ftbfs-with-gcc-10.patch
     ];
+
+    postPatch =
+      let
+        mesonPatch = fetchzip {
+          url = "https://wrapdb.mesonbuild.com/v2/libccp4c_8.0.0-1/get_patch#somefile.zip";
+          hash = "sha256-ohskfKh+972Pl56KtwAeWwHtAaAFNpCzz5vZBAI/vdU=";
+        };
+      in
+      ''
+        cp ${mesonPatch}/meson.build .
+      '';
   };
   # This is the statically-linked, pre-built binary of mosflm. Compiling it ourselves turns out to be very difficult
   # since the build process is very hard-coded for a specific machine, architecture, and libraries.
@@ -105,10 +109,10 @@ let
 
   xgandalf = stdenv.mkDerivation rec {
     pname = "xgandalf";
-    version = "c15afa2381d5f87d4aefcc8181a15b4a6fd3a955";
+    version = "c6c5003ff1086e8c0fb5313660b4f02f3a3aab7b";
     src = fetchurl {
       url = "https://gitlab.desy.de/thomas.white/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
-      sha256 = "11i1w57a3rpnb4x5y4n8d3iffn5m9w1zydl69syzljdk3aqg2pv8";
+      hash = "sha256-/uZlBwAINSoYqgLQFTMz8rS1Rpadu79JkO6Bu/+Nx9E=";
     };
 
     nativeBuildInputs = [ meson pkg-config ninja ];
@@ -117,10 +121,10 @@ let
 
   pinkIndexer = stdenv.mkDerivation rec {
     pname = "pinkindexer";
-    version = "8a828788f8272a89d484b00afbd2500c2c1ff974";
+    version = "5d4e016941eb2a9e50a10df96ded7ff1e2464503";
     src = fetchurl {
       url = "https://gitlab.desy.de/thomas.white/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
-      sha256 = "1mkgf1xd91ay0z0632kzxm0z3wcxf0cayjvs6a3znds72dkhfsyh";
+      hash = "sha256-VnJOJJ247dNoBlos4Fu3GQBlAnTk9el+yZDRiicJtu0=";
     };
 
     nativeBuildInputs = [ meson pkg-config ninja ];
@@ -129,10 +133,10 @@ let
 
   fdip = stdenv.mkDerivation rec {
     pname = "fdip";
-    version = "29da626f17f66d5c0780fc59b1eafb7c85b81dd6";
+    version = "5628fedddd79323b4b26df9b85e9543d83286d4c";
     src = fetchurl {
-      url = "https://gitlab.desy.de/philipp.middendorf/fdip/-/archive/${version}/fdip-${version}.tar.gz";
-      sha256 = "184l76r4fgznq54rnhgjk7dg41kqdl0d1da02vr5y4cs2fyqppky";
+      url = "https://gitlab.desy.de/thomas.white/fdip/-/archive/${version}/fdip-${version}.tar.gz";
+      hash = "sha256-EaihnW7p//ecgMn+KKlfmBeXrnAqs+HdhN+ovuSrtiQ=";
     };
 
     nativeBuildInputs = [ meson ninja pkg-config ];
@@ -145,10 +149,17 @@ let
     src = fetchFromGitHub {
       owner = "nexusformat";
       repo = pname;
-      rev = "d469f175e5273c1d488e71a6134f84088f57d39c";
-      sha256 = "1jrzzh75i68ad1yrim7s1nx9wy0s49ghkziahs71mm5azprm6gh9";
+      rev = "49e3b65eca772bca77af13ba047d8b577673afba";
+      hash = "sha256-bEzfWdZuHmb0PDzCqy8Dey4tLtq+4coO0sT0GzqrTYI=";
     };
 
+    patches = [
+      (fetchpatch {
+        url = "https://github.com/spanezz/HDF5-External-Filter-Plugins/commit/6b337fe36da97a3ef72354393687ce3386c0709d.patch";
+        hash = "sha256-wnBEdL/MjEyRHPwaVtuhzY+DW1AFeaUQUmIXh+JaRHo=";
+      })
+    ];
+
     nativeBuildInputs = [ cmake ];
     buildInputs = [ hdf5 lz4 bzip2 ];
 
@@ -161,12 +172,12 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "crystfel";
-  version = "0.10.1";
+  version = "0.10.2";
   src = fetchurl {
     url = "https://www.desy.de/~twhite/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "0i9d5ggalic7alj97dxjdys7010kxhm2cb4lwakvigl023j8ms79";
+    sha256 = "sha256-nCO9ndDKS54bVN9IhFBiCVNzqk7BsCljXFrOmlx+sP4=";
   };
-  nativeBuildInputs = [ meson pkg-config ninja flex bison doxygen opencl-headers ]
+  nativeBuildInputs = [ meson pkg-config ninja flex bison doxygen opencl-headers makeWrapper ]
     ++ lib.optionals withGui [ wrapGAppsHook ];
   buildInputs = [
     hdf5
@@ -184,14 +195,19 @@ stdenv.mkDerivation rec {
   ] ++ lib.optionals withGui [ gtk3 gdk-pixbuf ]
   ++ lib.optionals stdenv.isDarwin [
     argp-standalone
+  ] ++ lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
     memorymappingHook
   ]
-  # slurm is not available for Darwin; when it is, remove the condition
-  ++ lib.optionals (!stdenv.isDarwin) [ slurm ]
-  # hdf5-external-filter-plugins doesn't link on Darwin
-  ++ lib.optionals (withBitshuffle && !stdenv.isDarwin) [ hdf5-external-filter-plugins ];
+  ++ lib.optionals withBitshuffle [ hdf5-external-filter-plugins ];
 
-  patches = [ ./link-to-argp-standalone-if-needed.patch ];
+  patches = [
+    ./link-to-argp-standalone-if-needed.patch
+    ./disable-fmemopen-on-aarch64-darwin.patch
+    (fetchpatch {
+      url = "https://gitlab.desy.de/thomas.white/crystfel/-/commit/3c54d59e1c13aaae716845fed2585770c3ca9d14.diff";
+      hash = "sha256-oaJNBQQn0c+z4p1pnW4osRJA2KdKiz4hWu7uzoKY7wc=";
+    })
+  ];
 
   # CrystFEL calls mosflm by searching PATH for it. We could've create a wrapper script that sets the PATH, but
   # we'd have to do that for every CrystFEL executable (indexamajig, crystfel, partialator). Better to just
@@ -200,7 +216,7 @@ stdenv.mkDerivation rec {
     sed -i -e 's#execlp("mosflm"#execl("${mosflm}/bin/mosflm"#' libcrystfel/src/indexers/mosflm.c;
   '';
 
-  postInstall = lib.optionalString (withBitshuffle && !stdenv.isDarwin) ''
+  postInstall = lib.optionalString withBitshuffle ''
     for file in $out/bin/*; do
       wrapProgram $file --set HDF5_PLUGIN_PATH ${hdf5-external-filter-plugins}/lib/plugins
     done
@@ -220,7 +236,7 @@ stdenv.mkDerivation rec {
     downloadPage = "https://www.desy.de/~twhite/crystfel/download.html";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ pmiddend ];
-    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    platforms = platforms.unix;
   };
 
 }
diff --git a/nixpkgs/pkgs/applications/science/physics/crystfel/disable-fmemopen-on-aarch64-darwin.patch b/nixpkgs/pkgs/applications/science/physics/crystfel/disable-fmemopen-on-aarch64-darwin.patch
new file mode 100644
index 000000000000..c35350d0008f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/physics/crystfel/disable-fmemopen-on-aarch64-darwin.patch
@@ -0,0 +1,13 @@
+diff --git a/libcrystfel/src/image-cbf.c b/libcrystfel/src/image-cbf.c
+index b8f09a1f..f8a15c1b 100644
+--- a/libcrystfel/src/image-cbf.c
++++ b/libcrystfel/src/image-cbf.c
+@@ -287,7 +287,7 @@ static float *read_cbf_data(const char *filename, int gz, int *w, int *h)
+ 
+ 	} else {
+ 
+-		#ifdef HAVE_ZLIB
++		#if defined(HAVE_ZLIB) && !(defined(__aarch64__) && defined(__APPLE__))
+ 		gzFile gzfh;
+ 		int len_read;
+ 		size_t len;
diff --git a/nixpkgs/pkgs/applications/science/physics/crystfel/libccp4-use-hardcoded-syminfo-lib.patch b/nixpkgs/pkgs/applications/science/physics/crystfel/libccp4-use-hardcoded-syminfo-lib.patch
index 9c5e1365492b..1806d9b2b9da 100644
--- a/nixpkgs/pkgs/applications/science/physics/crystfel/libccp4-use-hardcoded-syminfo-lib.patch
+++ b/nixpkgs/pkgs/applications/science/physics/crystfel/libccp4-use-hardcoded-syminfo-lib.patch
@@ -1,11 +1,12 @@
 diff --git a/ccp4/csymlib.c b/ccp4/csymlib.c
-index 76bc70b..7a0c5dc 100644
+index 76bc70b..3616121 100644
 --- a/ccp4/csymlib.c
 +++ b/ccp4/csymlib.c
-@@ -137,24 +137,7 @@ CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg,
+@@ -136,25 +136,7 @@ CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg,
+     }
    }
  
-   /* Open the symop file: */
+-  /* Open the symop file: */
 -  if (!(symopfile = getenv("SYMINFO"))) {
 -    if (debug)
 -      printf("Environment variable SYMINFO not set ... guessing location of symmetry file. \n");
@@ -28,3 +29,12 @@ index 76bc70b..7a0c5dc 100644
  
    filein = fopen(symopfile,"r");
    if (!filein) {
+@@ -162,8 +144,6 @@ CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg,
+     return NULL;
+   }
+ 
+-  if (!(getenv("SYMINFO"))) free(symopfile);
+-
+   parser = ccp4_parse_start(20);
+   if (parser == NULL) 
+     ccp4_signal(CSYM_ERRNO(CSYMERR_ParserFail),"ccp4spg_load_spacegroup",NULL);
diff --git a/nixpkgs/pkgs/applications/science/physics/crystfel/link-to-argp-standalone-if-needed.patch b/nixpkgs/pkgs/applications/science/physics/crystfel/link-to-argp-standalone-if-needed.patch
index 707ecafde8b8..8314be29ac00 100644
--- a/nixpkgs/pkgs/applications/science/physics/crystfel/link-to-argp-standalone-if-needed.patch
+++ b/nixpkgs/pkgs/applications/science/physics/crystfel/link-to-argp-standalone-if-needed.patch
@@ -1,9 +1,9 @@
 diff --git a/meson.build b/meson.build
-index efc9002b..070f37e4 100644
+index 59bbcfb7..dd75d4e2 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -34,6 +34,12 @@ if slurmdep.found()
-   conf_data.set10('HAVE_SLURM', 1)
+@@ -80,6 +80,12 @@ if cc.has_function('clock_gettime', prefix: '#include <time.h>')
+   conf_data.set10('HAVE_CLOCK_GETTIME', true)
  endif
  
 +if build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
@@ -12,15 +12,15 @@ index efc9002b..070f37e4 100644
 +    argpdep = dependency('', required : false)
 +endif
 +
- # Find HDF5 using inbuilt Meson methods.  Requires Meson >= 0.50.0
- hdf5dep = dependency('hdf5', language: 'c', required: true)
+ # ************************ libcrystfel (subdir) ************************
  
-@@ -180,7 +186,7 @@ if zmqdep.found()
- endif
+ subdir('libcrystfel')
+@@ -180,7 +186,7 @@ endif
  
- executable('indexamajig', indexamajig_sources,
--           dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep],
-+           dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep, argpdep],
-            install: true,
-            install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')
+ indexamajig = executable('indexamajig', indexamajig_sources,
+                          dependencies: [mdep, libcrystfeldep, gsldep,
+-                                        pthreaddep, zmqdep, asapodep],
++                                        pthreaddep, zmqdep, asapodep, argpdep],
+                          install: true,
+                          install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')
  
diff --git a/nixpkgs/pkgs/applications/science/physics/dawn/default.nix b/nixpkgs/pkgs/applications/science/physics/dawn/default.nix
index 609a0e1c4cd3..c174d4c0720f 100644
--- a/nixpkgs/pkgs/applications/science/physics/dawn/default.nix
+++ b/nixpkgs/pkgs/applications/science/physics/dawn/default.nix
@@ -1,6 +1,8 @@
 { lib
 , stdenv
 , fetchurl
+, tk
+, makeWrapper
 }:
 
 stdenv.mkDerivation rec {
@@ -18,12 +20,19 @@ stdenv.mkDerivation rec {
       --replace 'INSTALL_DIR =' "INSTALL_DIR = $out/bin#"
   '';
 
+  nativeBuildInputs = [ makeWrapper ];
+
   dontConfigure = true;
 
   preInstall = ''
     mkdir -p "$out/bin"
   '';
 
+  postInstall = ''
+    wrapProgram "$out/bin/DAWN_GUI" \
+      --prefix PATH : ${lib.makeBinPath [ tk ]}
+  '';
+
   meta = with lib; {
     description = "A vectorized 3D PostScript processor with analytical hidden line/surface removal";
     license = licenses.unfree;
diff --git a/nixpkgs/pkgs/applications/science/physics/dawncut/default.nix b/nixpkgs/pkgs/applications/science/physics/dawncut/default.nix
new file mode 100644
index 000000000000..5c17837d2e95
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/physics/dawncut/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dawncut";
+  version = "1.54a";
+
+  src = fetchurl {
+    name = "${pname}-${version}.tar.gz";
+    url = "https://geant4.kek.jp/~tanaka/src/dawncut_${builtins.replaceStrings ["."] ["_"] version}.taz";
+    hash = "sha256-Ux4fDi7TXePisYAxCMDvtzLYOgxnbxQIO9QacTRrT6k=";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile.architecture \
+      --replace 'CXX      := g++' ""
+  '';
+
+  dontConfigure = true;
+
+  env.NIX_CFLAGS_COMPILE = "-std=c++98";
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm 500 dawncut "$out/bin/dawncut"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A tool to generate a 3D scene data clipped with an arbitrary plane";
+    license = licenses.unfree;
+    homepage = "https://geant4.kek.jp/~tanaka/DAWN/About_DAWNCUT.html";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix b/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix
index a203db1204cb..41a0e00ae784 100644
--- a/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix
+++ b/nixpkgs/pkgs/applications/science/physics/elmerfem/default.nix
@@ -1,14 +1,14 @@
-{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, pkg-config, libGL, libGLU, opencascade, libsForQt5, vtkWithQt5}:
+{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, pkg-config, libGL, libGLU, opencascade, libsForQt5, tbb, vtkWithQt5 }:
 
 stdenv.mkDerivation rec {
   pname = "elmerfem";
-  version = "9.0";
+  version = "unstable-2023-02-03";
 
   src = fetchFromGitHub {
     owner = "elmercsc";
-    repo = "elmerfem";
-    rev = "release-${version}";
-    sha256 = "VK7jvu4s5d7k0c39XqY9dEzg/vXtX5Yr/09VcuZVQ9A=";
+    repo = pname;
+    rev = "39c8784b6e4543a6bf560b5d597e0eec1eb06343";
+    hash = "sha256-yyxgFvlS+I4PouDL6eD4ZrXuONTDejCSYKq2AwQ0Iug=";
   };
 
   hardeningDisable = [ "format" ];
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
     libGL
     libGLU
     opencascade
+    tbb
     vtkWithQt5
   ];
 
@@ -36,12 +37,6 @@ stdenv.mkDerivation rec {
     patchShebangs ./
   '';
 
-  patches = [
-    ./patches/0001-fix-import-of-QPainterPath.patch
-    ./patches/0002-fem-rename-loopvars-to-avoid-redefinition.patch
-    ./patches/0003-ignore-qwt_compat.patch
-  ];
-
   storepath = placeholder "out";
 
   cmakeFlags = [
@@ -58,7 +53,7 @@ stdenv.mkDerivation rec {
   ];
 
   meta = with lib; {
-    homepage = "https://elmerfem.org/";
+    homepage = "https://elmerfem.org";
     description = "A finite element software for multiphysical problems";
     platforms = platforms.unix;
     maintainers = with maintainers; [ wulfsta broke ];
diff --git a/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0001-fix-import-of-QPainterPath.patch b/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0001-fix-import-of-QPainterPath.patch
deleted file mode 100644
index a9e1ba442b45..000000000000
--- a/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0001-fix-import-of-QPainterPath.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 87885de957aa3f891fe963503c94685675c24f49 Mon Sep 17 00:00:00 2001
-From: grindhold <grindhold@gmx.net>
-Date: Wed, 27 Apr 2022 19:16:42 +0200
-Subject: [PATCH] fix import of QPainterPath
-
----
- ElmerGUI/Application/twod/renderarea.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/ElmerGUI/Application/twod/renderarea.cpp b/ElmerGUI/Application/twod/renderarea.cpp
-index 4c2515c5..65128ea9 100644
---- a/ElmerGUI/Application/twod/renderarea.cpp
-+++ b/ElmerGUI/Application/twod/renderarea.cpp
-@@ -38,6 +38,7 @@
-  *                                                                           *
-  *****************************************************************************/
- #include <QPainter>
-+#include <QPainterPath>
- #include <QMouseEvent>
- #include <QFile>
- #include <QTextStream>
--- 
-2.33.3
-
diff --git a/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0002-fem-rename-loopvars-to-avoid-redefinition.patch b/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0002-fem-rename-loopvars-to-avoid-redefinition.patch
deleted file mode 100644
index 6c2782b9e0bd..000000000000
--- a/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0002-fem-rename-loopvars-to-avoid-redefinition.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 06634e5fd46a27dca11b87d4a38e9ead561de3d5 Mon Sep 17 00:00:00 2001
-From: grindhold <grindhold@gmx.net>
-Date: Thu, 28 Apr 2022 15:47:07 +0200
-Subject: [PATCH] fem: rename loopvars to avoid redefinition
-
----
- fem/src/modules/DCRComplexSolve.F90 | 28 ++++++++++++++--------------
- 1 file changed, 14 insertions(+), 14 deletions(-)
-
-diff --git a/fem/src/modules/DCRComplexSolve.F90 b/fem/src/modules/DCRComplexSolve.F90
-index 469214ee..268591fd 100644
---- a/fem/src/modules/DCRComplexSolve.F90
-+++ b/fem/src/modules/DCRComplexSolve.F90
-@@ -502,14 +502,14 @@ CONTAINS
- 
-       IF ( SIZE(Hwrk,1) == 1 ) THEN
- 
--         DO i=1,MIN(3,SIZE(Hwrk,2))
--            Tensor( i,1:n ) = Hwrk( 1,1,1:n )
-+         DO k=1,MIN(3,SIZE(Hwrk,2))
-+            Tensor( k,1:n ) = Hwrk( 1,1,1:n )
-          END DO
- 
-       ELSE
- 
--        DO i=1,MIN(3,SIZE(Hwrk,1))
--           Tensor( i,1:n ) = Hwrk( i,1,1:n )
-+        DO k=1,MIN(3,SIZE(Hwrk,1))
-+           Tensor( k,1:n ) = Hwrk( k,1,1:n )
-         END DO
- 
-       END IF
-@@ -1391,21 +1391,21 @@ contains
- 
-       IF ( SIZE(Hwrk,1) == 1 ) THEN
- 
--         DO i=1,MIN(3,SIZE(Hwrk,2))
--            Tensor( i,i,1:n ) = Hwrk( 1,1,1:n )
-+         DO k=1,MIN(3,SIZE(Hwrk,2))
-+            Tensor( k,k,1:n ) = Hwrk( 1,1,1:n )
-          END DO
- 
-       ELSE IF ( SIZE(Hwrk,2) == 1 ) THEN
- 
--         DO i=1,MIN(3,SIZE(Hwrk,1))
--            Tensor(i,i,1:n) = Hwrk(i,1,1:n)
-+         DO k=1,MIN(3,SIZE(Hwrk,1))
-+            Tensor(k,k,1:n) = Hwrk(k,1,1:n)
-          END DO
- 
-       ELSE
- 
--        DO i=1,MIN(3,SIZE(Hwrk,1))
-+        DO k=1,MIN(3,SIZE(Hwrk,1))
-            DO j=1,MIN(3,SIZE(Hwrk,2))
--              Tensor( i,j,1:n ) = Hwrk(i,j,1:n)
-+              Tensor( k,j,1:n ) = Hwrk(k,j,1:n)
-            END DO
-         END DO
- 
-@@ -1443,14 +1443,14 @@ contains
- 
-       IF ( SIZE(Hwrk,1) == 1 ) THEN
- 
--         DO i=1,MIN(3,SIZE(Hwrk,2))
--            Tensor( i,1:n ) = Hwrk( 1,1,1:n )
-+         DO k=1,MIN(3,SIZE(Hwrk,2))
-+            Tensor( k,1:n ) = Hwrk( 1,1,1:n )
-          END DO
- 
-       ELSE
- 
--        DO i=1,MIN(3,SIZE(Hwrk,1))
--           Tensor( i,1:n ) = Hwrk( i,1,1:n )
-+        DO k=1,MIN(3,SIZE(Hwrk,1))
-+           Tensor( k,1:n ) = Hwrk( k,1,1:n )
-         END DO
- 
-       END IF
--- 
-2.33.3
-
diff --git a/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0003-ignore-qwt_compat.patch b/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0003-ignore-qwt_compat.patch
deleted file mode 100644
index 26954008d5d4..000000000000
--- a/nixpkgs/pkgs/applications/science/physics/elmerfem/patches/0003-ignore-qwt_compat.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 26601fec36a4978e805aad40e6d0cbf268c653d2 Mon Sep 17 00:00:00 2001
-From: grindhold <grindhold@gmx.net>
-Date: Thu, 28 Apr 2022 17:13:06 +0200
-Subject: [PATCH] ignore qwt_compat
-
----
- ElmerGUI/Application/src/convergenceview.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/ElmerGUI/Application/src/convergenceview.h b/ElmerGUI/Application/src/convergenceview.h
-index 377b644b..64250149 100755
---- a/ElmerGUI/Application/src/convergenceview.h
-+++ b/ElmerGUI/Application/src/convergenceview.h
-@@ -52,7 +52,7 @@
- #include <qwt_plot_grid.h>

- #include <qwt_legend.h>

- /*#include <qwt_data.h> <-- deprecated in Qwt6, using qwt_compat.h instead*/

--#include <qwt_compat.h>

-+/*#include <qwt_compat.h>*/

- #include <qwt_text.h>

- #include <qwt_scale_engine.h>

- 

-@@ -76,8 +76,8 @@ public:
-   

- private:

-   int d_count;

--  QwtArray<double> d_x;

--  QwtArray<double> d_y;

-+  QVector<double> d_x;

-+  QVector<double> d_y;

- };

- 

- class Curve

--- 
-2.33.3
-
diff --git a/nixpkgs/pkgs/applications/science/physics/nnpdf/default.nix b/nixpkgs/pkgs/applications/science/physics/nnpdf/default.nix
index f71216278297..ec29c02054df 100644
--- a/nixpkgs/pkgs/applications/science/physics/nnpdf/default.nix
+++ b/nixpkgs/pkgs/applications/science/physics/nnpdf/default.nix
@@ -1,14 +1,13 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, fetchpatch
 , cmake
 , pkg-config
 , apfel
 , gsl
 , lhapdf
 , libarchive
-, libyamlcpp
+, yaml-cpp
 , python3
 , sqlite
 , swig
@@ -16,22 +15,15 @@
 
 stdenv.mkDerivation rec {
   pname = "nnpdf";
-  version = "4.0.4";
+  version = "4.0.6";
 
   src = fetchFromGitHub {
     owner = "NNPDF";
     repo = pname;
     rev = version;
-    sha256 = "sha256-Alx4W0TkPzJBsnRXcKBrlEU6jWTnOjrji/IPk+dNCw0=";
+    hash = "sha256-mwOMNlYFhHZq/wakO1/HGwcxvKGKh5OyFa2D9d3Y3IA=";
   };
 
-  patches = [
-    (fetchpatch {
-      url = "https://github.com/NNPDF/nnpdf/commit/7943b62a91d3a41fd4f6366b18881d50695f4b45.diff";
-      hash = "sha256-UXhTO7vZgJiY8h3bgjg7SQC0gMUQsYQ/V/PgtCEQ7VU=";
-    })
-  ];
-
   postPatch = ''
     for file in CMakeLists.txt buildmaster/CMakeLists.txt; do
       substituteInPlace $file \
@@ -49,7 +41,7 @@ stdenv.mkDerivation rec {
     gsl
     lhapdf
     libarchive
-    libyamlcpp
+    yaml-cpp
     python3
     python3.pkgs.numpy
     sqlite
@@ -62,11 +54,12 @@ stdenv.mkDerivation rec {
   ];
 
   meta = with lib; {
-    broken = (stdenv.isLinux && stdenv.isAarch64);
     description = "An open-source machine learning framework for global analyses of parton distributions";
     homepage = "https://docs.nnpdf.science/";
     license = licenses.gpl3Only;
     maintainers = [ maintainers.veprbl ];
     platforms = platforms.unix;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64);
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix b/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix
index 34e4d989e959..ec0620d3d8ed 100644
--- a/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix
+++ b/nixpkgs/pkgs/applications/science/physics/sacrifice/default.nix
@@ -44,5 +44,7 @@ stdenv.mkDerivation {
     homepage    = "https://agile.hepforge.org/trac/wiki/Sacrifice";
     platforms   = lib.platforms.unix;
     maintainers = with lib.maintainers; [ veprbl ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix b/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix
index 29c72b7f11c0..21a5ee7ec234 100644
--- a/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix
+++ b/nixpkgs/pkgs/applications/science/physics/sherpa/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "sherpa";
-  version = "2.2.12";
+  version = "2.2.15";
 
   src = fetchurl {
     url = "https://www.hepforge.org/archive/sherpa/SHERPA-MC-${version}.tar.gz";
-    sha256 = "sha256-UpRkd1yoKLncllEQUm80DedDtgA8Hm+Kvi/BRVCu0AE=";
+    sha256 = "sha256-3zvLa1k/bm7uOWKUsTyQM39cPBXJJlF1OgPgznl1hks=";
   };
 
   postPatch = lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
@@ -34,5 +34,7 @@ stdenv.mkDerivation rec {
     homepage = "https://gitlab.com/sherpa-team/sherpa";
     platforms = platforms.unix;
     maintainers = with maintainers; [ veprbl ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix b/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix
index 4e6f6626602f..1852ef3ff1c8 100644
--- a/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix
+++ b/nixpkgs/pkgs/applications/science/physics/xfitter/default.nix
@@ -13,7 +13,7 @@
 , lhapdf
 , libtirpc
 , libyaml
-, libyamlcpp
+, yaml-cpp
 , pkg-config
 , qcdnum
 , root
@@ -38,13 +38,13 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake gfortran pkg-config ];
   buildInputs =
-    [ apfel blas ceres-solver lhapdf lapack libyaml root qcdnum gsl libyamlcpp zlib ]
+    [ apfel blas ceres-solver lhapdf lapack libyaml root qcdnum gsl yaml-cpp zlib ]
     ++ lib.optionals ("5" == lib.versions.major root.version) [ apfelgrid applgrid ]
     ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook memstreamHook ]
     ++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc
     ;
 
-  NIX_CFLAGS_COMPILE = lib.optional (stdenv.hostPlatform.libc == "glibc") "-I${libtirpc.dev}/include/tirpc";
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "-I${libtirpc.dev}/include/tirpc";
   NIX_LDFLAGS = lib.optional (stdenv.hostPlatform.libc == "glibc") "-ltirpc";
 
   # workaround wrong library IDs
diff --git a/nixpkgs/pkgs/applications/science/physics/xnec2c/default.nix b/nixpkgs/pkgs/applications/science/physics/xnec2c/default.nix
new file mode 100644
index 000000000000..47fb7cf61df9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/physics/xnec2c/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, pkg-config
+, which
+, gtk3
+, blas
+, lapack
+}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  pname = "xnec2c";
+  version = "4.4.12";
+
+  src = fetchurl {
+    url = "https://www.xnec2c.org/releases/${pname}-v${version}.tar.gz";
+    hash = "sha256-6Yrx6LkJjfnMA/kJUDWLhGzGopZeecARSrcR++UScsU=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config which ];
+  buildInputs = [ gtk3 blas lapack ];
+
+  meta = with lib; {
+    homepage = "https://www.xnec2c.org/";
+    description = "Graphical antenna simulation";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ mvs ];
+    platforms = platforms.unix;
+
+    # Darwin support likely to be fixed upstream in the next release
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix b/nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix
index b65c23521395..34509f05daa3 100644
--- a/nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix
+++ b/nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix
@@ -1,4 +1,4 @@
-{ lib, mkDerivation, fetchFromGitHub, fetchpatch, qmake
+{ lib, mkDerivation, fetchFromGitHub, qmake
 , qtbase, qtscript, qtwebkit, qtserialport, qtsvg, qtdeclarative, qtquickcontrols2
 , alsa-lib, libsndfile, flite, openssl, udev, SDL2
 }:
diff --git a/nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix b/nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix
index 271274126b75..e8e5fbba4e49 100644
--- a/nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix
+++ b/nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix
@@ -13,17 +13,23 @@ let
 in
 stdenv.mkDerivation rec {
   inherit pname;
-  version = "10.8.0";
+  version = "10.9.0";
   src = fetchurl {
     url = "https://github.com/betaflight/${pname}/releases/download/${version}/${pname}_${version}_linux64-portable.zip";
-    sha256 = "sha256-Xn0ga2Z1UKd++TriL47ulV6idVTNBR8uiSW7FnL7r1g=";
+    sha256 = "sha256-9FzMyBIR2u1zXHtTWJABM6RF1+OyjYdEPlRwtig9blI=";
   };
 
+  # remove large unneeded files
+  postUnpack = ''
+    find -name "lib*.so" -delete
+  '';
+
   nativeBuildInputs = [ wrapGAppsHook unzip ];
 
   buildInputs = [ gsettings-desktop-schemas gtk3 ];
 
   installPhase = ''
+    runHook preInstall
     mkdir -p $out/bin \
              $out/opt/${pname}
 
@@ -32,6 +38,7 @@ stdenv.mkDerivation rec {
     cp -r ${desktopItem}/share/applications $out/share/
 
     makeWrapper ${nwjs}/bin/nw $out/bin/${pname} --add-flags $out/opt/${pname}
+    runHook postInstall
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/applications/science/robotics/emuflight-configurator/default.nix b/nixpkgs/pkgs/applications/science/robotics/emuflight-configurator/default.nix
index 112049d7c016..0a733261ea2b 100644
--- a/nixpkgs/pkgs/applications/science/robotics/emuflight-configurator/default.nix
+++ b/nixpkgs/pkgs/applications/science/robotics/emuflight-configurator/default.nix
@@ -3,11 +3,11 @@
 
 stdenv.mkDerivation rec {
   pname = "emuflight-configurator";
-  version = "0.4.0";
+  version = "0.4.1";
 
   src = fetchurl {
     url = "https://github.com/emuflight/EmuConfigurator/releases/download/${version}/emuflight-configurator_${version}_linux64.zip";
-    sha256 = "sha256-s5AE+r9Fw6S7IG2cDW2T7vctcYIAY8al7eCFIDjD5oI=";
+    sha256 = "sha256-e4HNg5yr9V5LyT0hYP6gzw0tZm4dLidJg5MQtH3L3JI=";
   };
 
   nativeBuildInputs = [ wrapGAppsHook unzip copyDesktopItems ];
diff --git a/nixpkgs/pkgs/applications/science/robotics/inav-configurator/default.nix b/nixpkgs/pkgs/applications/science/robotics/inav-configurator/default.nix
index a0b694f29541..9efb9163e5e0 100644
--- a/nixpkgs/pkgs/applications/science/robotics/inav-configurator/default.nix
+++ b/nixpkgs/pkgs/applications/science/robotics/inav-configurator/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "inav-configurator";
-  version = "4.1.0";
+  version = "5.1.0";
 
   src = fetchurl {
     url = "https://github.com/iNavFlight/inav-configurator/releases/download/${version}/INAV-Configurator_linux64_${version}.tar.gz";
-    sha256 = "sha256-+rPzytnAQcNGbISFBHb4JS9Nqy0C2i36k+EPBvq/mso=";
+    sha256 = "sha256-ZvZxQICa5fnJBTx0aW/hqQCuhQW9MkcVa2sOjPYaPXM=";
   };
 
   icon = fetchurl {
diff --git a/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix b/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix
index f02e45280a81..3b81b9ed0884 100644
--- a/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix
+++ b/nixpkgs/pkgs/applications/science/robotics/mavproxy/default.nix
@@ -1,13 +1,14 @@
-{ stdenv, lib, buildPythonApplication, fetchPypi, matplotlib, numpy, pymavlink, pyserial
-, setuptools, wxPython_4_0, billiard, gnureadline }:
+{ stdenv, lib, buildPythonApplication, fetchPypi, lxml, matplotlib, numpy
+, opencv4, pymavlink, pyserial, setuptools, wxPython_4_2, billiard
+, gnureadline }:
 
 buildPythonApplication rec {
   pname = "MAVProxy";
-  version = "1.8.52";
+  version = "1.8.59";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-H30QZbUj6SXuwhhQUvHoPDM1D4ynm/vt1Mi4rkCB1oo=";
+    sha256 = "sha256-XY0d9q4nSuPflN4ZX+nT4RKFy6i4Cd2lNWvWaJQzWW8=";
   };
 
   postPatch = ''
@@ -16,12 +17,14 @@ buildPythonApplication rec {
   '';
 
   propagatedBuildInputs = [
+    lxml
     matplotlib
     numpy
+    opencv4
     pymavlink
     pyserial
     setuptools
-    wxPython_4_0
+    wxPython_4_2
   ] ++ lib.optionals stdenv.isDarwin [ billiard gnureadline ];
 
   # No tests
diff --git a/nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix b/nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix
index 3f0a6a6cde50..856fdfec8235 100644
--- a/nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix
+++ b/nixpkgs/pkgs/applications/science/robotics/mission-planner/default.nix
@@ -12,11 +12,11 @@ let
   };
 in stdenv.mkDerivation rec {
   inherit pname;
-  version = "1.3.76";
+  version = "1.3.80";
 
   src = fetchurl {
     url = "https://firmware.ardupilot.org/Tools/MissionPlanner/MissionPlanner-${version}.zip";
-    sha256 = "sha256-vdunUGwLjDKf1LDhtyTQAExddecyWc1TdZOyuu0qMlk=";
+    sha256 = "sha256-iivlaQWtOMJHchmR92FoqTaosGJ9F1AgFtuFgDE/9qQ=";
   };
 
   nativeBuildInputs = [ makeWrapper mono unzip ];
diff --git a/nixpkgs/pkgs/applications/science/robotics/mujoco/default.nix b/nixpkgs/pkgs/applications/science/robotics/mujoco/default.nix
new file mode 100644
index 000000000000..4af3d6899fa9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/mujoco/default.nix
@@ -0,0 +1,122 @@
+{ cmake
+, fetchFromGitHub
+, fetchFromGitLab
+, git
+, lib
+, libGL
+, stdenv
+, xorg
+}:
+
+let
+  # See https://github.com/deepmind/mujoco/blob/573d331b69845c5d651b70f5d1b0f3a0d2a3a233/cmake/MujocoDependencies.cmake#L21-L59
+  abseil-cpp = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "8c0b94e793a66495e0b1f34a5eb26bd7dc672db0";
+    hash = "sha256-Od1FZOOWEXVQsnZBwGjDIExi6LdYtomyL0STR44SsG8=";
+  };
+  benchmark = fetchFromGitHub {
+    owner = "google";
+    repo = "benchmark";
+    rev = "d845b7b3a27d54ad96280a29d61fa8988d4fddcf";
+    hash = "sha256-XTnTM1k6xMGXUws/fKdJUbpCPcc4U0IelL6BPEEnpEQ=";
+  };
+  ccd = fetchFromGitHub {
+    owner = "danfis";
+    repo = "libccd";
+    rev = "7931e764a19ef6b21b443376c699bbc9c6d4fba8";
+    hash = "sha256-TIZkmqQXa0+bSWpqffIgaBela0/INNsX9LPM026x1Wk=";
+  };
+  eigen3 = fetchFromGitLab {
+    owner = "libeigen";
+    repo = "eigen";
+    rev = "3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e";
+    hash = "sha256-k71DoEsx8JpC9AlQ0cCRI0fWMIWFBFL/Yscx+2iBtNM=";
+  };
+  googletest = fetchFromGitHub {
+    owner = "google";
+    repo = "googletest";
+    rev = "58d77fa8070e8cec2dc1ed015d66b454c8d78850";
+    hash = "sha256-W+OxRTVtemt2esw4P7IyGWXOonUN5ZuscjvzqkYvZbM=";
+  };
+  lodepng = fetchFromGitHub {
+    owner = "lvandeve";
+    repo = "lodepng";
+    rev = "b4ed2cd7ecf61d29076169b49199371456d4f90b";
+    hash = "sha256-5cCkdj/izP4e99BKfs/Mnwu9aatYXjlyxzzYiMD/y1M=";
+  };
+  qhull = fetchFromGitHub {
+    owner = "qhull";
+    repo = "qhull";
+    rev = "3df027b91202cf179f3fba3c46eebe65bbac3790";
+    hash = "sha256-aHO5n9Y35C7/zb3surfMyjyMjo109DoZnkozhiAKpYQ=";
+  };
+  tinyobjloader = fetchFromGitHub {
+    owner = "tinyobjloader";
+    repo = "tinyobjloader";
+    rev = "1421a10d6ed9742f5b2c1766d22faa6cfbc56248";
+    hash = "sha256-9z2Ne/WPCiXkQpT8Cun/pSGUwgClYH+kQ6Dx1JvW6w0=";
+  };
+  tinyxml2 = fetchFromGitHub {
+    owner = "leethomason";
+    repo = "tinyxml2";
+    rev = "1dee28e51f9175a31955b9791c74c430fe13dc82";
+    hash = "sha256-AQQOctXi7sWIH/VOeSUClX6hlm1raEQUOp+VoPjLM14=";
+  };
+
+  # See https://github.com/deepmind/mujoco/blob/573d331b69845c5d651b70f5d1b0f3a0d2a3a233/simulate/cmake/SimulateDependencies.cmake#L32-L35
+  glfw = fetchFromGitHub {
+    owner = "glfw";
+    repo = "glfw";
+    rev = "7482de6071d21db77a7236155da44c172a7f6c9e";
+    hash = "sha256-4+H0IXjAwbL5mAWfsIVhW0BSJhcWjkQx4j2TrzZ3aIo=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "mujoco";
+  version = "2.3.0";
+
+  src = fetchFromGitHub {
+    owner = "deepmind";
+    repo = pname;
+    rev = version;
+    hash = "sha256-FxMaXl7yfUAyY6LE1sxaw226dBtp1DOCWNnROp0WX2I=";
+  };
+
+  patches = [ ./dependencies.patch ];
+
+  nativeBuildInputs = [ cmake git ];
+
+  buildInputs = [
+    libGL
+    xorg.libX11
+    xorg.libXcursor
+    xorg.libXext
+    xorg.libXi
+    xorg.libXinerama
+    xorg.libXrandr
+  ];
+
+  # Move things into place so that cmake doesn't try downloading dependencies.
+  preConfigure = ''
+    mkdir -p build/_deps
+    ln -s ${abseil-cpp} build/_deps/abseil-cpp-src
+    ln -s ${benchmark} build/_deps/benchmark-src
+    ln -s ${ccd} build/_deps/ccd-src
+    ln -s ${eigen3} build/_deps/eigen3-src
+    ln -s ${glfw} build/_deps/glfw-src
+    ln -s ${googletest} build/_deps/googletest-src
+    ln -s ${lodepng} build/_deps/lodepng-src
+    ln -s ${qhull} build/_deps/qhull-src
+    ln -s ${tinyobjloader} build/_deps/tinyobjloader-src
+    ln -s ${tinyxml2} build/_deps/tinyxml2-src
+  '';
+
+  meta = with lib; {
+    description = "Multi-Joint dynamics with Contact. A general purpose physics simulator.";
+    homepage = "https://mujoco.org/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ samuela ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/robotics/mujoco/dependencies.patch b/nixpkgs/pkgs/applications/science/robotics/mujoco/dependencies.patch
new file mode 100644
index 000000000000..5ddbaaab5329
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/mujoco/dependencies.patch
@@ -0,0 +1,114 @@
+diff --git a/cmake/MujocoDependencies.cmake b/cmake/MujocoDependencies.cmake
+index 99e4a7a..cf9a901 100644
+--- a/cmake/MujocoDependencies.cmake
++++ b/cmake/MujocoDependencies.cmake
+@@ -82,8 +82,6 @@ set(BUILD_SHARED_LIBS
+ if(NOT TARGET lodepng)
+   FetchContent_Declare(
+     lodepng
+-    GIT_REPOSITORY https://github.com/lvandeve/lodepng.git
+-    GIT_TAG ${MUJOCO_DEP_VERSION_lodepng}
+   )
+ 
+   FetchContent_GetProperties(lodepng)
+@@ -111,10 +109,6 @@ findorfetch(
+   qhull
+   LIBRARY_NAME
+   qhull
+-  GIT_REPO
+-  https://github.com/qhull/qhull.git
+-  GIT_TAG
+-  ${MUJOCO_DEP_VERSION_qhull}
+   TARGETS
+   qhull
+   # TODO(fraromano) Remove when https://github.com/qhull/qhull/pull/112 is merged.
+@@ -146,10 +140,6 @@ findorfetch(
+   tinyxml2
+   LIBRARY_NAME
+   tinyxml2
+-  GIT_REPO
+-  https://github.com/leethomason/tinyxml2.git
+-  GIT_TAG
+-  ${MUJOCO_DEP_VERSION_tinyxml2}
+   TARGETS
+   tinyxml2
+   EXCLUDE_FROM_ALL
+@@ -164,10 +154,6 @@ findorfetch(
+   tinyobjloader
+   LIBRARY_NAME
+   tinyobjloader
+-  GIT_REPO
+-  https://github.com/tinyobjloader/tinyobjloader.git
+-  GIT_TAG
+-  ${MUJOCO_DEP_VERSION_tinyobjloader}
+   TARGETS
+   tinyobjloader
+   EXCLUDE_FROM_ALL
+@@ -182,10 +168,6 @@ findorfetch(
+   ccd
+   LIBRARY_NAME
+   ccd
+-  GIT_REPO
+-  https://github.com/danfis/libccd.git
+-  GIT_TAG
+-  ${MUJOCO_DEP_VERSION_ccd}
+   TARGETS
+   ccd
+   EXCLUDE_FROM_ALL
+@@ -222,10 +204,6 @@ if(MUJOCO_BUILD_TESTS)
+     absl
+     LIBRARY_NAME
+     abseil-cpp
+-    GIT_REPO
+-    https://github.com/abseil/abseil-cpp.git
+-    GIT_TAG
+-    ${MUJOCO_DEP_VERSION_abseil}
+     TARGETS
+     absl::core_headers
+     EXCLUDE_FROM_ALL
+@@ -249,10 +227,6 @@ if(MUJOCO_BUILD_TESTS)
+     GTest
+     LIBRARY_NAME
+     googletest
+-    GIT_REPO
+-    https://github.com/google/googletest.git
+-    GIT_TAG
+-    ${MUJOCO_DEP_VERSION_gtest}
+     TARGETS
+     gtest
+     gmock
+@@ -283,10 +257,6 @@ if(MUJOCO_BUILD_TESTS)
+     benchmark
+     LIBRARY_NAME
+     benchmark
+-    GIT_REPO
+-    https://github.com/google/benchmark.git
+-    GIT_TAG
+-    ${MUJOCO_DEP_VERSION_benchmark}
+     TARGETS
+     benchmark::benchmark
+     benchmark::benchmark_main
+@@ -303,8 +273,6 @@ if(MUJOCO_TEST_PYTHON_UTIL)
+ 
+     FetchContent_Declare(
+       Eigen3
+-      GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
+-      GIT_TAG ${MUJOCO_DEP_VERSION_Eigen3}
+     )
+ 
+     FetchContent_GetProperties(Eigen3)
+diff --git a/simulate/cmake/SimulateDependencies.cmake b/simulate/cmake/SimulateDependencies.cmake
+index 6616d6f..5d5a889 100644
+--- a/simulate/cmake/SimulateDependencies.cmake
++++ b/simulate/cmake/SimulateDependencies.cmake
+@@ -81,10 +81,6 @@ findorfetch(
+   glfw
+   LIBRARY_NAME
+   glfw
+-  GIT_REPO
+-  https://github.com/glfw/glfw.git
+-  GIT_TAG
+-  ${MUJOCO_DEP_VERSION_glfw}
+   TARGETS
+   glfw
+   EXCLUDE_FROM_ALL
diff --git a/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix
index 8ed3cd8749fa..385944bc5be9 100644
--- a/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix
+++ b/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix
@@ -1,12 +1,10 @@
-{ lib, mkDerivation, fetchFromGitHub, SDL2
-, qtbase, qtcharts, qtlocation, qtserialport, qtsvg, qtquickcontrols2
-, qtgraphicaleffects, qtspeech, qtx11extras, qmake, qttools
-, gst_all_1, wayland, pkg-config
-}:
+{ lib, stdenv, fetchFromGitHub, SDL2, qtbase, qtcharts, qtlocation, qtserialport
+, qtsvg, qtquickcontrols2, qtgraphicaleffects, qtspeech, qtx11extras, qmake
+, qttools, gst_all_1, wayland, pkg-config, wrapQtAppsHook }:
 
-mkDerivation rec {
+stdenv.mkDerivation rec {
   pname = "qgroundcontrol";
-  version = "4.2.3";
+  version = "4.2.6";
 
   qtInputs = [
     qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2
@@ -23,7 +21,7 @@ mkDerivation rec {
   ];
 
   buildInputs = [ SDL2 ] ++ gstInputs ++ qtInputs;
-  nativeBuildInputs = [ pkg-config qmake qttools ];
+  nativeBuildInputs = [ pkg-config qmake qttools wrapQtAppsHook ];
 
   preConfigure = ''
     mkdir build
@@ -69,21 +67,16 @@ mkDerivation rec {
     owner = "mavlink";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-xa4c0ggQKqt4OfwVehjkhXYXY1TYVEoubuRH3Zsv0Ac=";
+    sha256 = "sha256-mMeKDfylVEqLo1i2ucUBu287Og4472Ecp7Cge9Cw3kE=";
     fetchSubmodules = true;
   };
 
-  patches = [
-    # fix build problems caused by https://github.com/mavlink/qgroundcontrol/pull/10132
-    # remove once updated past 4.2.0
-    ./fix-10132.patch
-  ];
-
   meta = with lib; {
     description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
     homepage = "http://qgroundcontrol.com/";
     license = licenses.gpl3Plus;
     platforms = platforms.linux;
     maintainers = with maintainers; [ lopsided98 ];
+    mainProgram = "QGroundControl";
   };
 }
diff --git a/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/fix-10132.patch b/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/fix-10132.patch
deleted file mode 100644
index 0a666132f931..000000000000
--- a/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/fix-10132.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/libs/qmlglsink/gst-plugins-good/ext/qt/gstqsgtexture.cc b/libs/qmlglsink/gst-plugins-good/ext/qt/gstqsgtexture.cc
-index 2b314e0..ad1425e 100644
---- a/libs/qmlglsink/gst-plugins-good/ext/qt/gstqsgtexture.cc
-+++ b/libs/qmlglsink/gst-plugins-good/ext/qt/gstqsgtexture.cc
-@@ -35,7 +35,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
- 
- GstQSGTexture::GstQSGTexture ()
- {
--  static volatile gsize _debug;
-+  static gsize _debug;
- 
-   initializeOpenGLFunctions();
- 
-diff --git a/libs/qmlglsink/gst-plugins-good/ext/qt/gstqtglutility.cc b/libs/qmlglsink/gst-plugins-good/ext/qt/gstqtglutility.cc
-index 3a68576..5203d13 100644
---- a/libs/qmlglsink/gst-plugins-good/ext/qt/gstqtglutility.cc
-+++ b/libs/qmlglsink/gst-plugins-good/ext/qt/gstqtglutility.cc
-@@ -58,7 +58,7 @@ gst_qt_get_gl_display ()
- {
-   GstGLDisplay *display = NULL;
-   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
--  static volatile gsize _debug;
-+  static gsize _debug;
- 
-   g_assert (app != NULL);
- 
-diff --git a/libs/qmlglsink/gst-plugins-good/ext/qt/qtitem.cc b/libs/qmlglsink/gst-plugins-good/ext/qt/qtitem.cc
-index f031b36..3c6722a 100644
---- a/libs/qmlglsink/gst-plugins-good/ext/qt/qtitem.cc
-+++ b/libs/qmlglsink/gst-plugins-good/ext/qt/qtitem.cc
-@@ -106,7 +106,7 @@ void InitializeSceneGraph::run()
- 
- QtGLVideoItem::QtGLVideoItem()
- {
--  static volatile gsize _debug;
-+  static gsize _debug;
- 
-   if (g_once_init_enter (&_debug)) {
-     GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwidget", 0, "Qt GL Widget");
-diff --git a/libs/qmlglsink/gst-plugins-good/ext/qt/qtwindow.cc b/libs/qmlglsink/gst-plugins-good/ext/qt/qtwindow.cc
-index 8bf14ae..2f88aa9 100644
---- a/libs/qmlglsink/gst-plugins-good/ext/qt/qtwindow.cc
-+++ b/libs/qmlglsink/gst-plugins-good/ext/qt/qtwindow.cc
-@@ -107,7 +107,7 @@ QtGLWindow::QtGLWindow ( QWindow * parent, QQuickWindow *src ) :
-   QQuickWindow( parent ), source (src)
- {
-   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
--  static volatile gsize _debug;
-+  static gsize _debug;
- 
-   g_assert (app != NULL);
- 
-@@ -156,7 +156,7 @@ QtGLWindow::beforeRendering()
- 
-   g_mutex_lock (&this->priv->lock);
- 
--  static volatile gsize once = 0;
-+  static gsize once = 0;
-   if (g_once_init_enter(&once)) {
-     this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
-     g_once_init_leave(&once,1);
-