···1+{ lib, stdenv, fetchFromGitHub, buildPythonPackage, python, packaging, numpy
2+, cython, scipy, matplotlib, pytestCheckHook, pytest-rerunfailures }:
3+4+buildPythonPackage rec {
5+ pname = "qutip";
6+ version = "4.6.2";
7+8+ src = fetchFromGitHub {
9+ owner = pname;
10+ repo = pname;
11+ rev = "v${version}";
12+ sha256 = "04g7ixq1yrrid4lliqbcamnzyw5r0fjbl8ipklps234hvsjfwmxb";
13+ };
14+15+ # QuTiP says it needs specific (old) Numpy versions. We overwrite them here
16+ # as the tests work perfectly fine with up-to-date packages.
17+ postPatch = ''
18+ substituteInPlace setup.cfg --replace "numpy>=1.16.6,<1.20" "numpy>=1.16.6"
19+ '';
20+21+ # Disabling OpenMP support on Darwin.
22+ setupPyGlobalFlags = lib.optional (!stdenv.isDarwin) "--with-openmp";
23+24+ propagatedBuildInputs = [
25+ packaging
26+ numpy
27+ cython
28+ scipy
29+ matplotlib
30+ ];
31+32+ checkInputs = [
33+ pytestCheckHook
34+ pytest-rerunfailures
35+ ];
36+37+ # - QuTiP tries to access the home directory to create an rc file for us.
38+ # This of course fails and therefore, we provide a writable temp dir as HOME.
39+ # - We need to go to another directory to run the tests from there.
40+ # This is due to the Cython-compiled modules not being in the correct location
41+ # of the source tree.
42+ # - For running tests, see:
43+ # https://qutip.org/docs/latest/installation.html#verifying-the-installation
44+ checkPhase = ''
45+ export OMP_NUM_THREADS=$NIX_BUILD_CORES
46+ export HOME=$(mktemp -d)
47+ mkdir -p test && cd test
48+ ${python.interpreter} -c "import qutip.testing; qutip.testing.run()"
49+ '';
50+51+ meta = with lib; {
52+ description = "Open-source software for simulating the dynamics of closed and open quantum systems";
53+ homepage = "https://qutip.org/";
54+ license = licenses.bsd3;
55+ maintainers = [ maintainers.fabiangd ];
56+ };
57+}
···3let
4 pname = "anki-bin";
5 # Update hashes for both Linux and Darwin!
6- version = "2.1.48";
78 sources = {
9 linux = fetchurl {
10 url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-linux.tar.bz2";
11- sha256 = "sha256-1ZvC8CPnYMzCxxrko1FfmTvKiJT+7BhOdk52zLTnLGE=";
12 };
13 darwin = fetchurl {
14 url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac.dmg";
15- sha256 = "sha256-HXYTpOxFxjQoqjs+04diy5d+GmS69dFNEfLI/E4NCXw=";
16 };
17 };
18
···3let
4 pname = "anki-bin";
5 # Update hashes for both Linux and Darwin!
6+ version = "2.1.49";
78 sources = {
9 linux = fetchurl {
10 url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-linux.tar.bz2";
11+ sha256 = "sha256-uG39g9CXnquArFsxtFHWWoDaNwu8y2KKh+SqGt8aqi0=";
12 };
13 darwin = fetchurl {
14 url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac.dmg";
15+ sha256 = "sha256-sEVWZQpICL7RYrOuPm1Y5XhzPxCwNk1WGP1rctTtE4Y=";
16 };
17 };
18
+3-3
pkgs/misc/emulators/ryujinx/default.nix
···67buildDotnetModule rec {
8 pname = "ryujinx";
9- version = "1.0.7086"; # Versioning is based off of the official appveyor builds: https://ci.appveyor.com/project/gdkchan/ryujinx
1011 src = fetchFromGitHub {
12 owner = "Ryujinx";
13 repo = "Ryujinx";
14- rev = "85d8d1d7cab5615e6911b7b570c8dd0b94a521ab";
15- sha256 = "11j54c7qrb7vcay8bjpv2jykdnwsjhf5cmqds43wvbicigbbds54";
16 };
1718 projectFile = "Ryujinx.sln";
···67buildDotnetModule rec {
8 pname = "ryujinx";
9+ version = "1.0.7094"; # Versioning is based off of the official appveyor builds: https://ci.appveyor.com/project/gdkchan/ryujinx
1011 src = fetchFromGitHub {
12 owner = "Ryujinx";
13 repo = "Ryujinx";
14+ rev = "c6015daf8ddbd8a08e0adff8d39ffc38c7b339a2";
15+ sha256 = "088il16rxkk74fdpqrbw1fq5f2c23921zi7v544iw8c62hqxxzv1";
16 };
1718 projectFile = "Ryujinx.sln";
+1-1
pkgs/misc/vim-plugins/overrides.nix
···535 postPatch = ''
536 # check that version is up to date
537 grep 'pname = "statix-vim"' -A 1 flake.nix \
538- | grep -F 'version = "${version}"' flake.nix
539540 cd vim-plugin
541 substituteInPlace ftplugin/nix.vim --replace statix ${statix}/bin/statix
···535 postPatch = ''
536 # check that version is up to date
537 grep 'pname = "statix-vim"' -A 1 flake.nix \
538+ | grep -F 'version = "${version}"'
539540 cd vim-plugin
541 substituteInPlace ftplugin/nix.vim --replace statix ${statix}/bin/statix
+18-5
pkgs/os-specific/linux/kernel/generic.nix
···60, kernelTests ? []
61, nixosTests
62, ...
63-}:
6465# Note: this package is used for bootstrapping fetchurl, and thus
66# cannot use fetchpatch! All mutable patches (generated by GitHub or
···70assert stdenv.isLinux;
7172let
00000000000073 # Combine the `features' attribute sets of all the kernel patches.
74 kernelFeatures = lib.foldr (x: y: (x.features or {}) // y) ({
75 iwlwifi = true;
···180 };
181 }; # end of configfile derivation
182183- kernel = (callPackage ./manual-config.nix { inherit buildPackages; }) {
184- inherit version modDirVersion src kernelPatches randstructSeed lib stdenv extraMakeFlags extraMeta configfile;
0185186 config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
187- };
188189- passthru = {
190 features = kernelFeatures;
191 inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre modDirVersion;
192 isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
···60, kernelTests ? []
61, nixosTests
62, ...
63+}@args:
6465# Note: this package is used for bootstrapping fetchurl, and thus
66# cannot use fetchpatch! All mutable patches (generated by GitHub or
···70assert stdenv.isLinux;
7172let
73+ # Dirty hack to make sure that `version` & `src` have
74+ # `<nixpkgs/pkgs/os-specific/linux/kernel/linux-x.y.nix>` as position
75+ # when using `builtins.unsafeGetAttrPos`.
76+ #
77+ # This is to make sure that ofborg actually detects changes in the kernel derivation
78+ # and pings all maintainers.
79+ #
80+ # For further context, see https://github.com/NixOS/nixpkgs/pull/143113#issuecomment-953319957
81+ basicArgs = builtins.removeAttrs
82+ args
83+ (lib.filter (x: ! (builtins.elem x [ "version" "src" ])) (lib.attrNames args));
84+85 # Combine the `features' attribute sets of all the kernel patches.
86 kernelFeatures = lib.foldr (x: y: (x.features or {}) // y) ({
87 iwlwifi = true;
···192 };
193 }; # end of configfile derivation
194195+ kernel = (callPackage ./manual-config.nix { inherit buildPackages; }) (basicArgs // {
196+ inherit modDirVersion kernelPatches randstructSeed lib stdenv extraMakeFlags extraMeta configfile;
197+ pos = builtins.unsafeGetAttrPos "version" args;
198199 config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
200+ });
201202+ passthru = basicArgs // {
203 features = kernelFeatures;
204 inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre modDirVersion;
205 isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
+3-1
pkgs/os-specific/linux/kernel/manual-config.nix
···19 stdenv,
20 # The kernel version
21 version,
0022 # Additional kernel make flags
23 extraMakeFlags ? [],
24 # The version of the kernel module directory
···339 ] ++ extraMakeFlags;
340341 karch = stdenv.hostPlatform.linuxArch;
342-})
···19 stdenv,
20 # The kernel version
21 version,
22+ # Position of the Linux build expression
23+ pos ? null,
24 # Additional kernel make flags
25 extraMakeFlags ? [],
26 # The version of the kernel module directory
···341 ] ++ extraMakeFlags;
342343 karch = stdenv.hostPlatform.linuxArch;
344+} // (optionalAttrs (pos != null) { inherit pos; }))
+26
pkgs/servers/home-assistant/default.nix
···2122let
23 defaultOverrides = [
000000000000024 # Override the version of some packages pinned in Home Assistant's setup.py and requirements_all.txt
25 (mkOverride "python-slugify" "4.0.1" "69a517766e00c1268e5bbfc0d010a0a8508de0b18d30ad5a1ff357f8ae724270")
26···49 sha256 = "0c8ckbbr1n8gx5k63ymgyfkbz3d0rbdvghg8fqdvbg4nrigrs5v0";
50 };
51 checkInputs = oldAttrs.checkInputs ++ [ python3.pkgs.asynctest ];
000000000000052 });
53 })
54
···4 pname = "statix";
5 # also update version of the vim plugin in pkgs/misc/vim-plugins/overrides.nix
6 # the version can be found in flake.nix of the source code
7- version = "0.3.4";
89 src = fetchFromGitHub {
10 owner = "nerdypepper";
11 repo = pname;
12 rev = "v${version}";
13- sha256 = "sha256-8xWtwa9ZtkcpWvLG2QS3jPlz2c+E5MjYWhZ/g5bjhkc=";
14 };
1516- cargoSha256 = "sha256-f8f5wJyK+q6zTfNiCRN89ptlSWfSnrzLyefTIpw5mts=";
1718 cargoBuildFlags = lib.optionals withJson [ "--features" "json" ];
19
···4 pname = "statix";
5 # also update version of the vim plugin in pkgs/misc/vim-plugins/overrides.nix
6 # the version can be found in flake.nix of the source code
7+ version = "0.3.5";
89 src = fetchFromGitHub {
10 owner = "nerdypepper";
11 repo = pname;
12 rev = "v${version}";
13+ sha256 = "sha256-vJvHmg6X/B6wQYjeX1FZC4MDGo0HkKbTmQH+l4tZAwg=";
14 };
1516+ cargoSha256 = "sha256-OfLpnVe1QIjpjpD4ticG/7AxPGFMMjBWN3DdLZq6pA8=";
1718 cargoBuildFlags = lib.optionals withJson [ "--features" "json" ];
19