diff options
23 files changed, 318 insertions, 87 deletions
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 810b8e12ac660..15c512bd74ec6 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -16,15 +16,8 @@ </para> <itemizedlist> <listitem> - <para> - Nix has been updated from 2.3 to 2.8. This mainly brings - experimental support for Flakes, but also marks the - <literal>nix</literal> command as experimental which now has - to be enabled via the configuration explicitly. For more - information and instructions for upgrades, see the - <link xlink:href="https://nixos.org/manual/nix/stable/release-notes/release-notes.html">Release - Notes</link>. - </para> +<literallayout>Nix has been updated from 2.3 to 2.8. This mainly brings experimental support for Flakes, but also marks the <literal>nix</literal> command as experimental which now has to be enabled via the configuration explicitly. For more information and instructions for upgrades, see the relase notes for <link xlink:href="https://nixos.org/manual/nix/stable/release-notes/rl-2.4.html">nix-2.4</link>, +<link xlink:href="https://nixos.org/manual/nix/stable/release-notes/rl-2.5.html">nix-2.5</link>, <link xlink:href="https://nixos.org/manual/nix/stable/release-notes/rl-2.6.html">nix-2.6</link>, <link xlink:href="https://nixos.org/manual/nix/stable/release-notes/rl-2.7.html">nix-2.7</link> and <link xlink:href="https://nixos.org/manual/nix/stable/release-notes/rl-2.8.html">nix-2.8</link></literallayout> </listitem> <listitem> <para> @@ -801,6 +794,13 @@ <literal>services.openldap.settings</literal>, which represents your <literal>cn=config</literal>. </para> + <para> + Additionally with 2.5 the argon2 module was included in the + standard distrubtion and renamed from + <literal>pw-argon2</literal> to <literal>argon2</literal>. + Remember to update your <literal>olcModuleLoad</literal> entry + in <literal>cn=config</literal>. + </para> </listitem> <listitem> <para> diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 2ae454fe0133a..152b62cddbf65 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -7,8 +7,14 @@ In addition to numerous new and upgraded packages, this release has the following highlights: - Nix has been updated from 2.3 to 2.8. This mainly brings experimental support - for Flakes, but also marks the `nix` command as experimental which now has to be enabled via the configuration explicitly. For more - information and instructions for upgrades, see the [Release Notes](https://nixos.org/manual/nix/stable/release-notes/release-notes.html). + for Flakes, but also marks the `nix` command as experimental which now has to + be enabled via the configuration explicitly. For more information and + instructions for upgrades, see the + relase notes for [nix-2.4](https://nixos.org/manual/nix/stable/release-notes/rl-2.4.html), + [nix-2.5](https://nixos.org/manual/nix/stable/release-notes/rl-2.5.html), + [nix-2.6](https://nixos.org/manual/nix/stable/release-notes/rl-2.6.html), + [nix-2.7](https://nixos.org/manual/nix/stable/release-notes/rl-2.7.html) and + [nix-2.8](https://nixos.org/manual/nix/stable/release-notes/rl-2.8.html) - The `firefox` browser on `x86_64-linux` now makes use of profile-guided optimisation, resulting in a much more responsive browsing experience. @@ -270,6 +276,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `openldap` (and therefore the slapd LDAP server) were updated to version 2.6.2. The project introduced backwards-incompatible changes, namely the removal of the bdb, hdb, ndb, and shell backends in slapd. Therefore before updating, dump your database `slapcat -n 1` in LDIF format, and reimport it after updating your `services.openldap.settings`, which represents your `cn=config`. + Additionally with 2.5 the argon2 module was included in the standard distrubtion and renamed from `pw-argon2` to `argon2`. Remember to update your `olcModuleLoad` entry in `cn=config`. + - `openssh` has been update to 8.9p1, changing the FIDO security key middleware interface. - `git` no longer hardcodes the path to openssh' ssh binary to reduce the amount of rebuilds. If you are using git with ssh remotes and do not have a ssh binary in your enviroment consider adding `openssh` to it or switching to `gitFull`. diff --git a/nixos/modules/services/misc/dendrite.nix b/nixos/modules/services/misc/dendrite.nix index ac5df9951b3f0..54052084b3378 100644 --- a/nixos/modules/services/misc/dendrite.nix +++ b/nixos/modules/services/misc/dendrite.nix @@ -74,6 +74,18 @@ in <literal>dendrite</literal> is running. ''; }; + loadCredential = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + example = [ "private_key:/path/to/my_private_key" ]; + description = '' + This can be used to pass secrets to the systemd service without adding them to + the nix store. + To use the example setting, see the example of + <option>services.dendrite.settings.global.private_key</option>. + See the LoadCredential section of systemd.exec manual for more information. + ''; + }; settings = lib.mkOption { type = lib.types.submodule { freeformType = settingsFormat.type; @@ -88,8 +100,10 @@ in ''; }; private_key = lib.mkOption { - type = lib.types.path; - example = "${workingDir}/matrix_key.pem"; + type = lib.types.either + lib.types.path + (lib.types.strMatching "^\\$CREDENTIALS_DIRECTORY/.+"); + example = "$CREDENTIALS_DIRECTORY/private_key"; description = '' The path to the signing private key file, used to sign requests and events. @@ -256,6 +270,7 @@ in RuntimeDirectoryMode = "0700"; LimitNOFILE = 65535; EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile; + LoadCredential = cfg.loadCredential; ExecStartPre = '' ${pkgs.envsubst}/bin/envsubst \ -i ${configurationYaml} \ diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index e0bccb83a97ff..31d18ae734495 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -11,10 +11,9 @@ let auth_unix_rw = "polkit" ${cfg.extraConfig} ''; - ovmfFilePrefix = if pkgs.stdenv.isAarch64 then "AAVMF" else "OVMF"; qemuConfigFile = pkgs.writeText "qemu.conf" '' ${optionalString cfg.qemu.ovmf.enable '' - nvram = [ "/run/libvirt/nix-ovmf/${ovmfFilePrefix}_CODE.fd:/run/libvirt/nix-ovmf/${ovmfFilePrefix}_VARS.fd" ] + nvram = [ "/run/libvirt/nix-ovmf/AAVMF_CODE.fd:/run/libvirt/nix-ovmf/AAVMF_VARS.fd", "/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd" ] ''} ${optionalString (!cfg.qemu.runAsRoot) '' user = "qemu-libvirtd" @@ -36,13 +35,20 @@ let ''; }; + # mkRemovedOptionModule does not work in submodules, do it manually package = mkOption { - type = types.package; - default = pkgs.OVMF; - defaultText = literalExpression "pkgs.OVMF"; - example = literalExpression "pkgs.OVMFFull"; + type = types.nullOr types.package; + default = null; + internal = true; + }; + + packages = mkOption { + type = types.listOf types.package; + default = [ pkgs.OVMF.fd ]; + defaultText = literalExpression "[ pkgs.OVMF.fd ]"; + example = literalExpression "[ pkgs.OVMFFull.fd pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd ]"; description = '' - OVMF package to use. + List of OVMF packages to use. Each listed package must contain files names FV/OVMF_CODE.fd and FV/OVMF_VARS.fd or FV/AAVMF_CODE.fd and FV/AAVMF_VARS.fd ''; }; }; @@ -141,9 +147,9 @@ in (mkRenamedOptionModule [ "virtualisation" "libvirtd" "qemuOvmf" ] [ "virtualisation" "libvirtd" "qemu" "ovmf" "enable" ]) - (mkRenamedOptionModule + (mkRemovedOptionModule [ "virtualisation" "libvirtd" "qemuOvmfPackage" ] - [ "virtualisation" "libvirtd" "qemu" "ovmf" "package" ]) + "If this option was set to `foo`, set the option `virtualisation.libvirtd.qemu.ovmf.packages' to `[foo.fd]` instead.") (mkRenamedOptionModule [ "virtualisation" "libvirtd" "qemuSwtpm" ] [ "virtualisation" "libvirtd" "qemu" "swtpm" "enable" ]) @@ -238,12 +244,15 @@ in assertions = [ { - assertion = config.security.polkit.enable; - message = "The libvirtd module currently requires Polkit to be enabled ('security.polkit.enable = true')."; + assertion = config.virtualisation.libvirtd.qemu.ovmf.package == null; + message = '' + The option virtualisation.libvirtd.qemu.ovmf.package is superseded by virtualisation.libvirtd.qemu.ovmf.packages. + If this option was set to `foo`, set the option `virtualisation.libvirtd.qemu.ovmf.packages' to `[foo.fd]` instead. + ''; } { - assertion = builtins.elem "fd" cfg.qemu.ovmf.package.outputs; - message = "The option 'virtualisation.libvirtd.qemuOvmfPackage' needs a package that has an 'fd' output."; + assertion = config.security.polkit.enable; + message = "The libvirtd module currently requires Polkit to be enabled ('security.polkit.enable = true')."; } ]; @@ -303,10 +312,18 @@ in ln -s --force ${cfg.qemu.package}/$helper /run/${dirName}/nix-helpers/ done - ${optionalString cfg.qemu.ovmf.enable '' - ln -s --force ${cfg.qemu.ovmf.package.fd}/FV/${ovmfFilePrefix}_CODE.fd /run/${dirName}/nix-ovmf/ - ln -s --force ${cfg.qemu.ovmf.package.fd}/FV/${ovmfFilePrefix}_VARS.fd /run/${dirName}/nix-ovmf/ - ''} + ${optionalString cfg.qemu.ovmf.enable (let + ovmfpackage = pkgs.buildEnv { + name = "qemu-ovmf"; + paths = cfg.qemu.ovmf.packages; + }; + in + '' + ln -s --force ${ovmfpackage}/FV/AAVMF_CODE.fd /run/${dirName}/nix-ovmf/ + ln -s --force ${ovmfpackage}/FV/OVMF_CODE.fd /run/${dirName}/nix-ovmf/ + ln -s --force ${ovmfpackage}/FV/AAVMF_VARS.fd /run/${dirName}/nix-ovmf/ + ln -s --force ${ovmfpackage}/FV/OVMF_VARS.fd /run/${dirName}/nix-ovmf/ + '')} ''; serviceConfig = { diff --git a/nixos/tests/dendrite.nix b/nixos/tests/dendrite.nix index d4a5bb1322638..1ff415433b47f 100644 --- a/nixos/tests/dendrite.nix +++ b/nixos/tests/dendrite.nix @@ -17,10 +17,11 @@ import ./make-test-python.nix ( homeserver = { pkgs, ... }: { services.dendrite = { enable = true; + loadCredential = [ "test_private_key:${private_key}" ]; openRegistration = true; settings = { global.server_name = "test-dendrite-server.com"; - global.private_key = private_key; + global.private_key = "$CREDENTIALS_DIRECTORY/test_private_key"; client_api.registration_disabled = false; }; }; diff --git a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix index 4773cfb9e43e4..6b4cf674ac5a5 100644 --- a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix +++ b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix @@ -27,8 +27,7 @@ rec { forceShare= [ "man" "info" ]; nativeBuildInputs = attrs.nativeBuildInputs or [] - ++ [ vimCommandCheckHook ] - ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) vimGenDocHook; + ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ vimCommandCheckHook vimGenDocHook ]; inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; installPhase = '' diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 0c74eb495d8cf..8546e80047c19 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -504,7 +504,7 @@ self: super: { }); null-ls-nvim = super.null-ls-nvim.overrideAttrs (old: { - dependencies = with self; [ plenary-nvim nvim-lspconfig ]; + dependencies = with self; [ plenary-nvim ]; }); nvim-lsputils = super.nvim-lsputils.overrideAttrs (old: { @@ -711,7 +711,7 @@ self: super: { }); telescope-nvim = super.telescope-nvim.overrideAttrs (old: { - dependencies = with self; [ plenary-nvim popup-nvim ]; + dependencies = with self; [ plenary-nvim ]; }); telescope-symbols-nvim = super.telescope-symbols-nvim.overrideAttrs (old: { diff --git a/pkgs/applications/editors/vim/plugins/vim-utils.nix b/pkgs/applications/editors/vim/plugins/vim-utils.nix index 9511e4da19520..14dbc43d3cd97 100644 --- a/pkgs/applications/editors/vim/plugins/vim-utils.nix +++ b/pkgs/applications/editors/vim/plugins/vim-utils.nix @@ -454,8 +454,8 @@ rec { mkdir -p "$out/bin" for exe in ${ - if standalone then "{,g,r,rg,e}vim {,g}vimdiff" - else "{,g,r,rg,e}{vim,view} {,g}vimdiff ex" + if standalone then "{,g,r,rg,e}vim {,g}vimdiff vi" + else "{,g,r,rg,e}{vim,view} {,g}vimdiff ex vi" }; do if [[ -e ${vim}/bin/$exe ]]; then dest="$out/bin/${executableName}" diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 21c1187c4ad46..80d336fb394f7 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -131,8 +131,8 @@ let mktplcRef = { name = "ng-template"; publisher = "Angular"; - version = "12.2.0"; - sha256 = "sha256-CChkWKiLi/OcOm268d45pNwiyrKhztqYsQvJV/9z+Ag="; + version = "13.3.4"; + sha256 = "sha256-odFh4Ms60tW+JOEbzzglgKe7BL1ccv3TKGir5NlvIrQ="; }; meta = with lib; { changelog = "https://marketplace.visualstudio.com/items/Angular.ng-template/changelog"; @@ -611,8 +611,8 @@ let mktplcRef = { name = "vscode-deno"; publisher = "denoland"; - version = "3.9.1"; - sha256 = "sha256-OuGTjmJQFAWrYp7YnFpyo0NnnCcXYF8itYjGKMa3FCs="; + version = "3.12.0"; + sha256 = "sha256-ZsHCWQtEQKkdZ3uk072ZBfHFRzk4Owf4h7+szHLgIeo="; }; meta = with lib; { changelog = "https://marketplace.visualstudio.com/items/denoland.vscode-deno/changelog"; @@ -722,8 +722,8 @@ let mktplcRef = { name = "gitlens"; publisher = "eamodio"; - version = "12.0.6"; - sha256 = "sha256-Q8l/GryB9iMhFnu5npUcDjWuImfrmVZF3xvm7nX/77Q="; + version = "12.0.7"; + sha256 = "sha256-gPhiytthf35eDhtzkSK2JZjtj4877la3hB1Cswbrszw="; }; meta = with lib; { changelog = "https://marketplace.visualstudio.com/items/eamodio.gitlens/changelog"; @@ -895,8 +895,8 @@ let mktplcRef = { name = "foam-vscode"; publisher = "foam"; - version = "0.14.1"; - sha256 = "sha256-w9xGkezS3A9z6sTk8WWgW7g8qYX6mJFfRV0lv5cu160="; + version = "0.18.3"; + sha256 = "sha256-qbF4k3GP7UdQrw0x/egVRkv5TYDwYWoycxY/HJSFTkI="; }; meta = with lib; { changelog = "https://marketplace.visualstudio.com/items/foam.foam-vscode/changelog"; @@ -1147,8 +1147,8 @@ let mktplcRef = { name = "Ionide-fsharp"; publisher = "Ionide"; - version = "6.0.4"; - sha256 = "sha256-gdM7mG5ykBiwLHodZ2VyF4uYYuAPhXP2MturNvfQ5iM="; + version = "6.0.5"; + sha256 = "sha256-vlmLr/1rBreqZifzEwAlhyGzHG28oZa+kmMzRl53tOI="; }; meta = with lib; { changelog = "https://marketplace.visualstudio.com/items/Ionide.Ionide-fsharp/changelog"; @@ -1538,8 +1538,8 @@ let mktplcRef = { name = "pyright"; publisher = "ms-pyright"; - version = "1.1.222"; - sha256 = "sha256-QMX/SawDEnG1xVrug8mvN7EvRrRDkJffcXBUFpQi1XE="; + version = "1.1.250"; + sha256 = "sha256-UHSY32F5wzqAHmmBWyCUkLL0z+LMWDwn/YvUOF3q87I="; }; meta = with lib; { description = "VS Code static type checking for Python"; @@ -1715,8 +1715,8 @@ let mktplcRef = { name = "ocaml-platform"; publisher = "ocamllabs"; - version = "1.8.4"; - sha256 = "sha256-T1eYAuYMv4B7rdECxYzNfIpydjzCDjeo7gmb1uhr6VM="; + version = "1.10.4"; + sha256 = "sha256-Qk4wD6gh/xvH6nFBonje4Stz6Y6yaIyxx1TdAXQEycM="; }; }; diff --git a/pkgs/applications/misc/bottles/default.nix b/pkgs/applications/misc/bottles/default.nix index e85af7806506b..a5514d431de15 100644 --- a/pkgs/applications/misc/bottles/default.nix +++ b/pkgs/applications/misc/bottles/default.nix @@ -20,13 +20,13 @@ let in python3Packages.buildPythonApplication rec { pname = "bottles"; - version = "2022.5.28-trento-2"; + version = "2022.5.28-trento-3"; src = fetchFromGitHub { owner = "bottlesdevs"; repo = pname; rev = version; - sha256 = "sha256-q4arUiHcAvkytcxnbLbMRzFVOgWqEXNIZt9Y8l3dAig="; + sha256 = "sha256-KIDLRqDLFTsVAczRpTchnUtKJfVHqbYzf8MhIR5UdYY="; }; postPatch = '' diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index 6cc8e60a39c1a..e2c89ed9057e4 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -19,28 +19,28 @@ } }, "beta": { - "version": "102.0.5005.61", - "sha256": "07vbi3gn9g4n04b2qi2hm34r122snrqaifa46yk3pyh1d79rfdqs", - "sha256bin64": "1cwfpjh060sm56bkgmpmmck0y3vrndrv6cbn8y3p26p3j06f2i3h", + "version": "103.0.5060.24", + "sha256": "1vdnq7vd0jdxkpc00xwvvk1mmyq2hcydms64l16nv3v8jgvizrha", + "sha256bin64": "1rnjgb9v8dr74x0lj00xdkpvp2yx8d79h1kdzp7m7nvh4q34s32w", "deps": { "gn": { - "version": "2022-04-14", + "version": "2022-05-11", "url": "https://gn.googlesource.com/gn", - "rev": "fd9f2036f26d83f9fcfe93042fb952e5a7fe2167", - "sha256": "0b5xs0chcv3hfhy71rycsmgxnqbm375a333hwav8929k9cbi5p9h" + "rev": "578a7fe4c3c6b0bc2ae1fd2e37f14857d09895bf", + "sha256": "03dqfrdpf5xxl64dby3qmbwpzdq2gsa8g7xl438py3a629rgxg63" } } }, "dev": { - "version": "103.0.5060.24", - "sha256": "1vdnq7vd0jdxkpc00xwvvk1mmyq2hcydms64l16nv3v8jgvizrha", - "sha256bin64": "0590ffrbpnd4v8z1wzn1baqvj59gx2yc3zp3qvhvmfrdmxz9i9b4", + "version": "104.0.5083.0", + "sha256": "02viibc6n77lrlr1vfdyjknzcknnpvp58s4y1g6cbwy4pvajisd9", + "sha256bin64": "0g2kzabbg5g3kb0a6scjxslywrkrgpynws7i4lbw0j2gay40zqar", "deps": { "gn": { - "version": "2022-05-11", + "version": "2022-05-17", "url": "https://gn.googlesource.com/gn", - "rev": "578a7fe4c3c6b0bc2ae1fd2e37f14857d09895bf", - "sha256": "03dqfrdpf5xxl64dby3qmbwpzdq2gsa8g7xl438py3a629rgxg63" + "rev": "c547ca1497e3ff0dcbc0b2cb036b3d40380cbeeb", + "sha256": "0wk721sqz5s7bnrk1ar7c07ykxpdvwq01qi4na84m4b76nyzakwy" } } }, diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 843cebe7d6ba6..82d98274f8ae5 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -27,7 +27,8 @@ edk2.mkDerivation projectDscPath { outputs = [ "out" "fd" ]; - buildInputs = [ util-linux nasm acpica-tools ]; + nativeBuildInputs = [ util-linux nasm acpica-tools ]; + strictDeps = true; hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ]; diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix index 47ea90482b6d2..e0bcc44768494 100644 --- a/pkgs/development/compilers/edk2/default.nix +++ b/pkgs/development/compilers/edk2/default.nix @@ -7,10 +7,11 @@ , bc , llvmPackages_9 , lib +, buildPackages }: let - pythonEnv = python3.withPackages (ps: [ps.tkinter]); + pythonEnv = buildPackages.python3.withPackages (ps: [ps.tkinter]); targetArch = if stdenv.isi686 then "IA32" @@ -35,6 +36,14 @@ edk2 = buildStdenv.mkDerivation { pname = "edk2"; version = "202202"; + patches = [ + # pass targetPrefix as an env var + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/edk2/raw/08f2354cd280b4ce5a7888aa85cf520e042955c3/f/0021-Tweak-the-tools_def-to-support-cross-compiling.patch"; + sha256 = "sha256-E1/fiFNVx0aB1kOej2DJ2DlBIs9tAAcxoedym2Zhjxw="; + }) + ]; + # submodules src = fetchFromGitHub { owner = "tianocore"; @@ -44,7 +53,12 @@ edk2 = buildStdenv.mkDerivation { sha256 = "0srmhi6c27n5vyl01nhh0fq8k4vngbwn79siyjvcacjbj2ivhh8d"; }; - buildInputs = [ libuuid pythonEnv ]; + nativeBuildInputs = [ pythonEnv ]; + depsBuildBuild = [ buildPackages.stdenv.cc buildPackages.util-linux buildPackages.bash ]; + strictDeps = true; + + # trick taken from https://src.fedoraproject.org/rpms/edk2/blob/08f2354cd280b4ce5a7888aa85cf520e042955c3/f/edk2.spec#_319 + ${"GCC5_${targetArch}_PREFIX"}=stdenv.cc.targetPrefix; makeFlags = [ "-C BaseTools" ] ++ lib.optional (stdenv.cc.isClang) [ "BUILD_CC=clang BUILD_CXX=clang++ BUILD_AS=clang" ]; @@ -57,6 +71,10 @@ edk2 = buildStdenv.mkDerivation { mkdir -vp $out mv -v BaseTools $out mv -v edksetup.sh $out + # patchShebangs fails to see these when cross compiling + for i in $out/BaseTools/BinWrappers/PosixLike/*; do + substituteInPlace $i --replace '/usr/bin/env bash' ${buildPackages.bash}/bin/bash + done ''; enableParallelBuilding = true; @@ -72,7 +90,11 @@ edk2 = buildStdenv.mkDerivation { mkDerivation = projectDscPath: attrs: buildStdenv.mkDerivation ({ inherit (edk2) src; - buildInputs = [ bc pythonEnv ] ++ attrs.buildInputs or []; + depsBuildBuild = [ buildPackages.stdenv.cc ] ++ attrs.depsBuildBuild or []; + nativeBuildInputs = [ bc pythonEnv ] ++ attrs.nativeBuildInputs or []; + strictDeps = true; + + ${"GCC5_${targetArch}_PREFIX"}=stdenv.cc.targetPrefix; prePatch = '' rm -rf BaseTools @@ -97,7 +119,7 @@ edk2 = buildStdenv.mkDerivation { mv -v Build/*/* $out runHook postInstall ''; - } // removeAttrs attrs [ "buildInputs" ]); + } // removeAttrs attrs [ "nativeBuildInputs" "depsBuildBuild" ]); }; }; diff --git a/pkgs/development/libraries/fcft/default.nix b/pkgs/development/libraries/fcft/default.nix index f03c24e28cbff..9ed4df601d352 100644 --- a/pkgs/development/libraries/fcft/default.nix +++ b/pkgs/development/libraries/fcft/default.nix @@ -20,14 +20,14 @@ in stdenv.mkDerivation rec { pname = "fcft"; - version = "3.1.1"; + version = "3.1.2"; src = fetchFromGitea { domain = "codeberg.org"; owner = "dnkl"; repo = "fcft"; rev = version; - sha256 = "1b43sqp5hah374ns62pcrmbiriqsdisb60hp1nwqz3ny3rfjvn15"; + sha256 = "1m7prc792dsd4mg6iqqwbfbmvs3a2yw2zmj0cd3qrf7h672b8snq"; }; depsBuildBuild = [ pkg-config ]; diff --git a/pkgs/development/python-modules/brother/default.nix b/pkgs/development/python-modules/brother/default.nix index 8cfe7624676e7..551dffa6541cf 100644 --- a/pkgs/development/python-modules/brother/default.nix +++ b/pkgs/development/python-modules/brother/default.nix @@ -32,15 +32,6 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov --cov-report term-missing " "" - substituteInPlace setup.py \ - --replace '"pytest-runner"' "" - substituteInPlace requirements.txt \ - --replace "pysnmplib==" "pysnmplib>=" - ''; - pythonImportsCheck = [ "brother" ]; diff --git a/pkgs/development/python-modules/expecttest/default.nix b/pkgs/development/python-modules/expecttest/default.nix new file mode 100644 index 0000000000000..db64b386f2415 --- /dev/null +++ b/pkgs/development/python-modules/expecttest/default.nix @@ -0,0 +1,34 @@ +{ buildPythonPackage +, fetchFromGitHub +, hypothesis +, lib +, poetry +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "expecttest"; + version = "0.1.3"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "ezyang"; + repo = pname; + rev = "v${version}"; + hash = "sha256-5CnpVFSbf3FcAa06Y7atG8sxu8uevpfrliB2HuVcrx0="; + }; + + buildInputs = [ poetry ]; + + checkInputs = [ hypothesis pytestCheckHook ]; + + pythonImportsCheck = [ "expecttest" ]; + + meta = { + maintainers = [ lib.maintainers.SomeoneSerge ]; + license = lib.licenses.mit; + description = ''EZ Yang "golden" tests (testing against a reference implementation)''; + homepage = "https://github.com/ezyang/expecttest"; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/development/python-modules/functorch/default.nix b/pkgs/development/python-modules/functorch/default.nix new file mode 100644 index 0000000000000..05b96077edc93 --- /dev/null +++ b/pkgs/development/python-modules/functorch/default.nix @@ -0,0 +1,98 @@ +{ buildPythonPackage +, expecttest +, fetchFromGitHub +, lib +, ninja +, pytestCheckHook +, python +, pytorch +, which +}: + +buildPythonPackage rec { + pname = "functorch"; + version = "0.1.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "pytorch"; + repo = pname; + rev = "v${version}"; + hash = "sha256-FidM04Q3hkGEDr4dthJv0MWtGiRfnWxJoyzu7Wl3SD8="; + }; + + # Somewhat surprisingly pytorch is actually necessary for the build process. + # `setup.py` imports `torch.utils.cpp_extension`. + nativeBuildInputs = [ + ninja + pytorch + which + ]; + + preCheck = '' + rm -rf functorch/ + ''; + + checkInputs = [ + expecttest + pytestCheckHook + ]; + + # See https://github.com/pytorch/functorch/issues/835. + disabledTests = [ + # RuntimeError: ("('...', '') is in PyTorch's OpInfo db ", "but is not in functorch's OpInfo db. Please regenerate ", '... and add the new tests to ', 'denylists if necessary.') + "test_coverage_bernoulli_cpu_float32" + "test_coverage_column_stack_cpu_float32" + "test_coverage_diagflat_cpu_float32" + "test_coverage_flatten_cpu_float32" + "test_coverage_linalg_lu_factor_cpu_float32" + "test_coverage_linalg_lu_factor_ex_cpu_float32" + "test_coverage_multinomial_cpu_float32" + "test_coverage_nn_functional_dropout2d_cpu_float32" + "test_coverage_nn_functional_feature_alpha_dropout_with_train_cpu_float32" + "test_coverage_nn_functional_feature_alpha_dropout_without_train_cpu_float32" + "test_coverage_nn_functional_kl_div_cpu_float32" + "test_coverage_normal_cpu_float32" + "test_coverage_normal_number_mean_cpu_float32" + "test_coverage_pca_lowrank_cpu_float32" + "test_coverage_round_decimals_0_cpu_float32" + "test_coverage_round_decimals_3_cpu_float32" + "test_coverage_round_decimals_neg_3_cpu_float32" + "test_coverage_scatter_reduce_cpu_float32" + "test_coverage_svd_lowrank_cpu_float32" + + # > self.assertEqual(len(functorch_lagging_op_db), len(op_db)) + # E AssertionError: Scalars are not equal! + # E + # E Absolute difference: 19 + # E Relative difference: 0.03525046382189239 + "test_functorch_lagging_op_db_has_opinfos_cpu" + + # RuntimeError: PyTorch not compiled with LLVM support! + "test_bias_gelu" + "test_binary_ops" + "test_broadcast1" + "test_broadcast2" + "test_float_double" + "test_float_int" + "test_fx_trace" + "test_int_long" + "test_issue57611" + "test_slice1" + "test_slice2" + "test_transposed1" + "test_transposed2" + "test_unary_ops" + ]; + + pythonImportsCheck = [ "functorch" ]; + + meta = with lib; { + description = "JAX-like composable function transforms for PyTorch"; + homepage = "https://pytorch.org/functorch"; + license = licenses.bsd3; + maintainers = with maintainers; [ samuela ]; + # See https://github.com/NixOS/nixpkgs/pull/174248#issuecomment-1139895064. + platforms = platforms.x86_64; + }; +} diff --git a/pkgs/development/python-modules/pykka/default.nix b/pkgs/development/python-modules/pykka/default.nix index 95d4597fd57bb..060a738911d1d 100644 --- a/pkgs/development/python-modules/pykka/default.nix +++ b/pkgs/development/python-modules/pykka/default.nix @@ -9,15 +9,15 @@ buildPythonPackage rec { pname = "pykka"; - version = "3.0.2"; + version = "3.1.1"; format = "pyproject"; disabled = pythonOlder "3.6.1"; src = fetchFromGitHub { owner = "jodal"; repo = pname; - rev = "v${version}"; - sha256 = "1cy4pr05xlsny9g573q7njsv7jaaysi1qzafm6f82y57jqnmziks"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-bvRjFpXufGygTgPfEOJOCXFbMy3dNlrTHlGoaIG/Fbs="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/backup/duplicity/default.nix b/pkgs/tools/backup/duplicity/default.nix index 232108d8e9f2f..4d83b693075b4 100644 --- a/pkgs/tools/backup/duplicity/default.nix +++ b/pkgs/tools/backup/duplicity/default.nix @@ -70,6 +70,7 @@ pythonPackages.buildPythonApplication rec { pythonPath = with pythonPackages; [ b2sdk + boto boto3 cffi cryptography diff --git a/pkgs/tools/filesystems/genimage/default.nix b/pkgs/tools/filesystems/genimage/default.nix index b3ca1ae8394b6..e23bb06270060 100644 --- a/pkgs/tools/filesystems/genimage/default.nix +++ b/pkgs/tools/filesystems/genimage/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "genimage"; - version = "9"; + version = "15"; src = fetchurl { url = "https://public.pengutronix.de/software/genimage/genimage-${version}.tar.xz"; - sha256 = "0y4h8x8lqxam8m90rdfq8cg5137kvilxr3d1qzddpx7nxpvmmwv9"; + sha256 = "0gh05pkmqn9ck79mwvl2812ssh0fb0xbq72iwh7b641ki2zj9jlv"; }; nativeBuildInputs = [ pkg-config ]; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # documentation. docdir="$out/share/doc/genimage" mkdir -p "$docdir" - cp -v README "$docdir" + cp -v README.rst "$docdir" ''; meta = with lib; { diff --git a/pkgs/tools/games/er-patcher/default.nix b/pkgs/tools/games/er-patcher/default.nix new file mode 100644 index 0000000000000..0b4ff71c4a256 --- /dev/null +++ b/pkgs/tools/games/er-patcher/default.nix @@ -0,0 +1,38 @@ +{ lib +, runCommandLocal +, fetchFromGitHub +, python3 +}: + +runCommandLocal "er-patcher" rec { + pname = "er-patcher"; + version = "1.04-1"; + + src = fetchFromGitHub { + owner = "gurrgur"; + repo = "er-patcher"; + rev = "v${version}"; + sha256 = "sha256-SnqYGtdtl1KMwUAWvdPK0heHMBtwpH2Jk6lieng6ngw="; + }; + + buildInputs = [ + python3 + ]; + + meta = with lib; { + homepage = "https://github.com/gurrgur/er-patcher"; + changelog = "https://github.com/gurrgur/er-patcher/releases/tag/v${version}"; + description = "Enhancement patches for Elden Ring adding ultrawide support, custom frame rate limits and more"; + longDescription = '' + A tool aimed at enhancing the experience when playing the game on linux through proton or natively on windows. + This tool is based on patching the game executable through hex-edits. However it is done in a safe and non-destructive way, + that ensures the patched executable is never run with EAC enabled (unless explicity told to do so). Use at your own risk! + ''; + license = licenses.mit; + maintainers = [ maintainers.ivar ]; + }; +} '' + mkdir -p $out/bin + install -Dm755 $src/er-patcher $out/bin/er-patcher + patchShebangs $out/bin/er-patcher +'' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac2e861f227b0..178b2e5c88d23 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3460,6 +3460,8 @@ with pkgs; envsubst = callPackage ../tools/misc/envsubst { }; + er-patcher = callPackage ../tools/games/er-patcher { }; + errcheck = callPackage ../development/tools/errcheck { buildGoModule = buildGo118Module; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 188e6c11b5e41..cc133d1be4987 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2841,6 +2841,8 @@ in { expects = callPackage ../development/python-modules/expects { }; + expecttest = callPackage ../development/python-modules/expecttest { }; + expiringdict = callPackage ../development/python-modules/expiringdict { }; explorerscript = callPackage ../development/python-modules/explorerscript { }; @@ -3286,6 +3288,8 @@ in { functools32 = callPackage ../development/python-modules/functools32 { }; + functorch = callPackage ../development/python-modules/functorch { }; + funcy = callPackage ../development/python-modules/funcy { }; furl = callPackage ../development/python-modules/furl { }; |