diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 09e5940e4fae..d3ba24939385 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -48,6 +48,16 @@ If you experience any issues, please report them. The original Perl script can still be used for now by setting `system.switch.enableNg` to `false`. +- The [Xen Hypervisor](https://xenproject.org) is once again available as a virtualisation option under [`virtualisation.xen`](#opt-virtualisation.xen.enable). + - This release includes Xen [4.17.5](https://wiki.xenproject.org/wiki/Xen_Project_4.17_Release_Notes), [4.18.3](https://wiki.xenproject.org/wiki/Xen_Project_4.18_Release_Notes) and [4.19.0](https://wiki.xenproject.org/wiki/Xen_Project_4.19_Release_Notes), as well as support for booting the hypervisor on EFI systems. + ::: {.warning} + Booting into Xen through a legacy BIOS bootloader or with the legacy script-based Stage 1 initrd have been **deprecated**. Only EFI booting and the new systemd-based Stage 1 initrd are supported. + ::: + - There are two flavours of Xen available by default: `xen`, which includes all built-in components, and `xen-slim`, which replaces the built-in components with their Nixpkgs equivalents. + - The `qemu-xen-traditional` component has been deprecated by upstream Xen, and is no longer available in any of the Xen packages. + - The OCaml-based Xen Store can now be configured using [`virtualisation.xen.store.settings`](#opt-virtualisation.xen.store.settings). + - The `virtualisation.xen.bridge` options have been deprecated in this release cycle. Users who need network bridges are encouraged to set up their own networking configurations. + ## New Modules {#sec-release-24.11-new-modules} - [TaskChampion Sync-Server](https://github.com/GothenburgBitFactory/taskchampion-sync-server), a [Taskwariror 3](https://taskwarrior.org/docs/upgrade-3/) sync server, replacing Taskwarrior 2's sync server named [`taskserver`](https://github.com/GothenburgBitFactory/taskserver). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 14a977c99e87..5068a04c8d34 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -265,6 +265,7 @@ ./programs/pqos-wrapper.nix ./programs/projecteur.nix ./programs/proxychains.nix + ./programs/pulseview.nix ./programs/qdmr.nix ./programs/qgroundcontrol.nix ./programs/qt5ct.nix diff --git a/nixos/modules/programs/pulseview.nix b/nixos/modules/programs/pulseview.nix new file mode 100644 index 000000000000..f8db5a467d53 --- /dev/null +++ b/nixos/modules/programs/pulseview.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.programs.pulseview; +in +{ + options.programs.pulseview = { + enable = lib.mkEnableOption "pulseview, a sigrok GUI"; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = [ + pkgs.pulseview + ]; + + services.udev = { + packages = [ + # Pulseview needs some udev rules provided by libsigrok to access devices + pkgs.libsigrok + ]; + }; + }; +} diff --git a/nixos/modules/virtualisation/amazon-init.nix b/nixos/modules/virtualisation/amazon-init.nix index 612f6c5bc765..1a65686af37c 100644 --- a/nixos/modules/virtualisation/amazon-init.nix +++ b/nixos/modules/virtualisation/amazon-init.nix @@ -75,6 +75,11 @@ in { after = [ "multi-user.target" ]; requires = [ "network-online.target" ]; + path = [ + "/run/wrappers" + "/run/current-system/sw" + ]; + restartIfChanged = false; unitConfig.X-StopOnRemoval = false; diff --git a/nixos/modules/virtualisation/xen-boot-builder.sh b/nixos/modules/virtualisation/xen-boot-builder.sh new file mode 100755 index 000000000000..13e1a4e20243 --- /dev/null +++ b/nixos/modules/virtualisation/xen-boot-builder.sh @@ -0,0 +1,165 @@ +# This script is called by ./xen-dom0.nix to create the Xen boot entries. +# shellcheck shell=bash + +# Handle input argument and exit if the flag is invalid. See virtualisation.xen.efi.bootBuilderVerbosity below. +[[ $# -ne 1 ]] && echo -e "\e[1;31merror:\e[0m xenBootBuilder must be called with exactly one verbosity argument. See the \e[1;34mvirtualisation.xen.efi.bootBuilderVerbosity\e[0m option." && exit 1 +case "$1" in + "quiet") true ;; + "default" | "info") echo -n "Installing Xen Hypervisor boot entries..." ;; + "debug") echo -e "\e[1;34mxenBootBuilder:\e[0m called with the '$1' flag" ;; + *) + echo -e "\e[1;31merror:\e[0m xenBootBuilder was called with an invalid argument. See the \e[1;34mvirtualisation.xen.efi.bootBuilderVerbosity\e[0m option." + exit 2 + ;; +esac + +# Get the current Xen generations and store them in an array. This will be used +# for displaying the diff later, if xenBootBuilder was called with `info`. +# We also delete the current Xen entries here, as they'll be rebuilt later if +# the corresponding NixOS generation still exists. +mapfile -t preGenerations < <(find "$efiMountPoint"/loader/entries -type f -name 'xen-*.conf' | sort -V | sed 's_/loader/entries/nixos_/loader/entries/xen_g;s_^.*/xen_xen_g;s_.conf$__g') +if [ "$1" = "debug" ]; then + if ((${#preGenerations[@]} == 0)); then + echo -e "\e[1;34mxenBootBuilder:\e[0m no previous Xen entries." + else + echo -e "\e[1;34mxenBootBuilder:\e[0m deleting the following stale xen entries:" && for debugGen in "${preGenerations[@]}"; do echo " - $debugGen"; done + fi +fi + +# Cleanup all Xen entries. +rm -f "$efiMountPoint"/{loader/entries/xen-*.conf,efi/nixos/xen-*.efi} + +# Main array for storing which generations exist in $efiMountPoint after +# systemd-boot-builder.py builds the main entries. +mapfile -t gens < <(find "$efiMountPoint"/loader/entries -type f -name 'nixos-*.conf' | sort -V) +[ "$1" = "debug" ] && echo -e "\e[1;34mxenBootBuilder:\e[0m found the following NixOS boot entries:" && for debugGen in "${gens[@]}"; do echo " - $debugGen"; done + +# This is the main loop that installs the Xen entries. +for gen in "${gens[@]}"; do + + # We discover the path to Bootspec through the init attribute in the entries, + # as it is equivalent to $toplevel/init. + bootspecFile="$(sed -nr 's/^options init=(.*)\/init.*$/\1/p' "$gen")/boot.json" + [ "$1" = "debug" ] && echo -e "\e[1;34mxenBootBuilder:\e[0m processing bootspec file $bootspecFile" + + # We do nothing if the Bootspec for the current $gen does not contain the Xen + # extension, which is added as a configuration attribute below. + if grep -sq '"org.xenproject.bootspec.v1"' "$bootspecFile"; then + [ "$1" = "debug" ] && echo -e " \e[1;32msuccess:\e[0m found Xen entries in $gen." + + # TODO: Support DeviceTree booting. Xen has some special handling for DeviceTree + # attributes, which will need to be translated in a boot script similar to this + # one. Having a DeviceTree entry is rare, and it is not always required for a + # successful boot, so we don't fail here, only warn with `debug`. + if grep -sq '"devicetree"' "$bootspecFile"; then + echo -e "\n\e[1;33mwarning:\e[0m $gen has a \e[1;34morg.nixos.systemd-boot.devicetree\e[0m Bootspec entry. Xen currently does not support DeviceTree, so this value will be ignored in the Xen boot entries, which may cause them to \e[1;31mfail to boot\e[0m." + else + [ "$1" = "debug" ] && echo -e "\e[1;34mxenBootBuilder:\e[0m no DeviceTree entries found in $gen." + fi + + # Prepare required attributes for `xen.cfg/xen.conf`. It inherits the name of + # the corresponding nixos generation, substituting `nixos` with `xen`: + # `xen-$profile-generation-$number-specialisation-$specialisation.{cfg,conf}` + xenGen=$(echo "$gen" | sed 's_/loader/entries/nixos_/loader/entries/xen_g;s_^.*/xen_xen_g;s_.conf$__g') + bootParams=$(jq -re '."org.xenproject.bootspec.v1".xenParams | join(" ")' "$bootspecFile") + kernel=$(jq -re '."org.nixos.bootspec.v1".kernel | sub("^/nix/store/"; "") | sub("/bzImage"; "-bzImage.efi")' "$bootspecFile") + kernelParams=$(jq -re '."org.nixos.bootspec.v1".kernelParams | join(" ")' "$bootspecFile") + initrd=$(jq -re '."org.nixos.bootspec.v1".initrd | sub("^/nix/store/"; "") | sub("/initrd"; "-initrd.efi")' "$bootspecFile") + init=$(jq -re '."org.nixos.bootspec.v1".init' "$bootspecFile") + title=$(sed -nr 's/^title (.*)$/\1/p' "$gen") + version=$(sed -nr 's/^version (.*)$/\1/p' "$gen") + machineID=$(sed -nr 's/^machine-id (.*)$/\1/p' "$gen") + sortKey=$(sed -nr 's/^sort-key (.*)$/\1/p' "$gen") + + # Write `xen.cfg` to a temporary location prior to UKI creation. + tmpCfg=$(mktemp) + [ "$1" = "debug" ] && echo -ne "\e[1;34mxenBootBuilder:\e[0m writing $xenGen.cfg to temporary file..." + cat > "$tmpCfg" << EOF +[global] +default=xen + +[xen] +options=$bootParams +kernel=$kernel init=$init $kernelParams +ramdisk=$initrd +EOF + [ "$1" = "debug" ] && echo -e "done." + + # Create Xen UKI for $generation. Most of this is lifted from + # https://xenbits.xenproject.org/docs/unstable/misc/efi.html. + [ "$1" = "debug" ] && echo -e "\e[1;34mxenBootBuilder:\e[0m making Xen UKI..." + xenEfi=$(jq -re '."org.xenproject.bootspec.v1".xen' "$bootspecFile") + padding=$(objdump --header --section=".pad" "$xenEfi" | awk '/\.pad/ { printf("0x%016x\n", strtonum("0x"$3) + strtonum("0x"$4))};') + [ "$1" = "debug" ] && echo " - padding: $padding" + objcopy \ + --add-section .config="$tmpCfg" \ + --change-section-vma .config="$padding" \ + "$xenEfi" \ + "$efiMountPoint"/EFI/nixos/"$xenGen".efi + [ "$1" = "debug" ] && echo -e " - \e[1;32msuccessfully built\e[0m $xenGen.efi" + rm -f "$tmpCfg" + + # Write `xen.conf`. + [ "$1" = "debug" ] && echo -ne "\e[1;34mxenBootBuilder:\e[0m writing $xenGen.conf to EFI System Partition..." + cat > "$efiMountPoint"/loader/entries/"$xenGen".conf << EOF +title $title (with Xen Hypervisor) +version $version +efi /EFI/nixos/$xenGen.efi +machine-id $machineID +sort-key $sortKey +EOF + [ "$1" = "debug" ] && echo -e "done." + + # Sometimes, garbage collection weirdness causes a generation to still exist in + # the loader entries, but its Bootspec file was deleted. We consider such a + # generation to be invalid, but we don't write extra code to handle this + # situation, as supressing grep's error messages above is quite enough, and the + # error message below is still technically correct, as no Xen can be found in + # something that does not exist. + else + [ "$1" = "debug" ] && echo -e " \e[1;33mwarning:\e[0m \e[1;31mno Xen found\e[0m in $gen." + fi +done + +# Counterpart to the preGenerations array above. We use it to diff the +# generations created/deleted when callled with the `info` argument. +mapfile -t postGenerations < <(find "$efiMountPoint"/loader/entries -type f -name 'xen-*.conf' | sort -V | sed 's_/loader/entries/nixos_/loader/entries/xen_g;s_^.*/xen_xen_g;s_.conf$__g') + +# In the event the script does nothing, guide the user to debug, as it'll only +# ever run when Xen is enabled, and it makes no sense to enable Xen and not have +# any hypervisor boot entries. +if ((${#postGenerations[@]} == 0)); then + case "$1" in + "default" | "info") echo "none found." && echo -e "If you believe this is an error, set the \e[1;34mvirtualisation.xen.efi.bootBuilderVerbosity\e[0m option to \e[1;34m\"debug\"\e[0m and rebuild to print debug logs." ;; + "debug") echo -e "\e[1;34mxenBootBuilder:\e[0m wrote \e[1;31mno generations\e[0m. Most likely, there were no generations with a valid \e[1;34morg.xenproject.bootspec.v1\e[0m entry." ;; + esac + +# If the script is successful, change the default boot, say "done.", write a +# diff, or print the total files written, depending on the argument this script +# was called with. We use some dumb dependencies here, like `diff` or `bat` for +# colourisation, but they're only included with the `info` argument. +# +# It's also fine to change the default here, as this runs after the +# `systemd-boot-builder.py` script, which overwrites the file, and this script +# does not run after an user disables the Xen module. +else + sed --in-place 's/^default nixos-/default xen-/g' "$efiMountPoint"/loader/loader.conf + case "$1" in + "default" | "info") echo "done." ;; + "debug") echo -e "\e[1;34mxenBootBuilder:\e[0m \e[1;32msuccessfully wrote\e[0m the following generations:" && for debugGen in "${postGenerations[@]}"; do echo " - $debugGen"; done ;; + esac + if [ "$1" = "info" ]; then + if [[ ${#preGenerations[@]} == "${#postGenerations[@]}" ]]; then + echo -e "\e[1;33mNo Change:\e[0m Xen Hypervisor boot entries were refreshed, but their contents are identical." + else + echo -e "\e[1;32mSuccess:\e[0m Changed the following boot entries:" + # We briefly unset errexit and pipefail here, as GNU diff has no option to not fail when files differ. + set +o errexit + set +o pipefail + diff <(echo "${preGenerations[*]}" | tr ' ' '\n') <(echo "${postGenerations[*]}" | tr ' ' '\n') -U 0 | grep --invert-match --extended-regexp '^(@@|---|\+\+\+).*' | sed '1{/^-$/d}' | bat --language diff --theme ansi --paging=never --plain + true + set -o errexit + set -o pipefail + fi + fi +fi diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index 2fb8c6cd4566..db0971065900 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -1,452 +1,870 @@ # Xen hypervisor (Dom0) support. -{ config, lib, pkgs, ... }: - -with lib; +{ + config, + lib, + pkgs, + ... +}: let cfg = config.virtualisation.xen; + + xenBootBuilder = pkgs.writeShellApplication { + name = "xenBootBuilder"; + runtimeInputs = + (with pkgs; [ + binutils + coreutils + findutils + gawk + gnugrep + gnused + jq + ]) + ++ lib.lists.optionals (cfg.efi.bootBuilderVerbosity == "info") ( + with pkgs; + [ + bat + diffutils + ] + ); + runtimeEnv = { + efiMountPoint = config.boot.loader.efi.efiSysMountPoint; + }; + text = builtins.readFile ./xen-boot-builder.sh; + }; in { - imports = [ - (mkRemovedOptionModule [ "virtualisation" "xen" "qemu" ] "You don't need this option anymore, it will work without it.") - (mkRenamedOptionModule [ "virtualisation" "xen" "qemu-package" ] [ "virtualisation" "xen" "package-qemu" ]) + imports = with lib.modules; [ + (mkRemovedOptionModule + [ + "virtualisation" + "xen" + "bridge" + "name" + ] + "The Xen Network Bridge options are currently unavailable. Please set up your own bridge manually." + ) + (mkRemovedOptionModule + [ + "virtualisation" + "xen" + "bridge" + "address" + ] + "The Xen Network Bridge options are currently unavailable. Please set up your own bridge manually." + ) + (mkRemovedOptionModule + [ + "virtualisation" + "xen" + "bridge" + "prefixLength" + ] + "The Xen Network Bridge options are currently unavailable. Please set up your own bridge manually." + ) + (mkRemovedOptionModule + [ + "virtualisation" + "xen" + "bridge" + "forwardDns" + ] + "The Xen Network Bridge options are currently unavailable. Please set up your own bridge manually." + ) + (mkRenamedOptionModule + [ + "virtualisation" + "xen" + "qemu-package" + ] + [ + "virtualisation" + "xen" + "qemu" + "package" + ] + ) + (mkRenamedOptionModule + [ + "virtualisation" + "xen" + "package-qemu" + ] + [ + "virtualisation" + "xen" + "qemu" + "package" + ] + ) + (mkRenamedOptionModule + [ + "virtualisation" + "xen" + "stored" + ] + [ + "virtualisation" + "xen" + "store" + "path" + ] + ) ]; - ###### interface + ## Interface ## - options = { + options.virtualisation.xen = { - virtualisation.xen.enable = - mkOption { - default = false; - type = types.bool; + enable = lib.options.mkEnableOption "the Xen Hypervisor, a virtualisation technology defined as a *type-1 hypervisor*, which allows multiple virtual machines, known as *domains*, to run concurrently on the physical machine. NixOS runs as the privileged *Domain 0*. This option requires a reboot into a Xen kernel to take effect"; + + debug = lib.options.mkEnableOption "Xen debug features for Domain 0. This option enables some hidden debugging tests and features, and should not be used in production"; + + trace = lib.options.mkOption { + type = lib.types.bool; + default = cfg.debug; + defaultText = lib.options.literalExpression "false"; + example = true; + description = "Whether to enable Xen debug tracing and logging for Domain 0."; + }; + + package = lib.options.mkOption { + type = lib.types.package; + default = pkgs.xen; + defaultText = lib.options.literalExpression "pkgs.xen"; + example = lib.options.literalExpression "pkgs.xen-slim"; + description = '' + The package used for Xen Hypervisor. + ''; + relatedPackages = [ + "xen" + "xen-slim" + ]; + }; + + qemu = { + package = lib.options.mkOption { + type = lib.types.package; + default = pkgs.xen; + defaultText = lib.options.literalExpression "pkgs.xen"; + example = lib.options.literalExpression "pkgs.qemu_xen"; description = '' - Setting this option enables the Xen hypervisor, a - virtualisation technology that allows multiple virtual - machines, known as *domains*, to run - concurrently on the physical machine. NixOS runs as the - privileged *Domain 0*. This option - requires a reboot to take effect. - ''; + The package with QEMU binaries that runs in Domain 0 + and virtualises the unprivileged domains. + ''; + relatedPackages = [ + "xen" + { + name = "qemu_xen"; + comment = "For use with `pkgs.xen-slim`."; + } + ]; + }; + pidFile = lib.options.mkOption { + type = lib.types.path; + default = "/run/xen/qemu-dom0.pid"; + example = "/var/run/xen/qemu-dom0.pid"; + description = "Path to the QEMU PID file."; }; - - virtualisation.xen.package = mkOption { - type = types.package; - defaultText = literalExpression "pkgs.xen"; - example = literalExpression "pkgs.xen-light"; - description = '' - The package used for Xen binary. - ''; - relatedPackages = [ "xen" "xen-light" ]; }; - virtualisation.xen.package-qemu = mkOption { - type = types.package; - defaultText = literalExpression "pkgs.xen"; - example = literalExpression "pkgs.qemu_xen-light"; + bootParams = lib.options.mkOption { + default = [ ]; + example = '' + [ + "iommu=force:true,qinval:true,debug:true" + "noreboot=true" + "vga=ask" + ] + ''; + type = lib.types.listOf lib.types.str; description = '' - The package with qemu binaries for dom0 qemu and xendomains. + Xen Command Line parameters passed to Domain 0 at boot time. + Note: these are different from `boot.kernelParams`. See + the [Xen documentation](https://xenbits.xenproject.org/docs/unstable/misc/xen-command-line.html) for more information. ''; - relatedPackages = [ "xen" - { name = "qemu_xen-light"; comment = "For use with pkgs.xen-light."; } - ]; }; - virtualisation.xen.bootParams = - mkOption { - default = []; - type = types.listOf types.str; - description = - '' - Parameters passed to the Xen hypervisor at boot time. - ''; + efi = { + bootBuilderVerbosity = lib.options.mkOption { + type = lib.types.enum [ + "default" + "info" + "debug" + "quiet" + ]; + default = "default"; + example = "info"; + description = '' + The EFI boot entry builder script should be called with exactly one of the following arguments in order to specify its verbosity: + + - `quiet` supresses all messages. + + - `default` adds a simple "Installing Xen Hypervisor boot entries...done." message to the script. + + - `info` is the same as `default`, but it also prints a diff with information on which generations were altered. + - This option adds two extra dependencies to the script: `diffutils` and `bat`. + + - `debug` prints information messages for every single step of the script. + + This option does not alter the actual functionality of the script, just the number of messages printed when rebuilding the system. + ''; }; - virtualisation.xen.domain0MemorySize = - mkOption { + path = lib.options.mkOption { + type = lib.types.path; + default = "${cfg.package.boot}/${cfg.package.efi}"; + defaultText = lib.options.literalExpression "\${config.virtualisation.xen.package.boot}/\${config.virtualisation.xen.package.efi}"; + example = lib.options.literalExpression "\${config.virtualisation.xen.package}/boot/efi/efi/nixos/xen-\${config.virtualisation.xen.package.version}.efi"; + description = '' + Path to xen.efi. `pkgs.xen` is patched to install the xen.efi file + on `$boot/boot/xen.efi`, but an unpatched Xen build may install it + somewhere else, such as `$out/boot/efi/efi/nixos/xen.efi`. Unless + you're building your own Xen derivation, you should leave this + option as the default value. + ''; + }; + }; + + dom0Resources = { + maxVCPUs = lib.options.mkOption { + default = 0; + example = 4; + type = lib.types.ints.unsigned; + description = '' + Amount of virtual CPU cores allocated to Domain 0 on boot. + If set to 0, all cores are assigned to Domain 0, and + unprivileged domains will compete with Domain 0 for CPU time. + ''; + }; + + memory = lib.options.mkOption { default = 0; example = 512; - type = types.addCheck types.int (n: n >= 0); - description = - '' - Amount of memory (in MiB) allocated to Domain 0 on boot. - If set to 0, all memory is assigned to Domain 0. - ''; + type = lib.types.ints.unsigned; + description = '' + Amount of memory (in MiB) allocated to Domain 0 on boot. + If set to 0, all memory is assigned to Domain 0, and + unprivileged domains will compete with Domain 0 for free RAM. + ''; }; - virtualisation.xen.bridge = { - name = mkOption { - default = "xenbr0"; - type = types.str; - description = '' - Name of bridge the Xen domUs connect to. - ''; - }; - - address = mkOption { - type = types.str; - default = "172.16.0.1"; - description = '' - IPv4 address of the bridge. - ''; - }; - - prefixLength = mkOption { - type = types.addCheck types.int (n: n >= 0 && n <= 32); - default = 16; - description = '' - Subnet mask of the bridge interface, specified as the number of - bits in the prefix (`24`). - A DHCP server will provide IP addresses for the whole, remaining - subnet. - ''; - }; - - forwardDns = mkOption { - type = types.bool; - default = false; - description = '' - If set to `true`, the DNS queries from the - hosts connected to the bridge will be forwarded to the DNS - servers specified in /etc/resolv.conf . - ''; - }; - + maxMemory = lib.options.mkOption { + default = cfg.dom0Resources.memory; + defaultText = lib.options.literalExpression "config.virtualisation.xen.dom0Resources.memory"; + example = 1024; + type = lib.types.ints.unsigned; + description = '' + Maximum amount of memory (in MiB) that Domain 0 can + dynamically allocate to itself. Does nothing if set + to the same amount as virtualisation.xen.memory, or + if that option is set to 0. + ''; }; + }; - virtualisation.xen.stored = - mkOption { - type = types.path; - description = - '' - Xen Store daemon to use. Defaults to oxenstored of the xen package. - ''; + domains = { + extraConfig = lib.options.mkOption { + type = lib.types.lines; + default = ""; + example = '' + XENDOMAINS_SAVE=/persist/xen/save + XENDOMAINS_RESTORE=false + XENDOMAINS_CREATE_USLEEP=10000000 + ''; + description = '' + Options defined here will override the defaults for xendomains. + The default options can be seen in the file included from + /etc/default/xendomains. + ''; }; + }; - virtualisation.xen.domains = { - extraConfig = mkOption { - type = types.lines; - default = ""; - description = - '' - Options defined here will override the defaults for xendomains. - The default options can be seen in the file included from - /etc/default/xendomains. - ''; + store = { + path = lib.options.mkOption { + type = lib.types.path; + default = "${cfg.package}/bin/oxenstored"; + defaultText = lib.options.literalExpression "\${config.virtualisation.xen.package}/bin/oxenstored"; + example = lib.options.literalExpression "\${config.virtualisation.xen.package}/bin/xenstored"; + description = '' + Path to the Xen Store Daemon. This option is useful to + switch between the legacy C-based Xen Store Daemon, and + the newer OCaml-based Xen Store Daemon, `oxenstored`. + ''; + }; + type = lib.options.mkOption { + type = lib.types.enum [ + "c" + "ocaml" + ]; + default = if (lib.strings.hasSuffix "oxenstored" cfg.store.path) then "ocaml" else "c"; + internal = true; + readOnly = true; + description = "Helper internal option that determines the type of the Xen Store Daemon based on cfg.store.path."; + }; + settings = lib.options.mkOption { + default = { }; + example = { + enableMerge = false; + quota.maxWatchEvents = 2048; + quota.enable = true; + conflict.maxHistorySeconds = 0.12; + conflict.burstLimit = 15.0; + xenstored.log.file = "/dev/null"; + xenstored.log.level = "info"; + }; + description = '' + The OCaml-based Xen Store Daemon configuration. This + option does nothing with the C-based `xenstored`. + ''; + type = lib.types.submodule { + options = { + pidFile = lib.options.mkOption { + default = "/run/xen/xenstored.pid"; + example = "/var/run/xen/xenstored.pid"; + type = lib.types.path; + description = "Path to the Xen Store Daemon PID file."; + }; + testEAGAIN = lib.options.mkOption { + default = cfg.debug; + defaultText = lib.options.literalExpression "config.virtualisation.xen.debug"; + example = true; + type = lib.types.bool; + visible = false; + description = "Randomly fail a transaction with EAGAIN. This option is used for debugging purposes only."; + }; + enableMerge = lib.options.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to enable transaction merge support."; + }; + conflict = { + burstLimit = lib.options.mkOption { + default = 5.0; + example = 15.0; + type = lib.types.addCheck ( + lib.types.float + // { + name = "nonnegativeFloat"; + description = "nonnegative floating point number, meaning >=0"; + descriptionClass = "nonRestrictiveClause"; + } + ) (n: n >= 0); + description = '' + Limits applied to domains whose writes cause other domains' transaction + commits to fail. Must include decimal point. + + The burst limit is the number of conflicts a domain can cause to + fail in a short period; this value is used for both the initial and + the maximum value of each domain's conflict-credit, which falls by + one point for each conflict caused, and when it reaches zero the + domain's requests are ignored. + ''; + }; + maxHistorySeconds = lib.options.mkOption { + default = 5.0e-2; + example = 1.0; + type = lib.types.addCheck ( + lib.types.float // { description = "nonnegative floating point number, meaning >=0"; } + ) (n: n >= 0); + description = '' + Limits applied to domains whose writes cause other domains' transaction + commits to fail. Must include decimal point. + + The conflict-credit is replenished over time: + one point is issued after each conflict.maxHistorySeconds, so this + is the minimum pause-time during which a domain will be ignored. + ''; + }; + rateLimitIsAggregate = lib.options.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + If the conflict.rateLimitIsAggregate option is `true`, then after each + tick one point of conflict-credit is given to just one domain: the + one at the front of the queue. If `false`, then after each tick each + domain gets a point of conflict-credit. + + In environments where it is known that every transaction will + involve a set of nodes that is writable by at most one other domain, + then it is safe to set this aggregate limit flag to `false` for better + performance. (This can be determined by considering the layout of + the xenstore tree and permissions, together with the content of the + transactions that require protection.) + + A transaction which involves a set of nodes which can be modified by + multiple other domains can suffer conflicts caused by any of those + domains, so the flag must be set to `true`. + ''; + }; + }; + perms = { + enable = lib.options.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to enable the node permission system."; + }; + enableWatch = lib.options.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = '' + Whether to enable the watch permission system. + + When this is set to `true`, unprivileged guests can only get watch events + for xenstore entries that they would've been able to read. + + When this is set to `false`, unprivileged guests may get watch events + for xenstore entries that they cannot read. The watch event contains + only the entry name, not the value. + This restores behaviour prior to [XSA-115](https://xenbits.xenproject.org/xsa/advisory-115.html). + ''; + }; + }; + quota = { + enable = lib.options.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to enable the quota system."; + }; + maxEntity = lib.options.mkOption { + default = 1000; + example = 1024; + type = lib.types.ints.positive; + description = "Entity limit for transactions."; + }; + maxSize = lib.options.mkOption { + default = 2048; + example = 4096; + type = lib.types.ints.positive; + description = "Size limit for transactions."; + }; + maxWatch = lib.options.mkOption { + default = 100; + example = 256; + type = lib.types.ints.positive; + description = "Maximum number of watches by the Xenstore Watchdog."; + }; + transaction = lib.options.mkOption { + default = 10; + example = 50; + type = lib.types.ints.positive; + description = "Maximum number of transactions."; + }; + maxRequests = lib.options.mkOption { + default = 1024; + example = 1024; + type = lib.types.ints.positive; + description = "Maximum number of requests per transaction."; + }; + maxPath = lib.options.mkOption { + default = 1024; + example = 1024; + type = lib.types.ints.positive; + description = "Path limit for the quota system."; + }; + maxOutstanding = lib.options.mkOption { + default = 1024; + example = 1024; + type = lib.types.ints.positive; + description = "Maximum outstanding requests, i.e. in-flight requests / domain."; + }; + maxWatchEvents = lib.options.mkOption { + default = 1024; + example = 2048; + type = lib.types.ints.positive; + description = "Maximum number of outstanding watch events per watch."; + }; + }; + persistent = lib.options.mkOption { + default = false; + example = true; + type = lib.types.bool; + description = "Whether to activate the filed base backend."; + }; + xenstored = { + log = { + file = lib.options.mkOption { + default = "/var/log/xen/xenstored.log"; + example = "/dev/null"; + type = lib.types.path; + description = "Path to the Xen Store log file."; + }; + level = lib.options.mkOption { + default = if cfg.trace then "debug" else null; + defaultText = lib.options.literalExpression "if (config.virtualisation.xen.trace == true) then \"debug\" else null"; + example = "error"; + type = lib.types.nullOr ( + lib.types.enum [ + "debug" + "info" + "warn" + "error" + ] + ); + description = "Logging level for the Xen Store."; + }; + # The hidden options below have no upstream documentation whatsoever. + # The nb* options appear to alter the log rotation behaviour, and + # the specialOps option appears to affect the Xenbus logging logic. + nbFiles = lib.options.mkOption { + default = 10; + example = 16; + type = lib.types.int; + visible = false; + description = "Set `xenstored-log-nb-files`."; + }; + }; + accessLog = { + file = lib.options.mkOption { + default = "/var/log/xen/xenstored-access.log"; + example = "/var/log/security/xenstored-access.log"; + type = lib.types.path; + description = "Path to the Xen Store access log file."; + }; + nbLines = lib.options.mkOption { + default = 13215; + example = 16384; + type = lib.types.int; + visible = false; + description = "Set `access-log-nb-lines`."; + }; + nbChars = lib.options.mkOption { + default = 180; + example = 256; + type = lib.types.int; + visible = false; + description = "Set `acesss-log-nb-chars`."; + }; + specialOps = lib.options.mkOption { + default = false; + example = true; + type = lib.types.bool; + visible = false; + description = "Set `access-log-special-ops`."; + }; + }; + xenfs = { + kva = lib.options.mkOption { + default = "/proc/xen/xsd_kva"; + example = cfg.store.settings.xenstored.xenfs.kva; + type = lib.types.path; + visible = false; + description = '' + Path to the Xen Store Daemon KVA location inside the XenFS pseudo-filesystem. + While it is possible to alter this value, some drivers may be hardcoded to follow the default paths. + ''; + }; + port = lib.options.mkOption { + default = "/proc/xen/xsd_port"; + example = cfg.store.settings.xenstored.xenfs.port; + type = lib.types.path; + visible = false; + description = '' + Path to the Xen Store Daemon userspace port inside the XenFS pseudo-filesystem. + While it is possible to alter this value, some drivers may be hardcoded to follow the default paths. + ''; + }; + }; + }; + ringScanInterval = lib.options.mkOption { + default = 20; + example = 30; + type = lib.types.addCheck ( + lib.types.int + // { + name = "nonzeroInt"; + description = "nonzero signed integer, meaning !=0"; + descriptionClass = "nonRestrictiveClause"; + } + ) (n: n != 0); + description = '' + Perodic scanning for all the rings as a safenet for lazy clients. + Define the interval in seconds; set to a negative integer to disable. + ''; + }; }; + }; }; - - virtualisation.xen.trace = mkEnableOption "Xen tracing"; - + }; }; + ## Implementation ## - ###### implementation + config = lib.modules.mkIf cfg.enable { + assertions = [ + { + assertion = pkgs.stdenv.isx86_64; + message = "Xen is currently not supported on ${pkgs.stdenv.hostPlatform.system}."; + } + { + assertion = + config.boot.loader.systemd-boot.enable + || (config.boot ? lanzaboote) && config.boot.lanzaboote.enable; + message = "Xen only supports booting on systemd-boot or Lanzaboote."; + } + { + assertion = config.boot.initrd.systemd.enable; + message = "Xen does not support the legacy script-based Stage 1 initrd."; + } + { + assertion = cfg.dom0Resources.maxMemory >= cfg.dom0Resources.memory; + message = '' + You have allocated more memory to dom0 than virtualisation.xen.dom0Resources.maxMemory + allows for. Please increase the maximum memory limit, or decrease the default memory allocation. + ''; + } + { + assertion = cfg.debug -> cfg.trace; + message = "Xen's debugging features are enabled, but logging is disabled. This is most likely not what you want."; + } + { + assertion = cfg.store.settings.quota.maxWatchEvents >= cfg.store.settings.quota.maxOutstanding; + message = '' + Upstream Xen recommends that maxWatchEvents be equal to or greater than maxOutstanding, + in order to mitigate denial of service attacks from malicious frontends. + ''; + } + ]; - config = mkIf cfg.enable { - assertions = [ { - assertion = pkgs.stdenv.isx86_64; - message = "Xen currently not supported on ${pkgs.stdenv.hostPlatform.system}"; - } { - assertion = config.boot.loader.grub.enable && (config.boot.loader.grub.efiSupport == false); - message = "Xen currently does not support EFI boot"; - } ]; + virtualisation.xen.bootParams = + lib.lists.optionals cfg.trace [ + "loglvl=all" + "guest_loglvl=all" + ] + ++ + lib.lists.optional (cfg.dom0Resources.memory != 0) + "dom0_mem=${toString cfg.dom0Resources.memory}M${ + lib.strings.optionalString ( + cfg.dom0Resources.memory != cfg.dom0Resources.maxMemory + ) ",max:${toString cfg.dom0Resources.maxMemory}M" + }" + ++ lib.lists.optional ( + cfg.dom0Resources.maxVCPUs != 0 + ) "dom0_max_vcpus=${toString cfg.dom0Resources.maxVCPUs}"; - virtualisation.xen.package = mkDefault pkgs.xen; - virtualisation.xen.package-qemu = mkDefault pkgs.xen; - virtualisation.xen.stored = mkDefault "${cfg.package}/bin/oxenstored"; - - environment.systemPackages = [ cfg.package ]; - - boot.kernelModules = - [ "xen-evtchn" "xen-gntdev" "xen-gntalloc" "xen-blkback" "xen-netback" - "xen-pciback" "evtchn" "gntdev" "netbk" "blkbk" "xen-scsibk" - "usbbk" "pciback" "xen-acpi-processor" "blktap2" "tun" "netxen_nic" - "xen_wdt" "xen-acpi-processor" "xen-privcmd" "xen-scsiback" + boot = { + kernelModules = [ + "xen-evtchn" + "xen-gntdev" + "xen-gntalloc" + "xen-blkback" + "xen-netback" + "xen-pciback" + "evtchn" + "gntdev" + "netbk" + "blkbk" + "xen-scsibk" + "usbbk" + "pciback" + "xen-acpi-processor" + "blktap2" + "tun" + "netxen_nic" + "xen_wdt" + "xen-acpi-processor" + "xen-privcmd" + "xen-scsiback" "xenfs" ]; - # The xenfs module is needed in system.activationScripts.xen, but - # the modprobe command there fails silently. Include xenfs in the - # initrd as a work around. - boot.initrd.kernelModules = [ "xenfs" ]; + # The xenfs module is needed to mount /proc/xen. + initrd.kernelModules = [ "xenfs" ]; - # The radeonfb kernel module causes the screen to go black as soon - # as it's loaded, so don't load it. - boot.blacklistedKernelModules = [ "radeonfb" ]; - - # Increase the number of loopback devices from the default (8), - # which is way too small because every VM virtual disk requires a - # loopback device. - boot.extraModprobeConfig = - '' + # Increase the number of loopback devices from the default (8), + # which is way too small because every VM virtual disk requires a + # loopback device. + extraModprobeConfig = '' options loop max_loop=64 ''; - virtualisation.xen.bootParams = [] ++ - optionals cfg.trace [ "loglvl=all" "guest_loglvl=all" ] ++ - optional (cfg.domain0MemorySize != 0) "dom0_mem=${toString cfg.domain0MemorySize}M"; + # Xen Bootspec extension. This extension allows NixOS bootloaders to + # fetch the `xen.efi` path and access the `cfg.bootParams` option. + bootspec.extensions = { + "org.xenproject.bootspec.v1" = { + xen = cfg.efi.path; + xenParams = cfg.bootParams; + }; + }; - system.extraSystemBuilderCmds = - '' - ln -s ${cfg.package}/boot/xen.gz $out/xen.gz - echo "${toString cfg.bootParams}" > $out/xen-params - ''; - - # Mount the /proc/xen pseudo-filesystem. - system.activationScripts.xen = - '' - if [ -d /proc/xen ]; then - ${pkgs.kmod}/bin/modprobe xenfs 2> /dev/null - ${pkgs.util-linux}/bin/mountpoint -q /proc/xen || \ - ${pkgs.util-linux}/bin/mount -t xenfs none /proc/xen - fi + # See the `xenBootBuilder` script in the main `let...in` statement of this file. + loader.systemd-boot.extraInstallCommands = '' + ${lib.meta.getExe xenBootBuilder} ${cfg.efi.bootBuilderVerbosity} ''; + }; # Domain 0 requires a pvops-enabled kernel. - system.requiredKernelConfig = with config.lib.kernelConfig; - [ (isYes "XEN") - (isYes "X86_IO_APIC") - (isYes "ACPI") - (isYes "XEN_DOM0") - (isYes "PCI_XEN") - (isYes "XEN_DEV_EVTCHN") - (isYes "XENFS") - (isYes "XEN_COMPAT_XENFS") - (isYes "XEN_SYS_HYPERVISOR") - (isYes "XEN_GNTDEV") - (isYes "XEN_BACKEND") - (isModule "XEN_NETDEV_BACKEND") - (isModule "XEN_BLKDEV_BACKEND") - (isModule "XEN_PCIDEV_BACKEND") - (isYes "XEN_BALLOON") - (isYes "XEN_SCRUB_PAGES") + # All NixOS kernels come with this enabled by default; this is merely a sanity check. + system.requiredKernelConfig = with config.lib.kernelConfig; [ + (isYes "XEN") + (isYes "X86_IO_APIC") + (isYes "ACPI") + (isYes "XEN_DOM0") + (isYes "PCI_XEN") + (isYes "XEN_DEV_EVTCHN") + (isYes "XENFS") + (isYes "XEN_COMPAT_XENFS") + (isYes "XEN_SYS_HYPERVISOR") + (isYes "XEN_GNTDEV") + (isYes "XEN_BACKEND") + (isModule "XEN_NETDEV_BACKEND") + (isModule "XEN_BLKDEV_BACKEND") + (isModule "XEN_PCIDEV_BACKEND") + (isYes "XEN_BALLOON") + (isYes "XEN_SCRUB_PAGES") + ]; + + environment = { + systemPackages = [ + cfg.package + cfg.qemu.package ]; + etc = + # Set up Xen Domain 0 configuration files. + { + "xen/xl.conf".source = "${cfg.package}/etc/xen/xl.conf"; # TODO: Add options to configure xl.conf declaratively. It's worth considering making a new "xl value" type, as it could be reused to produce xl.cfg (domain definition) files. + "xen/scripts-xen" = { + source = "${cfg.package}/etc/xen/scripts/*"; + target = "xen/scripts"; + }; + "default/xencommons".text = '' + source ${cfg.package}/etc/default/xencommons + XENSTORED="${cfg.store.path}" + QEMU_XEN="${cfg.qemu.package}/${cfg.qemu.package.qemu-system-i386}" + ${lib.strings.optionalString cfg.trace '' + XENSTORED_TRACE=yes + XENCONSOLED_TRACE=all + ''} + ''; + "default/xendomains".text = '' + source ${cfg.package}/etc/default/xendomains - environment.etc = - { - "xen/xl.conf".source = "${cfg.package}/etc/xen/xl.conf"; - "xen/scripts".source = "${cfg.package}/etc/xen/scripts"; - "default/xendomains".text = '' - source ${cfg.package}/etc/default/xendomains - - ${cfg.domains.extraConfig} - ''; - } - // optionalAttrs (builtins.compareVersions cfg.package.version "4.10" >= 0) { - # in V 4.10 oxenstored requires /etc/xen/oxenstored.conf to start - "xen/oxenstored.conf".source = "${cfg.package}/etc/xen/oxenstored.conf"; - }; + ${cfg.domains.extraConfig} + ''; + } + # The OCaml-based Xen Store Daemon requires /etc/xen/oxenstored.conf to start. + // lib.attrsets.optionalAttrs (cfg.store.type == "ocaml") { + "xen/oxenstored.conf".text = '' + pid-file = ${cfg.store.settings.pidFile} + test-eagain = ${lib.trivial.boolToString cfg.store.settings.testEAGAIN} + merge-activate = ${toString cfg.store.settings.enableMerge} + conflict-burst-limit = ${toString cfg.store.settings.conflict.burstLimit} + conflict-max-history-seconds = ${toString cfg.store.settings.conflict.maxHistorySeconds} + conflict-rate-limit-is-aggregate = ${toString cfg.store.settings.conflict.rateLimitIsAggregate} + perms-activate = ${toString cfg.store.settings.perms.enable} + perms-watch-activate = ${toString cfg.store.settings.perms.enableWatch} + quota-activate = ${toString cfg.store.settings.quota.enable} + quota-maxentity = ${toString cfg.store.settings.quota.maxEntity} + quota-maxsize = ${toString cfg.store.settings.quota.maxSize} + quota-maxwatch = ${toString cfg.store.settings.quota.maxWatch} + quota-transaction = ${toString cfg.store.settings.quota.transaction} + quota-maxrequests = ${toString cfg.store.settings.quota.maxRequests} + quota-path-max = ${toString cfg.store.settings.quota.maxPath} + quota-maxoutstanding = ${toString cfg.store.settings.quota.maxOutstanding} + quota-maxwatchevents = ${toString cfg.store.settings.quota.maxWatchEvents} + persistent = ${lib.trivial.boolToString cfg.store.settings.persistent} + xenstored-log-file = ${cfg.store.settings.xenstored.log.file} + xenstored-log-level = ${ + if isNull cfg.store.settings.xenstored.log.level then + "null" + else + cfg.store.settings.xenstored.log.level + } + xenstored-log-nb-files = ${toString cfg.store.settings.xenstored.log.nbFiles} + access-log-file = ${cfg.store.settings.xenstored.accessLog.file} + access-log-nb-lines = ${toString cfg.store.settings.xenstored.accessLog.nbLines} + acesss-log-nb-chars = ${toString cfg.store.settings.xenstored.accessLog.nbChars} + access-log-special-ops = ${lib.trivial.boolToString cfg.store.settings.xenstored.accessLog.specialOps} + ring-scan-interval = ${toString cfg.store.settings.ringScanInterval} + xenstored-kva = ${cfg.store.settings.xenstored.xenfs.kva} + xenstored-port = ${cfg.store.settings.xenstored.xenfs.port} + ''; + }; + }; # Xen provides udev rules. services.udev.packages = [ cfg.package ]; - services.udev.path = [ pkgs.bridge-utils pkgs.iproute2 ]; + systemd = { + # Xen provides systemd units. + packages = [ cfg.package ]; - systemd.services.xen-store = { - description = "Xen Store Daemon"; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" "xen-store.socket" ]; - requires = [ "xen-store.socket" ]; - preStart = '' - export XENSTORED_ROOTDIR="/var/lib/xenstored" - rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null + mounts = [ + { + description = "Mount /proc/xen files"; + what = "xenfs"; + where = "/proc/xen"; + type = "xenfs"; + unitConfig = { + ConditionPathExists = "/proc/xen"; + RefuseManualStop = "true"; + }; + } + ]; - mkdir -p /var/run - mkdir -p /var/log/xen # Running xl requires /var/log/xen and /var/lib/xen, - mkdir -p /var/lib/xen # so we create them here unconditionally. - grep -q control_d /proc/xen/capabilities - ''; - serviceConfig = if (builtins.compareVersions cfg.package.version "4.8" < 0) then - { ExecStart = '' - ${cfg.stored}${optionalString cfg.trace " -T /var/log/xen/xenstored-trace.log"} --no-fork - ''; - } else { - ExecStart = '' - ${cfg.package}/etc/xen/scripts/launch-xenstore - ''; - Type = "notify"; - RemainAfterExit = true; - NotifyAccess = "all"; - }; - postStart = '' - ${optionalString (builtins.compareVersions cfg.package.version "4.8" < 0) '' - time=0 - timeout=30 - # Wait for xenstored to actually come up, timing out after 30 seconds - while [ $time -lt $timeout ] && ! `${cfg.package}/bin/xenstore-read -s / >/dev/null 2>&1` ; do - time=$(($time+1)) - sleep 1 - done + services = { - # Exit if we timed out - if ! [ $time -lt $timeout ] ; then - echo "Could not start Xenstore Daemon" - exit 1 - fi - ''} - echo "executing xen-init-dom0" - ${cfg.package}/lib/xen/bin/xen-init-dom0 - ''; - }; + # While this service is installed by the `xen` package, it shouldn't be used in dom0. + xendriverdomain.enable = false; - systemd.sockets.xen-store = { - description = "XenStore Socket for userspace API"; - wantedBy = [ "sockets.target" ]; - socketConfig = { - ListenStream = [ "/var/run/xenstored/socket" "/var/run/xenstored/socket_ro" ]; - SocketMode = "0660"; - SocketUser = "root"; - SocketGroup = "root"; - }; - }; - - - systemd.services.xen-console = { - description = "Xen Console Daemon"; - wantedBy = [ "multi-user.target" ]; - after = [ "xen-store.service" ]; - requires = [ "xen-store.service" ]; - preStart = '' - mkdir -p /var/run/xen - ${optionalString cfg.trace "mkdir -p /var/log/xen"} - grep -q control_d /proc/xen/capabilities - ''; - serviceConfig = { - ExecStart = '' - ${cfg.package}/bin/xenconsoled\ - ${optionalString ((builtins.compareVersions cfg.package.version "4.8" >= 0)) " -i"}\ - ${optionalString cfg.trace " --log=all --log-dir=/var/log/xen"} + xenstored = { + wantedBy = [ "multi-user.target" ]; + preStart = '' + export XENSTORED_ROOTDIR="/var/lib/xenstored" + rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null + mkdir -p /var/{run,log,lib}/xen ''; + }; + + xen-init-dom0 = { + restartIfChanged = false; + wantedBy = [ "multi-user.target" ]; + }; + + xen-qemu-dom0-disk-backend = { + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + PIDFile = cfg.qemu.pidFile; + ExecStart = '' + ${cfg.qemu.package}/${cfg.qemu.package.qemu-system-i386} \ + -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv \ + -daemonize -monitor /dev/null -serial /dev/null -parallel \ + /dev/null -nodefaults -no-user-config -pidfile \ + ${cfg.qemu.pidFile} + ''; + }; + }; + + xenconsoled.wantedBy = [ "multi-user.target" ]; + + xen-watchdog = { + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + RestartSec = "1"; + Restart = "on-failure"; + }; + }; + + xendomains = { + restartIfChanged = false; + path = [ + cfg.package + cfg.qemu.package + ]; + preStart = "mkdir -p /var/lock/subsys -m 755"; + wantedBy = [ "multi-user.target" ]; + }; }; }; - - - systemd.services.xen-qemu = { - description = "Xen Qemu Daemon"; - wantedBy = [ "multi-user.target" ]; - after = [ "xen-console.service" ]; - requires = [ "xen-store.service" ]; - serviceConfig.ExecStart = '' - ${cfg.package-qemu}/${cfg.package-qemu.qemu-system-i386} \ - -xen-attach -xen-domid 0 -name dom0 -M xenpv \ - -nographic -monitor /dev/null -serial /dev/null -parallel /dev/null - ''; - }; - - - systemd.services.xen-watchdog = { - description = "Xen Watchdog Daemon"; - wantedBy = [ "multi-user.target" ]; - after = [ "xen-qemu.service" "xen-domains.service" ]; - serviceConfig.ExecStart = "${cfg.package}/bin/xenwatchdogd 30 15"; - serviceConfig.Type = "forking"; - serviceConfig.RestartSec = "1"; - serviceConfig.Restart = "on-failure"; - }; - - - systemd.services.xen-bridge = { - description = "Xen bridge"; - wantedBy = [ "multi-user.target" ]; - before = [ "xen-domains.service" ]; - preStart = '' - mkdir -p /var/run/xen - touch /var/run/xen/dnsmasq.pid - touch /var/run/xen/dnsmasq.etherfile - touch /var/run/xen/dnsmasq.leasefile - - IFS='-' read -a data <<< `${pkgs.sipcalc}/bin/sipcalc ${cfg.bridge.address}/${toString cfg.bridge.prefixLength} | grep Usable\ range` - export XEN_BRIDGE_IP_RANGE_START="${"\${data[1]//[[:blank:]]/}"}" - export XEN_BRIDGE_IP_RANGE_END="${"\${data[2]//[[:blank:]]/}"}" - - IFS='-' read -a data <<< `${pkgs.sipcalc}/bin/sipcalc ${cfg.bridge.address}/${toString cfg.bridge.prefixLength} | grep Network\ address` - export XEN_BRIDGE_NETWORK_ADDRESS="${"\${data[1]//[[:blank:]]/}"}" - - IFS='-' read -a data <<< `${pkgs.sipcalc}/bin/sipcalc ${cfg.bridge.address}/${toString cfg.bridge.prefixLength} | grep Network\ mask` - export XEN_BRIDGE_NETMASK="${"\${data[1]//[[:blank:]]/}"}" - - echo "${cfg.bridge.address} host gw dns" > /var/run/xen/dnsmasq.hostsfile - - cat < /var/run/xen/dnsmasq.conf - no-daemon - pid-file=/var/run/xen/dnsmasq.pid - interface=${cfg.bridge.name} - except-interface=lo - bind-interfaces - auth-zone=xen.local,$XEN_BRIDGE_NETWORK_ADDRESS/${toString cfg.bridge.prefixLength} - domain=xen.local - addn-hosts=/var/run/xen/dnsmasq.hostsfile - expand-hosts - strict-order - no-hosts - bogus-priv - ${optionalString (!cfg.bridge.forwardDns) '' - no-resolv - no-poll - auth-server=dns.xen.local,${cfg.bridge.name} - ''} - filterwin2k - clear-on-reload - domain-needed - dhcp-hostsfile=/var/run/xen/dnsmasq.etherfile - dhcp-authoritative - dhcp-range=$XEN_BRIDGE_IP_RANGE_START,$XEN_BRIDGE_IP_RANGE_END - dhcp-no-override - no-ping - dhcp-leasefile=/var/run/xen/dnsmasq.leasefile - EOF - - # DHCP - ${pkgs.iptables}/bin/iptables -w -I INPUT -i ${cfg.bridge.name} -p tcp -s $XEN_BRIDGE_NETWORK_ADDRESS/${toString cfg.bridge.prefixLength} --sport 68 --dport 67 -j ACCEPT - ${pkgs.iptables}/bin/iptables -w -I INPUT -i ${cfg.bridge.name} -p udp -s $XEN_BRIDGE_NETWORK_ADDRESS/${toString cfg.bridge.prefixLength} --sport 68 --dport 67 -j ACCEPT - # DNS - ${pkgs.iptables}/bin/iptables -w -I INPUT -i ${cfg.bridge.name} -p tcp -d ${cfg.bridge.address} --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT - ${pkgs.iptables}/bin/iptables -w -I INPUT -i ${cfg.bridge.name} -p udp -d ${cfg.bridge.address} --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT - - ${pkgs.bridge-utils}/bin/brctl addbr ${cfg.bridge.name} - ${pkgs.inetutils}/bin/ifconfig ${cfg.bridge.name} ${cfg.bridge.address} - ${pkgs.inetutils}/bin/ifconfig ${cfg.bridge.name} netmask $XEN_BRIDGE_NETMASK - ${pkgs.inetutils}/bin/ifconfig ${cfg.bridge.name} up - ''; - serviceConfig.ExecStart = "${pkgs.dnsmasq}/bin/dnsmasq --conf-file=/var/run/xen/dnsmasq.conf"; - postStop = '' - IFS='-' read -a data <<< `${pkgs.sipcalc}/bin/sipcalc ${cfg.bridge.address}/${toString cfg.bridge.prefixLength} | grep Network\ address` - export XEN_BRIDGE_NETWORK_ADDRESS="${"\${data[1]//[[:blank:]]/}"}" - - ${pkgs.inetutils}/bin/ifconfig ${cfg.bridge.name} down - ${pkgs.bridge-utils}/bin/brctl delbr ${cfg.bridge.name} - - # DNS - ${pkgs.iptables}/bin/iptables -w -D INPUT -i ${cfg.bridge.name} -p udp -d ${cfg.bridge.address} --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT - ${pkgs.iptables}/bin/iptables -w -D INPUT -i ${cfg.bridge.name} -p tcp -d ${cfg.bridge.address} --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT - # DHCP - ${pkgs.iptables}/bin/iptables -w -D INPUT -i ${cfg.bridge.name} -p udp -s $XEN_BRIDGE_NETWORK_ADDRESS/${toString cfg.bridge.prefixLength} --sport 68 --dport 67 -j ACCEPT - ${pkgs.iptables}/bin/iptables -w -D INPUT -i ${cfg.bridge.name} -p tcp -s $XEN_BRIDGE_NETWORK_ADDRESS/${toString cfg.bridge.prefixLength} --sport 68 --dport 67 -j ACCEPT - ''; - }; - - - systemd.services.xen-domains = { - description = "Xen domains - automatically starts, saves and restores Xen domains"; - wantedBy = [ "multi-user.target" ]; - after = [ "xen-bridge.service" "xen-qemu.service" ]; - requires = [ "xen-bridge.service" "xen-qemu.service" ]; - ## To prevent a race between dhcpcd and xend's bridge setup script - ## (which renames eth* to peth* and recreates eth* as a virtual - ## device), start dhcpcd after xend. - before = [ "dhcpd.service" ]; - restartIfChanged = false; - serviceConfig.RemainAfterExit = "yes"; - path = [ cfg.package cfg.package-qemu ]; - environment.XENDOM_CONFIG = "${cfg.package}/etc/sysconfig/xendomains"; - preStart = "mkdir -p /var/lock/subsys -m 755"; - serviceConfig.ExecStart = "${cfg.package}/etc/init.d/xendomains start"; - serviceConfig.ExecStop = "${cfg.package}/etc/init.d/xendomains stop"; - }; - }; + meta.maintainers = with lib.maintainers; [ sigmasquadron ]; } diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 8cb9f69f46d4..91c4aaf05ad9 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -6363,6 +6363,354 @@ final: prev: meta.homepage = "https://github.com/hadronized/mind.nvim/"; }; + mini-git = buildVimPlugin { + pname = "mini-git"; + version = "2024-08-10"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini-git"; + rev = "25651b097bedf519421f9744cdc91a693dfa463a"; + sha256 = "0535awbbl8hxyi41iwj5w44jajvjiys28z2qgs1fczsgwbpwx6z1"; + }; + meta.homepage = "https://github.com/echasnovski/mini-git/"; + }; + + mini-ai = buildVimPlugin { + pname = "mini.ai"; + version = "2024-08-06"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.ai"; + rev = "a9b992b13d22a8db8df6beac25afa59a10b5584d"; + sha256 = "12a9xyd3gj9qvll1fj4kv4cdv4jz1sfaxp176c73f2hlv4w4p6ri"; + }; + meta.homepage = "https://github.com/echasnovski/mini.ai/"; + }; + + mini-align = buildVimPlugin { + pname = "mini.align"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.align"; + rev = "b54d88b16bfac62ca6b3d699566135639a3ca4fa"; + sha256 = "1llrq86hbx299zbzfr04yrylrf5cqgpzanhiahb0mq3y5z0fpvcx"; + }; + meta.homepage = "https://github.com/echasnovski/mini.align/"; + }; + + mini-animate = buildVimPlugin { + pname = "mini.animate"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.animate"; + rev = "320fb35460238c436407cd779f63abad98e84870"; + sha256 = "1ksaln0r5lm5w4rxccbb4b3yz0ycgv67brbcnbkz2aifva1pza9y"; + }; + meta.homepage = "https://github.com/echasnovski/mini.animate/"; + }; + + mini-base16 = buildVimPlugin { + pname = "mini.base16"; + version = "2024-08-16"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.base16"; + rev = "b434a7c03f1c3581bed8c17dbc512168920de5c6"; + sha256 = "04lfciwlmrdzn58c49yshva6xyr46f4imnp4dh408cvdnw0j5yqv"; + }; + meta.homepage = "https://github.com/echasnovski/mini.base16/"; + }; + + mini-basics = buildVimPlugin { + pname = "mini.basics"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.basics"; + rev = "1af88d68b9d9c8cbf0dde9bd7ad510b93eafd9aa"; + sha256 = "0iynhxwc029lg62c3xfydpnnin2gnr4sbrxja4dj02j544y2kyss"; + }; + meta.homepage = "https://github.com/echasnovski/mini.basics/"; + }; + + mini-bracketed = buildVimPlugin { + pname = "mini.bracketed"; + version = "2024-08-13"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.bracketed"; + rev = "072d50801d8d4aaeb4b9765fa35c61639e0cff6b"; + sha256 = "047hcwcp8lms3zhvbckq2cqs9ir9g4z3i0lmf1qrd807aqih7fxp"; + }; + meta.homepage = "https://github.com/echasnovski/mini.bracketed/"; + }; + + mini-bufremove = buildVimPlugin { + pname = "mini.bufremove"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.bufremove"; + rev = "1ee294a97e091d3cf967974df622c0d887890dc2"; + sha256 = "0jhhh2f4zzbixcqbp7540bzgbzgwwipi37knqj1ykpf5py4kp0dm"; + }; + meta.homepage = "https://github.com/echasnovski/mini.bufremove/"; + }; + + mini-clue = buildVimPlugin { + pname = "mini.clue"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.clue"; + rev = "847376b3a044129348cea9eedb841106379e0796"; + sha256 = "19bzb4hawll898dr4w53jhy9h56dnf4c3cjisqlyjh3qgl0h588s"; + }; + meta.homepage = "https://github.com/echasnovski/mini.clue/"; + }; + + mini-colors = buildVimPlugin { + pname = "mini.colors"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.colors"; + rev = "9fa904dd46da5d84028478b9cc689be021732fab"; + sha256 = "1n81am3b3lphq75vs3fwwl14ajk58hqr5znjd4dbcdpr7mz94bzc"; + }; + meta.homepage = "https://github.com/echasnovski/mini.colors/"; + }; + + mini-comment = buildVimPlugin { + pname = "mini.comment"; + version = "2024-07-21"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.comment"; + rev = "03c13e37318bdb18481311c0ac1adc9ed731caf1"; + sha256 = "0hdi07c704jx5a7fbxziw8rqmzm5hx66gj04jpzwgqs1c3hchppf"; + }; + meta.homepage = "https://github.com/echasnovski/mini.comment/"; + }; + + mini-completion = buildVimPlugin { + pname = "mini.completion"; + version = "2024-07-30"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.completion"; + rev = "ad99bbe569aa5ceb70c2ff4c36368f94a89496c5"; + sha256 = "0w9hgf4fq8plbns1fnq283s2difg9np8k8888fryd97yd3nys4pd"; + }; + meta.homepage = "https://github.com/echasnovski/mini.completion/"; + }; + + mini-cursorword = buildVimPlugin { + pname = "mini.cursorword"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.cursorword"; + rev = "7a9f1ec73c52124abc39f0309d332ababefc68b2"; + sha256 = "1wwwila2k8yap1k6v2ndzqylaw49pw1wk1l011pi12hcaimixba5"; + }; + meta.homepage = "https://github.com/echasnovski/mini.cursorword/"; + }; + + mini-deps = buildVimPlugin { + pname = "mini.deps"; + version = "2024-08-10"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.deps"; + rev = "dbee3da96d3cf68ff311d8f324a9b236a08ad429"; + sha256 = "1plgz5fssa4yczr32h230kn65dldi729sjrlxp4x9307n3s80zk1"; + }; + meta.homepage = "https://github.com/echasnovski/mini.deps/"; + }; + + mini-diff = buildVimPlugin { + pname = "mini.diff"; + version = "2024-07-11"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.diff"; + rev = "d58f9cb13400aedc5b5a0ef70fcdf31871ba2ee6"; + sha256 = "09qg43c3qwk0csqlvy9c7s3l9anp4pg0jrrzv8idvii3za2zrwsq"; + }; + meta.homepage = "https://github.com/echasnovski/mini.diff/"; + }; + + mini-doc = buildVimPlugin { + pname = "mini.doc"; + version = "2024-08-10"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.doc"; + rev = "bb73a3d1ff390f7e2740027ea2567017099a237c"; + sha256 = "1jsamvgdk6zxaimn9v949gbghf92d0ii8jhn2sjjy7arbl8w0w23"; + }; + meta.homepage = "https://github.com/echasnovski/mini.doc/"; + }; + + mini-extra = buildVimPlugin { + pname = "mini.extra"; + version = "2024-08-17"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.extra"; + rev = "05ddb1e3056c5ab541477a38d2c61d96d19fd299"; + sha256 = "0z0lsgsmjchc0arspzm04p5vfd5mdc3lyx4d4qibsxq5i0834r6y"; + }; + meta.homepage = "https://github.com/echasnovski/mini.extra/"; + }; + + mini-files = buildVimPlugin { + pname = "mini.files"; + version = "2024-08-17"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.files"; + rev = "170d0dd321ca377cb427fb5576d4d75601c1c2da"; + sha256 = "14p5syc4w43mgp522zj6hwpri4a49zkq36in3sifmr6h8bwhx87g"; + }; + meta.homepage = "https://github.com/echasnovski/mini.files/"; + }; + + mini-fuzzy = buildVimPlugin { + pname = "mini.fuzzy"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.fuzzy"; + rev = "ea9d1380ad925c4d0e890f68dbf830d2b19bae5d"; + sha256 = "10ng6rq4ig0ijvbj2bbm428dg3asf40x9b7dsvndk33ikfrlbazz"; + }; + meta.homepage = "https://github.com/echasnovski/mini.fuzzy/"; + }; + + mini-hipatterns = buildVimPlugin { + pname = "mini.hipatterns"; + version = "2024-07-23"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.hipatterns"; + rev = "1811b0661721285fc83494d2e687d538fb3ddac8"; + sha256 = "0b8sswy6533rifxgfy52mssdbxrds8p0xxp8981q97pp0z64k2yq"; + }; + meta.homepage = "https://github.com/echasnovski/mini.hipatterns/"; + }; + + mini-hues = buildVimPlugin { + pname = "mini.hues"; + version = "2024-08-16"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.hues"; + rev = "0e46bdc04d3df4185097ecff08ad208868572b98"; + sha256 = "0s71n5mh49jvkzwamm7hnrrq39qlhhnpdg6l2x87mnyq5c0f8cvs"; + }; + meta.homepage = "https://github.com/echasnovski/mini.hues/"; + }; + + mini-icons = buildVimPlugin { + pname = "mini.icons"; + version = "2024-07-30"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.icons"; + rev = "fe63fe080e76d80713557e5f0c65bc15b14b152d"; + sha256 = "0z6jmrn5gf6c51dlnc7qwab8xg1dv1f5d5vmkmy8x2d6iapnlyqv"; + }; + meta.homepage = "https://github.com/echasnovski/mini.icons/"; + }; + + mini-indentscope = buildVimPlugin { + pname = "mini.indentscope"; + version = "2024-08-12"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.indentscope"; + rev = "d2e7b5f0260789c325f92ab3421ff9884ea01842"; + sha256 = "1w49n9nv32h70wf8ahya9xj1hfcxnx3bqxwpkhhz8ck95c84mmaa"; + }; + meta.homepage = "https://github.com/echasnovski/mini.indentscope/"; + }; + + mini-jump = buildVimPlugin { + pname = "mini.jump"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.jump"; + rev = "795f26e6640589382c277cffa494bda0a127bef4"; + sha256 = "0s51zsy0cm9bldxzzk5hnvqhccv9nh53qd07dlijd5403vsx77wa"; + }; + meta.homepage = "https://github.com/echasnovski/mini.jump/"; + }; + + mini-jump2d = buildVimPlugin { + pname = "mini.jump2d"; + version = "2024-07-18"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.jump2d"; + rev = "f39cc3eed3163799730166ac9cf382d44ce7159f"; + sha256 = "1bz2ymhvib10mb5cc8410yssi7k72hqs80n708p0dm3lyy3lw83w"; + }; + meta.homepage = "https://github.com/echasnovski/mini.jump2d/"; + }; + + mini-map = buildVimPlugin { + pname = "mini.map"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.map"; + rev = "290c3da965196d64f87050a076de9787a136e57a"; + sha256 = "09i26nh398i098lqsqajkjpr94762x54vnqlkcvbg5ak1fx3rajr"; + }; + meta.homepage = "https://github.com/echasnovski/mini.map/"; + }; + + mini-misc = buildVimPlugin { + pname = "mini.misc"; + version = "2024-08-18"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.misc"; + rev = "e51fa9430a4e18679d8b913ed2441182b5da2176"; + sha256 = "0r5kz4835srl8vgq8bhfx6qsqap6cbxnyk7247m5qy1j1hqdgchx"; + }; + meta.homepage = "https://github.com/echasnovski/mini.misc/"; + }; + + mini-move = buildVimPlugin { + pname = "mini.move"; + version = "2024-08-15"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.move"; + rev = "4caa1c212f5ca3d1633d21cfb184808090ed74b1"; + sha256 = "0f4nrg9n8air507h6bd61dmb1rjjhykyl36qgr0ai72cb011wzcx"; + }; + meta.homepage = "https://github.com/echasnovski/mini.move/"; + }; + + mini-notify = buildVimPlugin { + pname = "mini.notify"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.notify"; + rev = "a6101a5fa7eff7bdfbfc887ad9a331305729f0ec"; + sha256 = "1xkls37g2a6wfiyhhgaw0hzdrj602j1iv55b1a1l3pcj81w9p23l"; + }; + meta.homepage = "https://github.com/echasnovski/mini.notify/"; + }; + mini-nvim = buildVimPlugin { pname = "mini.nvim"; version = "2024-09-10"; @@ -6375,6 +6723,150 @@ final: prev: meta.homepage = "https://github.com/echasnovski/mini.nvim/"; }; + mini-operators = buildVimPlugin { + pname = "mini.operators"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.operators"; + rev = "7d30c0bc5baaa1f0d3a63dd18b35c8581bc164f4"; + sha256 = "0zghwk8rs7n9sgpssb2fbyrm8vnynwqa6ins2mshsirvmrbkz30z"; + }; + meta.homepage = "https://github.com/echasnovski/mini.operators/"; + }; + + mini-pairs = buildVimPlugin { + pname = "mini.pairs"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.pairs"; + rev = "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51"; + sha256 = "1016q19ndmzmbdaxi40w6wskhf91nc5qzbza6hyvcxdfpd81rl6q"; + }; + meta.homepage = "https://github.com/echasnovski/mini.pairs/"; + }; + + mini-pick = buildVimPlugin { + pname = "mini.pick"; + version = "2024-08-17"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.pick"; + rev = "2f0bdb96a3a1ef2a31a731e03b51fa97074df0d2"; + sha256 = "0ypz1zj3xpfwhx712i6dcwklmjriqbbg0kcq3zih1c3sz5la708m"; + }; + meta.homepage = "https://github.com/echasnovski/mini.pick/"; + }; + + mini-sessions = buildVimPlugin { + pname = "mini.sessions"; + version = "2024-08-10"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.sessions"; + rev = "3c80dcf01d9901ff3e4a40328bee8a44c65718b2"; + sha256 = "07kjgr31yd1kjlxhkaq3dy879s40c5zj89zjlxpspw0x49m167f8"; + }; + meta.homepage = "https://github.com/echasnovski/mini.sessions/"; + }; + + mini-splitjoin = buildVimPlugin { + pname = "mini.splitjoin"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.splitjoin"; + rev = "3e92f6764e770ba392325cad3a4497adcada695f"; + sha256 = "126z8rsyg3849ijix1siwq77f9slwr93l61rwg499flzja3incic"; + }; + meta.homepage = "https://github.com/echasnovski/mini.splitjoin/"; + }; + + mini-starter = buildVimPlugin { + pname = "mini.starter"; + version = "2024-07-02"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.starter"; + rev = "394994b2bec10a997c69575825d5c444957b9ff9"; + sha256 = "003fas6clkpql54w3lfqd088cy5cvd2iisl88adv54p3bfasppsp"; + }; + meta.homepage = "https://github.com/echasnovski/mini.starter/"; + }; + + mini-statusline = buildVimPlugin { + pname = "mini.statusline"; + version = "2024-08-12"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.statusline"; + rev = "85014aa9e4afe9a3ff1896ad768bf09584bff574"; + sha256 = "0aqf3wh0ibr4m9jjpi4p7vdfwc0knlm83axzlisy78x25xviks04"; + }; + meta.homepage = "https://github.com/echasnovski/mini.statusline/"; + }; + + mini-surround = buildVimPlugin { + pname = "mini.surround"; + version = "2024-08-17"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.surround"; + rev = "d8913ed23be0a1a4585ae34414821cc343a46174"; + sha256 = "182v214d8in864i3yirs7vg5lxb2kibfxpdh9cap14hbj4nbc6mi"; + }; + meta.homepage = "https://github.com/echasnovski/mini.surround/"; + }; + + mini-tabline = buildVimPlugin { + pname = "mini.tabline"; + version = "2024-08-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.tabline"; + rev = "27c38016a28b0efc375bbe11593391ca337849c1"; + sha256 = "0sxkyyb1igysj5n1cwa43m15dk307nj5d6njd93dmyrsawl4p0pw"; + }; + meta.homepage = "https://github.com/echasnovski/mini.tabline/"; + }; + + mini-test = buildVimPlugin { + pname = "mini.test"; + version = "2024-08-10"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.test"; + rev = "64bdbf6517032d29aab74525e212023631295a2f"; + sha256 = "02a6064sqdaajz99ga7sw7ijljlxjdd7v7i33razw2y3n5mx5f5d"; + }; + meta.homepage = "https://github.com/echasnovski/mini.test/"; + }; + + mini-trailspace = buildVimPlugin { + pname = "mini.trailspace"; + version = "2024-07-01"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.trailspace"; + rev = "c48d74a3cecf93f5adc6a7518c7ced60e6302895"; + sha256 = "0cywnra2v7hi76n3004wpv8r0w5qdpzwdmjrc21jv7hljq5q7av5"; + }; + meta.homepage = "https://github.com/echasnovski/mini.trailspace/"; + }; + + mini-visits = buildVimPlugin { + pname = "mini.visits"; + version = "2024-08-10"; + src = fetchFromGitHub { + owner = "echasnovski"; + repo = "mini.visits"; + rev = "76646d885b3700d594a8c4e6bca24b8cb79ff07f"; + sha256 = "0s4936yvjkv8l7hzzr8gs63h3a8f26y9lw2ibfn1fdyvpdp7nndk"; + }; + meta.homepage = "https://github.com/echasnovski/mini.visits/"; + }; + minimap-vim = buildVimPlugin { pname = "minimap.vim"; version = "2024-03-17"; @@ -10811,6 +11303,18 @@ final: prev: meta.homepage = "https://github.com/vim-syntastic/syntastic/"; }; + syntax-tree-surfer = buildVimPlugin { + pname = "syntax-tree-surfer"; + version = "2023-10-06"; + src = fetchFromGitHub { + owner = "ziontee113"; + repo = "syntax-tree-surfer"; + rev = "732ea6d0f868bcccd2f526be73afa46997d5a2fb"; + sha256 = "0x7kpmxq3n8531ca2bz506swww92wd3x16d125wrk54rxp1lv1cd"; + }; + meta.homepage = "https://github.com/ziontee113/syntax-tree-surfer/"; + }; + tabby-nvim = buildVimPlugin { pname = "tabby.nvim"; version = "2024-07-31"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index a544d4ad2131..2bfda55a474d 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1709,6 +1709,11 @@ }; }; + syntax-tree-surfer = super.syntax-tree-surfer.overrideAttrs { + dependencies = with self; [ nvim-treesitter ]; + meta.maintainers = with lib.maintainers; [ callumio ]; + }; + taskwarrior3 = buildVimPlugin { inherit (taskwarrior3) version pname; src = "${taskwarrior3.src}/scripts/vim"; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index cba86f4fee7c..1402e16e7d7e 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -532,7 +532,48 @@ https://github.com/lsig/messenger.nvim/,HEAD, https://github.com/xero/miasma.nvim/,, https://github.com/dasupradyumna/midnight.nvim/,, https://github.com/hadronized/mind.nvim/,HEAD, +https://github.com/echasnovski/mini-git/,HEAD, +https://github.com/echasnovski/mini.ai/,HEAD, +https://github.com/echasnovski/mini.align/,HEAD, +https://github.com/echasnovski/mini.animate/,HEAD, +https://github.com/echasnovski/mini.base16/,HEAD, +https://github.com/echasnovski/mini.basics/,HEAD, +https://github.com/echasnovski/mini.bracketed/,HEAD, +https://github.com/echasnovski/mini.bufremove/,HEAD, +https://github.com/echasnovski/mini.clue/,HEAD, +https://github.com/echasnovski/mini.colors/,HEAD, +https://github.com/echasnovski/mini.comment/,HEAD, +https://github.com/echasnovski/mini.completion/,HEAD, +https://github.com/echasnovski/mini.cursorword/,HEAD, +https://github.com/echasnovski/mini.deps/,HEAD, +https://github.com/echasnovski/mini.diff/,HEAD, +https://github.com/echasnovski/mini.doc/,HEAD, +https://github.com/echasnovski/mini.extra/,HEAD, +https://github.com/echasnovski/mini.files/,HEAD, +https://github.com/echasnovski/mini.fuzzy/,HEAD, +https://github.com/echasnovski/mini.hipatterns/,HEAD, +https://github.com/echasnovski/mini.hues/,HEAD, +https://github.com/echasnovski/mini.icons/,HEAD, +https://github.com/echasnovski/mini.indentscope/,HEAD, +https://github.com/echasnovski/mini.jump/,HEAD, +https://github.com/echasnovski/mini.jump2d/,HEAD, +https://github.com/echasnovski/mini.map/,HEAD, +https://github.com/echasnovski/mini.misc/,HEAD, +https://github.com/echasnovski/mini.move/,HEAD, +https://github.com/echasnovski/mini.notify/,HEAD, https://github.com/echasnovski/mini.nvim/,, +https://github.com/echasnovski/mini.operators/,HEAD, +https://github.com/echasnovski/mini.pairs/,HEAD, +https://github.com/echasnovski/mini.pick/,HEAD, +https://github.com/echasnovski/mini.sessions/,HEAD, +https://github.com/echasnovski/mini.splitjoin/,HEAD, +https://github.com/echasnovski/mini.starter/,HEAD, +https://github.com/echasnovski/mini.statusline/,HEAD, +https://github.com/echasnovski/mini.surround/,HEAD, +https://github.com/echasnovski/mini.tabline/,HEAD, +https://github.com/echasnovski/mini.test/,HEAD, +https://github.com/echasnovski/mini.trailspace/,HEAD, +https://github.com/echasnovski/mini.visits/,HEAD, https://github.com/wfxr/minimap.vim/,, https://github.com/jghauser/mkdir.nvim/,main, https://github.com/jakewvincent/mkdnflow.nvim/,HEAD, @@ -908,6 +949,7 @@ https://github.com/keith/swift.vim/,, https://github.com/AndrewRadev/switch.vim/,, https://github.com/simrat39/symbols-outline.nvim/,, https://github.com/vim-syntastic/syntastic/,, +https://github.com/ziontee113/syntax-tree-surfer/,HEAD, https://github.com/nanozuki/tabby.nvim/,HEAD, https://github.com/kdheepak/tabline.nvim/,, https://github.com/vim-scripts/tabmerge/,, diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix index 40355107b055..f4578e81f4f0 100644 --- a/pkgs/applications/networking/cluster/terraform/default.nix +++ b/pkgs/applications/networking/cluster/terraform/default.nix @@ -165,9 +165,9 @@ rec { mkTerraform = attrs: pluggable (generic attrs); terraform_1 = mkTerraform { - version = "1.9.5"; - hash = "sha256-fWyqBDvuBrwqgwi1WU4RsdWssKmaClNyP5zyUf+JmTU="; - vendorHash = "sha256-CAZUs1hxjHXcAteuVJZmkqwnMYUoIau++IFdD1b7yYY="; + version = "1.9.6"; + hash = "sha256-rlqpqiMlLcn2LqqKRU9iFaVqUz/QQtpiiZ39h5ZvpbI="; + vendorHash = "sha256-tH9KQF4oHcQh34ikB9Bx6fij/iLZN+waxv5ZilqGGlU="; patches = [ ./provider-path-0_15.patch ]; passthru = { inherit plugins; diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index f33ef641abf2..ba77425b5ef8 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -107,6 +107,14 @@ let hash = "sha256-d9XmXHq264rTT80zphYcKLxS+AyUhjb19D3DuBJvMI4="; fetchSubmodules = true; }; + + patches = [ + (fetchpatch { + name = "GCC14.patch"; + url = "https://github.com/mumble-voip/mumble/commit/56945a9dfb62d29dccfe561572ebf64500deaed1.patch"; + hash = "sha256-Frct9XJ/ZuHPglx+GB9h3vVycR8YY039dStIbfkPPDk="; + }) + ]; }; in { mumble = client source; diff --git a/pkgs/by-name/ba/basedpyright/package.nix b/pkgs/by-name/ba/basedpyright/package.nix index 8c3482676d3f..1fa304672947 100644 --- a/pkgs/by-name/ba/basedpyright/package.nix +++ b/pkgs/by-name/ba/basedpyright/package.nix @@ -11,13 +11,13 @@ }: let - version = "1.17.4"; + version = "1.17.5"; src = fetchFromGitHub { owner = "detachhead"; repo = "basedpyright"; rev = "refs/tags/v${version}"; - hash = "sha256-7lJUyn7UAY+wdbPXcLFz54m2Jl90EMZ6ieSPWysMoWE="; + hash = "sha256-DaNxPGY0ahTcluCnsEZNL2oP9zKWQlON8i1bxeJ5GnU="; }; patchedPackageJSON = runCommand "package.json" { } '' @@ -47,7 +47,7 @@ let pname = "pyright-internal"; inherit version src; sourceRoot = "${src.name}/packages/pyright-internal"; - npmDepsHash = "sha256-hd85cCpxx0vqtUXDUorHK8I9IbGZiwewI/RxKF/9ZNw="; + npmDepsHash = "sha256-A1XP2IMfQMI1fFk2leuvm/57MsK43Md6Kyag9dQVAdg="; dontNpmBuild = true; # Uncomment this flag when using unreleased peer dependencies # npmFlags = [ "--legacy-peer-deps" ]; @@ -94,7 +94,7 @@ buildNpmPackage rec { inherit version src; sourceRoot = "${src.name}/packages/pyright"; - npmDepsHash = "sha256-UKxFWhgarMdT24rFU5Ev+JoKbT6ByLnZ1CTKd34YrRE="; + npmDepsHash = "sha256-wvxwvPdTKcw4X8F5800ft4an7/xwmRPlL1Wzcm5jim8="; postPatch = '' chmod +w ../../ diff --git a/pkgs/by-name/li/libcsa/package.nix b/pkgs/by-name/li/libcsa/package.nix new file mode 100644 index 000000000000..5308a71d962d --- /dev/null +++ b/pkgs/by-name/li/libcsa/package.nix @@ -0,0 +1,30 @@ +{ + stdenv, + lib, + fetchFromGitHub, + unstableGitUpdater, +}: +stdenv.mkDerivation (finalAttrs: { + name = "csa"; + version = "1.26-unstable-2024-03-22"; + + src = fetchFromGitHub { + owner = "sakov"; + repo = "csa-c"; + rev = "7b48134613d1d3b337af6d5762df9999a703fb1a"; + hash = "sha256-G/VhXpdvXBT9I6pwiQXVqCoXhc29wJQpGyLeM3kgv7I="; + }; + + sourceRoot = "${finalAttrs.src.name}/csa"; + + passthru.updateScript = unstableGitUpdater { }; + + meta = with lib; { + description = "C code for cubic spline approximation of 2D scattered data"; + homepage = "https://github.com/sakov/csa-c/"; + platforms = platforms.unix; + license = licenses.bsd3; + maintainers = with maintainers; [ mkez ]; + mainProgram = "csabathy"; + }; +}) diff --git a/pkgs/by-name/re/remnote/package.nix b/pkgs/by-name/re/remnote/package.nix index 749fa25fbb15..5df3689928c1 100644 --- a/pkgs/by-name/re/remnote/package.nix +++ b/pkgs/by-name/re/remnote/package.nix @@ -6,10 +6,10 @@ }: let pname = "remnote"; - version = "1.16.111"; + version = "1.16.116"; src = fetchurl { url = "https://download2.remnote.io/remnote-desktop2/RemNote-${version}.AppImage"; - hash = "sha256-aelkdrILxe7Wf1BZmSIQ5XMJsyxHM9oW8h6DDzeA0uQ="; + hash = "sha256-H89ge4b8Xm6YJXQSiPA/FBnlbekAG0Vobr2EQ4459q4="; }; appimageContents = appimageTools.extractType2 { inherit pname version src; }; in diff --git a/pkgs/by-name/sa/sanjuuni/package.nix b/pkgs/by-name/sa/sanjuuni/package.nix index 413c8b2f4695..231714941462 100644 --- a/pkgs/by-name/sa/sanjuuni/package.nix +++ b/pkgs/by-name/sa/sanjuuni/package.nix @@ -7,6 +7,7 @@ poco, ocl-icd, opencl-clhpp, + gitUpdater, callPackage, }: @@ -38,8 +39,11 @@ stdenv.mkDerivation rec { runHook postInstall ''; - passthru.tests = { - run-on-nixos-artwork = callPackage ./tests/run-on-nixos-artwork.nix { }; + passthru = { + tests = { + run-on-nixos-artwork = callPackage ./tests/run-on-nixos-artwork.nix { }; + }; + updateScript = gitUpdater { }; }; meta = with lib; { diff --git a/pkgs/by-name/st/stu/package.nix b/pkgs/by-name/st/stu/package.nix index fa931ff011d4..ab74d428cc50 100644 --- a/pkgs/by-name/st/stu/package.nix +++ b/pkgs/by-name/st/stu/package.nix @@ -8,7 +8,7 @@ testers, }: let - version = "0.5.2"; + version = "0.6.2"; in rustPlatform.buildRustPackage { pname = "stu"; @@ -18,10 +18,10 @@ rustPlatform.buildRustPackage { owner = "lusingander"; repo = "stu"; rev = "v${version}"; - hash = "sha256-R+ebDW6qkYK92seQHCWGKby544UrNGg+CfdK1NLIwas="; + hash = "sha256-fxVnOftYkl4G6H+jMSy6r/YQgmK15EjKAjdf8MdoaS0="; }; - cargoHash = "sha256-6uporgZTii97xLdEt7KXuSxoRMmFOGEGU3bPXP7Z14g="; + cargoHash = "sha256-/a91ONvKG6aRFAnHDkpOQQFtfGlO1WahWM9LdPs75iw="; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit diff --git a/pkgs/by-name/su/surrealdb/package.nix b/pkgs/by-name/su/surrealdb/package.nix index 2dfa4012fcde..9a0c443faa83 100644 --- a/pkgs/by-name/su/surrealdb/package.nix +++ b/pkgs/by-name/su/surrealdb/package.nix @@ -16,16 +16,16 @@ let in rustPlatform.buildRustPackage rec { pname = "surrealdb"; - version = "1.5.5"; + version = "2.0.1"; src = fetchFromGitHub { owner = "surrealdb"; repo = "surrealdb"; rev = "v${version}"; - hash = "sha256-C2ppLbNv68qpl2bcqWp/PszcCeGCsD0LbEdAM9P1asg="; + hash = "sha256-JFkTD/MGvak8EuDEABGH1xLykSNj4rtnnENAruls6W8="; }; - cargoHash = "sha256-gLepa9JxY9AYyGepV6Uzt1g7apkKWJxf0SiNCSkjUDg="; + cargoHash = "sha256-N/4VHvBA9ij+VLPxJ+1237fnOHGoC6guZ62CYrwfHM4="; # error: linker `aarch64-linux-gnu-gcc` not found postPatch = '' diff --git a/pkgs/by-name/tl/tlclient/package.nix b/pkgs/by-name/tl/tlclient/package.nix new file mode 100644 index 000000000000..a789d391ccbe --- /dev/null +++ b/pkgs/by-name/tl/tlclient/package.nix @@ -0,0 +1,79 @@ +{ + lib, + stdenv, + fetchurl, + autoPatchelfHook, + alsa-lib, + libX11, + pcsclite, + testers, +}: + +stdenv.mkDerivation ( + finalAttrs: + let + version = "4.17.0"; + buildNum = "3543"; + in + { + pname = "tlclient"; + version = "${version}-${buildNum}"; + + src = fetchurl { + url = "https://www.cendio.com/downloads/clients/tl-${finalAttrs.version}-client-linux-dynamic-x86_64.tar.gz"; + hash = "sha256-7pl97xGNFwSDpWMpBvkz/bfMsWquVsJVGB+feWJvRQY="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + ]; + + buildInputs = [ + alsa-lib + libX11 + pcsclite + ]; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + cp -R lib "$out/" + cp -R lib/tlclient/share "$out/" + + install -Dm644 "lib/tlclient/EULA.txt" "$out/share/licenses/tlclient/EULA.txt" + install -m644 "lib/tlclient/open_source_licenses.txt" "$out/share/licenses/tlclient/open_source_licenses.txt" + substituteInPlace "$out/share/applications/thinlinc-client.desktop" \ + --replace-fail "/opt/thinlinc/bin/" "" + + install -Dm644 "etc/tlclient.conf" "$out/etc/tlclient.conf" + install -Dm755 bin/tlclient* -t "$out/bin" + install -Dm644 "lib/tlclient/thinlinc_128.png" "$out/share/icons/hicolor/128x128/apps/thinlinc-client.png" + + runHook postInstall + ''; + + passthru.tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + version = "${version} build ${buildNum}"; + }; + + meta = { + description = "Linux remote desktop client built on open source technology"; + license = { + fullName = "Cendio End User License Agreement 3.2"; + url = "https://www.cendio.com/thinlinc/docs/legal/eula"; + free = false; + }; + homepage = "https://www.cendio.com/"; + changelog = "https://www.cendio.com/thinlinc/docs/relnotes/${version}/"; + maintainers = with lib.maintainers; [ felixalbrigtsen ]; + platforms = with lib.platforms; linux ++ darwin ++ windows; + broken = !(stdenv.isLinux && stdenv.isx86_64); + mainProgram = "tlclient"; + }; + } +) diff --git a/pkgs/by-name/tr/troubadix/package.nix b/pkgs/by-name/tr/troubadix/package.nix index 2990037a28db..ba0db2dfd33f 100644 --- a/pkgs/by-name/tr/troubadix/package.nix +++ b/pkgs/by-name/tr/troubadix/package.nix @@ -7,14 +7,14 @@ python3.pkgs.buildPythonApplication rec { pname = "troubadix"; - version = "24.8.2"; + version = "24.9.2"; pyproject = true; src = fetchFromGitHub { owner = "greenbone"; repo = "troubadix"; rev = "refs/tags/v${version}"; - hash = "sha256-rBExXotfI4uG4ns3x1cJTQ0PGABG7ZlziBrqcsa3dOg="; + hash = "sha256-nFzrOSaq0U6qapmk59iAK3N0gQag1fMaew3LtOK+neY="; }; pythonRelaxDeps = [ "validators" ]; diff --git a/pkgs/development/libraries/mesa/common.nix b/pkgs/development/libraries/mesa/common.nix index 461dfb2fb64d..70c72ce58d0d 100644 --- a/pkgs/development/libraries/mesa/common.nix +++ b/pkgs/development/libraries/mesa/common.nix @@ -27,9 +27,9 @@ rec { complete hardware acceleration for modern GPUs. ''; homepage = "https://www.mesa3d.org/"; - changelog = "https://www.mesa3d.org/relnotes/${version}.html"; + changelog = "https://docs.mesa3d.org/relnotes/${version}.html"; license = with lib.licenses; [ mit ]; # X11 variant, in most files platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ primeos vcunat ]; # Help is welcome :) + maintainers = with lib.maintainers; [ k900 primeos vcunat ]; # Help is welcome :) }; } diff --git a/pkgs/development/libraries/pico-sdk/default.nix b/pkgs/development/libraries/pico-sdk/default.nix index 0e702510823b..259e47426b76 100644 --- a/pkgs/development/libraries/pico-sdk/default.nix +++ b/pkgs/development/libraries/pico-sdk/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "pico-sdk"; - version = "1.5.1"; + version = "2.0.0"; src = fetchFromGitHub { owner = "raspberrypi"; @@ -22,9 +22,9 @@ stdenv.mkDerivation (finalAttrs: { rev = finalAttrs.version; fetchSubmodules = withSubmodules; hash = if (withSubmodules) then - "sha256-GY5jjJzaENL3ftuU5KpEZAmEZgyFRtLwGVg3W1e/4Ho=" + "sha256-fVSpBVmjeP5pwkSPhhSCfBaEr/FEtA82mQOe/cHFh0A=" else - "sha256-JNcxd86XNNiPkvipVFR3X255boMmq+YcuJXUP4JwInU="; + "sha256-d6mEjuG8S5jvJS4g8e90gFII3sEqUVlT2fgd9M9LUkA="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/python-modules/ailment/default.nix b/pkgs/development/python-modules/ailment/default.nix index 0843f8338076..30998bc2ad47 100644 --- a/pkgs/development/python-modules/ailment/default.nix +++ b/pkgs/development/python-modules/ailment/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "ailment"; - version = "9.2.117"; + version = "9.2.118"; pyproject = true; disabled = pythonOlder "3.11"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "angr"; repo = "ailment"; rev = "refs/tags/v${version}"; - hash = "sha256-OYbLaMtelNxohrOfb4A9NC9Zado+0qvm3i2zgkgt6p4="; + hash = "sha256-wpH3hO5ge6WiUe3DxVMPylzTdTuqrmK4+ky1JkwGBY0="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/angr/default.nix b/pkgs/development/python-modules/angr/default.nix index 2f93cb48fc36..f9039ea24a8e 100644 --- a/pkgs/development/python-modules/angr/default.nix +++ b/pkgs/development/python-modules/angr/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { pname = "angr"; - version = "9.2.117"; + version = "9.2.118"; pyproject = true; disabled = pythonOlder "3.11"; @@ -45,7 +45,7 @@ buildPythonPackage rec { owner = "angr"; repo = "angr"; rev = "refs/tags/v${version}"; - hash = "sha256-woIid0DdaZqn7BZJrQ3UoOfGC1cP8r+t+++Sw8ZtX80="; + hash = "sha256-vysSt1YAXjmzhhP6ZYwaxI7K8x844YBSSg9Wp2xH1pI="; }; pythonRelaxDeps = [ "capstone" ]; diff --git a/pkgs/development/python-modules/archinfo/default.nix b/pkgs/development/python-modules/archinfo/default.nix index 2d041f545901..6d64836ee055 100644 --- a/pkgs/development/python-modules/archinfo/default.nix +++ b/pkgs/development/python-modules/archinfo/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "archinfo"; - version = "9.2.117"; + version = "9.2.118"; pyproject = true; disabled = pythonOlder "3.8"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "angr"; repo = "archinfo"; rev = "refs/tags/v${version}"; - hash = "sha256-eMhj+OQEfkD4AgwNEEVil7p/XoaREsM+72/bN72XnzE="; + hash = "sha256-ravf2/FyPxGw7eThzkVRTLD8zhjX5vUXzb+LVO+KVxU="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/claripy/default.nix b/pkgs/development/python-modules/claripy/default.nix index 18eebebd220a..618624295907 100644 --- a/pkgs/development/python-modules/claripy/default.nix +++ b/pkgs/development/python-modules/claripy/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "claripy"; - version = "9.2.117"; + version = "9.2.118"; pyproject = true; disabled = pythonOlder "3.11"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "angr"; repo = "claripy"; rev = "refs/tags/v${version}"; - hash = "sha256-f9rb5UvkEB3SkxqFQI82m4RrY6jWnD7YTjIGLVSx4gk="; + hash = "sha256-1VIWdKQD6wtYd6LHQ7vW1Ol3W+ZGB+xHhSMZ9EiNev8="; }; # z3 does not provide a dist-info, so python-runtime-deps-check will fail diff --git a/pkgs/development/python-modules/cle/default.nix b/pkgs/development/python-modules/cle/default.nix index 35be77a8a496..6f7614aa917d 100644 --- a/pkgs/development/python-modules/cle/default.nix +++ b/pkgs/development/python-modules/cle/default.nix @@ -18,14 +18,14 @@ let # The binaries are following the argr projects release cycle - version = "9.2.117"; + version = "9.2.118"; # Binary files from https://github.com/angr/binaries (only used for testing and only here) binaries = fetchFromGitHub { owner = "angr"; repo = "binaries"; rev = "refs/tags/v${version}"; - hash = "sha256-yTCE0QjUoHIGW0xJvCsC01w75SxzTW2zQ/UUhSqY1mQ="; + hash = "sha256-3XucYC7FKJ0WQI6fsKxMTCIdROjZcnTKpTi3ZRfiQkU="; }; in buildPythonPackage rec { @@ -39,7 +39,7 @@ buildPythonPackage rec { owner = "angr"; repo = "cle"; rev = "refs/tags/v${version}"; - hash = "sha256-WpMfHd5mHZp9hp8twYjiIbDCk61LWBF4lJpHZnnIfjk="; + hash = "sha256-izDaikc4WR/6fdgrc3TJze+DLe7NOtSNWue9HrTz18Q="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix index 35e307e7e5ac..09689a844751 100644 --- a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix +++ b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { pname = "cyclonedx-python-lib"; - version = "7.6.0"; + version = "7.6.1"; pyproject = true; disabled = pythonOlder "3.9"; @@ -32,7 +32,7 @@ buildPythonPackage rec { owner = "CycloneDX"; repo = "cyclonedx-python-lib"; rev = "refs/tags/v${version}"; - hash = "sha256-4778eTsgHxVnbJiFvZdOIXtRUeZ0S3nANEGC3eNlEpU="; + hash = "sha256-KvP3msV2qIn26pSLv0XrxnwqRx7uWcllLTJg9vig5V0="; }; pythonRelaxDeps = [ "py-serializable" ]; diff --git a/pkgs/development/python-modules/equinox/default.nix b/pkgs/development/python-modules/equinox/default.nix index 831241312a9b..80f1b114f473 100644 --- a/pkgs/development/python-modules/equinox/default.nix +++ b/pkgs/development/python-modules/equinox/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "equinox"; - version = "0.11.6"; + version = "0.11.7"; pyproject = true; src = fetchFromGitHub { owner = "patrick-kidger"; repo = "equinox"; rev = "refs/tags/v${version}"; - hash = "sha256-Ee715otEKmXbXwZ2umrJN3HlIjabQao8hl6MRGqJnNw="; + hash = "sha256-0waIpsVWoABtf4M0IOie9nJDk+e75ArTVmGqYg9AlnI="; }; build-system = [ hatchling ]; diff --git a/pkgs/development/python-modules/huggingface-hub/default.nix b/pkgs/development/python-modules/huggingface-hub/default.nix index 229daf9b15e2..bec0a7fefc25 100644 --- a/pkgs/development/python-modules/huggingface-hub/default.nix +++ b/pkgs/development/python-modules/huggingface-hub/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "huggingface-hub"; - version = "0.24.7"; + version = "0.25.0"; pyproject = true; src = fetchFromGitHub { owner = "huggingface"; repo = "huggingface_hub"; rev = "refs/tags/v${version}"; - hash = "sha256-7JW98PVJy3dKn3V+JmyxCZJplFUpqPckMbOJR45ZH7o="; + hash = "sha256-N/c/aTUWHolQ1TWVOoyfQ3eCLOSX3/6qtXk1T918/wg="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/ndspy/default.nix b/pkgs/development/python-modules/ndspy/default.nix index 2a5ef941e1b3..e6539d7caecb 100644 --- a/pkgs/development/python-modules/ndspy/default.nix +++ b/pkgs/development/python-modules/ndspy/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "ndspy"; - version = "4.1.0"; + version = "4.2.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -16,8 +16,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "RoadrunnerWMC"; repo = pname; - rev = "v${version}"; - hash = "sha256-V7phRZCA0WbUpYLgS/4nJbje/JM61RksDUZQ2pnbQyU="; + rev = "refs/tags/v${version}"; + hash = "sha256-PQONVEuh5Fg2LHr4gq0XTGcOpps/s9FSgoyDn4BCcik="; }; nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/openai/default.nix b/pkgs/development/python-modules/openai/default.nix index 9c54fe5daf4d..5583f0a42614 100644 --- a/pkgs/development/python-modules/openai/default.nix +++ b/pkgs/development/python-modules/openai/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { pname = "openai"; - version = "1.45.1"; + version = "1.46.0"; pyproject = true; disabled = pythonOlder "3.7.1"; @@ -44,7 +44,7 @@ buildPythonPackage rec { owner = "openai"; repo = "openai-python"; rev = "refs/tags/v${version}"; - hash = "sha256-2oO87J/Z3VGmBHJE2vBEvEtKa1XHQ6uWZfQTxwzHpMk="; + hash = "sha256-f8t/6T7IwWgt3WjMMdx04dunR7i4j6FBDN/abuGlEU0="; }; build-system = [ diff --git a/pkgs/development/python-modules/pydaikin/default.nix b/pkgs/development/python-modules/pydaikin/default.nix index a11d99332351..140a13f6678d 100644 --- a/pkgs/development/python-modules/pydaikin/default.nix +++ b/pkgs/development/python-modules/pydaikin/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "pydaikin"; - version = "2.13.6"; + version = "2.13.7"; pyproject = true; disabled = pythonOlder "3.11"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "fredrike"; repo = "pydaikin"; rev = "refs/tags/v${version}"; - hash = "sha256-b1dvPrtvYJuTZNUase4GgXFGq69QKJZoxUr2iuYShxk="; + hash = "sha256-pLr878LbflRlHzDjarwDLQFHbRZjRvlAZEqP1tfVBNA="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/pysmlight/default.nix b/pkgs/development/python-modules/pysmlight/default.nix index 3e4d7c24a4da..b0d7af3acaef 100644 --- a/pkgs/development/python-modules/pysmlight/default.nix +++ b/pkgs/development/python-modules/pysmlight/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "pysmlight"; - version = "0.0.16"; + version = "0.1.0"; pyproject = true; src = fetchFromGitHub { owner = "smlight-tech"; repo = "pysmlight"; rev = "refs/tags/v${version}"; - hash = "sha256-TjFMK14uWkguZpF5siWG/zoOBUuCxtDnfX7+QpRKDh8="; + hash = "sha256-qpE2bKEuCfhELKtYEstGAL5h01J/8qH3mE5c0LQtaHE="; }; build-system = [ poetry-core ]; diff --git a/pkgs/development/python-modules/pyturbojpeg/default.nix b/pkgs/development/python-modules/pyturbojpeg/default.nix index fbf8c658ca41..eb08b2e9873e 100644 --- a/pkgs/development/python-modules/pyturbojpeg/default.nix +++ b/pkgs/development/python-modules/pyturbojpeg/default.nix @@ -12,20 +12,20 @@ buildPythonPackage rec { pname = "pyturbojpeg"; - version = "1.7.6"; + version = "1.7.7"; pyproject = true; src = fetchFromGitHub { owner = "lilohuang"; repo = "PyTurboJPEG"; rev = "refs/tags/v${version}"; - hash = "sha256-dRogPQcDKRgHDiP7fA8uRCV65cUheuF4ZQfKSd+TKd4="; + hash = "sha256-JPjGZGVMZH6sDNRdV6kWsCpEjLT2aMrTy+bI4mRbdpw="; }; patches = [ (substituteAll { src = ./lib-path.patch; - libturbojpeg = "${libjpeg_turbo.out}/lib/libturbojpeg${stdenv.hostPlatform.extensions.sharedLibrary}"; + libturbojpeg = "${lib.getLib libjpeg_turbo}/lib/libturbojpeg${stdenv.hostPlatform.extensions.sharedLibrary}"; }) ]; diff --git a/pkgs/development/python-modules/pyvex/default.nix b/pkgs/development/python-modules/pyvex/default.nix index 5126815dbb0a..4fe56684d50e 100644 --- a/pkgs/development/python-modules/pyvex/default.nix +++ b/pkgs/development/python-modules/pyvex/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pyvex"; - version = "9.2.117"; + version = "9.2.118"; pyproject = true; disabled = pythonOlder "3.11"; src = fetchPypi { inherit pname version; - hash = "sha256-hW5uCploPx7+Q8RYZSm6bp/SkbPftkfMkhLvBjHJuBc="; + hash = "sha256-LRJSecKAQAg5Axfi8h//cc3xozOiPUkZD49VJIE6shE="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/ray/binary-hashes.nix b/pkgs/development/python-modules/ray/binary-hashes.nix index f8f7bfdcc258..5d5a474d49dd 100644 --- a/pkgs/development/python-modules/ray/binary-hashes.nix +++ b/pkgs/development/python-modules/ray/binary-hashes.nix @@ -1,11 +1,11 @@ { cp310 = { - hash = "sha256-GZSq+Zlv/EUBmFZUXoF9UnrVcnYvGvdq1mmuTnhvz9Y="; + hash = "sha256-LaTzHub21e+qDQs4/sxCIVzaE8leAVs8y4P1jighkT8="; }; cp311 = { - hash = "sha256-WHr1cMvl9s7cqFTxUQd0DmPGcge+6QBxPLLuOPbr8g8="; + hash = "sha256-Iym0IdxjsC4w5GV497RQfufdjMV/NbdGgQG9xkdy+js="; }; cp312 = { - hash = "sha256-LKGg3kHURi/XZFmKWYHPVfyVVZnzj5oa4Qho6Uxt2A0="; + hash = "sha256-KXAxrkdyHKzX9pgpTTZ2PiwsXEeac0BFG6dQOkJ0seU="; }; } diff --git a/pkgs/development/python-modules/ray/default.nix b/pkgs/development/python-modules/ray/default.nix index 4c97f1d8ae34..a2fe1808201b 100644 --- a/pkgs/development/python-modules/ray/default.nix +++ b/pkgs/development/python-modules/ray/default.nix @@ -56,7 +56,7 @@ let pname = "ray"; - version = "2.35.0"; + version = "2.36.0"; in buildPythonPackage rec { inherit pname version; diff --git a/pkgs/development/python-modules/sentence-transformers/default.nix b/pkgs/development/python-modules/sentence-transformers/default.nix index 7b870da88879..2b0177ffc3c4 100644 --- a/pkgs/development/python-modules/sentence-transformers/default.nix +++ b/pkgs/development/python-modules/sentence-transformers/default.nix @@ -1,35 +1,41 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, + + # build-system + setuptools, + + # dependencies huggingface-hub, nltk, numpy, - pytestCheckHook, - pythonOlder, scikit-learn, scipy, sentencepiece, - setuptools, tokenizers, torch, - torchvision, tqdm, transformers, + + # tests + accelerate, + datasets, + pytestCheckHook, + pytest-cov, }: buildPythonPackage rec { pname = "sentence-transformers"; - version = "2.7.0"; + version = "3.1.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "UKPLab"; repo = "sentence-transformers"; rev = "refs/tags/v${version}"; - hash = "sha256-xER+WHprW83KWJ0bom+lTn0HNU7PgGROnp/QLG1uUcw="; + hash = "sha256-Kp0B3+1zK45KypCaxH02U/JdzTBGwFAoxtmzek94QNI="; }; build-system = [ setuptools ]; @@ -43,39 +49,56 @@ buildPythonPackage rec { sentencepiece tokenizers torch - torchvision tqdm transformers ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + accelerate + datasets + pytestCheckHook + pytest-cov + ]; pythonImportsCheck = [ "sentence_transformers" ]; disabledTests = [ # Tests require network access - "test_simple_encode" - "test_paraphrase_mining" "test_cmnrl_same_grad" "test_LabelAccuracyEvaluator" + "test_model_card_reuse" + "test_paraphrase_mining" "test_ParaphraseMiningEvaluator" + "test_simple_encode" + "test_trainer" + "test_trainer_invalid_column_names" + "test_trainer_multi_dataset_errors" ]; disabledTestPaths = [ # Tests require network access + "tests/evaluation/test_information_retrieval_evaluator.py" + "tests/test_compute_embeddings.py" + "tests/test_cross_encoder.py" + "tests/test_model_card_data.py" + "tests/test_multi_process.py" "tests/test_pretrained_stsb.py" "tests/test_sentence_transformer.py" - "tests/test_compute_embeddings.py" - "tests/test_multi_process.py" - "tests/test_cross_encoder.py" "tests/test_train_stsb.py" ]; - meta = with lib; { + # Sentence-transformer needs a writable hf_home cache + postInstall = '' + export HF_HOME=$(mktemp -d) + ''; + + meta = { description = "Multilingual Sentence & Image Embeddings with BERT"; homepage = "https://github.com/UKPLab/sentence-transformers"; changelog = "https://github.com/UKPLab/sentence-transformers/releases/tag/${version}"; - license = licenses.asl20; - maintainers = with maintainers; [ dit7ya ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ dit7ya ]; + # Segmentation fault at import + broken = stdenv.hostPlatform.system == "x86_64-darwin"; }; } diff --git a/pkgs/development/python-modules/snowflake-connector-python/default.nix b/pkgs/development/python-modules/snowflake-connector-python/default.nix index cdf0c3d9a2a4..0dd9835e617b 100644 --- a/pkgs/development/python-modules/snowflake-connector-python/default.nix +++ b/pkgs/development/python-modules/snowflake-connector-python/default.nix @@ -5,19 +5,20 @@ certifi, cffi, charset-normalizer, + cryptography, cython, - fetchPypi, + fetchFromGitHub, filelock, idna, keyring, - oscrypto, packaging, pandas, platformdirs, pyarrow, - pycryptodomex, pyjwt, pyopenssl, + pytest-xdist, + pytestCheckHook, pythonOlder, pytz, requests, @@ -25,7 +26,6 @@ sortedcontainers, tomlkit, typing-extensions, - wheel, }: buildPythonPackage rec { @@ -35,30 +35,28 @@ buildPythonPackage rec { disabled = pythonOlder "3.8"; - src = fetchPypi { - pname = "snowflake_connector_python"; - inherit version; - hash = "sha256-/ZvCqxv1OE0si2W8ALsEdVV9UvBHenESkzSqtT+Wef0="; + src = fetchFromGitHub { + owner = "snowflakedb"; + repo = "snowflake-connector-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-A6QnKCROd1vJpFCTrLEoHVo43xojdjpgYS3qQm64gcY="; }; build-system = [ cython setuptools - wheel ]; - dependencies = [ asn1crypto certifi cffi charset-normalizer + cryptography filelock idna - oscrypto packaging platformdirs - pycryptodomex pyjwt pyopenssl pytz @@ -68,7 +66,7 @@ buildPythonPackage rec { typing-extensions ]; - passthru.optional-dependencies = { + optional-dependencies = { pandas = [ pandas pyarrow @@ -76,9 +74,35 @@ buildPythonPackage rec { secure-local-storage = [ keyring ]; }; - # Tests require encrypted secrets, see - # https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters - doCheck = false; + preCheck = '' + export HOME=$(mktemp -d) + ''; + + nativeCheckInputs = [ + pytest-xdist + pytestCheckHook + ]; + + disabledTestPaths = [ + # Tests require encrypted secrets, see + # https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters + "test/extras/simple_select1.py" + "test/integ" + # error getting schema from stream, error code: 0, error info: Expected to + # be able to read 19504 bytes for message body but got 19503 + "test/unit/test_connection.py" + "test/unit/test_cursor.py" + "test/unit/test_error_arrow_stream.py" + "test/unit/test_ocsp.py" + "test/unit/test_retry_network.py" + "test/unit/test_s3_util.py" + ]; + + disabledTests = [ + # Tests connect to the internet + "test_status_when_num_of_chunks_is_zero" + "test_test_socket_get_cert" + ]; pythonImportsCheck = [ "snowflake" diff --git a/pkgs/development/python-modules/tinygrad/default.nix b/pkgs/development/python-modules/tinygrad/default.nix index cd322ecfacde..387ee633264e 100644 --- a/pkgs/development/python-modules/tinygrad/default.nix +++ b/pkgs/development/python-modules/tinygrad/default.nix @@ -11,38 +11,43 @@ ocl-icd, stdenv, rocmPackages, + # build-system setuptools, - wheel, + # dependencies numpy, - tqdm, - # nativeCheckInputs + + # tests + blobfile, + bottle, clang, hexdump, hypothesis, librosa, onnx, pillow, + pydot, pytest-xdist, pytestCheckHook, safetensors, sentencepiece, tiktoken, torch, + tqdm, transformers, }: buildPythonPackage rec { pname = "tinygrad"; - version = "0.9.0"; + version = "0.9.2"; pyproject = true; src = fetchFromGitHub { owner = "tinygrad"; repo = "tinygrad"; rev = "refs/tags/v${version}"; - hash = "sha256-opBxciETZruZjHqz/3vO7rogzjvVJKItulIiok/Zs2Y="; + hash = "sha256-fCKtJhZtqq6yjc6m41uvikzM9GArUlB8Q7jN/Np8+SM="; }; patches = [ @@ -62,29 +67,20 @@ buildPythonPackage rec { substituteInPlace tinygrad/runtime/autogen/opencl.py \ --replace-fail "ctypes.util.find_library('OpenCL')" "'${ocl-icd}/lib/libOpenCL.so'" '' - # hipGetDevicePropertiesR0600 is a symbol from rocm-6. We are currently at rocm-5. - # We are not sure that this works. Remove when rocm gets updated to version 6. + lib.optionalString rocmSupport '' - substituteInPlace extra/hip_gpu_driver/hip_ioctl.py \ - --replace-fail "processor = platform.processor()" "processor = ${stdenv.hostPlatform.linuxArch}" substituteInPlace tinygrad/runtime/autogen/hip.py \ --replace-fail "/opt/rocm/lib/libamdhip64.so" "${rocmPackages.clr}/lib/libamdhip64.so" \ --replace-fail "/opt/rocm/lib/libhiprtc.so" "${rocmPackages.clr}/lib/libhiprtc.so" \ - --replace-fail "hipGetDevicePropertiesR0600" "hipGetDeviceProperties" substituteInPlace tinygrad/runtime/autogen/comgr.py \ --replace-fail "/opt/rocm/lib/libamd_comgr.so" "${rocmPackages.rocm-comgr}/lib/libamd_comgr.so" ''; - build-system = [ - setuptools - wheel - ]; + build-system = [ setuptools ]; dependencies = [ numpy - tqdm ] ++ lib.optionals stdenv.isDarwin [ # pyobjc-framework-libdispatch @@ -94,18 +90,22 @@ buildPythonPackage rec { pythonImportsCheck = [ "tinygrad" ]; nativeCheckInputs = [ + blobfile + bottle clang hexdump hypothesis librosa onnx pillow + pydot pytest-xdist pytestCheckHook safetensors sentencepiece tiktoken torch + tqdm transformers ]; @@ -115,6 +115,10 @@ buildPythonPackage rec { disabledTests = [ + # flaky: https://github.com/tinygrad/tinygrad/issues/6542 + # TODO: re-enable when https://github.com/tinygrad/tinygrad/pull/6560 gets merged + "test_broadcastdot" + # Require internet access "test_benchmark_openpilot_model" "test_bn_alone" @@ -129,12 +133,14 @@ buildPythonPackage rec { "test_e2e_big" "test_fetch_small" "test_huggingface_enet_safetensors" + "test_index_mnist" "test_linear_mnist" "test_load_convnext" "test_load_enet" "test_load_enet_alt" "test_load_llama2bfloat" "test_load_resnet" + "test_mnist_val" "test_openpilot_model" "test_resnet" "test_shufflenet" @@ -148,32 +154,28 @@ buildPythonPackage rec { ] # Fail on aarch64-linux with AssertionError ++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [ - "test_casts_to" - "test_casts_to" - "test_int8_to_uint16_negative" - "test_casts_to" - "test_casts_to" "test_casts_from" "test_casts_to" "test_int8" - "test_casts_to" + "test_int8_to_uint16_negative" ]; - disabledTestPaths = - [ - # Require internet access - "test/models/test_mnist.py" - "test/models/test_real_world.py" - "test/testextra/test_lr_scheduler.py" - ] - ++ lib.optionals (!rocmSupport) [ "extra/hip_gpu_driver/" ]; + disabledTestPaths = [ + # Require internet access + "test/models/test_mnist.py" + "test/models/test_real_world.py" + "test/testextra/test_lr_scheduler.py" - meta = with lib; { + # Files under this directory are not considered as tests by upstream and should be skipped + "extra/" + ]; + + meta = { description = "Simple and powerful neural network framework"; homepage = "https://github.com/tinygrad/tinygrad"; changelog = "https://github.com/tinygrad/tinygrad/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ GaetanLepage ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ GaetanLepage ]; # Requires unpackaged pyobjc-framework-libdispatch and pyobjc-framework-metal broken = stdenv.isDarwin; }; diff --git a/pkgs/development/python-modules/tinygrad/fix-dlopen-cuda.patch b/pkgs/development/python-modules/tinygrad/fix-dlopen-cuda.patch index 6b77173b4ecc..db74eab45bc0 100644 --- a/pkgs/development/python-modules/tinygrad/fix-dlopen-cuda.patch +++ b/pkgs/development/python-modules/tinygrad/fix-dlopen-cuda.patch @@ -1,32 +1,49 @@ diff --git a/tinygrad/runtime/autogen/cuda.py b/tinygrad/runtime/autogen/cuda.py -index 359083a9..3cd5f7be 100644 +index a30c8f53..e2078ff6 100644 --- a/tinygrad/runtime/autogen/cuda.py +++ b/tinygrad/runtime/autogen/cuda.py -@@ -143,10 +143,25 @@ def char_pointer_cast(string, encoding='utf-8'): - return ctypes.cast(string, ctypes.POINTER(ctypes.c_char)) +@@ -145,7 +145,19 @@ def char_pointer_cast(string, encoding='utf-8'): -+NAME_TO_PATHS = { -+ "libcuda.so": ["@driverLink@/lib/libcuda.so"], -+ "libnvrtc.so": ["@libnvrtc@"], -+} -+def _try_dlopen(name): -+ try: -+ return ctypes.CDLL(name) -+ except OSError: -+ pass -+ for candidate in NAME_TO_PATHS.get(name, []): -+ try: -+ return ctypes.CDLL(candidate) -+ except OSError: -+ pass -+ raise RuntimeError(f"{name} not found") - _libraries = {} -_libraries['libcuda.so'] = ctypes.CDLL(ctypes.util.find_library('cuda')) --_libraries['libnvrtc.so'] = ctypes.CDLL(ctypes.util.find_library('nvrtc')) -+_libraries['libcuda.so'] = _try_dlopen('libcuda.so') -+_libraries['libnvrtc.so'] = _try_dlopen('libnvrtc.so') ++libcuda = None ++try: ++ libcuda = ctypes.CDLL('libcuda.so') ++except OSError: ++ pass ++try: ++ libcuda = ctypes.CDLL('@driverLink@/lib/libcuda.so') ++except OSError: ++ pass ++if libcuda is None: ++ raise RuntimeError(f"`libcuda.so` not found") ++ ++_libraries['libcuda.so'] = libcuda cuuint32_t = ctypes.c_uint32 +diff --git a/tinygrad/runtime/autogen/nvrtc.py b/tinygrad/runtime/autogen/nvrtc.py +index 6af74187..c5a6c6c4 100644 +--- a/tinygrad/runtime/autogen/nvrtc.py ++++ b/tinygrad/runtime/autogen/nvrtc.py +@@ -10,7 +10,18 @@ import ctypes, ctypes.util + + + _libraries = {} +-_libraries['libnvrtc.so'] = ctypes.CDLL(ctypes.util.find_library('nvrtc')) ++libnvrtc = None ++try: ++ libnvrtc = ctypes.CDLL('libnvrtc.so') ++except OSError: ++ pass ++try: ++ libnvrtc = ctypes.CDLL('@libnvrtc@') ++except OSError: ++ pass ++if libnvrtc is None: ++ raise RuntimeError(f"`libnvrtc.so` not found") ++_libraries['libnvrtc.so'] = ctypes.CDLL(libnvrtc) + def string_cast(char_pointer, encoding='utf-8', errors='strict'): + value = ctypes.cast(char_pointer, ctypes.c_char_p).value + if value is not None and encoding is not None: diff --git a/pkgs/development/python-modules/twilio/default.nix b/pkgs/development/python-modules/twilio/default.nix index 33680d968969..826888a528ae 100644 --- a/pkgs/development/python-modules/twilio/default.nix +++ b/pkgs/development/python-modules/twilio/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "twilio"; - version = "9.3.0"; + version = "9.3.1"; pyproject = true; disabled = pythonOlder "3.7"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "twilio"; repo = "twilio-python"; rev = "refs/tags/${version}"; - hash = "sha256-v+Xq2t9eaKHLQFypNUTzLVBLo+3m0bKkjI09jwD3ieQ="; + hash = "sha256-yQrWMRLH8GZYmpmhjW2Lomk6qyKydWsteCvFR0uDPRQ="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/tools/database/surrealdb-migrations/default.nix b/pkgs/development/tools/database/surrealdb-migrations/default.nix index e2c2e9293d21..a8243353adea 100644 --- a/pkgs/development/tools/database/surrealdb-migrations/default.nix +++ b/pkgs/development/tools/database/surrealdb-migrations/default.nix @@ -10,7 +10,7 @@ let pname = "surrealdb-migrations"; - version = "2.0.0-preview.2"; + version = "2.0.0-preview.3"; in rustPlatform.buildRustPackage rec { inherit pname version; @@ -19,10 +19,10 @@ rustPlatform.buildRustPackage rec { owner = "Odonno"; repo = pname; rev = "v${version}"; - hash = "sha256-GrgBDuyXnwmaq55LWTnNGsichfoQ+/arSxLhl3ymbDM="; + hash = "sha256-BSLUhXxZyffH6HX3RR6PqXts76ERa0bpct/qs0Sf0NE="; }; - cargoHash = "sha256-7AdaUz43GHHhS1WoOD7qT4ZleBXc+Sp2/7/UHcSppTs="; + cargoHash = "sha256-jj1ytX44XoNKR+TCn/MpWk8CFM/DvHSwyfjVe3ca+AA="; buildInputs = [ ] ++ lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/development/tools/semantic-release/default.nix b/pkgs/development/tools/semantic-release/default.nix index fb8f568c31d9..95f92919d15d 100644 --- a/pkgs/development/tools/semantic-release/default.nix +++ b/pkgs/development/tools/semantic-release/default.nix @@ -8,16 +8,16 @@ buildNpmPackage rec { pname = "semantic-release"; - version = "24.1.0"; + version = "24.1.1"; src = fetchFromGitHub { owner = "semantic-release"; repo = "semantic-release"; rev = "v${version}"; - hash = "sha256-k1sqr41ctlBYmN3QdoPDVajQtDGrQMlvBqGHsxBZ+8U="; + hash = "sha256-BGSe05I1NconPkPCzGOOLPbH/JSlwXvAWbViJVYMU/c="; }; - npmDepsHash = "sha256-6I5WUUkvj5Ob9By00FpxiNMiLU5sMnqG03kHJBrndHs="; + npmDepsHash = "sha256-DsBklxeY9RbvFsEA56vkmvVms+W9mr9qA/JVgAgs81k="; dontNpmBuild = true; diff --git a/pkgs/os-specific/linux/apfs/default.nix b/pkgs/os-specific/linux/apfs/default.nix index 22d69959e21f..dd617562aa66 100644 --- a/pkgs/os-specific/linux/apfs/default.nix +++ b/pkgs/os-specific/linux/apfs/default.nix @@ -6,7 +6,7 @@ }: let - tag = "0.3.10"; + tag = "0.3.11"; in stdenv.mkDerivation { pname = "apfs"; @@ -16,7 +16,7 @@ stdenv.mkDerivation { owner = "linux-apfs"; repo = "linux-apfs-rw"; rev = "v${tag}"; - hash = "sha256-GFqBRZMoBBRRrWAhRKJrxawPS4z+xVkuHSlCoSrMEEI="; + hash = "sha256-Vt63JA9VNIuigSmDp8TuCpShebCsssrBFIsI7HUM5q0="; }; hardeningDisable = [ "pic" ]; diff --git a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix index cf322e59bdc8..a9e75b651156 100644 --- a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix +++ b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix @@ -7,12 +7,12 @@ let # kernel config in the xanmod version commit variants = { lts = { - version = "6.6.50"; - hash = "sha256-NaAJMsOlN1T/KfE2lbQdeoS/B9l2YdVMDdmrN9HygHw="; + version = "6.6.51"; + hash = "sha256-dNUTePfL6cAA0EmEG/D36dNJUobDRBHR5+BYrLIYot4="; }; main = { - version = "6.10.9"; - hash = "sha256-hzSWeyJF2JeP12M1PP+CgcFKMahjTw4pE7PcAuozksw="; + version = "6.10.10"; + hash = "sha256-abxhlF0zmY9WvcQ+FnkR5fNMvrw+oTCIMaCs8DFJ+oA="; }; }; diff --git a/pkgs/servers/home-assistant/custom-components/dwd/default.nix b/pkgs/servers/home-assistant/custom-components/dwd/default.nix index a7b1da7bddea..5d8cba11f2d7 100644 --- a/pkgs/servers/home-assistant/custom-components/dwd/default.nix +++ b/pkgs/servers/home-assistant/custom-components/dwd/default.nix @@ -8,13 +8,13 @@ buildHomeAssistantComponent rec { owner = "hg1337"; domain = "dwd"; - version = "2024.4.0"; + version = "2024.9.0"; src = fetchFromGitHub { owner = "hg1337"; repo = "homeassistant-dwd"; rev = version; - hash = "sha256-2bmLEBt6031p9SN855uunq7HrRJ9AFokw8t4CSBidTM="; + hash = "sha256-9zS6ufy7tYt1KwFeqdg0Az8xz3x5UzU9ZO9aOyWjdQE="; }; dependencies = [ defusedxml ]; @@ -26,6 +26,9 @@ buildHomeAssistantComponent rec { description = "Custom component for Home Assistant that integrates weather data (measurements and forecasts) of Deutscher Wetterdienst"; homepage = "https://github.com/hg1337/homeassistant-dwd"; license = licenses.asl20; - maintainers = with maintainers; [ hexa ]; + maintainers = with maintainers; [ + hexa + emilylange + ]; }; } diff --git a/pkgs/tools/security/terrascan/default.nix b/pkgs/tools/security/terrascan/default.nix index 7f65e0119f3e..416e3cf1fdf5 100644 --- a/pkgs/tools/security/terrascan/default.nix +++ b/pkgs/tools/security/terrascan/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "terrascan"; - version = "1.19.8"; + version = "1.19.9"; src = fetchFromGitHub { owner = "accurics"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-+fg482jVMc9IDH0MKSbXaU44QXH/wdjXbztqKNqJjbs="; + hash = "sha256-4XIhmUUOSROwEPSB+DcMOfG5+q/pmWkVUwKGrWVcNtM="; }; vendorHash = "sha256-yQien8v7Ru+JWLou9QfyKZAR2ENMHO2aF2vzuWyQcjY="; diff --git a/pkgs/tools/system/mediawriter/default.nix b/pkgs/tools/system/mediawriter/default.nix index e2ff1f610782..cc6cf69f5683 100644 --- a/pkgs/tools/system/mediawriter/default.nix +++ b/pkgs/tools/system/mediawriter/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "mediawriter"; - version = "5.1.2"; + version = "5.1.3"; src = fetchFromGitHub { owner = "FedoraQt"; repo = "MediaWriter"; rev = "refs/tags/${version}"; - hash = "sha256-KyABM3XIHvd9kT7aayYivGw6kjLf55Gpkk041BQ4yw0="; + hash = "sha256-w32Ps+GrbMq4Wot6vWyZS03Tv2rfTDnFLS7VwrcJLcc="; }; nativeBuildInputs = [