diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 331cf3f506bf..fae671dc12b7 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10842,6 +10842,15 @@ githubId = 77865363; name = "Leonid Belyaev"; }; + leonm1 = { + github = "leonm1"; + githubId = 32306579; + keys = [{ + fingerprint = "C12D F14B DC9D 64E1 44C3 4D8A 755C DA4E 5923 416A"; + }]; + matrix = "@mattleon:matrix.org"; + name = "Matt Leon"; + }; leshainc = { email = "leshainc@fomalhaut.me"; github = "LeshaInc"; @@ -16589,6 +16598,11 @@ fingerprint = "1401 1B63 393D 16C1 AA9C C521 8526 B757 4A53 6236"; }]; }; + rosehobgoblin = { + name = "J. L. Bowden"; + github = "rosehobgoblin"; + githubId = 84164410; + }; rossabaker = { name = "Ross A. Baker"; email = "ross@rossabaker.com"; diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index 8b89143a199b..e5898909e12a 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -78,9 +78,15 @@ In addition to numerous new and upgraded packages, this release has the followin - [hebbot](https://github.com/haecker-felix/hebbot), a Matrix bot to generate "This Week in X" like blog posts. Available as [services.hebbot](#opt-services.hebbot.enable). +- [Python Matter Server](https://github.com/home-assistant-libs/python-matter-server), a + Matter Controller Server exposing websocket connections for use with other services, notably Home Assistant. + Available as [services.matter-server](#opt-services.matter-server.enable) + - [Anki Sync Server](https://docs.ankiweb.net/sync-server.html), the official sync server built into recent versions of Anki. Available as [services.anki-sync-server](#opt-services.anki-sync-server.enable). The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been marked deprecated and will be dropped after 24.05 due to lack of maintenance of the anki-sync-server softwares. +- [transfer-sh](https://github.com/dutchcoders/transfer.sh), a tool that supports easy and fast file sharing from the command-line. Available as [services.transfer-sh](#opt-services.transfer-sh.enable). + - [Suwayomi Server](https://github.com/Suwayomi/Suwayomi-Server), a free and open source manga reader server that runs extensions built for [Tachiyomi](https://tachiyomi.org). Available as [services.suwayomi-server](#opt-services.suwayomi-server.enable). - [ping_exporter](https://github.com/czerwonk/ping_exporter), a Prometheus exporter for ICMP echo requests. Available as [services.prometheus.exporters.ping](#opt-services.prometheus.exporters.ping.enable). diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index da94ef16654c..9bdbf4e0713d 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -609,6 +609,13 @@ let format' = format; in let ''} # Set up core system link, bootloader (sd-boot, GRUB, uboot, etc.), etc. + + # NOTE: systemd-boot-builder.py calls nix-env --list-generations which + # clobbers $HOME/.nix-defexpr/channels/nixos This would cause a folder + # /homeless-shelter to show up in the final image which in turn breaks + # nix builds in the target image if sandboxing is turned off (through + # __noChroot for example). + export HOME=$TMPDIR NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root $mountPoint -- /nix/var/nix/profiles/system/bin/switch-to-configuration boot # The above scripts will generate a random machine-id and we don't want to bake a single ID into all our images diff --git a/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix index 530727f3f292..2e87705c6dc2 100644 --- a/nixos/modules/i18n/input-method/fcitx5.nix +++ b/nixos/modules/i18n/input-method/fcitx5.nix @@ -5,7 +5,10 @@ with lib; let im = config.i18n.inputMethod; cfg = im.fcitx5; - fcitx5Package = pkgs.fcitx5-with-addons.override { inherit (cfg) addons; }; + fcitx5Package = + if cfg.plasma6Support + then pkgs.qt6Packages.fcitx5-with-addons.override { inherit (cfg) addons; } + else pkgs.libsForQt5.fcitx5-with-addons.override { inherit (cfg) addons; }; settingsFormat = pkgs.formats.ini { }; in { @@ -27,6 +30,14 @@ in See [Using Fcitx 5 on Wayland](https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland). ''; }; + plasma6Support = mkOption { + type = types.bool; + default = false; + description = lib.mdDoc '' + Use qt6 versions of fcitx5 packages. + Required for configuring fcitx5 in KDE System Settings. + ''; + }; quickPhrase = mkOption { type = with types; attrsOf str; default = { }; diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index da321a923449..10f800cd741a 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -208,7 +208,11 @@ in example = { system = "x86_64-linux"; }; # Make sure that the final value has all fields for sake of other modules # referring to this. - apply = lib.systems.elaborate; + apply = inputBuildPlatform: + let elaborated = lib.systems.elaborate inputBuildPlatform; + in if lib.systems.equals elaborated cfg.hostPlatform + then cfg.hostPlatform # make identical, so that `==` equality works; see https://github.com/NixOS/nixpkgs/issues/278001 + else elaborated; defaultText = literalExpression ''config.nixpkgs.hostPlatform''; description = lib.mdDoc '' diff --git a/nixos/modules/misc/nixpkgs/test.nix b/nixos/modules/misc/nixpkgs/test.nix index 0536cfc9624a..be9a88a07788 100644 --- a/nixos/modules/misc/nixpkgs/test.nix +++ b/nixos/modules/misc/nixpkgs/test.nix @@ -12,6 +12,10 @@ let nixpkgs.hostPlatform = "aarch64-linux"; nixpkgs.buildPlatform = "aarch64-darwin"; }; + withSameHostAndBuild = eval { + nixpkgs.hostPlatform = "aarch64-linux"; + nixpkgs.buildPlatform = "aarch64-linux"; + }; ambiguous = { _file = "ambiguous.nix"; nixpkgs.hostPlatform = "aarch64-linux"; @@ -81,6 +85,8 @@ lib.recurseIntoAttrs { assert withHost._module.args.pkgs.stdenv.buildPlatform.system == "aarch64-linux"; assert withHostAndBuild._module.args.pkgs.stdenv.hostPlatform.system == "aarch64-linux"; assert withHostAndBuild._module.args.pkgs.stdenv.buildPlatform.system == "aarch64-darwin"; + assert withSameHostAndBuild.config.nixpkgs.buildPlatform == withSameHostAndBuild.config.nixpkgs.hostPlatform; + assert withSameHostAndBuild._module.args.pkgs.stdenv.buildPlatform == withSameHostAndBuild._module.args.pkgs.stdenv.hostPlatform; assert builtins.trace (lib.head (getErrors ambiguous)) getErrors ambiguous == ['' diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 90268d3efb47..627427262da6 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -585,6 +585,7 @@ ./services/home-automation/govee2mqtt.nix ./services/home-automation/home-assistant.nix ./services/home-automation/homeassistant-satellite.nix + ./services/home-automation/matter-server.nix ./services/home-automation/zigbee2mqtt.nix ./services/home-automation/zwave-js.nix ./services/logging/SystemdJournal2Gelf.nix @@ -786,6 +787,7 @@ ./services/misc/tiddlywiki.nix ./services/misc/tp-auto-kbbl.nix ./services/misc/tuxclocker.nix + ./services/misc/transfer-sh.nix ./services/misc/tzupdate.nix ./services/misc/uhub.nix ./services/misc/weechat.nix diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index b87e22b23980..560e5eff5c39 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -1465,9 +1465,9 @@ in ''; } { - assertion = config.security.pam.zfs.enable -> (config.boot.zfs.enabled || config.boot.zfs.enableUnstable); + assertion = config.security.pam.zfs.enable -> config.boot.zfs.enabled; message = '' - `security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled` or `boot.zfs.enableUnstable`). + `security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled`). ''; } { diff --git a/nixos/modules/services/home-automation/matter-server.nix b/nixos/modules/services/home-automation/matter-server.nix new file mode 100644 index 000000000000..864ef9e20083 --- /dev/null +++ b/nixos/modules/services/home-automation/matter-server.nix @@ -0,0 +1,125 @@ +{ lib +, pkgs +, config +, ... +}: + +with lib; + +let + cfg = config.services.matter-server; + storageDir = "matter-server"; + storagePath = "/var/lib/${storageDir}"; + vendorId = "4939"; # home-assistant vendor ID +in + +{ + meta.maintainers = with lib.maintainers; [ leonm1 ]; + + options.services.matter-server = with types; { + enable = mkEnableOption (lib.mdDoc "Matter-server"); + + package = mkPackageOptionMD pkgs "python-matter-server" { }; + + port = mkOption { + type = types.port; + default = 5580; + description = "Port to expose the matter-server service on."; + }; + + logLevel = mkOption { + type = types.enum [ "critical" "error" "warning" "info" "debug" ]; + default = "info"; + description = "Verbosity of logs from the matter-server"; + }; + + extraArgs = mkOption { + type = listOf str; + default = []; + description = '' + Extra arguments to pass to the matter-server executable. + See https://github.com/home-assistant-libs/python-matter-server?tab=readme-ov-file#running-the-development-server for options. + ''; + }; + }; + + config = mkIf cfg.enable { + systemd.services.matter-server = { + after = [ "network-online.target" ]; + before = [ "home-assistant.service" ]; + wants = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + description = "Matter Server"; + environment.HOME = storagePath; + serviceConfig = { + ExecStart = (concatStringsSep " " [ + "${cfg.package}/bin/matter-server" + "--port" (toString cfg.port) + "--vendorid" vendorId + "--storage-path" storagePath + "--log-level" "${cfg.logLevel}" + "${escapeShellArgs cfg.extraArgs}" + ]); + # Start with a clean root filesystem, and allowlist what the container + # is permitted to access. + TemporaryFileSystem = "/"; + # Allowlist /nix/store (to allow the binary to find its dependencies) + # and dbus. + ReadOnlyPaths = "/nix/store /run/dbus"; + # Let systemd manage `/var/lib/matter-server` for us inside the + # ephemeral TemporaryFileSystem. + StateDirectory = storageDir; + # `python-matter-server` writes to /data even when a storage-path is + # specified. This bind-mount points /data at the systemd-managed + # /var/lib/matter-server, so all files get dropped into the state + # directory. + BindPaths = "${storagePath}:/data"; + + # Hardening bits + AmbientCapabilities = ""; + CapabilityBoundingSet = ""; + DevicePolicy = "closed"; + DynamicUser = true; + LockPersonality = true; + MemoryDenyWriteExecute = true; + NoNewPrivileges = true; + PrivateDevices = true; + PrivateTmp = true; + PrivateUsers = true; + ProcSubset = "pid"; + ProtectClock = true; + ProtectControlGroups = true; + ProtectHome = true; + ProtectHostname = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectProc = "invisible"; + RestrictAddressFamilies = [ + "AF_INET" + "AF_INET6" + "AF_NETLINK" + ]; + RestrictNamespaces = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + SystemCallFilter = concatStringsSep " " [ + "~" # Blocklist + "@clock" + "@cpu-emulation" + "@debug" + "@module" + "@mount" + "@obsolete" + "@privileged" + "@raw-io" + "@reboot" + "@resources" + "@swap" + ]; + UMask = "0077"; + }; + }; + }; +} + diff --git a/nixos/modules/services/misc/transfer-sh.nix b/nixos/modules/services/misc/transfer-sh.nix new file mode 100644 index 000000000000..899d9dfc3c10 --- /dev/null +++ b/nixos/modules/services/misc/transfer-sh.nix @@ -0,0 +1,102 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.transfer-sh; + inherit (lib) + mkDefault mkEnableOption mkPackageOption mkIf mkOption + types mapAttrs isBool getExe boolToString mdDoc optionalAttrs; +in +{ + options.services.transfer-sh = { + enable = mkEnableOption (mdDoc "Easy and fast file sharing from the command-line"); + + package = mkPackageOption pkgs "transfer-sh" { }; + + settings = mkOption { + type = types.submodule { freeformType = with types; attrsOf (oneOf [ bool int str ]); }; + default = { }; + example = { + LISTENER = ":8080"; + BASEDIR = "/var/lib/transfer.sh"; + TLS_LISTENER_ONLY = false; + }; + description = mdDoc '' + Additional configuration for transfer-sh, see + + for supported values. + + For secrets use secretFile option instead. + ''; + }; + + provider = mkOption { + type = types.enum [ "local" "s3" "storj" "gdrive" ]; + default = "local"; + description = mdDoc "Storage providers to use"; + }; + + secretFile = mkOption { + type = types.nullOr types.path; + default = null; + example = "/run/secrets/transfer-sh.env"; + description = mdDoc '' + Path to file containing environment variables. + Useful for passing down secrets. + Some variables that can be considered secrets are: + - AWS_ACCESS_KEY + - AWS_ACCESS_KEY + - TLS_PRIVATE_KEY + - HTTP_AUTH_HTPASSWD + ''; + }; + }; + + config = + let + localProvider = (cfg.provider == "local"); + stateDirectory = "/var/lib/transfer.sh"; + in + mkIf cfg.enable + { + services.transfer-sh.settings = { + LISTENER = mkDefault ":8080"; + } // optionalAttrs localProvider { + BASEDIR = mkDefault stateDirectory; + }; + + systemd.services.transfer-sh = { + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + environment = mapAttrs (_: v: if isBool v then boolToString v else toString v) cfg.settings; + serviceConfig = { + CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ]; + DevicePolicy = "closed"; + DynamicUser = true; + ExecStart = "${getExe cfg.package} --provider ${cfg.provider}"; + LockPersonality = true; + MemoryDenyWriteExecute = true; + PrivateDevices = true; + PrivateUsers = true; + ProtectClock = true; + ProtectControlGroups = true; + ProtectHostname = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectProc = "invisible"; + RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ]; + RestrictNamespaces = true; + RestrictRealtime = true; + SystemCallArchitectures = [ "native" ]; + SystemCallFilter = [ "@system-service" ]; + StateDirectory = baseNameOf stateDirectory; + } // optionalAttrs (cfg.secretFile != null) { + EnvironmentFile = cfg.secretFile; + } // optionalAttrs localProvider { + ReadWritePaths = cfg.settings.BASEDIR; + }; + }; + }; + + meta.maintainers = with lib.maintainers; [ ocfox ]; +} diff --git a/nixos/modules/services/networking/tailscale.nix b/nixos/modules/services/networking/tailscale.nix index f11fe57d6ce5..972299a4697a 100644 --- a/nixos/modules/services/networking/tailscale.nix +++ b/nixos/modules/services/networking/tailscale.nix @@ -66,6 +66,13 @@ in { default = []; example = ["--ssh"]; }; + + extraDaemonFlags = mkOption { + description = lib.mdDoc "Extra flags to pass to {command}`tailscaled`."; + type = types.listOf types.str; + default = []; + example = ["--no-logs-no-support"]; + }; }; config = mkIf cfg.enable { @@ -80,7 +87,7 @@ in { ] ++ lib.optional config.networking.resolvconf.enable config.networking.resolvconf.package; serviceConfig.Environment = [ "PORT=${toString cfg.port}" - ''"FLAGS=--tun ${lib.escapeShellArg cfg.interfaceName}"'' + ''"FLAGS=--tun ${lib.escapeShellArg cfg.interfaceName} ${lib.concatStringsSep " " cfg.extraDaemonFlags}"'' ] ++ (lib.optionals (cfg.permitCertUid != null) [ "TS_PERMIT_CERT_UID=${cfg.permitCertUid}" ]); diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index e29fa49ea23b..49090423e078 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -97,6 +97,7 @@ let # Maintaining state across reboots. "systemd-random-seed.service" + "systemd-boot-random-seed.service" "systemd-backlight@.service" "systemd-rfkill.service" "systemd-rfkill.socket" @@ -667,7 +668,6 @@ in # Don't bother with certain units in containers. systemd.services.systemd-remount-fs.unitConfig.ConditionVirtualization = "!container"; - systemd.services.systemd-random-seed.unitConfig.ConditionVirtualization = "!container"; # Increase numeric PID range (set directly instead of copying a one-line file from systemd) # https://github.com/systemd/systemd/pull/12226 diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 58aca3fdbd4f..d11424c11c81 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -211,6 +211,7 @@ in imports = [ (mkRemovedOptionModule [ "boot" "zfs" "enableLegacyCrypto" ] "The corresponding package was removed from nixpkgs.") + (mkRemovedOptionModule [ "boot" "zfs" "enableUnstable" ] "Instead set `boot.zfs.package = pkgs.zfs_unstable;`") ]; ###### interface @@ -219,9 +220,9 @@ in boot.zfs = { package = mkOption { type = types.package; - default = if cfgZfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs; - defaultText = literalExpression "if zfsUnstable is enabled then pkgs.zfsUnstable else pkgs.zfs"; - description = lib.mdDoc "Configured ZFS userland tools package, use `pkgs.zfsUnstable` if you want to track the latest staging ZFS branch."; + default = pkgs.zfs; + defaultText = literalExpression "pkgs.zfs"; + description = lib.mdDoc "Configured ZFS userland tools package, use `pkgs.zfs_unstable` if you want to track the latest staging ZFS branch."; }; modulePackage = mkOption { @@ -239,19 +240,6 @@ in description = lib.mdDoc "True if ZFS filesystem support is enabled"; }; - enableUnstable = mkOption { - type = types.bool; - default = false; - description = lib.mdDoc '' - Use the unstable zfs package. This might be an option, if the latest - kernel is not yet supported by a published release of ZFS. Enabling - this option will install a development version of ZFS on Linux. The - version will have already passed an extensive test suite, but it is - more likely to hit an undiscovered bug compared to running a released - version of ZFS on Linux. - ''; - }; - allowHibernation = mkOption { type = types.bool; default = false; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 231767ca2b97..9795023bcea9 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -512,6 +512,7 @@ in { mastodon = discoverTests (import ./web-apps/mastodon { inherit handleTestOn; }); pixelfed = discoverTests (import ./web-apps/pixelfed { inherit handleTestOn; }); mate = handleTest ./mate.nix {}; + matter-server = handleTest ./matter-server.nix {}; matomo = handleTest ./matomo.nix {}; matrix-appservice-irc = handleTest ./matrix/appservice-irc.nix {}; matrix-conduit = handleTest ./matrix/conduit.nix {}; @@ -916,6 +917,7 @@ in { tor = handleTest ./tor.nix {}; traefik = handleTestOn ["aarch64-linux" "x86_64-linux"] ./traefik.nix {}; trafficserver = handleTest ./trafficserver.nix {}; + transfer-sh = handleTest ./transfer-sh.nix {}; transmission = handleTest ./transmission.nix { transmission = pkgs.transmission; }; transmission_4 = handleTest ./transmission.nix { transmission = pkgs.transmission_4; }; # tracee requires bpf diff --git a/nixos/tests/matter-server.nix b/nixos/tests/matter-server.nix new file mode 100644 index 000000000000..c646e9840d19 --- /dev/null +++ b/nixos/tests/matter-server.nix @@ -0,0 +1,45 @@ +import ./make-test-python.nix ({ pkgs, lib, ...} : + +let + chipVersion = pkgs.python311Packages.home-assistant-chip-core.version; +in + +{ + name = "matter-server"; + meta.maintainers = with lib.maintainers; [ leonm1 ]; + + nodes = { + machine = { config, ... }: { + services.matter-server = { + enable = true; + port = 1234; + }; + }; + }; + + testScript = /* python */ '' + start_all() + + machine.wait_for_unit("matter-server.service") + machine.wait_for_open_port(1234) + + with subtest("Check websocket server initialized"): + output = machine.succeed("echo \"\" | ${pkgs.websocat}/bin/websocat ws://localhost:1234/ws") + machine.log(output) + + assert '"sdk_version": "${chipVersion}"' in output, ( + 'CHIP version \"${chipVersion}\" not present in websocket message' + ) + + assert '"fabric_id": 1' in output, ( + "fabric_id not propagated to server" + ) + + with subtest("Check storage directory is created"): + machine.succeed("ls /var/lib/matter-server/chip.json") + + with subtest("Check systemd hardening"): + _, output = machine.execute("systemd-analyze security matter-server.service | grep -v '✓'") + machine.log(output) + ''; +}) diff --git a/nixos/tests/qemu-vm-external-disk-image.nix b/nixos/tests/qemu-vm-external-disk-image.nix index a229fc5e3963..c481159511a0 100644 --- a/nixos/tests/qemu-vm-external-disk-image.nix +++ b/nixos/tests/qemu-vm-external-disk-image.nix @@ -69,5 +69,8 @@ in os.environ['NIX_DISK_IMAGE'] = tmp_disk_image.name machine.succeed("findmnt --kernel --source ${rootFsDevice} --target /") + + # Make sure systemd boot didn't clobber this + machine.succeed("[ ! -e /homeless-shelter ]") ''; } diff --git a/nixos/tests/transfer-sh.nix b/nixos/tests/transfer-sh.nix new file mode 100644 index 000000000000..f4ab7d28858e --- /dev/null +++ b/nixos/tests/transfer-sh.nix @@ -0,0 +1,20 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: { + name = "transfer-sh"; + + meta = { + maintainers = with lib.maintainers; [ ocfox ]; + }; + + nodes.machine = { pkgs, ... }: { + services.transfer-sh = { + enable = true; + settings.LISTENER = ":1234"; + }; + }; + + testScript = '' + machine.wait_for_unit("transfer-sh.service") + machine.wait_for_open_port(1234) + machine.succeed("curl --fail http://localhost:1234/") + ''; +}) diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index 0b411b0b9d8a..851fced2c5e1 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -7,14 +7,14 @@ with import ../lib/testing-python.nix { inherit system pkgs; }; let - makeZfsTest = name: + makeZfsTest = { kernelPackages , enableSystemdStage1 ? false , zfsPackage , extraTest ? "" }: makeTest { - name = "zfs-" + name; + name = zfsPackage.kernelModuleAttribute; meta = with pkgs.lib.maintainers; { maintainers = [ elvishjerricco ]; }; @@ -192,23 +192,23 @@ let in { # maintainer: @raitobezarius - series_2_1 = makeZfsTest "2.1-series" { + series_2_1 = makeZfsTest { zfsPackage = pkgs.zfs_2_1; kernelPackages = pkgs.linuxPackages; }; - stable = makeZfsTest "stable" { - zfsPackage = pkgs.zfsStable; + series_2_2 = makeZfsTest { + zfsPackage = pkgs.zfs_2_2; kernelPackages = pkgs.linuxPackages; }; - unstable = makeZfsTest "unstable" rec { - zfsPackage = pkgs.zfsUnstable; + unstable = makeZfsTest rec { + zfsPackage = pkgs.zfs_unstable; kernelPackages = zfsPackage.latestCompatibleLinuxPackages; }; - unstableWithSystemdStage1 = makeZfsTest "unstable" rec { - zfsPackage = pkgs.zfsUnstable; + unstableWithSystemdStage1 = makeZfsTest rec { + zfsPackage = pkgs.zfs_unstable; kernelPackages = zfsPackage.latestCompatibleLinuxPackages; enableSystemdStage1 = true; }; diff --git a/pkgs/applications/audio/monkeys-audio/default.nix b/pkgs/applications/audio/monkeys-audio/default.nix index 3df94d5c4581..d4da27dd3639 100644 --- a/pkgs/applications/audio/monkeys-audio/default.nix +++ b/pkgs/applications/audio/monkeys-audio/default.nix @@ -5,13 +5,13 @@ }: stdenv.mkDerivation (finalAttrs: { - version = "10.49"; + version = "10.52"; pname = "monkeys-audio"; src = fetchzip { url = "https://monkeysaudio.com/files/MAC_${ builtins.concatStringsSep "" (lib.strings.splitString "." finalAttrs.version)}_SDK.zip"; - hash = "sha256-OhTqBFNwmReMT1U11CIB7XCTohiILdd2nDFp+9nfObs="; + hash = "sha256-n+bQzvuCTt7dnqkPO592KKZeShmMlbp/KAXK0F2dlTg="; stripRoot = false; }; nativeBuildInputs = [ diff --git a/pkgs/applications/audio/spotifywm/default.nix b/pkgs/applications/audio/spotifywm/default.nix deleted file mode 100644 index c2248056834e..000000000000 --- a/pkgs/applications/audio/spotifywm/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, spotify, xorg, makeWrapper }: -stdenv.mkDerivation { - pname = "spotifywm-unstable"; - version = "2022-10-26"; - - src = fetchFromGitHub { - owner = "dasJ"; - repo = "spotifywm"; - rev = "8624f539549973c124ed18753881045968881745"; - sha256 = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0="; - }; - - nativeBuildInputs = [ makeWrapper ]; - - buildInputs = [ xorg.libX11 ]; - - installPhase = '' - runHook preInstall - - mkdir -p $out/{bin,lib} - install -Dm644 spotifywm.so $out/lib/ - ln -sf ${spotify}/bin/spotify $out/bin/spotify - - # wrap spotify to use spotifywm.so - wrapProgram $out/bin/spotify --set LD_PRELOAD "$out/lib/spotifywm.so" - # backwards compatibility for people who are using the "spotifywm" binary - ln -sf $out/bin/spotify $out/bin/spotifywm - - runHook postInstall - ''; - - meta = with lib; { - homepage = "https://github.com/dasJ/spotifywm"; - description = "Wrapper around Spotify that correctly sets class name before opening the window"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ jqueiroz the-argus ]; - }; -} diff --git a/pkgs/applications/graphics/oculante/default.nix b/pkgs/applications/graphics/oculante/default.nix index 76ac8abc8b21..d6f8c1d641cb 100644 --- a/pkgs/applications/graphics/oculante/default.nix +++ b/pkgs/applications/graphics/oculante/default.nix @@ -22,16 +22,16 @@ rustPlatform.buildRustPackage rec { pname = "oculante"; - version = "0.8.11"; + version = "0.8.13"; src = fetchFromGitHub { owner = "woelper"; repo = "oculante"; rev = version; - hash = "sha256-5nOXt2c7byO+JdVXADu2TyO4vtLyg8UBWerPFMGHcso="; + hash = "sha256-RbRvV3OkRZXc0n7qGzqbBtbU81wFc+/Ohg9pbVqdsw4="; }; - cargoHash = "sha256-l1JYZxwvNnaff1PYPXniHmfNMG2Um5aPKTYuh/LCHoE="; + cargoHash = "sha256-qt4bHCHpiP6yOce9hquVVlLFF906ADwhss4xAP9E0fA="; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/graphics/upscayl/default.nix b/pkgs/applications/graphics/upscayl/default.nix index 6541aefd7092..9675f4cf17dc 100644 --- a/pkgs/applications/graphics/upscayl/default.nix +++ b/pkgs/applications/graphics/upscayl/default.nix @@ -4,11 +4,11 @@ lib, }: let pname = "upscayl"; - version = "2.9.9"; + version = "2.10.0"; src = fetchurl { url = "https://github.com/upscayl/upscayl/releases/download/v${version}/upscayl-${version}-linux.AppImage"; - hash = "sha256-EoTFvlLsXQYZldXfEHhP3/bHygm+NdeDsf+p138mM8w"; + hash = "sha256-nRYNYNHIkbvvQZd1zRDCCsCadgRgV/yn9WfaKjt44O8="; }; appimageContents = appimageTools.extractType2 { diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index a0966e5555b3..6003212d16b5 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -32,11 +32,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "calibre"; - version = "7.5.1"; + version = "7.6.0"; src = fetchurl { url = "https://download.calibre-ebook.com/${finalAttrs.version}/calibre-${finalAttrs.version}.tar.xz"; - hash = "sha256-pGo9fWyeX5hpw5YOV05tWy/0YxHShStKN96LMPnqIiA="; + hash = "sha256-fD2kTwH692x6Nm93NrUQvmbcXiX9hHBpo4wvUvBqLAM="; }; patches = [ diff --git a/pkgs/applications/misc/logseq/default.nix b/pkgs/applications/misc/logseq/default.nix index ed4a07ec97ae..27aeca89be60 100644 --- a/pkgs/applications/misc/logseq/default.nix +++ b/pkgs/applications/misc/logseq/default.nix @@ -14,11 +14,11 @@ stdenv.mkDerivation (finalAttrs: let in { pname = "logseq"; - version = "0.10.6"; + version = "0.10.7"; src = fetchurl { url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage"; - hash = "sha256-OUQh+6HRnzxw8Nn/OkU+DkjPKWKpMN0xchD1vPU3KV8="; + hash = "sha256-EC83D7tSpoDV6h363yIdX9IrTfoMd4b0hTVdW1T0pXg="; name = "${pname}-${version}.AppImage"; }; diff --git a/pkgs/applications/misc/ttdl/default.nix b/pkgs/applications/misc/ttdl/default.nix index cc8cb96f91cd..d4a74e6bdbc1 100644 --- a/pkgs/applications/misc/ttdl/default.nix +++ b/pkgs/applications/misc/ttdl/default.nix @@ -5,16 +5,16 @@ rustPlatform.buildRustPackage rec { pname = "ttdl"; - version = "4.2.0"; + version = "4.2.1"; src = fetchFromGitHub { owner = "VladimirMarkelov"; repo = "ttdl"; rev = "v${version}"; - sha256 = "sha256-5OYOF8SvjPn/gZf/utcpv1zVvVbB1HeB1mkMiJtBjOQ="; + sha256 = "sha256-fspqUzF3QqFpd16J1dbcNMdqjcR3PIiRu/s+VB4KgwQ="; }; - cargoHash = "sha256-MLypY7Dbr1/4hJ2UYmNOVp0nNWrq3DDTEidgkL0X0AU="; + cargoHash = "sha256-dvzm9lbVGGM4t6KZcHSlqwo55jssxi8HyFREMaj5I0Q="; meta = with lib; { description = "A CLI tool to manage todo lists in todo.txt format"; diff --git a/pkgs/applications/misc/wofi/default.nix b/pkgs/applications/misc/wofi/default.nix index 97aba94d1770..30e7072644f3 100644 --- a/pkgs/applications/misc/wofi/default.nix +++ b/pkgs/applications/misc/wofi/default.nix @@ -11,13 +11,13 @@ }: stdenv.mkDerivation rec { pname = "wofi"; - version = "1.4"; + version = "1.4.1"; src = fetchFromSourcehut { repo = pname; owner = "~scoopta"; rev = "v${version}"; - sha256 = "sha256-zzBD1OPPlOjAUaJOlMf6k1tSai1w1ZvOwy2sSOWI7AM="; + sha256 = "sha256-aedoUhVfk8ljmQ23YxVmGZ00dPpRftW2dnRAgXmtV/w="; vc = "hg"; }; diff --git a/pkgs/applications/networking/cluster/atmos/default.nix b/pkgs/applications/networking/cluster/atmos/default.nix index 2b3ff6c11710..af4dad92e466 100644 --- a/pkgs/applications/networking/cluster/atmos/default.nix +++ b/pkgs/applications/networking/cluster/atmos/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "atmos"; - version = "1.64.1"; + version = "1.64.3"; src = fetchFromGitHub { owner = "cloudposse"; repo = pname; rev = "v${version}"; - sha256 = "sha256-QHXBvZThLi5Gnpc7fmitkvl3JU1i/g2jz8c6U4//6mU="; + sha256 = "sha256-Z27wFAWstsQliDiYl93yY9LDeVcGEWcrmggGJI60hxk="; }; vendorHash = "sha256-i7m9YXPlWqHtvC4Df7v5bLWt2tqeT933t2+Xit5RQxg="; diff --git a/pkgs/applications/networking/cluster/werf/default.nix b/pkgs/applications/networking/cluster/werf/default.nix index f61a760115a1..254d7bd08ebd 100644 --- a/pkgs/applications/networking/cluster/werf/default.nix +++ b/pkgs/applications/networking/cluster/werf/default.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "werf"; - version = "1.2.294"; + version = "1.2.295"; src = fetchFromGitHub { owner = "werf"; repo = "werf"; rev = "v${version}"; - hash = "sha256-A/Do2UepwV8lmT8qWir7CKR8/YeVKOEoJjvVfj9+wt0="; + hash = "sha256-oQDP2Tsxj4c5X2pfj4i+hfnsdjUBYcyF2p61OY04Ozg="; }; - vendorHash = "sha256-Fb9drtVITjka83Y8+YSa9fqSBv7O4muMGqV4w3K7+Dg="; + vendorHash = "sha256-6q13vMxu0iQgaXS+Z6V0jjSIhxMscw6sLANzK07gAlI="; proxyVendor = true; diff --git a/pkgs/applications/science/physics/nnpdf/default.nix b/pkgs/applications/science/physics/nnpdf/default.nix index a53940d38d74..26e8247f85e3 100644 --- a/pkgs/applications/science/physics/nnpdf/default.nix +++ b/pkgs/applications/science/physics/nnpdf/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { pname = "nnpdf"; - version = "4.0.8"; + version = "4.0.9"; src = fetchFromGitHub { owner = "NNPDF"; repo = pname; rev = version; - hash = "sha256-hGCA2K/fD6UZa9WD42IDmZV1oxNgjFaXkjOZKGgGSBg="; + hash = "sha256-PyhkHlOlzKfDxUX91NkeZWjdEzFR4PW0Yh5Yz6ZA27g="; }; postPatch = '' diff --git a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix b/pkgs/applications/window-managers/hyprwm/hyprland/default.nix index 92694db761a4..3db57a6b8dd2 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprland/default.nix @@ -9,6 +9,7 @@ , cairo , git , hyprland-protocols +, hyprlang , jq , libGL , libdrm @@ -31,7 +32,7 @@ , debug ? false , enableXWayland ? true , legacyRenderer ? false -, withSystemd ? true +, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd , wrapRuntimeDeps ? true # deprecated flags , nvidiaPatches ? false @@ -43,13 +44,13 @@ assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` ha assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland"; stdenv.mkDerivation (finalAttrs: { pname = "hyprland" + lib.optionalString debug "-debug"; - version = "0.35.0"; + version = "0.36.0"; src = fetchFromGitHub { owner = "hyprwm"; repo = finalAttrs.pname; rev = "v${finalAttrs.version}"; - hash = "sha256-dU5m6Cd4+WQZal2ICDVf1kww/dNzo1YUWRxWeCctEig="; + hash = "sha256-oZe4k6jtO/0govmERGcbeyvE9EfTvXY5bnyIs6AsL9U="; }; patches = [ @@ -92,6 +93,7 @@ stdenv.mkDerivation (finalAttrs: { cairo git hyprland-protocols + hyprlang libGL libdrm libinput @@ -116,10 +118,10 @@ stdenv.mkDerivation (finalAttrs: { mesonAutoFeatures = "disabled"; - mesonFlags = builtins.concatLists [ - (lib.optional enableXWayland "-Dxwayland=enabled") - (lib.optional legacyRenderer "-Dlegacy_renderer=enabled") - (lib.optional withSystemd "-Dsystemd=enabled") + mesonFlags = [ + (lib.mesonEnable "xwayland" enableXWayland) + (lib.mesonEnable "legacy_renderer" legacyRenderer) + (lib.mesonEnable "systemd" withSystemd) ]; postInstall = '' diff --git a/pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix b/pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix index 421d0d328539..4992e18b6bee 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix @@ -5,7 +5,7 @@ , hyprland }: let - mkHyprlandPlugin = + mkHyprlandPlugin = hyprland: args@{ pluginName, ... }: stdenv.mkDerivation (args // { pname = "${pluginName}"; @@ -14,23 +14,23 @@ let ++ hyprland.buildInputs ++ (args.buildInputs or [ ]); meta = args.meta // { - description = (args.meta.description or ""); - longDescription = (args.meta.lonqDescription or "") + + description = args.meta.description or ""; + longDescription = (args.meta.longDescription or "") + "\n\nPlugins can be installed via a plugin entry in the Hyprland NixOS or Home Manager options."; }; }); plugins = { hy3 = { fetchFromGitHub, cmake, hyprland }: - mkHyprlandPlugin rec { + mkHyprlandPlugin hyprland rec { pluginName = "hy3"; - version = "0.35.0"; + version = "unstable-2024-02-23"; src = fetchFromGitHub { owner = "outfoxxed"; repo = "hy3"; - rev = "hl${version}"; - hash = "sha256-lFe7Lf0K5ePTh4gflnvBohOGH4ayGDtNkbg/XtoNqRo="; + rev = "029a2001361d2a4cbbe7447968dee5d1b1880298"; + hash = "sha256-8LKCXwNU6wA8o6O7s9T2sLWbYNHaI1tYU4YMjHkNLZQ="; }; nativeBuildInputs = [ cmake ]; @@ -47,5 +47,4 @@ let }; }; in -lib.mapAttrs (name: plugin: callPackage plugin { }) plugins - +(lib.mapAttrs (name: plugin: callPackage plugin { }) plugins) // { inherit mkHyprlandPlugin; } diff --git a/pkgs/applications/window-managers/hyprwm/hyprland/wlroots.nix b/pkgs/applications/window-managers/hyprwm/hyprland/wlroots.nix index a2b2f96769d7..5c42eff6fc8c 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprland/wlroots.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprland/wlroots.nix @@ -9,8 +9,8 @@ wlroots.overrideAttrs domain = "gitlab.freedesktop.org"; owner = "wlroots"; repo = "wlroots"; - rev = "00b869c1a96f300a8f25da95d624524895e0ddf2"; - hash = "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM="; + rev = "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5"; + hash = "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI="; }; patches = [ ]; # don't inherit old.patches diff --git a/pkgs/by-name/README.md b/pkgs/by-name/README.md index 990882aec837..0296ccf2e1bc 100644 --- a/pkgs/by-name/README.md +++ b/pkgs/by-name/README.md @@ -118,3 +118,83 @@ $ ./pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh master ``` See [here](../../.github/workflows/check-by-name.yml) for more info. + +## Recommendation for new packages with multiple versions + +These checks of the `pkgs/by-name` structure can cause problems in combination: +1. New top-level packages using `callPackage` must be defined via `pkgs/by-name`. +2. Packages in `pkgs/by-name` cannot refer to files outside their own directory. + +This means that outside `pkgs/by-name`, multiple already-present top-level packages can refer to some common file. +If you open a PR to another instance of such a package, CI will fail check 1, +but if you try to move the package to `pkgs/by-name`, it will fail check 2. + +This is often the case for packages with multiple versions, such as + +```nix + foo_1 = callPackage ../tools/foo/1.nix { }; + foo_2 = callPackage ../tools/foo/2.nix { }; +``` + +The best way to resolve this is to not use `callPackage` directly, such that check 1 doesn't trigger. +This can be done by using `inherit` on a local package set: +```nix + inherit + ({ + foo_1 = callPackage ../tools/foo/1.nix { }; + foo_2 = callPackage ../tools/foo/2.nix { }; + }) + foo_1 + foo_2 + ; +``` + +While this may seem pointless, this can in fact help with future package set refactorings, +because it establishes a clear connection between related attributes. + +### Further possible refactorings + +This is not required, but the above solution also allows refactoring the definitions into a separate file: + +```nix + inherit (import ../tools/foo pkgs) + foo_1 foo_2; +``` + +```nix +# pkgs/tools/foo/default.nix +pkgs: { + foo_1 = callPackage ./1.nix { }; + foo_2 = callPackage ./2.nix { }; +} +``` + +Alternatively using [`callPackages`](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.callPackagesWith) +if `callPackage` isn't used underneath and you want the same `.override` arguments for all attributes: + +```nix + inherit (callPackages ../tools/foo { }) + foo_1 foo_2; +``` + +```nix +# pkgs/tools/foo/default.nix +{ + stdenv +}: { + foo_1 = stdenv.mkDerivation { /* ... */ }; + foo_2 = stdenv.mkDerivation { /* ... */ }; +} +``` + +### Exposing the package set + +This is not required, but the above solution also allows exposing the package set as an attribute: + +```nix + foo-versions = import ../tools/foo pkgs; + # Or using callPackages + # foo-versions = callPackages ../tools/foo { }; + + inherit (foo-versions) foo_1 foo_2; +``` diff --git a/pkgs/by-name/ap/apt/package.nix b/pkgs/by-name/ap/apt/package.nix index 0078e2dcecd9..d58644b935d8 100644 --- a/pkgs/by-name/ap/apt/package.nix +++ b/pkgs/by-name/ap/apt/package.nix @@ -33,11 +33,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "apt"; - version = "2.7.12"; + version = "2.7.13"; src = fetchurl { url = "mirror://debian/pool/main/a/apt/apt_${finalAttrs.version}.tar.xz"; - hash = "sha256-5G0Wa1/Ih8LZvKet1+DM2lR7lit2LhJyoIwEJrqpnK8="; + hash = "sha256-xCq1XpHXvuX8v3/4w1hHFMusqgNl8JHn5gT3+Ek8fjU="; }; # cycle detection; lib can't be split diff --git a/pkgs/by-name/co/codeium/package.nix b/pkgs/by-name/co/codeium/package.nix index a9a7f14e06b5..2c7a44c1048f 100644 --- a/pkgs/by-name/co/codeium/package.nix +++ b/pkgs/by-name/co/codeium/package.nix @@ -13,10 +13,10 @@ let }.${system} or throwSystem; hash = { - x86_64-linux = "sha256-3B1TEToovw4C8rLsJv0Y3OPg8ZjMZ3Y29IzIs9Wm6II="; - aarch64-linux = "sha256-kD0yMHoJejKpK1cX/OPQLjPB8cXBp/aXy66YDxXINRw="; - x86_64-darwin = "sha256-DxyxR1t4UrqTn/ORrDiOryWCQ1L0DWXmlh2Hnm7kMS4="; - aarch64-darwin = "sha256-Ckbg/bZxeMpt2xtrLhJXo9DJTLluuWPVdGRRwiO1ZY8="; + x86_64-linux = "sha256-+SdAippxuJ0LvT+w6xSvTpzCv5EPjxXJKH4mcmnxu9Y="; + aarch64-linux = "sha256-cX+P0WcT+0oYDAcUJJ0+SRWPQCdv4rhrBf5BdPrF1Hg="; + x86_64-darwin = "sha256-eQjwViY5OsFzFtKkjLbrQgGNVBBpNNJjlfu8t/F37hI="; + aarch64-darwin = "sha256-xfB81SLuVa1wKcIGJZFxjdCSPmPXg0vYXtkCftiXBtU="; }.${system} or throwSystem; bin = "$out/bin/codeium_language_server"; @@ -24,7 +24,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "codeium"; - version = "1.6.39"; + version = "1.8.0"; src = fetchurl { name = "${finalAttrs.pname}-${finalAttrs.version}.gz"; url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${finalAttrs.version}/language_server_${plat}.gz"; diff --git a/pkgs/by-name/co/composefs/package.nix b/pkgs/by-name/co/composefs/package.nix index eec9ef0de853..6d0b6b9319b9 100644 --- a/pkgs/by-name/co/composefs/package.nix +++ b/pkgs/by-name/co/composefs/package.nix @@ -16,6 +16,7 @@ , fsverity-utils , nix-update-script , testers +, nixosTests , fuseSupport ? lib.meta.availableOn stdenv.hostPlatform fuse3 , enableValgrindCheck ? false @@ -23,13 +24,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "composefs"; - version = "1.0.2"; + version = "1.0.3"; src = fetchFromGitHub { owner = "containers"; repo = "composefs"; rev = "v${finalAttrs.version}"; - hash = "sha256-ViZkmuLFV5DN1nqWKGl+yaqhYUEOztZ1zGpxjr1U/dw="; + hash = "sha256-YmredtZZKMjzJW/kxiTUmdgO/1iPIKzJsuJz8DeEdGM="; }; strictDeps = true; @@ -69,7 +70,11 @@ stdenv.mkDerivation (finalAttrs: { passthru = { updateScript = nix-update-script { }; - tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + tests = { + # Broken on aarch64 unrelated to this package: https://github.com/NixOS/nixpkgs/issues/291398 + inherit (nixosTests) activation-etc-overlay-immutable activation-etc-overlay-mutable; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; }; meta = { diff --git a/pkgs/by-name/ek/eksctl/package.nix b/pkgs/by-name/ek/eksctl/package.nix index cce848b16de7..5d01ac999406 100644 --- a/pkgs/by-name/ek/eksctl/package.nix +++ b/pkgs/by-name/ek/eksctl/package.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "eksctl"; - version = "0.172.0"; + version = "0.173.0"; src = fetchFromGitHub { owner = "weaveworks"; repo = pname; rev = version; - hash = "sha256-DzbCtTXeoERV9ceUsZ+srATIyviJp+oNyB7EE/iHe6g="; + hash = "sha256-PVBt+AoYd8fMYHzBpgQ261TGlkmyooN7UKX9ooXaRYA="; }; - vendorHash = "sha256-P+T+ynSkG3KEmJsrzJusCPBD1ClaVK/VIHD+2xkGswQ="; + vendorHash = "sha256-5bHZt+Oze7JiaY0dKjoMNDdU6wzMphgZ3W3NveRKGy0="; doCheck = false; diff --git a/pkgs/by-name/fc/fcitx5-rose-pine/package.nix b/pkgs/by-name/fc/fcitx5-rose-pine/package.nix new file mode 100644 index 000000000000..b1f11a1784a9 --- /dev/null +++ b/pkgs/by-name/fc/fcitx5-rose-pine/package.nix @@ -0,0 +1,34 @@ +{ stdenvNoCC +, fetchFromGitHub +, lib +}: + +stdenvNoCC.mkDerivation { + pname = "fcitx5-rose-pine"; + version = "0-unstable-2024-03-01"; + + src = fetchFromGitHub { + owner = "rose-pine"; + repo = "fcitx5"; + rev = "148de09929c2e2f948376bb23bc25d72006403bc"; + hash = "sha256-SpQ5ylHSDF5KCwKttAlXgrte3GA1cCCy/0OKNT1a3D8="; + }; + + installPhase = '' + runHook preInstall + + mkdir -pv $out/share/fcitx5/themes/ + cp -rv rose-pine* $out/share/fcitx5/themes/ + + runHook postInstall + ''; + + + meta = { + description = "Fcitx5 themes based on Rosé Pine"; + homepage = "https://github.com/rose-pine/fcitx5"; + maintainers = with lib.maintainers; [ rosehobgoblin ]; + platforms = lib.platforms.all; + license = lib.licenses.unfree; + }; +} diff --git a/pkgs/by-name/hu/hugo/package.nix b/pkgs/by-name/hu/hugo/package.nix index 7695aeca9ed3..be4ee9c4ffb8 100644 --- a/pkgs/by-name/hu/hugo/package.nix +++ b/pkgs/by-name/hu/hugo/package.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "hugo"; - version = "0.123.4"; + version = "0.123.6"; src = fetchFromGitHub { owner = "gohugoio"; repo = "hugo"; rev = "refs/tags/v${version}"; - hash = "sha256-AJ/uK2eunQgsCcXR8FcQ9TVvMXs56J0gpfXRQCX78qY="; + hash = "sha256-gLow1AcUROid6skLDdaJ9E3mPi99KPoOO/ZFdLBineU="; }; - vendorHash = "sha256-6qNICaj+P0VRl/crbiucZ7CpBG1vwFURkvOdaH6WidU="; + vendorHash = "sha256-V7YRrC+6fOIjXOu7E0kIOZZt++4oFLPhmHeWmOVU3Xw="; doCheck = false; diff --git a/pkgs/by-name/li/libvpl/opengl-driver-lib.patch b/pkgs/by-name/li/libvpl/opengl-driver-lib.patch new file mode 100644 index 000000000000..5913190a5384 --- /dev/null +++ b/pkgs/by-name/li/libvpl/opengl-driver-lib.patch @@ -0,0 +1,19 @@ +--- a/libvpl/src/mfx_dispatcher_vpl_loader.cpp ++++ b/libvpl/src/mfx_dispatcher_vpl_loader.cpp +@@ -548,6 +548,16 @@ mfxStatus LoaderCtxVPL::BuildListOfCandidateLibs() { + it++; + } + ++ // fourth priority ++ searchDirList.clear(); ++ searchDirList.push_back("@driverLink@/lib"); ++ it = searchDirList.begin(); ++ while (it != searchDirList.end()) { ++ STRING_TYPE nextDir = (*it); ++ sts = SearchDirForLibs(nextDir, m_libInfoList, LIB_PRIORITY_05); ++ it++; ++ } ++ + // lowest priority: legacy MSDK installation + searchDirList.clear(); + GetSearchPathsLegacy(searchDirList); diff --git a/pkgs/by-name/li/libvpl/package.nix b/pkgs/by-name/li/libvpl/package.nix index 8a647916ca63..f28287053beb 100644 --- a/pkgs/by-name/li/libvpl/package.nix +++ b/pkgs/by-name/li/libvpl/package.nix @@ -3,6 +3,8 @@ , fetchFromGitHub , cmake , pkg-config +, substituteAll +, addDriverRunpath }: stdenv.mkDerivation (finalAttrs: { @@ -32,6 +34,13 @@ stdenv.mkDerivation (finalAttrs: { "-DBUILD_TOOLS=OFF" ]; + patches = [ + (substituteAll { + src = ./opengl-driver-lib.patch; + inherit (addDriverRunpath) driverLink; + }) + ]; + meta = with lib; { description = "Intel Video Processing Library"; homepage = "https://intel.github.io/libvpl/"; diff --git a/pkgs/by-name/li/live555/package.nix b/pkgs/by-name/li/live555/package.nix index b08ed44f4854..123b775cea97 100644 --- a/pkgs/by-name/li/live555/package.nix +++ b/pkgs/by-name/li/live555/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "live555"; - version = "2023.11.30"; + version = "2024.02.23"; src = fetchurl { urls = [ @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { "https://download.videolan.org/contrib/live555/live.${finalAttrs.version}.tar.gz" "mirror://sourceforge/slackbuildsdirectlinks/live.${finalAttrs.version}.tar.gz" ]; - hash = "sha256-xue+9YtdAM2XkzAY6dU2PZ3n6bvPwlULIHqBqc8wuSU="; + hash = "sha256-85JWXfsPAvocX5PiKXw9Xkd4zm2akzxMeETsZ3xm2wg="; }; patches = [ diff --git a/pkgs/games/lgames/ltris/default.nix b/pkgs/by-name/lt/ltris/package.nix similarity index 55% rename from pkgs/games/lgames/ltris/default.nix rename to pkgs/by-name/lt/ltris/package.nix index 8cf581b376bf..82137b2fbec6 100644 --- a/pkgs/games/lgames/ltris/default.nix +++ b/pkgs/by-name/lt/ltris/package.nix @@ -1,18 +1,18 @@ { lib -, stdenv -, fetchurl , SDL , SDL_mixer , directoryListingUpdater +, fetchurl +, stdenv }: -stdenv.mkDerivation rec { - pname = "ltris"; - version = "1.2.7"; +stdenv.mkDerivation (finalAttrs: { + pname = "lgames-ltris"; + version = "1.2.8"; src = fetchurl { - url = "mirror://sourceforge/lgames/${pname}-${version}.tar.gz"; - hash = "sha256-EpHGpkLQa57hU6wKLnhVosmD6DnGGPGilN8E2ClSXLA="; + url = "mirror://sourceforge/lgames/ltris-${finalAttrs.version}.tar.gz"; + hash = "sha256-2e5haaU2pqkBk82qiF/3HQgSBVPHP09UwW+TQqpGUqA="; }; buildInputs = [ @@ -23,17 +23,18 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; passthru.updateScript = directoryListingUpdater { - inherit pname version; + inherit (finalAttrs) pname version; url = "https://lgames.sourceforge.io/LTris/"; extraRegex = "(?!.*-win(32|64)).*"; }; - meta = with lib; { + meta = { homepage = "https://lgames.sourceforge.io/LTris/"; description = "Tetris clone from the LGames series"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ AndersonTorres ciil ]; + license = with lib.licenses; [ gpl2Plus ]; + mainProgram = "ltris"; + maintainers = with lib.maintainers; [ AndersonTorres ]; inherit (SDL.meta) platforms; broken = stdenv.isDarwin; }; -} +}) diff --git a/pkgs/development/tools/documentation/mdsh/default.nix b/pkgs/by-name/md/mdsh/package.nix similarity index 73% rename from pkgs/development/tools/documentation/mdsh/default.nix rename to pkgs/by-name/md/mdsh/package.nix index 654721c50ea9..e97b8eee51fe 100644 --- a/pkgs/development/tools/documentation/mdsh/default.nix +++ b/pkgs/by-name/md/mdsh/package.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "mdsh"; - version = "0.7.0"; + version = "0.8.0"; src = fetchFromGitHub { owner = "zimbatm"; repo = "mdsh"; rev = "v${version}"; - hash = "sha256-Y8ss/aw01zpgM6Z6fCGshP21kcdSOTVG/VqL8H3tlls="; + hash = "sha256-ammLbKEKXDSuZMr4DwPpcRSkKh7BzNC+4ZRCqTNNCQk="; }; - cargoSha256 = "sha256-8o4gN6mqUU+o80IqlAYAD5qpZBSQ/FY5HoNbpwzTm0A="; + cargoHash = "sha256-wLHMccxk3ceZyGK27t5Kyal48yj9dQNgmEHjH9hR9Pc="; meta = with lib; { description = "Markdown shell pre-processor"; diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/date.txt b/pkgs/by-name/ni/nixfmt-rfc-style/date.txt index b3c1f63a9286..f4f1f2ef867e 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/date.txt +++ b/pkgs/by-name/ni/nixfmt-rfc-style/date.txt @@ -1 +1 @@ -2024-01-31 +2024-03-01 diff --git a/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix b/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix index ac96818227ce..738b3e53c872 100644 --- a/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix +++ b/pkgs/by-name/ni/nixfmt-rfc-style/generated-package.nix @@ -8,8 +8,8 @@ mkDerivation { pname = "nixfmt"; version = "0.5.0"; src = fetchzip { - url = "https://github.com/piegamesde/nixfmt/archive/d6930fd0c62c4d7ec9e4a814adc3d2f590d96271.tar.gz"; - sha256 = "1ijrdzdwricv4asmy296j7gzvhambv96nlxi3qrxb4lj1by6a34m"; + url = "https://github.com/piegamesde/nixfmt/archive/2b5ee820690bae64cb4003e46917ae43541e3e0b.tar.gz"; + sha256 = "1i1jbc1q4gd7fpilwy6s3a583yl5l8d8rlmipygj61mpclg9ihqg"; }; isLibrary = true; isExecutable = true; diff --git a/pkgs/by-name/op/opengist/package.nix b/pkgs/by-name/op/opengist/package.nix new file mode 100644 index 000000000000..fb9efcd7b076 --- /dev/null +++ b/pkgs/by-name/op/opengist/package.nix @@ -0,0 +1,70 @@ +{ lib, buildGoModule, buildNpmPackage, fetchFromGitHub, moreutils, jq, git }: +let + # finalAttrs when 🥺 (buildGoModule does not support them) + # https://github.com/NixOS/nixpkgs/issues/273815 + version = "1.6.1"; + src = fetchFromGitHub { + owner = "thomiceli"; + repo = "opengist"; + rev = "v${version}"; + hash = "sha256-rJ8oiH08kSSFNgPHKGo68Oi1i3L1SEJyHuzoxKMOZME="; + }; + + frontend = buildNpmPackage { + pname = "opengist-frontend"; + inherit version src; + + nativeBuildInputs = [ moreutils jq ]; + + # npm complains of "invalid package". shrug. we can give it a version. + preBuild = '' + jq '.version = "${version}"' package.json | sponge package.json + ''; + + # copy pasta from the Makefile upstream, seems to be a workaround of sass + # issues, unsure why it is not done in vite: + # https://github.com/thomiceli/opengist/blob/05eccfa8e728335514a40476cd8116cfd1ca61dd/Makefile#L16-L19 + postBuild = '' + EMBED=1 npx postcss 'public/assets/embed-*.css' -c public/postcss.config.js --replace + ''; + + installPhase = '' + mkdir -p $out + cp -R public $out + ''; + + npmDepsHash = "sha256-Sy321tIQOOrypk+EOGGixEzrPdhA9U8Hak+DOS+d00A="; + }; +in +buildGoModule { + pname = "opengist"; + inherit version src; + vendorHash = "sha256-IorqXJKzUTUL5zfKRipZaJtRlwVOmTwolJXFG/34Ais="; + tags = [ + "fs_embed" + ]; + + # required for tests + nativeCheckInputs = [ + git + ]; + + # required for tests to not try to write into $HOME and fail + preCheck = '' + export OG_OPENGIST_HOME=$(mktemp -d) + ''; + + postPatch = '' + cp -R ${frontend}/public/{manifest.json,assets} public/ + ''; + + passthru.frontend = frontend; + + meta = { + description = "Self-hosted pastebin powered by Git"; + homepage = "https://github.com/thomiceli/opengist"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ lf- ]; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/applications/audio/ptcollab/default.nix b/pkgs/by-name/pt/ptcollab/package.nix similarity index 74% rename from pkgs/applications/audio/ptcollab/default.nix rename to pkgs/by-name/pt/ptcollab/package.nix index ca98012c3ff5..f03d89e7c490 100644 --- a/pkgs/applications/audio/ptcollab/default.nix +++ b/pkgs/by-name/pt/ptcollab/package.nix @@ -1,40 +1,39 @@ -{ mkDerivation +{ stdenv , lib -, stdenv , fetchFromGitHub , nix-update-script +, libsForQt5 , libvorbis , pkg-config -, qmake -, qtbase -, qttools -, qtmultimedia , rtmidi }: -mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ptcollab"; - version = "0.6.4.7"; + version = "0.6.4.8"; src = fetchFromGitHub { owner = "yuxshao"; repo = "ptcollab"; - rev = "v${version}"; - hash = "sha256-KYNov/HbKM2d8VVO8iyWA3XWFDE9iWeKkRCNC1xlPNw="; + rev = "v${finalAttrs.version}"; + hash = "sha256-9u2K79QJRfYKL66e1lsRrQMEqmKTWbK+ucal3/u4rP4="; }; nativeBuildInputs = [ pkg-config + ] ++ (with libsForQt5; [ qmake qttools - ]; + wrapQtAppsHook + ]); buildInputs = [ libvorbis + rtmidi + ] ++ (with libsForQt5; [ qtbase qtmultimedia - rtmidi - ]; + ]); postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' # Move appbundles to Applications before wrapping happens @@ -54,8 +53,9 @@ mkDerivation rec { meta = with lib; { description = "Experimental pxtone editor where you can collaborate with friends"; homepage = "https://yuxshao.github.io/ptcollab/"; + changelog = "https://github.com/yuxshao/ptcollab/releases/tag/v${finalAttrs.version}"; license = licenses.mit; maintainers = with maintainers; [ OPNA2608 ]; platforms = platforms.all; }; -} +}) diff --git a/pkgs/by-name/rs/rsgain/package.nix b/pkgs/by-name/rs/rsgain/package.nix index 79b86ca95493..adb2be57332c 100644 --- a/pkgs/by-name/rs/rsgain/package.nix +++ b/pkgs/by-name/rs/rsgain/package.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "rsgain"; - version = "3.4"; + version = "3.5"; src = fetchFromGitHub { owner = "complexlogic"; repo = "rsgain"; rev = "v${version}"; - sha256 = "sha256-AiNjsrwTF6emcwXo2TPMbs8mLavGS7NsvytAppMGKfY="; + sha256 = "sha256-qIRtdgfGDNbZk9TQ3GC3lYetRqjOk8QPhAb4MuFuN0U="; }; cmakeFlags = ["-DCMAKE_BUILD_TYPE='Release'"]; diff --git a/pkgs/by-name/sp/spotifywm/package.nix b/pkgs/by-name/sp/spotifywm/package.nix new file mode 100644 index 000000000000..b8a7db9a3d39 --- /dev/null +++ b/pkgs/by-name/sp/spotifywm/package.nix @@ -0,0 +1,51 @@ +{ + lib, + stdenv, + fetchFromGitHub, + libX11, + lndir, + makeBinaryWrapper, + spotify, +}: +stdenv.mkDerivation { + pname = "spotifywm"; + version = "0-unstable-2022-10-25"; + + src = fetchFromGitHub { + owner = "dasJ"; + repo = "spotifywm"; + rev = "8624f539549973c124ed18753881045968881745"; + hash = "sha256-AsXqcoqUXUFxTG+G+31lm45gjP6qGohEnUSUtKypew0="; + }; + + nativeBuildInputs = [ + makeBinaryWrapper + lndir + ]; + + buildInputs = [ libX11 ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out + + lndir -silent ${spotify} $out + + install -Dm644 spotifywm.so $out/lib/spotifywm.so + + wrapProgram $out/bin/spotify \ + --suffix LD_PRELOAD : "$out/lib/spotifywm.so" + + runHook postInstall + ''; + + meta = { + homepage = "https://github.com/dasJ/spotifywm"; + description = "Wrapper around Spotify that correctly sets class name before opening the window"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ jqueiroz the-argus ]; + mainProgram = "spotify"; + }; +} diff --git a/pkgs/by-name/ti/tippecanoe/package.nix b/pkgs/by-name/ti/tippecanoe/package.nix index 3a949234c65a..80fb8c195cff 100644 --- a/pkgs/by-name/ti/tippecanoe/package.nix +++ b/pkgs/by-name/ti/tippecanoe/package.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "tippecanoe"; - version = "2.46.0"; + version = "2.47.0"; src = fetchFromGitHub { owner = "felt"; repo = "tippecanoe"; rev = finalAttrs.version; - hash = "sha256-UsQb90DKK05JByF3rh6kcvSaugEemU2Gg4c/owImNVs="; + hash = "sha256-tkecrbrkwYJU0eZMzU+7rJGAn+S/vnh/rw5co0x1m5M="; }; buildInputs = [ sqlite zlib ]; @@ -32,5 +32,6 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd2; maintainers = with maintainers; [ sikmir ]; platforms = platforms.unix; + mainProgram = "tippecanoe"; }; }) diff --git a/pkgs/by-name/tr/transfer-sh/package.nix b/pkgs/by-name/tr/transfer-sh/package.nix new file mode 100644 index 000000000000..d3b15ae2465b --- /dev/null +++ b/pkgs/by-name/tr/transfer-sh/package.nix @@ -0,0 +1,36 @@ +{ lib +, fetchFromGitHub +, buildGoModule +, nix-update-script +, nixosTests +}: + +buildGoModule rec { + pname = "transfer-sh"; + version = "1.6.1"; + + src = fetchFromGitHub { + owner = "dutchcoders"; + repo = "transfer.sh"; + rev = "v${version}"; + hash = "sha256-V8E6RwzxKB6KeGPer5074e7y6XHn3ZD24PQMwTxw5lQ="; + }; + + vendorHash = "sha256-C8ZfUIGT9HiQQiJ2hk18uwGaQzNCIKp/Jiz6ePZkgDQ="; + + passthru = { + tests = { + inherit (nixosTests) transfer-sh; + }; + updateScript = nix-update-script { }; + }; + + meta = with lib; { + description = "Easy and fast file sharing and pastebin server with access from the command-line"; + homepage = "https://github.com/dutchcoders/transfer.sh"; + changelog = "https://github.com/dutchcoders/transfer.sh/releases"; + mainProgram = "transfer.sh"; + license = licenses.mit; + maintainers = with maintainers; [ ocfox pinpox ]; + }; +} diff --git a/pkgs/by-name/wa/waycheck/package.nix b/pkgs/by-name/wa/waycheck/package.nix index 0dc22a3d50af..cb78db2d6e38 100644 --- a/pkgs/by-name/wa/waycheck/package.nix +++ b/pkgs/by-name/wa/waycheck/package.nix @@ -12,14 +12,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "waycheck"; - version = "1.1.0"; + version = "1.1.1"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "serebit"; repo = "waycheck"; rev = "v${finalAttrs.version}"; - hash = "sha256-y8fuy2ed2yPRiqusMZBD7mzFBDavmdByBzEaI6P5byk="; + hash = "sha256-kwkdTMA15oJHz9AXEkBGeuzYdEUpNuv/xnhzoKOHCE4="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ya/yamlscript/package.nix b/pkgs/by-name/ya/yamlscript/package.nix new file mode 100644 index 000000000000..dd86546d72d4 --- /dev/null +++ b/pkgs/by-name/ya/yamlscript/package.nix @@ -0,0 +1,40 @@ +{ lib, buildGraalvmNativeImage, fetchurl }: + +buildGraalvmNativeImage rec { + pname = "yamlscript"; + version = "0.1.38"; + + src = fetchurl { + url = "https://github.com/yaml/yamlscript/releases/download/${version}/yamlscript.cli-${version}-standalone.jar"; + hash = "sha256-cdRMmeJTlkEmF4jbElrXgobSU+VIvh/k9Lr9WkOSTl8="; + }; + + executable = "ys"; + + extraNativeImageBuildArgs = [ + "--native-image-info" + "--no-fallback" + "--initialize-at-build-time" + "--enable-preview" + "-H:+ReportExceptionStackTraces" + "-H:IncludeResources=SCI_VERSION" + "-H:Log=registerResource:" + "-J-Dclojure.spec.skip-macros=true" + "-J-Dclojure.compiler.direct-linking=true" + ]; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/ys -e 'say: (+ 1 2)' | fgrep 3 + ''; + + meta = with lib; { + description = "Programming in YAML"; + homepage = "https://github.com/yaml/yamlscript"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + license = licenses.mit; + mainProgram = "ys"; + maintainers = with maintainers; [ sgo ]; + }; +} diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index 3a2476aaad6d..e8933d045e37 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -24,12 +24,12 @@ let sha256 = "189gjqzdz10xh3ybiy4ch1r98bsmkcb4hpnrmggd4y2g5kqnyx4y"; }; - "2.4.0" = { - sha256 = "sha256-g9i3TwjSJUxZuXkLwfZp4JCZRXuIRyDs7L9F9LRtF3Y="; - }; "2.4.1" = { sha256 = "sha256-2k+UhvrUE9OversbCSaTJf20v/fnuI8hld3udDJjz34="; }; + "2.4.2" = { + sha256 = "sha256-/APLUtEqr+h1nmMoRQogG73fibFwcaToPznoC0Pd7w8="; + }; }; # Collection of pre-built SBCL binaries for platforms that need them for # bootstrapping. Ideally these are to be avoided. If CLISP (or any other @@ -96,10 +96,9 @@ stdenv.mkDerivation (self: rec { ); buildInputs = lib.optionals coreCompression [ zstd ]; - patches = [ + patches = lib.optionals (lib.versionOlder self.version "2.4.2") [ + # Fixed in 2.4.2 ./search-for-binaries-in-PATH.patch - ] ++ lib.optionals (version == "2.4.0") [ - ./fix-2.4.0-aarch64-darwin.patch ]; # I don’t know why these are failing (on ofBorg), and I’d rather just disable diff --git a/pkgs/development/libraries/CGAL/default.nix b/pkgs/development/libraries/CGAL/default.nix index 672facdc230c..e7d26606f271 100644 --- a/pkgs/development/libraries/CGAL/default.nix +++ b/pkgs/development/libraries/CGAL/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "cgal"; - version = "5.5.3"; + version = "5.6.1"; src = fetchurl { url = "https://github.com/CGAL/cgal/releases/download/v${version}/CGAL-${version}.tar.xz"; - hash = "sha256-CgT2YmkyVjKLBbq/q7XjpbfbL1pY1S48Ug350IKN3XM="; + hash = "sha256-zbFefuMeBmNYnTEHp5mIo3t7FxnfPSTyBYVF0bzdWDc="; }; # note: optional component libCGAL_ImageIO would need zlib and opengl; diff --git a/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix b/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix index 65ce6580dcec..198d94dbee7e 100644 --- a/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix +++ b/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix @@ -8,10 +8,10 @@ stdenv.mkDerivation rec { version = "2.10"; src = fetchFromGitHub { - owner = "c4dm"; + owner = "vamp-plugins"; repo = "vamp-plugin-sdk"; rev = "vamp-plugin-sdk-v${version}"; - sha256 = "1lhmskcyk7qqfikmasiw7wjry74gc8g5q6a3j1iya84yd7ll0cz6"; + hash = "sha256-5jNA6WmeIOVjkEMZXB5ijxyfJT88alVndBif6dnUFdI="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/development/libraries/libime/default.nix b/pkgs/development/libraries/libime/default.nix index 5f914485993a..ff9301eb9caf 100644 --- a/pkgs/development/libraries/libime/default.nix +++ b/pkgs/development/libraries/libime/default.nix @@ -29,13 +29,13 @@ let in stdenv.mkDerivation rec { pname = "libime"; - version = "1.1.5"; + version = "1.1.6"; src = fetchFromGitHub { owner = "fcitx"; repo = "libime"; rev = version; - hash = "sha256-AvlQOpjrHSifUtWSTft2bywlWhwka26VcqqReqAlcv8="; + hash = "sha256-PhzJtAGmSkMeXMSe2uR/JKHKlZtL0e3tPDZVoRCvAis="; fetchSubmodules = true; }; diff --git a/pkgs/development/libraries/nng/default.nix b/pkgs/development/libraries/nng/default.nix index e6b851817eff..34f0aee7d707 100644 --- a/pkgs/development/libraries/nng/default.nix +++ b/pkgs/development/libraries/nng/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "nng"; - version = "1.7.2"; + version = "1.7.3"; src = fetchFromGitHub { owner = "nanomsg"; repo = "nng"; rev = "v${version}"; - hash = "sha256-CG6Gw/Qrbi96koF2VxKMYPMPT2Zj9U97vNk2JdrfRro="; + hash = "sha256-oP7hO3wCXNPW7877wK+HpGsw7j+U0q4i8aTRVi1v0r0="; }; nativeBuildInputs = [ cmake ninja ] diff --git a/pkgs/development/libraries/xcb-imdkit/default.nix b/pkgs/development/libraries/xcb-imdkit/default.nix index a0fd70e10d3b..0483d2718541 100644 --- a/pkgs/development/libraries/xcb-imdkit/default.nix +++ b/pkgs/development/libraries/xcb-imdkit/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "xcb-imdkit"; - version = "1.0.6"; + version = "1.0.7"; src = fetchFromGitHub { owner = "fcitx"; repo = "xcb-imdkit"; rev = version; - sha256 = "sha256-1+x4KE2xh6KWbdCBlPxDvHvcKUEj4hiW4fEPCeYfTwc="; + sha256 = "sha256-trfKWCMIuYV0XyCcIsNP8LCTc0MYotXvslRvp76YnKU="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/zlog/default.nix b/pkgs/development/libraries/zlog/default.nix index 4baa18b9d46f..df6c253075e6 100644 --- a/pkgs/development/libraries/zlog/default.nix +++ b/pkgs/development/libraries/zlog/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { version = "1.2.17"; @@ -11,6 +11,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-ckpDMRLxObpl8N539DC5u2bPpmD7jM+KugurUfta6tg="; }; + patches = [ + (fetchpatch { + name = "CVE-2024-22857.patch"; + url = "https://github.com/HardySimpson/zlog/commit/c47f781a9f1e9604f5201e27d046d925d0d48ac4.patch"; + hash = "sha256-3FAAHJ2R/OpNpErWXptjEh0x370/jzvK2VhuUuyaOjE="; + }) + ]; + makeFlags = [ "PREFIX=${placeholder "out"}" ]; meta = with lib; { diff --git a/pkgs/development/php-packages/psalm/composer.lock b/pkgs/development/php-packages/psalm/composer.lock index 32838e6eb725..782901f11bd0 100644 --- a/pkgs/development/php-packages/psalm/composer.lock +++ b/pkgs/development/php-packages/psalm/composer.lock @@ -1192,46 +1192,47 @@ }, { "name": "symfony/console", - "version": "v7.0.3", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456" + "reference": "0d9e4eb5ad413075624378f474c4167ea202de78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c5010d50f1ee4b25cfa0201d9915cf1b14071456", - "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456", + "url": "https://api.github.com/repos/symfony/console/zipball/0d9e4eb5ad413075624378f474c4167ea202de78", + "reference": "0d9e4eb5ad413075624378f474c4167ea202de78", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1265,7 +1266,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.0.3" + "source": "https://github.com/symfony/console/tree/v6.4.4" }, "funding": [ { @@ -1281,24 +1282,91 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-02-22T20:27:10+00:00" }, { - "name": "symfony/filesystem", - "version": "v7.0.3", + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "2890e3a825bc0c0558526c04499c13f83e1b6b12" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/2890e3a825bc0c0558526c04499c13f83e1b6b12", - "reference": "2890e3a825bc0c0558526c04499c13f83e1b6b12", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", + "reference": "7f3b1755eb49297a0827a7575d5d2b2fd11cc9fb", + "shasum": "" + }, + "require": { + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -1328,7 +1396,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.0.3" + "source": "https://github.com/symfony/filesystem/tree/v6.4.3" }, "funding": [ { @@ -1344,7 +1412,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1748,20 +1816,20 @@ }, { "name": "symfony/string", - "version": "v7.0.3", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "524aac4a280b90a4420d8d6a040718d0586505ac" + "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/524aac4a280b90a4420d8d6a040718d0586505ac", - "reference": "524aac4a280b90a4420d8d6a040718d0586505ac", + "url": "https://api.github.com/repos/symfony/string/zipball/4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", + "reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -1771,11 +1839,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1814,7 +1882,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.3" + "source": "https://github.com/symfony/string/tree/v6.4.4" }, "funding": [ { @@ -1830,7 +1898,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T15:41:16+00:00" + "time": "2024-02-01T13:16:41+00:00" }, { "name": "webmozart/assert", @@ -4448,20 +4516,20 @@ }, { "name": "symfony/process", - "version": "v7.0.3", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "937a195147e0c27b2759ade834169ed006d0bc74" + "reference": "710e27879e9be3395de2b98da3f52a946039f297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/937a195147e0c27b2759ade834169ed006d0bc74", - "reference": "937a195147e0c27b2759ade834169ed006d0bc74", + "url": "https://api.github.com/repos/symfony/process/zipball/710e27879e9be3395de2b98da3f52a946039f297", + "reference": "710e27879e9be3395de2b98da3f52a946039f297", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -4489,7 +4557,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.0.3" + "source": "https://github.com/symfony/process/tree/v6.4.4" }, "funding": [ { @@ -4505,7 +4573,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-02-20T12:31:00+00:00" }, { "name": "theseer/tokenizer", diff --git a/pkgs/development/php-packages/psalm/default.nix b/pkgs/development/php-packages/psalm/default.nix index f12357507eb1..b20bbbf301c6 100644 --- a/pkgs/development/php-packages/psalm/default.nix +++ b/pkgs/development/php-packages/psalm/default.nix @@ -17,7 +17,7 @@ php.buildComposerProject (finalAttrs: { # Missing `composer.lock` from the repository. # Issue open at https://github.com/vimeo/psalm/issues/10446 composerLock = ./composer.lock; - vendorHash = "sha256-URPyV1V/8BP8fbJqyYLf+XKG786hY2BbAzUphzPyPCs="; + vendorHash = "sha256-AgvAaHcCYosS3yRrp9EFdqTjg6NzQRCr8ELSza9DvZ8="; meta = { changelog = "https://github.com/vimeo/psalm/releases/tag/${finalAttrs.version}"; diff --git a/pkgs/development/python-modules/aioairzone-cloud/default.nix b/pkgs/development/python-modules/aioairzone-cloud/default.nix index dab1e05180f9..694f1ca73335 100644 --- a/pkgs/development/python-modules/aioairzone-cloud/default.nix +++ b/pkgs/development/python-modules/aioairzone-cloud/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "aioairzone-cloud"; - version = "0.3.8"; + version = "0.4.5"; pyproject = true; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "Noltari"; repo = "aioairzone-cloud"; rev = "refs/tags/${version}"; - hash = "sha256-h9WUHehTXg73qqpw+sMxoQMzOV+io2GvjwXlr4gF2ns="; + hash = "sha256-G+tzA4VEdpRFVouj8Uv7BJLgSTOO5eKkNntVL1bIzXY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/aioautomower/default.nix b/pkgs/development/python-modules/aioautomower/default.nix index 43f8f833703a..486781c4c97d 100644 --- a/pkgs/development/python-modules/aioautomower/default.nix +++ b/pkgs/development/python-modules/aioautomower/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "aioautomower"; - version = "2024.2.9"; + version = "2024.2.10"; pyproject = true; disabled = pythonOlder "3.11"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "Thomas55555"; repo = "aioautomower"; rev = "refs/tags/${version}"; - hash = "sha256-vjg7y+9E4R1Q7h+ao/ttuRbvui4u5hESR8tImWSO04U="; + hash = "sha256-NRcLyuU5FFIKJALUrx5iVSihzgO6ljqaqlhbs+y2E4Q="; }; postPatch = '' diff --git a/pkgs/development/python-modules/aiomysensors/default.nix b/pkgs/development/python-modules/aiomysensors/default.nix index 15c71c5cba68..404a9c2c3a77 100644 --- a/pkgs/development/python-modules/aiomysensors/default.nix +++ b/pkgs/development/python-modules/aiomysensors/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "aiomysensors"; - version = "0.3.12"; + version = "0.3.13"; pyproject = true; disabled = pythonOlder "3.9"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "MartinHjelmare"; repo = "aiomysensors"; rev = "refs/tags/v${version}"; - hash = "sha256-9M5WuBoezbZr7OwJaM0m2CqibziJVwqANGOhiJrqfxA="; + hash = "sha256-2i2QodEWOZ/nih6ap5ovWuKxILB5arusnqOiOlb4xWM="; }; postPatch = '' diff --git a/pkgs/development/python-modules/aiounittest/default.nix b/pkgs/development/python-modules/aiounittest/default.nix index 045613837902..1c97a430503a 100644 --- a/pkgs/development/python-modules/aiounittest/default.nix +++ b/pkgs/development/python-modules/aiounittest/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , pythonAtLeast , setuptools -, nose +, pynose , coverage , wrapt }: @@ -13,9 +13,6 @@ buildPythonPackage rec { version = "1.4.2"; pyproject = true; - # requires the imp module - disabled = pythonAtLeast "3.12"; - src = fetchFromGitHub { owner = "kwarunek"; repo = pname; @@ -32,12 +29,12 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - nose + pynose coverage ]; checkPhase = '' - nosetests + nosetests -e test_specific_test ''; pythonImportsCheck = [ "aiounittest" ]; diff --git a/pkgs/development/python-modules/boto3-stubs/default.nix b/pkgs/development/python-modules/boto3-stubs/default.nix index 371497c895fb..5a425a342b63 100644 --- a/pkgs/development/python-modules/boto3-stubs/default.nix +++ b/pkgs/development/python-modules/boto3-stubs/default.nix @@ -365,14 +365,14 @@ buildPythonPackage rec { pname = "boto3-stubs"; - version = "1.34.52"; + version = "1.34.53"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-gjxBBZ+DbWh32qocvSD4E8jxp4uf3ykLwLhTEn4Se6M="; + hash = "sha256-/zGbNI+nsNbkD2hTeClyZvk5A4wG0E4JGKpazy5TLCw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/botocore-stubs/default.nix b/pkgs/development/python-modules/botocore-stubs/default.nix index 808deb064ad8..4f12ba1530fd 100644 --- a/pkgs/development/python-modules/botocore-stubs/default.nix +++ b/pkgs/development/python-modules/botocore-stubs/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "botocore-stubs"; - version = "1.34.52"; + version = "1.34.53"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "botocore_stubs"; inherit version; - hash = "sha256-pRtsofyprNqp6AQS83FTaQ//rX7SJ3Q8xTCAmSDSoAk="; + hash = "sha256-41fme2SpxtfeEOdmzSxmWJJkJXRG26bl7hwt/Ltjvlw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix index 6d5aa4032c2d..c2e8eb3a48d5 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 = "6.4.1"; + version = "6.4.2"; 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-IhiH1Vk/Wf6cTxijxE1erkQozY+vOVd5pu6tAVUoDJM="; + hash = "sha256-uDppmYJiQt2Yix5vaWYqMDbPcHOEPz2pBK11lUZ54fI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/fairseq/default.nix b/pkgs/development/python-modules/fairseq/default.nix index 35275c32780a..e784f8ec0b0d 100644 --- a/pkgs/development/python-modules/fairseq/default.nix +++ b/pkgs/development/python-modules/fairseq/default.nix @@ -96,6 +96,7 @@ buildPythonPackage rec { disabledTests = [ # this test requires xformers "test_xformers_single_forward_parity" + "test_mask_for_xformers" # this test requires iopath "test_file_io_async" # these tests require network access @@ -105,6 +106,8 @@ buildPythonPackage rec { "test_waitk_checkpoint" "test_sotasty_es_en_600m_checkpoint" "test_librispeech_s2t_conformer_s_checkpoint" + # TODO research failure + "test_multilingual_translation_latent_depth" ]; disabledTestPaths = [ @@ -117,6 +120,7 @@ buildPythonPackage rec { homepage = "https://github.com/pytorch/fairseq"; license = licenses.mit; platforms = platforms.linux; + hydraPlatforms = []; maintainers = with maintainers; [ happysalada ]; }; } diff --git a/pkgs/development/python-modules/huggingface-hub/default.nix b/pkgs/development/python-modules/huggingface-hub/default.nix index f57aa1a4cbb9..544fc22078a6 100644 --- a/pkgs/development/python-modules/huggingface-hub/default.nix +++ b/pkgs/development/python-modules/huggingface-hub/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "huggingface-hub"; - version = "0.21.2"; + version = "0.21.3"; pyproject = true; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "huggingface"; repo = "huggingface_hub"; rev = "refs/tags/v${version}"; - hash = "sha256-0Nr6qs9rzuBQo8SGuQ2Ai2Q+E+Gs4DT/AMrYf7dYM/E="; + hash = "sha256-DtKb/mR01vifclDalZiZV4/A4XpTKBcT9bCiLZkRCZY="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/jaxtyping/default.nix b/pkgs/development/python-modules/jaxtyping/default.nix index cb73681bc276..26e638f98e32 100644 --- a/pkgs/development/python-modules/jaxtyping/default.nix +++ b/pkgs/development/python-modules/jaxtyping/default.nix @@ -3,6 +3,7 @@ , pythonOlder , fetchFromGitHub , hatchling +, pythonRelaxDepsHook , numpy , typeguard , typing-extensions @@ -19,7 +20,7 @@ let self = buildPythonPackage rec { pname = "jaxtyping"; - version = "0.2.25"; + version = "0.2.26"; pyproject = true; disabled = pythonOlder "3.9"; @@ -28,16 +29,12 @@ let owner = "google"; repo = "jaxtyping"; rev = "refs/tags/v${version}"; - hash = "sha256-+JqpI5xrM7o73LG6oMix88Jr5aptmWYjJQcqUNo7icg="; + hash = "sha256-2QDTRNH2/9FPU5xrQx7yZRHwEWqj0PUNzcCuKwY4yNg="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "typeguard>=2.13.3,<3" "typeguard" - ''; - nativeBuildInputs = [ hatchling + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -46,6 +43,10 @@ let typing-extensions ]; + pythonRelaxDeps = [ + "typeguard" + ]; + nativeCheckInputs = [ cloudpickle equinox diff --git a/pkgs/development/python-modules/mmengine/default.nix b/pkgs/development/python-modules/mmengine/default.nix index dd4e9095325f..347d22d569e0 100644 --- a/pkgs/development/python-modules/mmengine/default.nix +++ b/pkgs/development/python-modules/mmengine/default.nix @@ -69,6 +69,10 @@ buildPythonPackage rec { disabledTestPaths = [ # AttributeError "tests/test_fileio/test_backends/test_petrel_backend.py" + # Freezes forever? + "tests/test_runner/test_activation_checkpointing.py" + # missing dependencies + "tests/test_visualizer/test_vis_backend.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/openai/default.nix b/pkgs/development/python-modules/openai/default.nix index 78ace71a3575..fb05e0a18dd3 100644 --- a/pkgs/development/python-modules/openai/default.nix +++ b/pkgs/development/python-modules/openai/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { pname = "openai"; - version = "1.13.2"; + version = "1.13.3"; pyproject = true; disabled = pythonOlder "3.7.1"; @@ -35,7 +35,7 @@ buildPythonPackage rec { owner = "openai"; repo = "openai-python"; rev = "refs/tags/v${version}"; - hash = "sha256-3otPmMVV/Wx7k/oec5c1r6GcZGzhMSKifJB8S5nBSZw="; + hash = "sha256-8SHXUrPLZ7lgvB0jqZlcvKq5Zv2d2UqXjJpgiBpR8P8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/py-serializable/default.nix b/pkgs/development/python-modules/py-serializable/default.nix index 0954993ccd1f..2834aeaf53d9 100644 --- a/pkgs/development/python-modules/py-serializable/default.nix +++ b/pkgs/development/python-modules/py-serializable/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "py-serializable"; - version = "1.0.1"; + version = "1.0.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "madpah"; repo = "serializable"; rev = "refs/tags/v${version}"; - hash = "sha256-OsgFzT5qGyszO4jFYWIAgGY41s0ZBEMwCbWZeY189h4="; + hash = "sha256-RhipoPTewPaYwspTnywLr5FvFVUaFixfRQk6aUMvB4w="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pyctr/default.nix b/pkgs/development/python-modules/pyctr/default.nix index 0ce889fdb739..cf225369b395 100644 --- a/pkgs/development/python-modules/pyctr/default.nix +++ b/pkgs/development/python-modules/pyctr/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "pyctr"; - version = "0.7.4"; + version = "0.7.5"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-1nPP+rz/8BiFHu3nGcHuqCPwyyR55LUhoBprHFTudWQ="; + hash = "sha256-fiDJWcypFabnUoS313f56ypDuDrLASHrkk0Em8bymmw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pyoverkiz/default.nix b/pkgs/development/python-modules/pyoverkiz/default.nix index 86bcf10bcf3d..bf1efac9de74 100644 --- a/pkgs/development/python-modules/pyoverkiz/default.nix +++ b/pkgs/development/python-modules/pyoverkiz/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "pyoverkiz"; - version = "1.13.7"; + version = "1.13.8"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "iMicknl"; repo = "python-overkiz-api"; rev = "refs/tags/v${version}"; - hash = "sha256-wH4LCfjnxAwub/BCe27osyJVUZSOMDjjxItv0aEa8Ic="; + hash = "sha256-tvS7aPfBTs75Rq1WGslWDMv1pOTVt7MtwpXPRJtqbuk="; }; postPatch = '' diff --git a/pkgs/development/python-modules/python-heatclient/default.nix b/pkgs/development/python-modules/python-heatclient/default.nix index 2af9483dd264..2319ecda0bfe 100644 --- a/pkgs/development/python-modules/python-heatclient/default.nix +++ b/pkgs/development/python-modules/python-heatclient/default.nix @@ -21,14 +21,14 @@ buildPythonPackage rec { pname = "python-heatclient"; - version = "3.4.0"; + version = "3.5.0"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-ggfhDJW2qn0o4Wi5cdPsEpoHb9miZbr4Ba8mgLkStvI="; + hash = "sha256-B1F40HYHFF91mkxwySR/kqCvlwLLtBgqwUvw2byOc9g="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/python-ironicclient/default.nix b/pkgs/development/python-modules/python-ironicclient/default.nix index 10af09c06720..5839498bbe96 100644 --- a/pkgs/development/python-modules/python-ironicclient/default.nix +++ b/pkgs/development/python-modules/python-ironicclient/default.nix @@ -20,12 +20,12 @@ buildPythonPackage rec { pname = "python-ironicclient"; - version = "5.4.0"; + version = "5.5.0"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-Q9yGuYf9TS7RCo9aV1hnNSrHoll7AOUiSpzRYxi+JXU="; + hash = "sha256-JlO487QSPsBJZqPYRhsQYFA7noIN2q/stH4eZXAFLnY="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/python-matter-server/default.nix b/pkgs/development/python-modules/python-matter-server/default.nix index 588f2042bd9b..31064f369379 100644 --- a/pkgs/development/python-modules/python-matter-server/default.nix +++ b/pkgs/development/python-modules/python-matter-server/default.nix @@ -2,6 +2,8 @@ , buildPythonPackage , fetchFromGitHub , pythonOlder +, stdenvNoCC +, substituteAll # build , setuptools @@ -28,6 +30,29 @@ , pytestCheckHook }: +let + paaCerts = stdenvNoCC.mkDerivation rec { + pname = "matter-server-paa-certificates"; + version = "1.2.0.1"; + + src = fetchFromGitHub { + owner = "project-chip"; + repo = "connectedhomeip"; + rev = "refs/tags/v${version}"; + hash = "sha256-p3P0n5oKRasYz386K2bhN3QVfN6oFndFIUWLEUWB0ss="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp $src/credentials/development/paa-root-certs/* $out/ + + runHook postInstall + ''; + }; +in + buildPythonPackage rec { pname = "python-matter-server"; version = "5.7.0b2"; @@ -42,6 +67,13 @@ buildPythonPackage rec { hash = "sha256-fMtvVizHeAzLdou0U1tqbmQATIBLK4w9I7EwMlzB8QA="; }; + patches = [ + (substituteAll { + src = ./link-paa-root-certs.patch; + paacerts = paaCerts; + }) + ]; + postPatch = '' substituteInPlace pyproject.toml \ --replace 'version = "0.0.0"' 'version = "${version}"' \ diff --git a/pkgs/development/python-modules/python-matter-server/link-paa-root-certs.patch b/pkgs/development/python-modules/python-matter-server/link-paa-root-certs.patch new file mode 100644 index 000000000000..a788f69144b8 --- /dev/null +++ b/pkgs/development/python-modules/python-matter-server/link-paa-root-certs.patch @@ -0,0 +1,126 @@ +diff --git a/matter_server/server/const.py b/matter_server/server/const.py +index b6cd839..f9f798f 100644 +--- a/matter_server/server/const.py ++++ b/matter_server/server/const.py +@@ -5,14 +5,4 @@ from typing import Final + # The minimum schema version (of a client) the server can support + MIN_SCHEMA_VERSION = 5 + +-# the paa-root-certs path is hardcoded in the sdk at this time +-# and always uses the development subfolder +-# regardless of anything you pass into instantiating the controller +-# revisit this once matter 1.1 is released +-PAA_ROOT_CERTS_DIR: Final[pathlib.Path] = ( +- pathlib.Path(__file__) +- .parent.resolve() +- .parent.resolve() +- .parent.resolve() +- .joinpath("credentials/development/paa-root-certs") +-) ++PAA_ROOT_CERTS_DIR: Final[pathlib.Path] = pathlib.Path("@paacerts@") +diff --git a/matter_server/server/helpers/paa_certificates.py b/matter_server/server/helpers/paa_certificates.py +index 9ac5a10..25230c1 100644 +--- a/matter_server/server/helpers/paa_certificates.py ++++ b/matter_server/server/helpers/paa_certificates.py +@@ -58,84 +58,14 @@ async def fetch_dcl_certificates( + fetch_production_certificates: bool = True, + ) -> int: + """Fetch DCL PAA Certificates.""" +- LOGGER.info("Fetching the latest PAA root certificates from DCL.") +- if not PAA_ROOT_CERTS_DIR.is_dir(): +- loop = asyncio.get_running_loop() +- await loop.run_in_executor(None, makedirs, PAA_ROOT_CERTS_DIR) +- fetch_count: int = 0 +- base_urls = set() +- # determine which url's need to be queried. +- # if we're going to fetch both prod and test, do test first +- # so any duplicates will be overwritten/preferred by the production version +- # NOTE: While Matter is in BETA we fetch the test certificates by default +- if fetch_test_certificates: +- base_urls.add(TEST_URL) +- if fetch_production_certificates: +- base_urls.add(PRODUCTION_URL) + +- try: +- async with ClientSession(raise_for_status=True) as http_session: +- for url_base in base_urls: +- # fetch the paa certificates list +- async with http_session.get( +- f"{url_base}/dcl/pki/root-certificates" +- ) as response: +- result = await response.json() +- paa_list = result["approvedRootCertificates"]["certs"] +- # grab each certificate +- for paa in paa_list: +- # do not fetch a certificate if we already fetched it +- if paa["subjectKeyId"] in LAST_CERT_IDS: +- continue +- async with http_session.get( +- f"{url_base}/dcl/pki/certificates/{paa['subject']}/{paa['subjectKeyId']}" +- ) as response: +- result = await response.json() +- +- certificate_data: dict = result["approvedCertificates"]["certs"][0] +- certificate: str = certificate_data["pemCert"] +- subject = certificate_data["subjectAsText"] +- certificate = certificate.rstrip("\n") +- +- await write_paa_root_cert( +- certificate, +- subject, +- ) +- LAST_CERT_IDS.add(paa["subjectKeyId"]) +- fetch_count += 1 +- except ClientError as err: +- LOGGER.warning( +- "Fetching latest certificates failed: error %s", err, exc_info=err +- ) +- else: +- LOGGER.info("Fetched %s PAA root certificates from DCL.", fetch_count) +- +- return fetch_count ++ return 0 + + + async def fetch_git_certificates() -> int: + """Fetch Git PAA Certificates.""" +- fetch_count = 0 +- LOGGER.info("Fetching the latest PAA root certificates from Git.") +- try: +- async with ClientSession(raise_for_status=True) as http_session: +- for cert in GIT_CERTS: +- if cert in LAST_CERT_IDS: +- continue + +- async with http_session.get(f"{GIT_URL}/{cert}.pem") as response: +- certificate = await response.text() +- await write_paa_root_cert(certificate, cert) +- LAST_CERT_IDS.add(cert) +- fetch_count += 1 +- except ClientError as err: +- LOGGER.warning( +- "Fetching latest certificates failed: error %s", err, exc_info=err +- ) +- +- LOGGER.info("Fetched %s PAA root certificates from Git.", fetch_count) +- +- return fetch_count ++ return 0 + + + async def fetch_certificates( +@@ -144,12 +74,4 @@ async def fetch_certificates( + ) -> int: + """Fetch PAA Certificates.""" + +- fetch_count = await fetch_dcl_certificates( +- fetch_test_certificates=fetch_test_certificates, +- fetch_production_certificates=fetch_production_certificates, +- ) +- +- if fetch_test_certificates: +- fetch_count += await fetch_git_certificates() +- +- return fetch_count ++ return 0 + diff --git a/pkgs/development/python-modules/python-novaclient/default.nix b/pkgs/development/python-modules/python-novaclient/default.nix index 1bad0f4e6930..866e4cb097ec 100644 --- a/pkgs/development/python-modules/python-novaclient/default.nix +++ b/pkgs/development/python-modules/python-novaclient/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "python-novaclient"; - version = "18.4.0"; + version = "18.5.0"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-a2tq4sEescEI469V6qchGw/JGZk1oimmuj4N5RTBK1A="; + hash = "sha256-4j7kQMDI6uK1OvqIHTCsrsBof8660kY5HsKblsVDA40="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/python-swiftclient/default.nix b/pkgs/development/python-modules/python-swiftclient/default.nix index e34bad425b3c..8c0239e2bc50 100644 --- a/pkgs/development/python-modules/python-swiftclient/default.nix +++ b/pkgs/development/python-modules/python-swiftclient/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "python-swiftclient"; - version = "4.4.0"; + version = "4.5.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-p32Xqw5AEsZ4cy5XW9/u0oKzSJuRdegsRqR6yEke7oQ="; + hash = "sha256-8qCIflo5KXq8BDJRrj+QiRTOFEei+NLcpWcWGGCBQr0="; }; # remove duplicate script that will be created by setuptools from the diff --git a/pkgs/development/python-modules/remotezip/default.nix b/pkgs/development/python-modules/remotezip/default.nix index 6581fc6189be..e7ed4b1c356d 100644 --- a/pkgs/development/python-modules/remotezip/default.nix +++ b/pkgs/development/python-modules/remotezip/default.nix @@ -1,36 +1,35 @@ { lib , buildPythonPackage , fetchFromGitHub +, setuptools , requests , tabulate , pytestCheckHook , requests-mock }: -buildPythonPackage { +buildPythonPackage rec { pname = "remotezip"; - version = "0.12.2"; - format = "setuptools"; + version = "0.12.3"; + pyproject = true; src = fetchFromGitHub { owner = "gtsystem"; repo = "python-remotezip"; - # upstream does not tag releases, determined with git blame - # pypi archive lacks files for tests - rev = "3723724d6d877d3166d52f4528ffa7bd5bf6627f"; - hash = "sha256-iYxHW8RdLFrpjkcEvpfF/NWBnw7Dd5cx2ghpof2XFn4="; + rev = "refs/tags/v${version}"; + hash = "sha256-TNEM7Dm4iH4Z/P/PAqjJppbn1CKmyi9Xpq/sU9O8uxg="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ requests - tabulate ]; nativeCheckInputs = [ pytestCheckHook - ]; - - checkInputs = [ requests-mock ]; diff --git a/pkgs/development/python-modules/spyder-kernels/default.nix b/pkgs/development/python-modules/spyder-kernels/default.nix index f62c4d7c9ede..30f76ffd6258 100644 --- a/pkgs/development/python-modules/spyder-kernels/default.nix +++ b/pkgs/development/python-modules/spyder-kernels/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "spyder-kernels"; - version = "2.5.0"; + version = "2.5.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-M2hCbARFfgIRiE6SdPpH61ViUrpMBz3ydeg8Zd97oqE="; + hash = "sha256-BQQqP5eyXxfN+o11AR/Xmq8CdSM0ip3/8PWiC92wubA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix b/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix index c91dce1a4c59..2dc2ebbf9238 100644 --- a/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix +++ b/pkgs/development/python-modules/tencentcloud-sdk-python/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "tencentcloud-sdk-python"; - version = "3.0.1094"; + version = "3.0.1098"; pyproject = true; disabled = pythonOlder "3.9"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "TencentCloud"; repo = "tencentcloud-sdk-python"; rev = "refs/tags/${version}"; - hash = "sha256-h2p9auD8bTDbagAmjsmV06Z75I93LB6h+/ZYyt17ow0="; + hash = "sha256-5BG5WizkBP/KYHS00v949uQgiCChR3DWW0MnMXRBDAs="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/textnets/default.nix b/pkgs/development/python-modules/textnets/default.nix index f0dd9ab9a650..2ba5ff701919 100644 --- a/pkgs/development/python-modules/textnets/default.nix +++ b/pkgs/development/python-modules/textnets/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , cairocffi -, cython +, cython_3 , fetchPypi , igraph , leidenalg @@ -9,6 +9,7 @@ , poetry-core , pytestCheckHook , pythonOlder +, pythonRelaxDepsHook , scipy , setuptools , spacy @@ -21,22 +22,25 @@ buildPythonPackage rec { pname = "textnets"; - version = "0.9.3"; + version = "0.9.4"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-fx2S43IqpSMsfJow26jB/D27dyUFQ1PlXP1rbUIZPPQ="; + hash = "sha256-4154ytzo1QpwhKA1BkVMss9fNIkysnClW/yfSVlX33M="; }; nativeBuildInputs = [ - cython + pythonRelaxDepsHook + cython_3 poetry-core setuptools ]; + pythonRelaxDeps = [ "igraph" "leidenalg" ]; + propagatedBuildInputs = [ cairocffi igraph @@ -59,10 +63,14 @@ buildPythonPackage rec { "textnets" ]; + # Enables the package to find the cythonized .so files during testing. See #255262 + preCheck = '' + rm -r textnets + ''; + disabledTests = [ - # Test fails: A warning is triggered because of a deprecation notice by pandas. - # TODO: Try to re-enable it when pandas is updated to 2.1.1 - "test_corpus_czech" + # Test fails: Throws a UserWarning asking the user to install `textnets[fca]`. + "test_context" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index de3fabc2ba28..0a0af07b89ee 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { pname = "transformers"; - version = "4.38.1"; + version = "4.38.2"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -62,7 +62,7 @@ buildPythonPackage rec { owner = "huggingface"; repo = "transformers"; rev = "refs/tags/v${version}"; - hash = "sha256-92WmvSFZYCCG4qJprPT7clYa7ePuvyaCvxni/spDhSw="; + hash = "sha256-/rt2XHN46NcFwlM9MOygVvpQkfPVu2eCNybYmSj711M="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/types-awscrt/default.nix b/pkgs/development/python-modules/types-awscrt/default.nix index ad5041ddea67..7b0e42df6d5a 100644 --- a/pkgs/development/python-modules/types-awscrt/default.nix +++ b/pkgs/development/python-modules/types-awscrt/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "types-awscrt"; - version = "0.20.4"; + version = "0.20.5"; pyproject = true; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "types_awscrt"; inherit version; - hash = "sha256-ECRVcMcoXpSTYrSucQxUvyhdZKJ0U9QnYkd7zuXNd6M="; + hash = "sha256-YYEbv03pUkiTn5J2pDS+k9K5X2zP6KqU5WmZ6XeM/MI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/types-pyopenssl/default.nix b/pkgs/development/python-modules/types-pyopenssl/default.nix index 7a0a60049296..32859f099955 100644 --- a/pkgs/development/python-modules/types-pyopenssl/default.nix +++ b/pkgs/development/python-modules/types-pyopenssl/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "types-pyopenssl"; - version = "24.0.0.20240130"; + version = "24.0.0.20240228"; format = "setuptools"; src = fetchPypi { pname = "types-pyOpenSSL"; inherit version; - hash = "sha256-yBLlwcNSSfde9ZNXCLKpl9Yqv5dFviIuX5S5WVRyqyU="; + hash = "sha256-zZkHF9iqN0PvDnPg9GLmS1TZDDBCSSMtSP7OTw98PGo="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/uncertainties/default.nix b/pkgs/development/python-modules/uncertainties/default.nix index 040f37847617..827a21c811b7 100644 --- a/pkgs/development/python-modules/uncertainties/default.nix +++ b/pkgs/development/python-modules/uncertainties/default.nix @@ -1,6 +1,9 @@ -{ lib, fetchPypi, buildPythonPackage -, nose, numpy, future -, pythonOlder +{ lib +, buildPythonPackage +, fetchPypi +, future +, numpy +, pynose }: buildPythonPackage rec { @@ -14,14 +17,10 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ future ]; - - # uses removed lib2to3.tests - doCheck = pythonOlder "3.12"; - - nativeCheckInputs = [ nose numpy ]; + nativeCheckInputs = [ pynose numpy ]; checkPhase = '' - nosetests -sv + nosetests -sve test_1to2 ''; meta = with lib; { diff --git a/pkgs/development/python-modules/weconnect/default.nix b/pkgs/development/python-modules/weconnect/default.nix index df6a1529e929..096e41b89bcc 100644 --- a/pkgs/development/python-modules/weconnect/default.nix +++ b/pkgs/development/python-modules/weconnect/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "weconnect"; - version = "0.60.1"; + version = "0.60.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "tillsteinbach"; repo = "WeConnect-python"; rev = "refs/tags/v${version}"; - hash = "sha256-hvV4pbCyzAbi3bKXClzpiyhp+4qnuIj5pViUe7pEq64="; + hash = "sha256-VM4qCe+VMnfKXioUHTjOeBSniwpq44fvbN1k1jG6puk="; }; postPatch = '' diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 1fd0fe8e7cfa..efbd6b88a2a3 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -405,7 +405,7 @@ let rjags = [ pkgs.jags ]; rJava = with pkgs; [ zlib bzip2.dev icu xz.dev pcre.dev jdk libzip ]; Rlibeemd = [ pkgs.gsl ]; - rmatio = [ pkgs.zlib.dev ]; + rmatio = [ pkgs.zlib.dev pkgs.pkg-config ]; Rmpfr = with pkgs; [ gmp mpfr.dev ]; Rmpi = [ pkgs.mpi ]; RMySQL = with pkgs; [ zlib libmysqlclient openssl.dev ]; @@ -946,7 +946,7 @@ let cargoDeps = pkgs.rustPlatform.fetchCargoTarball { src = attrs.src; sourceRoot = "gifski/src/myrustlib"; - hash = "sha256-vBrTQ+5JZA8554Aasbqw7mbaOfJNQjrOpG00IXAcamI="; + hash = "sha256-e6nuiQU22GiO2I+bu0muyICGrdkCLSZUDHDz2mM2hz0="; }; cargoRoot = "src/myrustlib"; diff --git a/pkgs/development/tools/analysis/snyk/default.nix b/pkgs/development/tools/analysis/snyk/default.nix index b87bb1a11634..4eacb2b476f5 100644 --- a/pkgs/development/tools/analysis/snyk/default.nix +++ b/pkgs/development/tools/analysis/snyk/default.nix @@ -2,16 +2,16 @@ buildNpmPackage rec { pname = "snyk"; - version = "1.1280.1"; + version = "1.1281.0"; src = fetchFromGitHub { owner = "snyk"; repo = "cli"; rev = "v${version}"; - hash = "sha256-bwEekB/jifSRktblvq98C3t2xSTTPn4NOftQs/T090U="; + hash = "sha256-QxmYArH9HRq2vkGzfhWlCPLS++UiwdzAStUQxhGF85Q="; }; - npmDepsHash = "sha256-TtWc+Zy6yMHbDdsw5rVKK+RiCZ8ZuXyU+SfcPRgToiA="; + npmDepsHash = "sha256-JxX4r1I/F3PEzg9rLfFNEIa4Q8jwuUWC6krH1oSoc8s="; postPatch = '' substituteInPlace package.json --replace '"version": "1.0.0-monorepo"' '"version": "${version}"' diff --git a/pkgs/development/tools/build-managers/apache-maven/build-package.nix b/pkgs/development/tools/build-managers/apache-maven/build-package.nix index 49c217dbc91c..43fc8e123244 100644 --- a/pkgs/development/tools/build-managers/apache-maven/build-package.nix +++ b/pkgs/development/tools/build-managers/apache-maven/build-package.nix @@ -13,6 +13,7 @@ , mvnFetchExtraArgs ? { } , mvnDepsParameters ? "" , manualMvnArtifacts ? [ ] +, manualMvnSources ? [ ] , mvnParameters ? "" , ... } @args: @@ -39,6 +40,14 @@ let echo "downloading manual $artifactId" mvn dependency:get -Dartifact="$artifactId" -Dmaven.repo.local=$out/.m2 done + + for artifactId in ${builtins.toString manualMvnSources} + do + group=$(echo $artifactId | cut -d':' -f1) + artifact=$(echo $artifactId | cut -d':' -f2) + echo "downloading manual sources $artifactId" + mvn dependency:sources -DincludeGroupIds="$group" -DincludeArtifactIds="$artifact" -Dmaven.repo.local=$out/.m2 + done '' + lib.optionalString (!buildOffline) '' mvn package -Dmaven.repo.local=$out/.m2 ${mvnParameters} '' + '' diff --git a/pkgs/development/tools/language-servers/ruff-lsp/default.nix b/pkgs/development/tools/language-servers/ruff-lsp/default.nix index e446df7f70e2..4cfcb4c6e064 100644 --- a/pkgs/development/tools/language-servers/ruff-lsp/default.nix +++ b/pkgs/development/tools/language-servers/ruff-lsp/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "ruff-lsp"; - version = "0.0.52"; + version = "0.0.53"; pyproject = true; disabled = pythonOlder "3.7"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "astral-sh"; repo = "ruff-lsp"; rev = "refs/tags/v${version}"; - hash = "sha256-T18c0vKy/RUWiDjX2oScVxgVIhlj7t3M/+IoKsQ0N4w="; + hash = "sha256-gtMqIsgGCzSBo5D4+Ne8tUloDV9+MufYkN96yr7XVd4="; }; postPatch = '' diff --git a/pkgs/development/tools/misc/act/default.nix b/pkgs/development/tools/misc/act/default.nix index c620ca1649f0..23b9c24fe95c 100644 --- a/pkgs/development/tools/misc/act/default.nix +++ b/pkgs/development/tools/misc/act/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "act"; - version = "0.2.59"; + version = "0.2.60"; src = fetchFromGitHub { owner = "nektos"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-Y8g+eVZ0c0YPVL8E/JAqD6EheQX6sBHpw1tT88BkbtI="; + hash = "sha256-FFSnxxqKAFYPuX4NJahiBS65Goj6se2U5WdPiKpNXDo="; }; - vendorHash = "sha256-0Sjj9+YJcIkigvJOXxtDVcUylZmVY/Xv/IYpEBN46Is="; + vendorHash = "sha256-FLomnHVhpvbM+O3OGwjXfrtTVbegnzry8Sl+4a3uw08="; doCheck = false; diff --git a/pkgs/development/tools/misc/devspace/default.nix b/pkgs/development/tools/misc/devspace/default.nix index 93707f993cd5..4a1393f79d46 100644 --- a/pkgs/development/tools/misc/devspace/default.nix +++ b/pkgs/development/tools/misc/devspace/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "devspace"; - version = "6.3.11"; + version = "6.3.12"; src = fetchFromGitHub { owner = "devspace-sh"; repo = "devspace"; rev = "v${version}"; - hash = "sha256-g+M34y7GTbQ8FyO4BieNYgo68ZE5x3hyXiMJrx6Nqug="; + hash = "sha256-tnkMXB0BWavSZF3HEdvtCE42zgcHNRGI5CdK3RDvv9c="; }; vendorHash = null; diff --git a/pkgs/development/tools/misc/kool/default.nix b/pkgs/development/tools/misc/kool/default.nix index b5a3c5e77035..fc747a476bdc 100644 --- a/pkgs/development/tools/misc/kool/default.nix +++ b/pkgs/development/tools/misc/kool/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "kool"; - version = "3.1.0"; + version = "3.2.0"; src = fetchFromGitHub { owner = "kool-dev"; repo = "kool"; rev = version; - hash = "sha256-apecHILrtvzD1bAOuyhSokDqBB2UgCavQXOw4dQSPwc="; + hash = "sha256-oMPzDU5MNIgxg7E2lgvgXEfO4W+VrFlLThOC9OEqhWo="; }; vendorHash = "sha256-PmS96KVhe9TDmtYBx2hROLCbGMQ0OY3MN405dUmxPzk="; diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix index 9f9599e047dc..a44c28c18bca 100644 --- a/pkgs/development/tools/mold/default.nix +++ b/pkgs/development/tools/mold/default.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation rec { pname = "mold"; - version = "2.4.0"; + version = "2.4.1"; src = fetchFromGitHub { owner = "rui314"; repo = "mold"; rev = "v${version}"; - hash = "sha256-ufqTbY59AI1MrY/vrsDg5a4WEVz9IFTdgl1GHMw9HGc="; + hash = "sha256-wwlpYAWP8sAsEkTq0w3s2jAWGayW3v9QcaVRKWHTlGE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/oh-my-posh/default.nix b/pkgs/development/tools/oh-my-posh/default.nix index 1458d173e3c6..e1797a606ca4 100644 --- a/pkgs/development/tools/oh-my-posh/default.nix +++ b/pkgs/development/tools/oh-my-posh/default.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "oh-my-posh"; - version = "19.11.4"; + version = "19.11.6"; src = fetchFromGitHub { owner = "jandedobbeleer"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-xViCmfLhvRWi02hFIxKZ+5mrvoSaHRXFj4iLHtVS3uo="; + hash = "sha256-wo8ngZ/rWugYESc1/0WjOa8Zs6aEfXv7VJ7fqqbmSCE="; }; vendorHash = "sha256-OkcwcQfI1CeKIQaaS/Bd1Hct2yebp0TB98lsGAVRWqk="; diff --git a/pkgs/development/tools/open-policy-agent/default.nix b/pkgs/development/tools/open-policy-agent/default.nix index ee249c2c7657..873d9b19da4a 100644 --- a/pkgs/development/tools/open-policy-agent/default.nix +++ b/pkgs/development/tools/open-policy-agent/default.nix @@ -11,13 +11,13 @@ assert enableWasmEval && stdenv.isDarwin -> builtins.throw "building with wasm o buildGoModule rec { pname = "open-policy-agent"; - version = "0.61.0"; + version = "0.62.0"; src = fetchFromGitHub { owner = "open-policy-agent"; repo = "opa"; rev = "v${version}"; - hash = "sha256-d0/S9XP/W6Mhs1b9IBzm7kerb6SJ7UzsYS0DnTDVfvY="; + hash = "sha256-Afaa6ykGyZQGjzSDYuJ954LF0IOzRDG8rV9hgXVT7YE="; }; vendorHash = null; diff --git a/pkgs/development/tools/pip-audit/default.nix b/pkgs/development/tools/pip-audit/default.nix index 3b9ea3b2fd8b..9ff8f51b672d 100644 --- a/pkgs/development/tools/pip-audit/default.nix +++ b/pkgs/development/tools/pip-audit/default.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "pip-audit"; - version = "2.7.1"; + version = "2.7.2"; format = "pyproject"; src = fetchFromGitHub { owner = "trailofbits"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-3OqF4xgRWzX4m4WW2B+cUuHJpNzf2L033ZXwGH0K4b0="; + hash = "sha256-IlIPLuHGmnmt6FgX+Psw+f6XpkuhP+BZ+e4k4DV8e/U="; }; nativeBuildInputs = with python3.pkgs; [ diff --git a/pkgs/development/tools/rain/default.nix b/pkgs/development/tools/rain/default.nix index a07f09a060c7..f400bf192cd4 100644 --- a/pkgs/development/tools/rain/default.nix +++ b/pkgs/development/tools/rain/default.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "rain"; - version = "1.7.5"; + version = "1.8.0"; src = fetchFromGitHub { owner = "aws-cloudformation"; repo = pname; rev = "v${version}"; - sha256 = "sha256-UAh84LM7QbIdxuPGN+lsbjVLd+hk8NXqwDxcRv5FAdY="; + sha256 = "sha256-kU+eNw27jv+yhBIR09zVRedZM5WSIMU68jCkIDWvhgw="; }; - vendorHash = "sha256-kd820Qe/0gN34VnX9Ge4BLeI3yySunJNjOVJXBe/M58="; + vendorHash = "sha256-Ea83gPSq7lReS2KXejY9JlDDEncqS1ouVyIEKbn+VAw="; subPackages = [ "cmd/rain" ]; diff --git a/pkgs/development/tools/rust/cargo-chef/default.nix b/pkgs/development/tools/rust/cargo-chef/default.nix index 69788f43c2ce..19591518b445 100644 --- a/pkgs/development/tools/rust/cargo-chef/default.nix +++ b/pkgs/development/tools/rust/cargo-chef/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "cargo-chef"; - version = "0.1.64"; + version = "0.1.65"; src = fetchCrate { inherit pname version; - sha256 = "sha256-TjmtL/0rr/rJPdWSjL6zD3H49Qhg6YE7irS1xjyc3OA="; + sha256 = "sha256-3G2mgQDSj+IL6gqdhr3Sov9FHwLA6B+MRazLNF+zKZk="; }; - cargoHash = "sha256-1SZZva0b7/0FGqZO4RL5gMnpG+xZwKqLU1Fgv54ewNM="; + cargoHash = "sha256-hWkUvUFYAOqRkoU52bKzEmvNaqASfWLlnWtIuFLMDc8="; meta = with lib; { description = "A cargo-subcommand to speed up Rust Docker builds using Docker layer caching"; diff --git a/pkgs/development/tools/upbound/default.nix b/pkgs/development/tools/upbound/default.nix index c1ac7b1a19b0..6d91ea46a969 100644 --- a/pkgs/development/tools/upbound/default.nix +++ b/pkgs/development/tools/upbound/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "upbound"; - version = "0.24.1"; + version = "0.24.2"; src = fetchFromGitHub { owner = pname; repo = "up"; rev = "v${version}"; - sha256 = "sha256-1WSkNL1XpgnkWeL4tDiOxoKX6N5LYepD3DU0109pWC4="; + sha256 = "sha256-MDpe5CM5pgbrdVozh1yXiALLd8BkhrtNjL/su2JubcE="; }; vendorHash = "sha256-jHVwI5fQbS/FhRptRXtNezG1djaZKHJgpPJfuEH/zO0="; diff --git a/pkgs/development/web/twitter-bootstrap/default.nix b/pkgs/development/web/twitter-bootstrap/default.nix index 86b35decf676..328154ef810f 100644 --- a/pkgs/development/web/twitter-bootstrap/default.nix +++ b/pkgs/development/web/twitter-bootstrap/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "bootstrap"; - version = "5.3.2"; + version = "5.3.3"; src = fetchurl { url = "https://github.com/twbs/bootstrap/releases/download/v${finalAttrs.version}/bootstrap-${finalAttrs.version}-dist.zip"; - hash = "sha256-hUlReGqLkaBeQ9DyIATFyddhdeFv1vUNeTnnsBhMPgk="; + hash = "sha256-WwokWrhFiVFmjSn9FJ/GyOY8Z2l378I4IqIjwIJF3ho="; }; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/kde/gear/akonadi/default.nix b/pkgs/kde/gear/akonadi/default.nix index 20fd1f54b1ec..15d1436e9cb5 100644 --- a/pkgs/kde/gear/akonadi/default.nix +++ b/pkgs/kde/gear/akonadi/default.nix @@ -1,16 +1,25 @@ { + lib, mkKdeDerivation, qttools, accounts-qt, kaccounts-integration, shared-mime-info, xz, + mariadb, }: mkKdeDerivation { pname = "akonadi"; - # FIXME(later): investigate nixpkgs patches + patches = [ + # Always regenerate MySQL config, as the store paths don't have accurate timestamps + ./ignore-mysql-config-timestamp.patch + ]; + + extraCmakeFlags = [ + "-DMYSQLD_SCRIPTS_PATH=${lib.getBin mariadb}/bin" + ]; extraNativeBuildInputs = [qttools shared-mime-info]; - extraBuildInputs = [kaccounts-integration accounts-qt xz]; + extraBuildInputs = [kaccounts-integration accounts-qt xz mariadb]; } diff --git a/pkgs/kde/gear/akonadi/ignore-mysql-config-timestamp.patch b/pkgs/kde/gear/akonadi/ignore-mysql-config-timestamp.patch new file mode 100644 index 000000000000..62f1556bf687 --- /dev/null +++ b/pkgs/kde/gear/akonadi/ignore-mysql-config-timestamp.patch @@ -0,0 +1,12 @@ +--- a/src/server/storage/dbconfigmysql.cpp ++++ b/src/server/storage/dbconfigmysql.cpp +@@ -241,8 +241,7 @@ bool DbConfigMysql::startInternalServer() + bool confUpdate = false; + QFile actualFile(actualConfig); + // update conf only if either global (or local) is newer than actual +- if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) +- || (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) { ++ if (true) { + QFile globalFile(globalConfig); + QFile localFile(localConfig); + if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) { diff --git a/pkgs/kde/plasma/oxygen/default.nix b/pkgs/kde/plasma/oxygen/default.nix index 5b5de64af90f..718a9737a8e1 100644 --- a/pkgs/kde/plasma/oxygen/default.nix +++ b/pkgs/kde/plasma/oxygen/default.nix @@ -1,6 +1,51 @@ -{mkKdeDerivation}: +{ + mkKdeDerivation, + qtbase, + libsForQt5, +}: mkKdeDerivation { pname = "oxygen"; - # FIXME(qt5) - meta.broken = true; + + outputs = ["out" "dev" "qt5"]; + + # We can't add qt5 stuff to dependencies or the hooks blow up, + # so manually point everything to everything. Oof. + extraCmakeFlags = [ + "-DQt5_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5" + "-DQt5Core_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Core" + "-DQt5DBus_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5DBus" + "-DQt5Gui_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Gui" + "-DQt5Network_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Network" + "-DQt5Qml_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Qml" + "-DQt5QmlModels_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5QmlModels" + "-DQt5Quick_DIR=${libsForQt5.qtdeclarative.dev}/lib/cmake/Qt5Quick" + "-DQt5Widgets_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Widgets" + "-DQt5X11Extras_DIR=${libsForQt5.qtx11extras.dev}/lib/cmake/Qt5X11Extras" + "-DQt5Xml_DIR=${libsForQt5.qtbase.dev}/lib/cmake/Qt5Xml" + + "-DKF5Auth_DIR=${libsForQt5.kauth.dev}/lib/cmake/KF5Auth" + "-DKF5Codecs_DIR=${libsForQt5.kcodecs.dev}/lib/cmake/KF5Codecs" + "-DKF5Config_DIR=${libsForQt5.kconfig.dev}/lib/cmake/KF5Config" + "-DKF5ConfigWidgets_DIR=${libsForQt5.kconfigwidgets.dev}/lib/cmake/KF5ConfigWidgets" + "-DKF5Completion_DIR=${libsForQt5.kcompletion.dev}/lib/cmake/KF5Completion" + "-DKF5CoreAddons_DIR=${libsForQt5.kcoreaddons.dev}/lib/cmake/KF5CoreAddons" + "-DKF5FrameworkIntegration_DIR=${libsForQt5.frameworkintegration.dev}/lib/cmake/KF5FrameworkIntegration" + "-DKF5GuiAddons_DIR=${libsForQt5.kguiaddons.dev}/lib/cmake/KF5GuiAddons" + "-DKF5IconThemes_DIR=${libsForQt5.kiconthemes.dev}/lib/cmake/KF5IconThemes" + "-DKF5I18n_DIR=${libsForQt5.ki18n.dev}/lib/cmake/KF5I18n" + "-DKF5Kirigami2_DIR=${libsForQt5.kirigami2.dev}/lib/cmake/KF5Kirigami2" + "-DKF5Service_DIR=${libsForQt5.kservice.dev}/lib/cmake/KF5Service" + "-DKF5WidgetsAddons_DIR=${libsForQt5.kwidgetsaddons.dev}/lib/cmake/KF5WidgetsAddons" + "-DKF5WindowSystem_DIR=${libsForQt5.kwindowsystem.dev}/lib/cmake/KF5WindowSystem" + ]; + + # Move Qt5 plugin to Qt5 plugin path + postInstall = '' + mkdir -p $qt5/${libsForQt5.qtbase.qtPluginPrefix}/styles + mv $out/${qtbase.qtPluginPrefix}/styles/oxygen5.so $qt5/${libsForQt5.qtbase.qtPluginPrefix}/styles + + moveToOutput bin/oxygen-demo5 $qt5 + moveToOutput 'lib/liboxygenstyle5*' $qt5 + moveToOutput 'lib/liboxygenstyleconfig5*' $qt5 + ''; } diff --git a/pkgs/os-specific/linux/intel-cmt-cat/default.nix b/pkgs/os-specific/linux/intel-cmt-cat/default.nix index 62e6149b6f13..71f7735996ad 100644 --- a/pkgs/os-specific/linux/intel-cmt-cat/default.nix +++ b/pkgs/os-specific/linux/intel-cmt-cat/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - version = "23.11"; + version = "23.11.1"; pname = "intel-cmt-cat"; src = fetchFromGitHub { owner = "intel"; repo = "intel-cmt-cat"; rev = "v${version}"; - sha256 = "sha256-/OSU/7QR8NAjcAIo+unVQfORvCH5VpjfRn5sIrCxwbE="; + sha256 = "sha256-cBsbXua3uOqzElkLcLrOnNXXukGn5zRF8ytWa9VzGdE="; }; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index febf7ff0ba98..cc31c41e6973 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -4,31 +4,31 @@ "hash": "sha256:03ci53snbv917ccyjdm3xzl2fwijq5da7nkg05dpwb99wrzp8fkd" }, "6.1": { - "version": "6.1.79", - "hash": "sha256:16xkd0hcslqlcf55d4ivzhf1fkhfs5yy0m9arbax8pmm5yi9r97s" + "version": "6.1.80", + "hash": "sha256:0wdnyy7m9kfkl98id0gm6jzp4aa0hfy6gfkb4k4cg1wbpfpcm3jn" }, "5.15": { - "version": "5.15.149", - "hash": "sha256:1c01fnaghj55mkgsgddznq1zq4mswsa05rz00kmh1d3y6sd8115x" + "version": "5.15.150", + "hash": "sha256:1m74cwsbjwlamxh8vdg2y9jjzk0h7a40adml2p2wszwf8lmmj1gf" }, "5.10": { - "version": "5.10.210", - "hash": "sha256:0vggj3a71awc1w803cdzrnkn88rxr7l1xh9mmdcw9hzxj1d3r9jf" + "version": "5.10.211", + "hash": "sha256:1cir36s369fl6s46x16xnjg0wdlnkipsp2zhz11m9d3z205hly1s" }, "5.4": { - "version": "5.4.269", - "hash": "sha256:1kqqm4hpif3jy2ycnb0dfjgzyn18vqhm1i5q7d7rkisks33bwm7z" + "version": "5.4.270", + "hash": "sha256:0svnkpivv5w9b2yyg0z607b84f591d401gxvr8s7kmzdxadhcjqs" }, "4.19": { - "version": "4.19.307", - "hash": "sha256:0lp3fc7sqy48vpcl2g0n1bz7i1hp9k0nlz3i1xfh9l056ihzzvl3" + "version": "4.19.308", + "hash": "sha256:1j81zdx75m48rvqacw4xlcb13vkvlx0pfq4kdfxrsdfl7wfcwl9a" }, "6.6": { - "version": "6.6.18", - "hash": "sha256:07cv97l5jiakmmv35n0ganvqfr0590b02f3qb617qkx1zg2xhhsf" + "version": "6.6.19", + "hash": "sha256:16hk8y3pw40hahhpnpxjwhprq6hlblavr45pglpb3d62f9mpwqxm" }, "6.7": { - "version": "6.7.6", - "hash": "sha256:1lrp7pwnxnqyy8c2l4n4nz997039gbnssrfm8ss8kl3h2c7fr2g4" + "version": "6.7.7", + "hash": "sha256:1n8lgf814mfslca51pm3nh4icvv1lb5w5l1sxdkf5nqdax28nsr5" } } diff --git a/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix b/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix index 50d2115d9e1f..3d5fe5c1b6be 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "6.1.77-rt24"; # updated by ./update-rt.sh + version = "6.1.79-rt25"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -18,14 +18,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz"; - sha256 = "07grng6rrgpy6c3465hwqhn3gcdam1c8rwya30vgpk8nfxbfqm1v"; + sha256 = "16xkd0hcslqlcf55d4ivzhf1fkhfs5yy0m9arbax8pmm5yi9r97s"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "194fdr89020igfdcfwdrfrl3rn51aannadr5x4yhd7p4cma0iq0a"; + sha256 = "1q851lhbdcxipzxzqkyp6wv4g437kgf8yj24n2x4rkbny9vgz220"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix b/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix index b586dc392a6c..097533ea0b3b 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "6.6.15-rt22"; # updated by ./update-rt.sh + version = "6.6.18-rt23"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -18,14 +18,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz"; - sha256 = "1ajzby6isqji1xlp660m4qj2i2xs003vsjp1jspziwl7hrzhqadb"; + sha256 = "07cv97l5jiakmmv35n0ganvqfr0590b02f3qb617qkx1zg2xhhsf"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "0dr4lb6f95vj8vzhlvy353dk6k694f1s6qfxr10m48hzyyqyaxdy"; + sha256 = "03950miwqscgnxa5x8mdx5vyyfv8hjk0g8v24b65vl48sfh8nnv8"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 2b1e7066b602..1de00b4bae8a 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -68,16 +68,14 @@ rec { # Vulkan developer beta driver # See here for more information: https://developer.nvidia.com/vulkan-driver vulkan_beta = generic rec { - version = "535.43.28"; - persistencedVersion = "535.98"; - settingsVersion = "535.98"; - sha256_64bit = "sha256-ic7r3MPp65fdEwqDRyc0WiKonL5eF6KZUpfD/C3vYaU="; - openSha256 = "sha256-a5iccyISHheOfTwpsrz6puqrVhgzYWFvNlykVG3+PVc="; - settingsSha256 = "sha256-jCRfeB1w6/dA27gaz6t5/Qo7On0zbAPIi74LYLel34s="; - persistencedSha256 = "sha256-WviDU6B50YG8dO64CGvU3xK8WFUX8nvvVYm/fuGyroM="; + version = "550.40.53"; + persistencedVersion = "550.54.14"; + settingsVersion = "550.54.14"; + sha256_64bit = "sha256-ZA5pb1xjzDyEBrf3UYHta4T9laCOCW7LHJwhcdjw6MA="; + openSha256 = "sha256-p4FL0j9Ev4SJ3YcjfhFLxbMbc77dBblkrTYK50+OYqA="; + settingsSha256 = "sha256-m2rNASJp0i0Ez2OuqL+JpgEF0Yd8sYVCyrOoo/ln2a4="; + persistencedSha256 = "sha256-XaPN8jVTjdag9frLPgBtqvO/goB5zxeGzaTU0CdL6C4="; url = "https://developer.nvidia.com/downloads/vulkan-beta-${lib.concatStrings (lib.splitVersion version)}-linux"; - - patches = [ rcu_patch ]; }; # data center driver compatible with current default cudaPackages diff --git a/pkgs/os-specific/linux/zfs/stable.nix b/pkgs/os-specific/linux/zfs/2_2.nix similarity index 90% rename from pkgs/os-specific/linux/zfs/stable.nix rename to pkgs/os-specific/linux/zfs/2_2.nix index 7ca1d5be3787..3e5d262f73d0 100644 --- a/pkgs/os-specific/linux/zfs/stable.nix +++ b/pkgs/os-specific/linux/zfs/2_2.nix @@ -12,7 +12,7 @@ in callPackage ./generic.nix args { # You have to ensure that in `pkgs/top-level/linux-kernels.nix` # this attribute is the correct one for this package. - kernelModuleAttribute = "zfs"; + kernelModuleAttribute = "zfs_2_2"; # check the release notes for compatible kernels kernelCompatible = kernel.kernelOlder "6.8"; @@ -23,7 +23,7 @@ callPackage ./generic.nix args { tests = [ nixosTests.zfs.installer - nixosTests.zfs.stable + nixosTests.zfs.series_2_2 ]; hash = "sha256-Bzkow15OitUUQ+mTYhCXgTrQl+ao/B4feleHY/rSSjg="; diff --git a/pkgs/os-specific/linux/zfs/generic.nix b/pkgs/os-specific/linux/zfs/generic.nix index 566af6950d48..c0ff834cb34a 100644 --- a/pkgs/os-specific/linux/zfs/generic.nix +++ b/pkgs/os-specific/linux/zfs/generic.nix @@ -234,8 +234,8 @@ let inherit maintainers; mainProgram = "zfs"; - # If your Linux kernel version is not yet supported by zfs, try zfsUnstable. - # On NixOS set the option boot.zfs.enableUnstable. + # If your Linux kernel version is not yet supported by zfs, try zfs_unstable. + # On NixOS set the option `boot.zfs.package = pkgs.zfs_unstable`. broken = buildKernel && (kernelCompatible != null) && !kernelCompatible; }; }; diff --git a/pkgs/os-specific/linux/zfs/unstable.nix b/pkgs/os-specific/linux/zfs/unstable.nix index 2bd06e0d6b74..052dd0cd74c9 100644 --- a/pkgs/os-specific/linux/zfs/unstable.nix +++ b/pkgs/os-specific/linux/zfs/unstable.nix @@ -12,7 +12,7 @@ in callPackage ./generic.nix args { # You have to ensure that in `pkgs/top-level/linux-kernels.nix` # this attribute is the correct one for this package. - kernelModuleAttribute = "zfsUnstable"; + kernelModuleAttribute = "zfs_unstable"; # check the release notes for compatible kernels kernelCompatible = kernel.kernelOlder "6.9"; diff --git a/pkgs/servers/gortr/default.nix b/pkgs/servers/gortr/default.nix index fb365342bd68..ef569eef53a4 100644 --- a/pkgs/servers/gortr/default.nix +++ b/pkgs/servers/gortr/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "gortr"; - version = "0.14.8"; + version = "0.15.0"; src = fetchFromGitHub { owner = "cloudflare"; repo = pname; rev = "v${version}"; - sha256 = "sha256-3aZf5HINoFIJrN+196kk1lt2S+fN9DlQakwGnkMU5U8="; + sha256 = "sha256-W6+zCLPcORGcRJF0F6/LRPap4SNVn/oKGs21T4nSNO0="; }; vendorHash = null; diff --git a/pkgs/servers/nextcloud/default.nix b/pkgs/servers/nextcloud/default.nix index 63f7162fc5d6..7760a65cc9ef 100644 --- a/pkgs/servers/nextcloud/default.nix +++ b/pkgs/servers/nextcloud/default.nix @@ -55,8 +55,8 @@ in { }; nextcloud28 = generic { - version = "28.0.2"; - hash = "sha256-3jTWuvPszqz90TjoVSDNheHSzmeY2f+keKwX6x76HQg="; + version = "28.0.3"; + hash = "sha256-ntQTwN4W9bAzzu/8ypnA1h/GmNvrjbhRrJrfnu+VGQY="; packages = nextcloud28Packages; }; diff --git a/pkgs/servers/sickbeard/sickgear.nix b/pkgs/servers/sickbeard/sickgear.nix index ffb5994269e9..881afa06f142 100644 --- a/pkgs/servers/sickbeard/sickgear.nix +++ b/pkgs/servers/sickbeard/sickgear.nix @@ -4,13 +4,13 @@ let pythonEnv = python3.withPackages(ps: with ps; [ cheetah3 lxml ]); in stdenv.mkDerivation rec { pname = "sickgear"; - version = "3.30.10"; + version = "3.30.11"; src = fetchFromGitHub { owner = "SickGear"; repo = "SickGear"; rev = "release_${version}"; - hash = "sha256-pTcetcZ62rHMcnplteTJQkuEIQrPUKdX+cSV5V4ZqA4="; + hash = "sha256-o5JEjKv/7TN+BCmjxVZeOcHm5FDPMg4zM6GUeO9uZUo="; }; patches = [ diff --git a/pkgs/servers/sql/rqlite/default.nix b/pkgs/servers/sql/rqlite/default.nix index 66f2ce9ad74e..d8bcadbb9df9 100644 --- a/pkgs/servers/sql/rqlite/default.nix +++ b/pkgs/servers/sql/rqlite/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "rqlite"; - version = "8.21.3"; + version = "8.22.1"; src = fetchFromGitHub { owner = "rqlite"; repo = pname; rev = "v${version}"; - sha256 = "sha256-YnCa0gv+loI+PeQHZWar7GpEhqvQo1AwIj5LGTol3k0="; + sha256 = "sha256-g5W+rHD4gUS82E+wFLQ3VTSwIWQUogwTutwPTtf+IdM="; }; vendorHash = "sha256-onR4n6ok6y9APRwGjBoMISbidGDVw19D48TkogRp1uM="; diff --git a/pkgs/shells/fish/plugins/forgit.nix b/pkgs/shells/fish/plugins/forgit.nix index 253208d47981..d0792d084ea8 100644 --- a/pkgs/shells/fish/plugins/forgit.nix +++ b/pkgs/shells/fish/plugins/forgit.nix @@ -2,13 +2,13 @@ buildFishPlugin rec { pname = "forgit"; - version = "24.02.0"; + version = "24.03.0"; src = fetchFromGitHub { owner = "wfxr"; repo = "forgit"; rev = version; - hash = "sha256-DoOtrnEJwSxkCZtsVek+3w9RZH7j7LTvdleBC88xyfI="; + hash = "sha256-E8zL5HPUHhb3V03yTIF6IQ83bmqrrRt0KHxYbmtzCQ4="; }; postInstall = '' diff --git a/pkgs/test/nixpkgs-check-by-name/Cargo.lock b/pkgs/test/nixpkgs-check-by-name/Cargo.lock index 904a9cff0e78..19435c2ab76e 100644 --- a/pkgs/test/nixpkgs-check-by-name/Cargo.lock +++ b/pkgs/test/nixpkgs-check-by-name/Cargo.lock @@ -299,12 +299,14 @@ dependencies = [ "itertools", "lazy_static", "regex", + "relative-path", "rnix", "rowan", "serde", "serde_json", "temp-env", "tempfile", + "textwrap", ] [[package]] @@ -392,6 +394,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +[[package]] +name = "relative-path" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" + [[package]] name = "rnix" version = "0.11.0" @@ -482,6 +490,12 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + [[package]] name = "strsim" version = "0.10.0" @@ -527,12 +541,35 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + [[package]] name = "unicode-ident" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + [[package]] name = "utf8parse" version = "0.2.1" diff --git a/pkgs/test/nixpkgs-check-by-name/Cargo.toml b/pkgs/test/nixpkgs-check-by-name/Cargo.toml index 5240cd69f996..50cdabb7e2dd 100644 --- a/pkgs/test/nixpkgs-check-by-name/Cargo.toml +++ b/pkgs/test/nixpkgs-check-by-name/Cargo.toml @@ -15,7 +15,9 @@ lazy_static = "1.4.0" colored = "2.0.4" itertools = "0.11.0" rowan = "0.15.11" +indoc = "2.0.4" +relative-path = "1.9.2" +textwrap = "0.16.1" [dev-dependencies] temp-env = "0.3.5" -indoc = "2.0.4" diff --git a/pkgs/test/nixpkgs-check-by-name/src/eval.rs b/pkgs/test/nixpkgs-check-by-name/src/eval.rs index e90a95533144..094508f595d8 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/eval.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/eval.rs @@ -1,10 +1,14 @@ +use crate::nix_file::CallPackageArgumentInfo; use crate::nixpkgs_problem::NixpkgsProblem; use crate::ratchet; +use crate::ratchet::RatchetState::Loose; +use crate::ratchet::RatchetState::Tight; use crate::structure; use crate::utils; use crate::validation::ResultIteratorExt as _; use crate::validation::{self, Validation::Success}; use crate::NixFileStore; +use relative_path::RelativePathBuf; use std::path::Path; use anyhow::Context; @@ -51,6 +55,20 @@ struct Location { pub column: usize, } +impl Location { + // Returns the [file] field, but relative to Nixpkgs + fn relative_file(&self, nixpkgs_path: &Path) -> anyhow::Result { + let path = self.file.strip_prefix(nixpkgs_path).with_context(|| { + format!( + "The file ({}) is outside Nixpkgs ({})", + self.file.display(), + nixpkgs_path.display() + ) + })?; + Ok(RelativePathBuf::from_path(path).expect("relative path")) + } +} + #[derive(Deserialize)] pub enum AttributeVariant { /// The attribute is not an attribute set, we're limited in the amount of information we can get @@ -163,6 +181,7 @@ pub fn check_values( Attribute::NonByName(non_by_name_attribute) => handle_non_by_name_attribute( nixpkgs_path, nix_file_store, + &attribute_name, non_by_name_attribute, )?, Attribute::ByName(by_name_attribute) => by_name( @@ -195,7 +214,6 @@ fn by_name( use ByNameAttribute::*; let relative_package_file = structure::relative_file_for_package(attribute_name); - let absolute_package_file = nixpkgs_path.join(&relative_package_file); // At this point we know that `pkgs/by-name/fo/foo/package.nix` has to exists. // This match decides whether the attribute `foo` is defined accordingly @@ -276,53 +294,31 @@ fn by_name( // We should expect manual definitions to have a location, otherwise we can't // enforce the expected format if let Some(location) = location { - // Parse the Nix file in the location and figure out whether it's an - // attribute definition of the form `= callPackage `, - // returning the arguments if so. - let optional_syntactic_call_package = nix_file_store - .get(&location.file)? - .call_package_argument_info_at( - location.line, - location.column, - // We're passing `pkgs/by-name/fo/foo/package.nix` here, which causes - // the function to verify that `` is the same path, - // making `syntactic_call_package.relative_path` end up as `""` - // TODO: This is confusing and should be improved - &absolute_package_file, - )?; + // Parse the Nix file in the location + let nix_file = nix_file_store.get(&location.file)?; - // At this point, we completed two different checks for whether it's a - // `callPackage` - match (is_semantic_call_package, optional_syntactic_call_package) { - // Something like ` = { ... }` - // or a `pkgs.callPackage` but with the wrong file - (false, None) - // Something like ` = pythonPackages.callPackage ./pkgs/by-name/...` - | (false, Some(_)) - // Something like ` = bar` where `bar = pkgs.callPackage ...` - // or a `callPackage` but with the wrong file - | (true, None) => { - // All of these are not of the expected form, so error out - // TODO: Make error more specific, don't lump everything together - NixpkgsProblem::WrongCallPackage { - relative_package_file: relative_package_file.to_owned(), - package_name: attribute_name.to_owned(), - }.into() - } - // Something like ` = pkgs.callPackage ./pkgs/by-name/...`, - // with the correct file - (true, Some(syntactic_call_package)) => { - Success( - // Manual definitions with empty arguments are not allowed - // anymore - if syntactic_call_package.empty_arg { - Loose(()) - } else { - Tight - } - ) - } - } + // The relative path of the Nix file, for error messages + let relative_location_file = location.relative_file(nixpkgs_path).with_context(|| { + format!("Failed to resolve the file where attribute {attribute_name} is defined") + })?; + + // Figure out whether it's an attribute definition of the form `= callPackage `, + // returning the arguments if so. + let (optional_syntactic_call_package, definition) = nix_file + .call_package_argument_info_at(location.line, location.column, nixpkgs_path) + .with_context(|| { + format!("Failed to get the definition info for attribute {attribute_name}") + })?; + + by_name_override( + attribute_name, + relative_package_file, + is_semantic_call_package, + optional_syntactic_call_package, + definition, + location, + relative_location_file, + ) } else { // If manual definitions don't have a location, it's likely `mapAttrs`'d // over, e.g. if it's defined in aliases.nix. @@ -350,11 +346,91 @@ fn by_name( ) } +/// Handles the case for packages in `pkgs/by-name` that are manually overridden, e.g. in +/// all-packages.nix +fn by_name_override( + attribute_name: &str, + expected_package_file: RelativePathBuf, + is_semantic_call_package: bool, + optional_syntactic_call_package: Option, + definition: String, + location: Location, + relative_location_file: RelativePathBuf, +) -> validation::Validation> { + // At this point, we completed two different checks for whether it's a + // `callPackage` + match (is_semantic_call_package, optional_syntactic_call_package) { + // Something like ` = foo` + (_, None) => NixpkgsProblem::NonSyntacticCallPackage { + package_name: attribute_name.to_owned(), + file: relative_location_file, + line: location.line, + column: location.column, + definition, + } + .into(), + // Something like ` = pythonPackages.callPackage ...` + (false, Some(_)) => NixpkgsProblem::NonToplevelCallPackage { + package_name: attribute_name.to_owned(), + file: relative_location_file, + line: location.line, + column: location.column, + definition, + } + .into(), + // Something like ` = pkgs.callPackage ...` + (true, Some(syntactic_call_package)) => { + if let Some(actual_package_file) = syntactic_call_package.relative_path { + if actual_package_file != expected_package_file { + // Wrong path + NixpkgsProblem::WrongCallPackagePath { + package_name: attribute_name.to_owned(), + file: relative_location_file, + line: location.line, + actual_path: actual_package_file, + expected_path: expected_package_file, + } + .into() + } else { + // Manual definitions with empty arguments are not allowed + // anymore, but existing ones should continue to be allowed + let manual_definition_ratchet = if syntactic_call_package.empty_arg { + // This is the state to migrate away from + Loose(NixpkgsProblem::EmptyArgument { + package_name: attribute_name.to_owned(), + file: relative_location_file, + line: location.line, + column: location.column, + definition, + }) + } else { + // This is the state to migrate to + Tight + }; + + Success(manual_definition_ratchet) + } + } else { + // No path + NixpkgsProblem::NonPath { + package_name: attribute_name.to_owned(), + file: relative_location_file, + line: location.line, + column: location.column, + definition, + } + .into() + } + } + } +} + /// Handles the evaluation result for an attribute _not_ in `pkgs/by-name`, /// turning it into a validation result. fn handle_non_by_name_attribute( nixpkgs_path: &Path, nix_file_store: &mut NixFileStore, + attribute_name: &str, non_by_name_attribute: NonByNameAttribute, ) -> validation::Result { use ratchet::RatchetState::*; @@ -405,11 +481,17 @@ fn handle_non_by_name_attribute( location: Some(location), }) = non_by_name_attribute { - // Parse the Nix file in the location and figure out whether it's an - // attribute definition of the form `= callPackage `, + // Parse the Nix file in the location + let nix_file = nix_file_store.get(&location.file)?; + + // The relative path of the Nix file, for error messages + let relative_location_file = location.relative_file(nixpkgs_path).with_context(|| { + format!("Failed to resolve the file where attribute {attribute_name} is defined") + })?; + + // Figure out whether it's an attribute definition of the form `= callPackage `, // returning the arguments if so. - let optional_syntactic_call_package = nix_file_store - .get(&location.file)? + let (optional_syntactic_call_package, _definition) = nix_file .call_package_argument_info_at( location.line, location.column, @@ -417,7 +499,10 @@ fn handle_non_by_name_attribute( // strips the absolute Nixpkgs path from it, such that // syntactic_call_package.relative_path is relative to Nixpkgs nixpkgs_path - )?; + ) + .with_context(|| { + format!("Failed to get the definition info for attribute {attribute_name}") + })?; // At this point, we completed two different checks for whether it's a // `callPackage` @@ -453,7 +538,7 @@ fn handle_non_by_name_attribute( _ => { // Otherwise, the path is outside `pkgs/by-name`, which means it can be // migrated - Loose(syntactic_call_package) + Loose((syntactic_call_package, relative_location_file)) } } } diff --git a/pkgs/test/nixpkgs-check-by-name/src/main.rs b/pkgs/test/nixpkgs-check-by-name/src/main.rs index 0d0ddcd7e632..dcc9cb9e716d 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/main.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/main.rs @@ -1,4 +1,5 @@ use crate::nix_file::NixFileStore; +use std::panic; mod eval; mod nix_file; mod nixpkgs_problem; @@ -17,6 +18,7 @@ use colored::Colorize; use std::io; use std::path::{Path, PathBuf}; use std::process::ExitCode; +use std::thread; /// Program to check the validity of pkgs/by-name /// @@ -46,15 +48,9 @@ pub struct Args { fn main() -> ExitCode { let args = Args::parse(); - match process(&args.base, &args.nixpkgs, false, &mut io::stderr()) { - Ok(true) => { - eprintln!("{}", "Validated successfully".green()); - ExitCode::SUCCESS - } - Ok(false) => { - eprintln!("{}", "Validation failed, see above errors".yellow()); - ExitCode::from(1) - } + match process(args.base, args.nixpkgs, false, &mut io::stderr()) { + Ok(true) => ExitCode::SUCCESS, + Ok(false) => ExitCode::from(1), Err(e) => { eprintln!("{} {:#}", "I/O error: ".yellow(), e); ExitCode::from(2) @@ -77,34 +73,66 @@ fn main() -> ExitCode { /// - `Ok(false)` if there are problems, all of which will be written to `error_writer`. /// - `Ok(true)` if there are no problems pub fn process( - base_nixpkgs: &Path, - main_nixpkgs: &Path, + base_nixpkgs: PathBuf, + main_nixpkgs: PathBuf, keep_nix_path: bool, error_writer: &mut W, ) -> anyhow::Result { - // Check the main Nixpkgs first - let main_result = check_nixpkgs(main_nixpkgs, keep_nix_path, error_writer)?; - let check_result = main_result.result_map(|nixpkgs_version| { - // If the main Nixpkgs doesn't have any problems, run the ratchet checks against the base - // Nixpkgs - check_nixpkgs(base_nixpkgs, keep_nix_path, error_writer)?.result_map( - |base_nixpkgs_version| { - Ok(ratchet::Nixpkgs::compare( - base_nixpkgs_version, - nixpkgs_version, - )) - }, - ) - })?; + // Very easy to parallelise this, since it's totally independent + let base_thread = thread::spawn(move || check_nixpkgs(&base_nixpkgs, keep_nix_path)); + let main_result = check_nixpkgs(&main_nixpkgs, keep_nix_path)?; - match check_result { - Failure(errors) => { + let base_result = match base_thread.join() { + Ok(res) => res?, + Err(e) => panic::resume_unwind(e), + }; + + match (base_result, main_result) { + (Failure(_), Failure(errors)) => { + // Base branch fails and the PR doesn't fix it and may also introduce additional problems for error in errors { writeln!(error_writer, "{}", error.to_string().red())? } + writeln!(error_writer, "{}", "The base branch is broken and still has above problems with this PR, which need to be fixed first.\nConsider reverting the PR that introduced these problems in order to prevent more failures of unrelated PRs.".yellow())?; Ok(false) } - Success(()) => Ok(true), + (Failure(_), Success(_)) => { + writeln!( + error_writer, + "{}", + "The base branch is broken, but this PR fixes it. Nice job!".green() + )?; + Ok(true) + } + (Success(_), Failure(errors)) => { + for error in errors { + writeln!(error_writer, "{}", error.to_string().red())? + } + writeln!( + error_writer, + "{}", + "This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break." + .yellow() + )?; + Ok(false) + } + (Success(base), Success(main)) => { + // Both base and main branch succeed, check ratchet state + match ratchet::Nixpkgs::compare(base, main) { + Failure(errors) => { + for error in errors { + writeln!(error_writer, "{}", error.to_string().red())? + } + writeln!(error_writer, "{}", "This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch.".yellow())?; + + Ok(false) + } + Success(()) => { + writeln!(error_writer, "{}", "Validated successfully".green())?; + Ok(true) + } + } + } } } @@ -113,10 +141,9 @@ pub fn process( /// This does not include ratchet checks, see ../README.md#ratchet-checks /// Instead a `ratchet::Nixpkgs` value is returned, whose `compare` method allows performing the /// ratchet check against another result. -pub fn check_nixpkgs( +pub fn check_nixpkgs( nixpkgs_path: &Path, keep_nix_path: bool, - error_writer: &mut W, ) -> validation::Result { let mut nix_file_store = NixFileStore::default(); @@ -129,11 +156,7 @@ pub fn check_nixpkgs( })?; if !nixpkgs_path.join(utils::BASE_SUBPATH).exists() { - writeln!( - error_writer, - "Given Nixpkgs path does not contain a {} subdirectory, no check necessary.", - utils::BASE_SUBPATH - )?; + // No pkgs/by-name directory, always valid Success(ratchet::Nixpkgs::default()) } else { check_structure(&nixpkgs_path, &mut nix_file_store)?.result_map(|package_names| @@ -163,8 +186,8 @@ mod tests { continue; } - let expected_errors = - fs::read_to_string(path.join("expected")).unwrap_or(String::new()); + let expected_errors = fs::read_to_string(path.join("expected")) + .expect("No expected file for test {name}"); test_nixpkgs(&name, &path, &expected_errors)?; } @@ -201,7 +224,7 @@ mod tests { test_nixpkgs( "case_sensitive", &path, - "pkgs/by-name/fo: Duplicate case-sensitive package directories \"foO\" and \"foo\".\n", + "pkgs/by-name/fo: Duplicate case-sensitive package directories \"foO\" and \"foo\".\nThis PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break.\n", )?; Ok(()) @@ -225,7 +248,11 @@ mod tests { let tmpdir = temp_root.path().join("symlinked"); temp_env::with_var("TMPDIR", Some(&tmpdir), || { - test_nixpkgs("symlinked_tmpdir", Path::new("tests/success"), "") + test_nixpkgs( + "symlinked_tmpdir", + Path::new("tests/success"), + "Validated successfully\n", + ) }) } @@ -240,7 +267,7 @@ mod tests { // We don't want coloring to mess up the tests let writer = temp_env::with_var("NO_COLOR", Some("1"), || -> anyhow::Result<_> { let mut writer = vec![]; - process(base_nixpkgs, &path, true, &mut writer) + process(base_nixpkgs.to_owned(), path.to_owned(), true, &mut writer) .with_context(|| format!("Failed test case {name}"))?; Ok(writer) })?; @@ -249,7 +276,7 @@ mod tests { if actual_errors != expected_errors { panic!( - "Failed test case {name}, expected these errors:\n\n{}\n\nbut got these:\n\n{}", + "Failed test case {name}, expected these errors:\n=======\n{}\n=======\nbut got these:\n=======\n{}\n=======", expected_errors, actual_errors ); } diff --git a/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs b/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs index 836c5e2dcdda..e2dc1e196141 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs @@ -2,10 +2,11 @@ use crate::utils::LineIndex; use anyhow::Context; +use itertools::Either::{self, Left, Right}; +use relative_path::RelativePathBuf; use rnix::ast; use rnix::ast::Expr; use rnix::ast::HasEntry; -use rnix::SyntaxKind; use rowan::ast::AstNode; use rowan::TextSize; use rowan::TokenAtOffset; @@ -79,7 +80,7 @@ impl NixFile { #[derive(Debug, PartialEq)] pub struct CallPackageArgumentInfo { /// The relative path of the first argument, or `None` if it's not a path. - pub relative_path: Option, + pub relative_path: Option, /// Whether the second argument is an empty attribute set pub empty_arg: bool, } @@ -87,8 +88,9 @@ pub struct CallPackageArgumentInfo { impl NixFile { /// Returns information about callPackage arguments for an attribute at a specific line/column /// index. - /// If the location is not of the form ` = callPackage ;`, `None` is - /// returned. + /// If the definition at the given location is not of the form ` = callPackage ;`, + /// `Ok((None, String))` is returned, with `String` being the definition itself. + /// /// This function only returns `Err` for problems that can't be caused by the Nix contents, /// but rather problems in this programs code itself. /// @@ -109,7 +111,10 @@ impl NixFile { /// /// You'll get back /// ```rust - /// Some(CallPackageArgumentInfo { path = Some("default.nix"), empty_arg: true }) + /// Ok(( + /// Some(CallPackageArgumentInfo { path = Some("default.nix"), empty_arg: true }), + /// "foo = self.callPackage ./default.nix { };", + /// )) /// ``` /// /// Note that this also returns the same for `pythonPackages.callPackage`. It doesn't make an @@ -119,11 +124,16 @@ impl NixFile { line: usize, column: usize, relative_to: &Path, - ) -> anyhow::Result> { - let Some(attrpath_value) = self.attrpath_value_at(line, column)? else { - return Ok(None); - }; - self.attrpath_value_call_package_argument_info(attrpath_value, relative_to) + ) -> anyhow::Result<(Option, String)> { + Ok(match self.attrpath_value_at(line, column)? { + Left(definition) => (None, definition), + Right(attrpath_value) => { + let definition = attrpath_value.to_string(); + let attrpath_value = + self.attrpath_value_call_package_argument_info(attrpath_value, relative_to)?; + (attrpath_value, definition) + } + }) } // Internal function mainly to make it independently testable @@ -131,7 +141,7 @@ impl NixFile { &self, line: usize, column: usize, - ) -> anyhow::Result> { + ) -> anyhow::Result> { let index = self.line_index.fromlinecolumn(line, column); let token_at_offset = self @@ -158,6 +168,22 @@ impl NixFile { ) }; + if ast::Attr::can_cast(node.kind()) { + // Something like `foo`, `"foo"` or `${"foo"}` + } else if ast::Inherit::can_cast(node.kind()) { + // Something like `inherit ` or `inherit () ` + // This is the only other way how `builtins.unsafeGetAttrPos` can return + // attribute positions, but we only look for ones like ` = `, so + // ignore this + return Ok(Left(node.to_string())); + } else { + // However, anything else is not expected and smells like a bug + anyhow::bail!( + "Node in {} is neither an attribute node nor an inherit node: {node:?}", + self.path.display() + ) + } + // node looks like "foo" let Some(attrpath_node) = node.parent() else { anyhow::bail!( @@ -166,10 +192,14 @@ impl NixFile { ) }; - if attrpath_node.kind() != SyntaxKind::NODE_ATTRPATH { - // This can happen for e.g. `inherit foo`, so definitely not a syntactic `callPackage` - return Ok(None); + if !ast::Attrpath::can_cast(attrpath_node.kind()) { + // We know that `node` is an attribute, its parent should be an attribute path + anyhow::bail!( + "In {}, attribute parent node is not an attribute path node: {attrpath_node:?}", + self.path.display() + ) } + // attrpath_node looks like "foo.bar" let Some(attrpath_value_node) = attrpath_node.parent() else { anyhow::bail!( @@ -189,7 +219,9 @@ impl NixFile { // unwrap is fine because we confirmed that we can cast with the above check. // We could avoid this `unwrap` for a `clone`, since `cast` consumes the argument, // but we still need it for the error message when the cast fails. - Ok(Some(ast::AttrpathValue::cast(attrpath_value_node).unwrap())) + Ok(Right( + ast::AttrpathValue::cast(attrpath_value_node).unwrap(), + )) } // Internal function mainly to make attrpath_value_at independently testable @@ -338,8 +370,8 @@ pub enum ResolvedPath { /// The path is outside the given absolute path Outside, /// The path is within the given absolute path. - /// The `PathBuf` is the relative path under the given absolute path. - Within(PathBuf), + /// The `RelativePathBuf` is the relative path under the given absolute path. + Within(RelativePathBuf), } impl NixFile { @@ -371,7 +403,9 @@ impl NixFile { // Check if it's within relative_to match resolved.strip_prefix(relative_to) { Err(_prefix_error) => ResolvedPath::Outside, - Ok(suffix) => ResolvedPath::Within(suffix.to_path_buf()), + Ok(suffix) => ResolvedPath::Within( + RelativePathBuf::from_path(suffix).expect("a relative path"), + ), } } } @@ -408,6 +442,7 @@ mod tests { /**/quuux/**/=/**/5/**/;/*E*/ inherit toInherit; + inherit (toInherit) toInherit; } "#}; @@ -417,20 +452,28 @@ mod tests { // These are builtins.unsafeGetAttrPos locations for the attributes let cases = [ - (2, 3, Some("foo = 1;")), - (3, 3, Some(r#""bar" = 2;"#)), - (4, 3, Some(r#"${"baz"} = 3;"#)), - (5, 3, Some(r#""${"qux"}" = 4;"#)), - (8, 3, Some("quux\n # B\n =\n # C\n 5\n # D\n ;")), - (17, 7, Some("quuux/**/=/**/5/**/;")), - (19, 10, None), + (2, 3, Right("foo = 1;")), + (3, 3, Right(r#""bar" = 2;"#)), + (4, 3, Right(r#"${"baz"} = 3;"#)), + (5, 3, Right(r#""${"qux"}" = 4;"#)), + (8, 3, Right("quux\n # B\n =\n # C\n 5\n # D\n ;")), + (17, 7, Right("quuux/**/=/**/5/**/;")), + (19, 10, Left("inherit toInherit;")), + (20, 22, Left("inherit (toInherit) toInherit;")), ]; for (line, column, expected_result) in cases { let actual_result = nix_file - .attrpath_value_at(line, column)? - .map(|node| node.to_string()); - assert_eq!(actual_result.as_deref(), expected_result); + .attrpath_value_at(line, column) + .context(format!("line {line}, column {column}"))? + .map_right(|node| node.to_string()); + let owned_expected_result = expected_result + .map(|x| x.to_string()) + .map_left(|x| x.to_string()); + assert_eq!( + actual_result, owned_expected_result, + "line {line}, column {column}" + ); } Ok(()) @@ -466,14 +509,14 @@ mod tests { ( 6, Some(CallPackageArgumentInfo { - relative_path: Some(PathBuf::from("file.nix")), + relative_path: Some(RelativePathBuf::from("file.nix")), empty_arg: true, }), ), ( 7, Some(CallPackageArgumentInfo { - relative_path: Some(PathBuf::from("file.nix")), + relative_path: Some(RelativePathBuf::from("file.nix")), empty_arg: true, }), ), @@ -487,7 +530,7 @@ mod tests { ( 9, Some(CallPackageArgumentInfo { - relative_path: Some(PathBuf::from("file.nix")), + relative_path: Some(RelativePathBuf::from("file.nix")), empty_arg: false, }), ), @@ -501,8 +544,10 @@ mod tests { ]; for (line, expected_result) in cases { - let actual_result = nix_file.call_package_argument_info_at(line, 3, temp_dir.path())?; - assert_eq!(actual_result, expected_result); + let (actual_result, _definition) = nix_file + .call_package_argument_info_at(line, 3, temp_dir.path()) + .context(format!("line {line}"))?; + assert_eq!(actual_result, expected_result, "line {line}"); } Ok(()) diff --git a/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs b/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs index e13869adaa41..7e257c0ed5d8 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/nixpkgs_problem.rs @@ -1,96 +1,141 @@ use crate::structure; use crate::utils::PACKAGE_NIX_FILENAME; +use indoc::writedoc; +use relative_path::RelativePath; +use relative_path::RelativePathBuf; use std::ffi::OsString; use std::fmt; -use std::io; -use std::path::PathBuf; /// Any problem that can occur when checking Nixpkgs +/// All paths are relative to Nixpkgs such that the error messages can't be influenced by Nixpkgs absolute +/// location +#[derive(Clone)] pub enum NixpkgsProblem { ShardNonDir { - relative_shard_path: PathBuf, + relative_shard_path: RelativePathBuf, }, InvalidShardName { - relative_shard_path: PathBuf, + relative_shard_path: RelativePathBuf, shard_name: String, }, PackageNonDir { - relative_package_dir: PathBuf, + relative_package_dir: RelativePathBuf, }, CaseSensitiveDuplicate { - relative_shard_path: PathBuf, + relative_shard_path: RelativePathBuf, first: OsString, second: OsString, }, InvalidPackageName { - relative_package_dir: PathBuf, + relative_package_dir: RelativePathBuf, package_name: String, }, IncorrectShard { - relative_package_dir: PathBuf, - correct_relative_package_dir: PathBuf, + relative_package_dir: RelativePathBuf, + correct_relative_package_dir: RelativePathBuf, }, PackageNixNonExistent { - relative_package_dir: PathBuf, + relative_package_dir: RelativePathBuf, }, PackageNixDir { - relative_package_dir: PathBuf, + relative_package_dir: RelativePathBuf, }, UndefinedAttr { - relative_package_file: PathBuf, + relative_package_file: RelativePathBuf, package_name: String, }, - WrongCallPackage { - relative_package_file: PathBuf, + EmptyArgument { package_name: String, + file: RelativePathBuf, + line: usize, + column: usize, + definition: String, + }, + NonToplevelCallPackage { + package_name: String, + file: RelativePathBuf, + line: usize, + column: usize, + definition: String, + }, + NonPath { + package_name: String, + file: RelativePathBuf, + line: usize, + column: usize, + definition: String, + }, + WrongCallPackagePath { + package_name: String, + file: RelativePathBuf, + line: usize, + actual_path: RelativePathBuf, + expected_path: RelativePathBuf, + }, + NonSyntacticCallPackage { + package_name: String, + file: RelativePathBuf, + line: usize, + column: usize, + definition: String, }, NonDerivation { - relative_package_file: PathBuf, + relative_package_file: RelativePathBuf, package_name: String, }, OutsideSymlink { - relative_package_dir: PathBuf, - subpath: PathBuf, + relative_package_dir: RelativePathBuf, + subpath: RelativePathBuf, }, UnresolvableSymlink { - relative_package_dir: PathBuf, - subpath: PathBuf, - io_error: io::Error, + relative_package_dir: RelativePathBuf, + subpath: RelativePathBuf, + io_error: String, }, PathInterpolation { - relative_package_dir: PathBuf, - subpath: PathBuf, + relative_package_dir: RelativePathBuf, + subpath: RelativePathBuf, line: usize, text: String, }, SearchPath { - relative_package_dir: PathBuf, - subpath: PathBuf, + relative_package_dir: RelativePathBuf, + subpath: RelativePathBuf, line: usize, text: String, }, OutsidePathReference { - relative_package_dir: PathBuf, - subpath: PathBuf, + relative_package_dir: RelativePathBuf, + subpath: RelativePathBuf, line: usize, text: String, }, UnresolvablePathReference { - relative_package_dir: PathBuf, - subpath: PathBuf, + relative_package_dir: RelativePathBuf, + subpath: RelativePathBuf, line: usize, text: String, - io_error: io::Error, + io_error: String, }, - MovedOutOfByName { + MovedOutOfByNameEmptyArg { package_name: String, - call_package_path: Option, - empty_arg: bool, + call_package_path: Option, + file: RelativePathBuf, }, - NewPackageNotUsingByName { + MovedOutOfByNameNonEmptyArg { package_name: String, - call_package_path: Option, - empty_arg: bool, + call_package_path: Option, + file: RelativePathBuf, + }, + NewPackageNotUsingByNameEmptyArg { + package_name: String, + call_package_path: Option, + file: RelativePathBuf, + }, + NewPackageNotUsingByNameNonEmptyArg { + package_name: String, + call_package_path: Option, + file: RelativePathBuf, }, InternalCallPackageUsed { attr_name: String, @@ -106,156 +151,238 @@ impl fmt::Display for NixpkgsProblem { NixpkgsProblem::ShardNonDir { relative_shard_path } => write!( f, - "{}: This is a file, but it should be a directory.", - relative_shard_path.display(), + "{relative_shard_path}: This is a file, but it should be a directory.", ), NixpkgsProblem::InvalidShardName { relative_shard_path, shard_name } => write!( f, - "{}: Invalid directory name \"{shard_name}\", must be at most 2 ASCII characters consisting of a-z, 0-9, \"-\" or \"_\".", - relative_shard_path.display() + "{relative_shard_path}: Invalid directory name \"{shard_name}\", must be at most 2 ASCII characters consisting of a-z, 0-9, \"-\" or \"_\".", ), NixpkgsProblem::PackageNonDir { relative_package_dir } => write!( f, - "{}: This path is a file, but it should be a directory.", - relative_package_dir.display(), + "{relative_package_dir}: This path is a file, but it should be a directory.", ), NixpkgsProblem::CaseSensitiveDuplicate { relative_shard_path, first, second } => write!( f, - "{}: Duplicate case-sensitive package directories {first:?} and {second:?}.", - relative_shard_path.display(), + "{relative_shard_path}: Duplicate case-sensitive package directories {first:?} and {second:?}.", ), NixpkgsProblem::InvalidPackageName { relative_package_dir, package_name } => write!( f, - "{}: Invalid package directory name \"{package_name}\", must be ASCII characters consisting of a-z, A-Z, 0-9, \"-\" or \"_\".", - relative_package_dir.display(), + "{relative_package_dir}: Invalid package directory name \"{package_name}\", must be ASCII characters consisting of a-z, A-Z, 0-9, \"-\" or \"_\".", ), NixpkgsProblem::IncorrectShard { relative_package_dir, correct_relative_package_dir } => write!( f, - "{}: Incorrect directory location, should be {} instead.", - relative_package_dir.display(), - correct_relative_package_dir.display(), + "{relative_package_dir}: Incorrect directory location, should be {correct_relative_package_dir} instead.", ), NixpkgsProblem::PackageNixNonExistent { relative_package_dir } => write!( f, - "{}: Missing required \"{PACKAGE_NIX_FILENAME}\" file.", - relative_package_dir.display(), + "{relative_package_dir}: Missing required \"{PACKAGE_NIX_FILENAME}\" file.", ), NixpkgsProblem::PackageNixDir { relative_package_dir } => write!( f, - "{}: \"{PACKAGE_NIX_FILENAME}\" must be a file.", - relative_package_dir.display(), + "{relative_package_dir}: \"{PACKAGE_NIX_FILENAME}\" must be a file.", ), NixpkgsProblem::UndefinedAttr { relative_package_file, package_name } => write!( f, - "pkgs.{package_name}: This attribute is not defined but it should be defined automatically as {}", - relative_package_file.display() + "pkgs.{package_name}: This attribute is not defined but it should be defined automatically as {relative_package_file}", ), - NixpkgsProblem::WrongCallPackage { relative_package_file, package_name } => - write!( + NixpkgsProblem::EmptyArgument { package_name, file, line, column, definition } => { + let relative_package_dir = structure::relative_dir_for_package(package_name); + let relative_package_file = structure::relative_file_for_package(package_name); + let indented_definition = indent_definition(*column, definition.clone()); + writedoc!( f, - "pkgs.{package_name}: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage {} {{ ... }}` with a non-empty second argument.", - relative_package_file.display() - ), + " + - Because {relative_package_dir} exists, the attribute `pkgs.{package_name}` must be defined like + + {package_name} = callPackage ./{relative_package_file} {{ /* ... */ }}; + + However, in this PR, the second argument is empty. See the definition in {file}:{line}: + + {indented_definition} + + Such a definition is provided automatically and therefore not necessary. Please remove it. + ", + ) + } + NixpkgsProblem::NonToplevelCallPackage { package_name, file, line, column, definition } => { + let relative_package_dir = structure::relative_dir_for_package(package_name); + let relative_package_file = structure::relative_file_for_package(package_name); + let indented_definition = indent_definition(*column, definition.clone()); + writedoc!( + f, + " + - Because {relative_package_dir} exists, the attribute `pkgs.{package_name}` must be defined like + + {package_name} = callPackage ./{relative_package_file} {{ /* ... */ }}; + + However, in this PR, a different `callPackage` is used. See the definition in {file}:{line}: + + {indented_definition} + ", + ) + } + NixpkgsProblem::NonPath { package_name, file, line, column, definition } => { + let relative_package_dir = structure::relative_dir_for_package(package_name); + let relative_package_file = structure::relative_file_for_package(package_name); + let indented_definition = indent_definition(*column, definition.clone()); + writedoc!( + f, + " + - Because {relative_package_dir} exists, the attribute `pkgs.{package_name}` must be defined like + + {package_name} = callPackage ./{relative_package_file} {{ /* ... */ }}; + + However, in this PR, the first `callPackage` argument is not a path. See the definition in {file}:{line}: + + {indented_definition} + ", + ) + } + NixpkgsProblem::WrongCallPackagePath { package_name, file, line, actual_path, expected_path } => { + let relative_package_dir = structure::relative_dir_for_package(package_name); + let expected_path_expr = create_path_expr(file, expected_path); + let actual_path_expr = create_path_expr(file, actual_path); + writedoc! { + f, + " + - Because {relative_package_dir} exists, the attribute `pkgs.{package_name}` must be defined like + + {package_name} = callPackage {expected_path_expr} {{ /* ... */ }}; + + However, in this PR, the first `callPackage` argument is the wrong path. See the definition in {file}:{line}: + + {package_name} = callPackage {actual_path_expr} {{ /* ... */ }}; + ", + } + } + NixpkgsProblem::NonSyntacticCallPackage { package_name, file, line, column, definition } => { + let relative_package_dir = structure::relative_dir_for_package(package_name); + let relative_package_file = structure::relative_file_for_package(package_name); + let indented_definition = indent_definition(*column, definition.clone()); + writedoc!( + f, + " + - Because {relative_package_dir} exists, the attribute `pkgs.{package_name}` must be defined like + + {package_name} = callPackage ./{relative_package_file} {{ /* ... */ }}; + + However, in this PR, it isn't defined that way. See the definition in {file}:{line} + + {indented_definition} + ", + ) + } NixpkgsProblem::NonDerivation { relative_package_file, package_name } => write!( f, - "pkgs.{package_name}: This attribute defined by {} is not a derivation", - relative_package_file.display() + "pkgs.{package_name}: This attribute defined by {relative_package_file} is not a derivation", ), NixpkgsProblem::OutsideSymlink { relative_package_dir, subpath } => write!( f, - "{}: Path {} is a symlink pointing to a path outside the directory of that package.", - relative_package_dir.display(), - subpath.display(), + "{relative_package_dir}: Path {subpath} is a symlink pointing to a path outside the directory of that package.", ), NixpkgsProblem::UnresolvableSymlink { relative_package_dir, subpath, io_error } => write!( f, - "{}: Path {} is a symlink which cannot be resolved: {io_error}.", - relative_package_dir.display(), - subpath.display(), + "{relative_package_dir}: Path {subpath} is a symlink which cannot be resolved: {io_error}.", ), NixpkgsProblem::PathInterpolation { relative_package_dir, subpath, line, text } => write!( f, - "{}: File {} at line {line} contains the path expression \"{}\", which is not yet supported and may point outside the directory of that package.", - relative_package_dir.display(), - subpath.display(), - text + "{relative_package_dir}: File {subpath} at line {line} contains the path expression \"{text}\", which is not yet supported and may point outside the directory of that package.", ), NixpkgsProblem::SearchPath { relative_package_dir, subpath, line, text } => write!( f, - "{}: File {} at line {line} contains the nix search path expression \"{}\" which may point outside the directory of that package.", - relative_package_dir.display(), - subpath.display(), - text + "{relative_package_dir}: File {subpath} at line {line} contains the nix search path expression \"{text}\" which may point outside the directory of that package.", ), NixpkgsProblem::OutsidePathReference { relative_package_dir, subpath, line, text } => write!( f, - "{}: File {} at line {line} contains the path expression \"{}\" which may point outside the directory of that package.", - relative_package_dir.display(), - subpath.display(), - text, + "{relative_package_dir}: File {subpath} at line {line} contains the path expression \"{text}\" which may point outside the directory of that package.", ), NixpkgsProblem::UnresolvablePathReference { relative_package_dir, subpath, line, text, io_error } => write!( f, - "{}: File {} at line {line} contains the path expression \"{}\" which cannot be resolved: {io_error}.", - relative_package_dir.display(), - subpath.display(), - text, + "{relative_package_dir}: File {subpath} at line {line} contains the path expression \"{text}\" which cannot be resolved: {io_error}.", ), - NixpkgsProblem::MovedOutOfByName { package_name, call_package_path, empty_arg } => { + NixpkgsProblem::MovedOutOfByNameEmptyArg { package_name, call_package_path, file } => { let call_package_arg = if let Some(path) = &call_package_path { - format!("./{}", path.display()) + format!("./{path}") } else { "...".into() }; - if *empty_arg { - write!( - f, - "pkgs.{package_name}: This top-level package was previously defined in {}, but is now manually defined as `callPackage {call_package_arg} {{ }}` (e.g. in `pkgs/top-level/all-packages.nix`). Please move the package back and remove the manual `callPackage`.", - structure::relative_file_for_package(package_name).display(), - ) - } else { - // This can happen if users mistakenly assume that for custom arguments, - // pkgs/by-name can't be used. - write!( - f, - "pkgs.{package_name}: This top-level package was previously defined in {}, but is now manually defined as `callPackage {call_package_arg} {{ ... }}` (e.g. in `pkgs/top-level/all-packages.nix`). While the manual `callPackage` is still needed, it's not necessary to move the package files.", - structure::relative_file_for_package(package_name).display(), - ) - } - }, - NixpkgsProblem::NewPackageNotUsingByName { package_name, call_package_path, empty_arg } => { - let call_package_arg = - if let Some(path) = &call_package_path { - format!("./{}", path.display()) - } else { - "...".into() - }; - let extra = - if *empty_arg { - "Since the second `callPackage` argument is `{ }`, no manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is needed anymore." - } else { - "Since the second `callPackage` argument is not `{ }`, the manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is still needed." - }; - write!( + let relative_package_file = structure::relative_file_for_package(package_name); + writedoc!( f, - "pkgs.{package_name}: This is a new top-level package of the form `callPackage {call_package_arg} {{ }}`. Please define it in {} instead. See `pkgs/by-name/README.md` for more details. {extra}", - structure::relative_file_for_package(package_name).display(), + " + - Attribute `pkgs.{package_name}` was previously defined in {relative_package_file}, but is now manually defined as `callPackage {call_package_arg} {{ /* ... */ }}` in {file}. + Please move the package back and remove the manual `callPackage`. + ", + ) + }, + NixpkgsProblem::MovedOutOfByNameNonEmptyArg { package_name, call_package_path, file } => { + let call_package_arg = + if let Some(path) = &call_package_path { + format!("./{}", path) + } else { + "...".into() + }; + let relative_package_file = structure::relative_file_for_package(package_name); + // This can happen if users mistakenly assume that for custom arguments, + // pkgs/by-name can't be used. + writedoc!( + f, + " + - Attribute `pkgs.{package_name}` was previously defined in {relative_package_file}, but is now manually defined as `callPackage {call_package_arg} {{ ... }}` in {file}. + While the manual `callPackage` is still needed, it's not necessary to move the package files. + ", + ) + }, + NixpkgsProblem::NewPackageNotUsingByNameEmptyArg { package_name, call_package_path, file } => { + let call_package_arg = + if let Some(path) = &call_package_path { + format!("./{}", path) + } else { + "...".into() + }; + let relative_package_file = structure::relative_file_for_package(package_name); + writedoc!( + f, + " + - Attribute `pkgs.{package_name}` is a new top-level package using `pkgs.callPackage {call_package_arg} {{ /* ... */ }}`. + Please define it in {relative_package_file} instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is `{{ }}`, no manual `callPackage` in {file} is needed anymore. + ", + ) + }, + NixpkgsProblem::NewPackageNotUsingByNameNonEmptyArg { package_name, call_package_path, file } => { + let call_package_arg = + if let Some(path) = &call_package_path { + format!("./{}", path) + } else { + "...".into() + }; + let relative_package_file = structure::relative_file_for_package(package_name); + writedoc!( + f, + " + - Attribute `pkgs.{package_name}` is a new top-level package using `pkgs.callPackage {call_package_arg} {{ /* ... */ }}`. + Please define it in {relative_package_file} instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is not `{{ }}`, the manual `callPackage` in {file} is still needed. + ", ) }, NixpkgsProblem::InternalCallPackageUsed { attr_name } => @@ -271,3 +398,28 @@ impl fmt::Display for NixpkgsProblem { } } } + +fn indent_definition(column: usize, definition: String) -> String { + // The entire code should be indented 4 spaces + textwrap::indent( + // But first we want to strip the code's natural indentation + &textwrap::dedent( + // The definition _doesn't_ include the leading spaces, but we can + // recover those from the column + &format!("{}{definition}", " ".repeat(column - 1)), + ), + " ", + ) +} + +/// Creates a Nix path expression that when put into Nix file `from_file`, would point to the `to_file`. +fn create_path_expr( + from_file: impl AsRef, + to_file: impl AsRef, +) -> String { + // This `expect` calls should never trigger because we only call this function with files. + // That's why we `expect` them! + let from = from_file.as_ref().parent().expect("a parent for this path"); + let rel = from.relative(to_file); + format!("./{rel}") +} diff --git a/pkgs/test/nixpkgs-check-by-name/src/ratchet.rs b/pkgs/test/nixpkgs-check-by-name/src/ratchet.rs index 200bf92c516a..8136d641c351 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/ratchet.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/ratchet.rs @@ -4,8 +4,8 @@ use crate::nix_file::CallPackageArgumentInfo; use crate::nixpkgs_problem::NixpkgsProblem; -use crate::structure; use crate::validation::{self, Validation, Validation::Success}; +use relative_path::RelativePathBuf; use std::collections::HashMap; /// The ratchet value for the entirety of Nixpkgs. @@ -127,17 +127,14 @@ impl RatchetState { pub enum ManualDefinition {} impl ToNixpkgsProblem for ManualDefinition { - type ToContext = (); + type ToContext = NixpkgsProblem; fn to_nixpkgs_problem( - name: &str, + _name: &str, _optional_from: Option<()>, - _to: &Self::ToContext, + to: &Self::ToContext, ) -> NixpkgsProblem { - NixpkgsProblem::WrongCallPackage { - relative_package_file: structure::relative_file_for_package(name), - package_name: name.to_owned(), - } + (*to).clone() } } @@ -149,24 +146,38 @@ impl ToNixpkgsProblem for ManualDefinition { pub enum UsesByName {} impl ToNixpkgsProblem for UsesByName { - type ToContext = CallPackageArgumentInfo; + type ToContext = (CallPackageArgumentInfo, RelativePathBuf); fn to_nixpkgs_problem( name: &str, optional_from: Option<()>, - to: &Self::ToContext, + (to, file): &Self::ToContext, ) -> NixpkgsProblem { if let Some(()) = optional_from { - NixpkgsProblem::MovedOutOfByName { + if to.empty_arg { + NixpkgsProblem::MovedOutOfByNameEmptyArg { + package_name: name.to_owned(), + call_package_path: to.relative_path.clone(), + file: file.to_owned(), + } + } else { + NixpkgsProblem::MovedOutOfByNameNonEmptyArg { + package_name: name.to_owned(), + call_package_path: to.relative_path.clone(), + file: file.to_owned(), + } + } + } else if to.empty_arg { + NixpkgsProblem::NewPackageNotUsingByNameEmptyArg { package_name: name.to_owned(), call_package_path: to.relative_path.clone(), - empty_arg: to.empty_arg, + file: file.to_owned(), } } else { - NixpkgsProblem::NewPackageNotUsingByName { + NixpkgsProblem::NewPackageNotUsingByNameNonEmptyArg { package_name: name.to_owned(), call_package_path: to.relative_path.clone(), - empty_arg: to.empty_arg, + file: file.to_owned(), } } } diff --git a/pkgs/test/nixpkgs-check-by-name/src/references.rs b/pkgs/test/nixpkgs-check-by-name/src/references.rs index 169e996300ba..e2319163ccc6 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/references.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/references.rs @@ -2,6 +2,7 @@ use crate::nixpkgs_problem::NixpkgsProblem; use crate::utils; use crate::validation::{self, ResultIteratorExt, Validation::Success}; use crate::NixFileStore; +use relative_path::RelativePath; use anyhow::Context; use rowan::ast::AstNode; @@ -12,14 +13,14 @@ use std::path::Path; /// Both symlinks and Nix path expressions are checked. pub fn check_references( nix_file_store: &mut NixFileStore, - relative_package_dir: &Path, + relative_package_dir: &RelativePath, absolute_package_dir: &Path, ) -> validation::Result<()> { // The first subpath to check is the package directory itself, which we can represent as an // empty path, since the absolute package directory gets prepended to this. // We don't use `./.` to keep the error messages cleaner // (there's no canonicalisation going on underneath) - let subpath = Path::new(""); + let subpath = RelativePath::new(""); check_path( nix_file_store, relative_package_dir, @@ -29,7 +30,7 @@ pub fn check_references( .with_context(|| { format!( "While checking the references in package directory {}", - relative_package_dir.display() + relative_package_dir ) }) } @@ -41,11 +42,11 @@ pub fn check_references( /// The absolute package directory gets prepended before doing anything with it though. fn check_path( nix_file_store: &mut NixFileStore, - relative_package_dir: &Path, + relative_package_dir: &RelativePath, absolute_package_dir: &Path, - subpath: &Path, + subpath: &RelativePath, ) -> validation::Result<()> { - let path = absolute_package_dir.join(subpath); + let path = subpath.to_path(absolute_package_dir); Ok(if path.is_symlink() { // Check whether the symlink resolves to outside the package directory @@ -55,8 +56,8 @@ fn check_path( // entire directory recursively anyways if let Err(_prefix_error) = target.strip_prefix(absolute_package_dir) { NixpkgsProblem::OutsideSymlink { - relative_package_dir: relative_package_dir.to_path_buf(), - subpath: subpath.to_path_buf(), + relative_package_dir: relative_package_dir.to_owned(), + subpath: subpath.to_owned(), } .into() } else { @@ -64,9 +65,9 @@ fn check_path( } } Err(io_error) => NixpkgsProblem::UnresolvableSymlink { - relative_package_dir: relative_package_dir.to_path_buf(), - subpath: subpath.to_path_buf(), - io_error, + relative_package_dir: relative_package_dir.to_owned(), + subpath: subpath.to_owned(), + io_error: io_error.to_string(), } .into(), } @@ -80,11 +81,12 @@ fn check_path( nix_file_store, relative_package_dir, absolute_package_dir, - &subpath.join(entry.file_name()), + // TODO: The relative_path crate doesn't seem to support OsStr + &subpath.join(entry.file_name().to_string_lossy().to_string()), ) }) .collect_vec() - .with_context(|| format!("Error while recursing into {}", subpath.display()))?, + .with_context(|| format!("Error while recursing into {}", subpath))?, ) } else if path.is_file() { // Only check Nix files @@ -96,7 +98,7 @@ fn check_path( absolute_package_dir, subpath, ) - .with_context(|| format!("Error while checking Nix file {}", subpath.display()))? + .with_context(|| format!("Error while checking Nix file {}", subpath))? } else { Success(()) } @@ -105,7 +107,7 @@ fn check_path( } } else { // This should never happen, git doesn't support other file types - anyhow::bail!("Unsupported file type for path {}", subpath.display()); + anyhow::bail!("Unsupported file type for path {}", subpath); }) } @@ -113,11 +115,11 @@ fn check_path( /// directory fn check_nix_file( nix_file_store: &mut NixFileStore, - relative_package_dir: &Path, + relative_package_dir: &RelativePath, absolute_package_dir: &Path, - subpath: &Path, + subpath: &RelativePath, ) -> validation::Result<()> { - let path = absolute_package_dir.join(subpath); + let path = subpath.to_path(absolute_package_dir); let nix_file = nix_file_store.get(&path)?; @@ -135,32 +137,32 @@ fn check_nix_file( match nix_file.static_resolve_path(path, absolute_package_dir) { ResolvedPath::Interpolated => NixpkgsProblem::PathInterpolation { - relative_package_dir: relative_package_dir.to_path_buf(), - subpath: subpath.to_path_buf(), + relative_package_dir: relative_package_dir.to_owned(), + subpath: subpath.to_owned(), line, text, } .into(), ResolvedPath::SearchPath => NixpkgsProblem::SearchPath { - relative_package_dir: relative_package_dir.to_path_buf(), - subpath: subpath.to_path_buf(), + relative_package_dir: relative_package_dir.to_owned(), + subpath: subpath.to_owned(), line, text, } .into(), ResolvedPath::Outside => NixpkgsProblem::OutsidePathReference { - relative_package_dir: relative_package_dir.to_path_buf(), - subpath: subpath.to_path_buf(), + relative_package_dir: relative_package_dir.to_owned(), + subpath: subpath.to_owned(), line, text, } .into(), ResolvedPath::Unresolvable(e) => NixpkgsProblem::UnresolvablePathReference { - relative_package_dir: relative_package_dir.to_path_buf(), - subpath: subpath.to_path_buf(), + relative_package_dir: relative_package_dir.to_owned(), + subpath: subpath.to_owned(), line, text, - io_error: e, + io_error: e.to_string(), } .into(), ResolvedPath::Within(..) => { diff --git a/pkgs/test/nixpkgs-check-by-name/src/structure.rs b/pkgs/test/nixpkgs-check-by-name/src/structure.rs index 9b615dd9969a..09806bc3d4dc 100644 --- a/pkgs/test/nixpkgs-check-by-name/src/structure.rs +++ b/pkgs/test/nixpkgs-check-by-name/src/structure.rs @@ -7,8 +7,9 @@ use crate::NixFileStore; use itertools::concat; use lazy_static::lazy_static; use regex::Regex; +use relative_path::RelativePathBuf; use std::fs::DirEntry; -use std::path::{Path, PathBuf}; +use std::path::Path; lazy_static! { static ref SHARD_NAME_REGEX: Regex = Regex::new(r"^[a-z0-9_-]{1,2}$").unwrap(); @@ -21,15 +22,15 @@ pub fn shard_for_package(package_name: &str) -> String { package_name.to_lowercase().chars().take(2).collect() } -pub fn relative_dir_for_shard(shard_name: &str) -> PathBuf { - PathBuf::from(format!("{BASE_SUBPATH}/{shard_name}")) +pub fn relative_dir_for_shard(shard_name: &str) -> RelativePathBuf { + RelativePathBuf::from(format!("{BASE_SUBPATH}/{shard_name}")) } -pub fn relative_dir_for_package(package_name: &str) -> PathBuf { +pub fn relative_dir_for_package(package_name: &str) -> RelativePathBuf { relative_dir_for_shard(&shard_for_package(package_name)).join(package_name) } -pub fn relative_file_for_package(package_name: &str) -> PathBuf { +pub fn relative_file_for_package(package_name: &str) -> RelativePathBuf { relative_dir_for_package(package_name).join(PACKAGE_NIX_FILENAME) } @@ -120,7 +121,8 @@ fn check_package( ) -> validation::Result { let package_path = package_entry.path(); let package_name = package_entry.file_name().to_string_lossy().into_owned(); - let relative_package_dir = PathBuf::from(format!("{BASE_SUBPATH}/{shard_name}/{package_name}")); + let relative_package_dir = + RelativePathBuf::from(format!("{BASE_SUBPATH}/{shard_name}/{package_name}")); Ok(if !package_path.is_dir() { NixpkgsProblem::PackageNonDir { @@ -174,7 +176,7 @@ fn check_package( let result = result.and(references::check_references( nix_file_store, &relative_package_dir, - &path.join(&relative_package_dir), + &relative_package_dir.to_path(path), )?); result.map(|_| package_name.clone()) diff --git a/pkgs/test/nixpkgs-check-by-name/tests/aliases/expected b/pkgs/test/nixpkgs-check-by-name/tests/aliases/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/aliases/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/all-packages.nix b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/all-packages.nix new file mode 100644 index 000000000000..399f8eee0a18 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/all-packages.nix @@ -0,0 +1,7 @@ +self: super: { + + alt.callPackage = self.lib.callPackageWith {}; + + foo = self.alt.callPackage ({ }: self.someDrv) { }; + +} diff --git a/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/default.nix b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/default.nix new file mode 100644 index 000000000000..861260cdca4b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/default.nix @@ -0,0 +1 @@ +import { root = ./.; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/expected b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/expected new file mode 100644 index 000000000000..1d92e652200e --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/expected @@ -0,0 +1,9 @@ +- Because pkgs/by-name/fo/foo exists, the attribute `pkgs.foo` must be defined like + + foo = callPackage ./pkgs/by-name/fo/foo/package.nix { /* ... */ }; + + However, in this PR, a different `callPackage` is used. See the definition in all-packages.nix:5: + + foo = self.alt.callPackage ({ }: self.someDrv) { }; + +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/pkgs/by-name/fo/foo/package.nix b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/pkgs/by-name/fo/foo/package.nix new file mode 100644 index 000000000000..a1b92efbbadb --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/alt-callPackage/pkgs/by-name/fo/foo/package.nix @@ -0,0 +1 @@ +{ someDrv }: someDrv diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/base/default.nix b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/base/default.nix new file mode 100644 index 000000000000..861260cdca4b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/base/default.nix @@ -0,0 +1 @@ +import { root = ./.; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/base/pkgs/by-name/foo b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/base/pkgs/by-name/foo new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/default.nix b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/default.nix new file mode 100644 index 000000000000..861260cdca4b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/default.nix @@ -0,0 +1 @@ +import { root = ./.; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/expected b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/expected new file mode 100644 index 000000000000..e209e1855314 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/expected @@ -0,0 +1 @@ +The base branch is broken, but this PR fixes it. Nice job! diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/pkgs/by-name/README.md b/pkgs/test/nixpkgs-check-by-name/tests/base-fixed/pkgs/by-name/README.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/base/default.nix b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/base/default.nix new file mode 100644 index 000000000000..861260cdca4b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/base/default.nix @@ -0,0 +1 @@ +import { root = ./.; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/base/pkgs/by-name/foo b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/base/pkgs/by-name/foo new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/default.nix b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/default.nix new file mode 100644 index 000000000000..861260cdca4b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/default.nix @@ -0,0 +1 @@ +import { root = ./.; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/expected b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/expected new file mode 100644 index 000000000000..c25f06b4150e --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/expected @@ -0,0 +1,3 @@ +pkgs/by-name/bar: This is a file, but it should be a directory. +The base branch is broken and still has above problems with this PR, which need to be fixed first. +Consider reverting the PR that introduced these problems in order to prevent more failures of unrelated PRs. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/pkgs/by-name/bar b/pkgs/test/nixpkgs-check-by-name/tests/base-still-broken/pkgs/by-name/bar new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkgs/test/nixpkgs-check-by-name/tests/broken-autocall/expected b/pkgs/test/nixpkgs-check-by-name/tests/broken-autocall/expected index fff17c6c7cd5..15b3e3ff6ede 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/broken-autocall/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/broken-autocall/expected @@ -1 +1,2 @@ pkgs.foo: This attribute is not defined but it should be defined automatically as pkgs/by-name/fo/foo/package.nix +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/callPackage-syntax/expected b/pkgs/test/nixpkgs-check-by-name/tests/callPackage-syntax/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/callPackage-syntax/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/empty-base/expected b/pkgs/test/nixpkgs-check-by-name/tests/empty-base/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/empty-base/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/incorrect-shard/expected b/pkgs/test/nixpkgs-check-by-name/tests/incorrect-shard/expected index 3627368c0ef0..3b0146cdc146 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/incorrect-shard/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/incorrect-shard/expected @@ -1 +1,2 @@ pkgs/by-name/aa/FOO: Incorrect directory location, should be pkgs/by-name/fo/FOO instead. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/expected b/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/expected index 404795ee5c79..b3d0c6fc1a40 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/internalCallPackage/expected @@ -1 +1,2 @@ pkgs.foo: This attribute is defined using `_internalCallByNamePackageFile`, which is an internal function not intended for manual use. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/invalid-package-name/expected b/pkgs/test/nixpkgs-check-by-name/tests/invalid-package-name/expected index 8c8eafdcb3d1..80f6e7dd5998 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/invalid-package-name/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/invalid-package-name/expected @@ -1 +1,2 @@ pkgs/by-name/fo/fo@: Invalid package directory name "fo@", must be ASCII characters consisting of a-z, A-Z, 0-9, "-" or "_". +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/invalid-shard-name/expected b/pkgs/test/nixpkgs-check-by-name/tests/invalid-shard-name/expected index 248aa8877966..7ca9ff8565bd 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/invalid-shard-name/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/invalid-shard-name/expected @@ -1 +1,2 @@ pkgs/by-name/A: Invalid directory name "A", must be at most 2 ASCII characters consisting of a-z, 0-9, "-" or "_". +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/manual-definition/expected b/pkgs/test/nixpkgs-check-by-name/tests/manual-definition/expected index 29d33f7dbdc0..4d906ec0d086 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/manual-definition/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/manual-definition/expected @@ -1,2 +1,21 @@ -pkgs.noEval: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/no/noEval/package.nix { ... }` with a non-empty second argument. -pkgs.onlyMove: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/on/onlyMove/package.nix { ... }` with a non-empty second argument. +- Because pkgs/by-name/no/noEval exists, the attribute `pkgs.noEval` must be defined like + + noEval = callPackage ./pkgs/by-name/no/noEval/package.nix { /* ... */ }; + + However, in this PR, the second argument is empty. See the definition in all-packages.nix:9: + + noEval = self.callPackage ./pkgs/by-name/no/noEval/package.nix { }; + + Such a definition is provided automatically and therefore not necessary. Please remove it. + +- Because pkgs/by-name/on/onlyMove exists, the attribute `pkgs.onlyMove` must be defined like + + onlyMove = callPackage ./pkgs/by-name/on/onlyMove/package.nix { /* ... */ }; + + However, in this PR, the second argument is empty. See the definition in all-packages.nix:7: + + onlyMove = self.callPackage ./pkgs/by-name/on/onlyMove/package.nix { }; + + Such a definition is provided automatically and therefore not necessary. Please remove it. + +This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/missing-package-nix/expected b/pkgs/test/nixpkgs-check-by-name/tests/missing-package-nix/expected index ce1afcbf2d34..1b67704817cf 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/missing-package-nix/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/missing-package-nix/expected @@ -1 +1,2 @@ pkgs/by-name/fo/foo: Missing required "package.nix" file. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix b/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix index 81a9c916ac2d..fbd51f656138 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix +++ b/pkgs/test/nixpkgs-check-by-name/tests/mock-nixpkgs.nix @@ -28,13 +28,22 @@ let lib = import ; # The base fixed-point function to populate the resulting attribute set - pkgsFun = self: { - inherit lib; - newScope = extra: lib.callPackageWith (self // extra); - callPackage = self.newScope { }; - callPackages = lib.callPackagesWith self; - someDrv = { type = "derivation"; }; - }; + pkgsFun = + self: { + inherit lib; + newScope = extra: lib.callPackageWith (self // extra); + callPackage = self.newScope { }; + callPackages = lib.callPackagesWith self; + } + # This mapAttrs is a very hacky workaround necessary because for all attributes defined in Nixpkgs, + # the files that define them are verified to be within Nixpkgs. + # This is usually a very safe assumption, but it fails in these tests for someDrv, + # because it's technically defined outside the Nixpkgs directories of each test case. + # By using `mapAttrs`, `builtins.unsafeGetAttrPos` just returns `null`, + # which then doesn't trigger this check + // lib.mapAttrs (name: value: value) { + someDrv = { type = "derivation"; }; + }; baseDirectory = root + "/pkgs/by-name"; diff --git a/pkgs/test/nixpkgs-check-by-name/tests/move-to-non-by-name/expected b/pkgs/test/nixpkgs-check-by-name/tests/move-to-non-by-name/expected index 96da50b52491..123e24daab8a 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/move-to-non-by-name/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/move-to-non-by-name/expected @@ -1,4 +1,13 @@ -pkgs.foo1: This top-level package was previously defined in pkgs/by-name/fo/foo1/package.nix, but is now manually defined as `callPackage ... { }` (e.g. in `pkgs/top-level/all-packages.nix`). Please move the package back and remove the manual `callPackage`. -pkgs.foo2: This top-level package was previously defined in pkgs/by-name/fo/foo2/package.nix, but is now manually defined as `callPackage ./without-config.nix { }` (e.g. in `pkgs/top-level/all-packages.nix`). Please move the package back and remove the manual `callPackage`. -pkgs.foo3: This top-level package was previously defined in pkgs/by-name/fo/foo3/package.nix, but is now manually defined as `callPackage ... { ... }` (e.g. in `pkgs/top-level/all-packages.nix`). While the manual `callPackage` is still needed, it's not necessary to move the package files. -pkgs.foo4: This top-level package was previously defined in pkgs/by-name/fo/foo4/package.nix, but is now manually defined as `callPackage ./with-config.nix { ... }` (e.g. in `pkgs/top-level/all-packages.nix`). While the manual `callPackage` is still needed, it's not necessary to move the package files. +- Attribute `pkgs.foo1` was previously defined in pkgs/by-name/fo/foo1/package.nix, but is now manually defined as `callPackage ... { /* ... */ }` in all-packages.nix. + Please move the package back and remove the manual `callPackage`. + +- Attribute `pkgs.foo2` was previously defined in pkgs/by-name/fo/foo2/package.nix, but is now manually defined as `callPackage ./without-config.nix { /* ... */ }` in all-packages.nix. + Please move the package back and remove the manual `callPackage`. + +- Attribute `pkgs.foo3` was previously defined in pkgs/by-name/fo/foo3/package.nix, but is now manually defined as `callPackage ... { ... }` in all-packages.nix. + While the manual `callPackage` is still needed, it's not necessary to move the package files. + +- Attribute `pkgs.foo4` was previously defined in pkgs/by-name/fo/foo4/package.nix, but is now manually defined as `callPackage ./with-config.nix { ... }` in all-packages.nix. + While the manual `callPackage` is still needed, it's not necessary to move the package files. + +This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/multiple-failures/expected b/pkgs/test/nixpkgs-check-by-name/tests/multiple-failures/expected index ff5d18556ef0..0105b19078c7 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/multiple-failures/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/multiple-failures/expected @@ -11,3 +11,4 @@ pkgs/by-name/ba/foo: File package.nix at line 3 contains the path expression ".. pkgs/by-name/ba/foo: File package.nix at line 4 contains the nix search path expression "" which may point outside the directory of that package. pkgs/by-name/ba/foo: File package.nix at line 5 contains the path expression "./${"test"}", which is not yet supported and may point outside the directory of that package. pkgs/by-name/fo/foo: Missing required "package.nix" file. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/new-package-non-by-name/expected b/pkgs/test/nixpkgs-check-by-name/tests/new-package-non-by-name/expected index 3f294f26dfd8..92668a231b48 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/new-package-non-by-name/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/new-package-non-by-name/expected @@ -1,4 +1,21 @@ -pkgs.new1: This is a new top-level package of the form `callPackage ... { }`. Please define it in pkgs/by-name/ne/new1/package.nix instead. See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is `{ }`, no manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is needed anymore. -pkgs.new2: This is a new top-level package of the form `callPackage ./without-config.nix { }`. Please define it in pkgs/by-name/ne/new2/package.nix instead. See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is `{ }`, no manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is needed anymore. -pkgs.new3: This is a new top-level package of the form `callPackage ... { }`. Please define it in pkgs/by-name/ne/new3/package.nix instead. See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is not `{ }`, the manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is still needed. -pkgs.new4: This is a new top-level package of the form `callPackage ./with-config.nix { }`. Please define it in pkgs/by-name/ne/new4/package.nix instead. See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is not `{ }`, the manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is still needed. +- Attribute `pkgs.new1` is a new top-level package using `pkgs.callPackage ... { /* ... */ }`. + Please define it in pkgs/by-name/ne/new1/package.nix instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is `{ }`, no manual `callPackage` in all-packages.nix is needed anymore. + +- Attribute `pkgs.new2` is a new top-level package using `pkgs.callPackage ./without-config.nix { /* ... */ }`. + Please define it in pkgs/by-name/ne/new2/package.nix instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is `{ }`, no manual `callPackage` in all-packages.nix is needed anymore. + +- Attribute `pkgs.new3` is a new top-level package using `pkgs.callPackage ... { /* ... */ }`. + Please define it in pkgs/by-name/ne/new3/package.nix instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is not `{ }`, the manual `callPackage` in all-packages.nix is still needed. + +- Attribute `pkgs.new4` is a new top-level package using `pkgs.callPackage ./with-config.nix { /* ... */ }`. + Please define it in pkgs/by-name/ne/new4/package.nix instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is not `{ }`, the manual `callPackage` in all-packages.nix is still needed. + +This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/no-by-name/expected b/pkgs/test/nixpkgs-check-by-name/tests/no-by-name/expected index ddcb2df46e5f..defae2634c34 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/no-by-name/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/no-by-name/expected @@ -1 +1 @@ -Given Nixpkgs path does not contain a pkgs/by-name subdirectory, no check necessary. +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/no-eval/expected b/pkgs/test/nixpkgs-check-by-name/tests/no-eval/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/no-eval/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/non-attrs/expected b/pkgs/test/nixpkgs-check-by-name/tests/non-attrs/expected index e6c923790102..1705d22be798 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/non-attrs/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/non-attrs/expected @@ -1 +1,2 @@ pkgs.nonDerivation: This attribute defined by pkgs/by-name/no/nonDerivation/package.nix is not a derivation +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/non-derivation/expected b/pkgs/test/nixpkgs-check-by-name/tests/non-derivation/expected index e6c923790102..1705d22be798 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/non-derivation/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/non-derivation/expected @@ -1 +1,2 @@ pkgs.nonDerivation: This attribute defined by pkgs/by-name/no/nonDerivation/package.nix is not a derivation +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected b/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected index 9df788191ece..e09e931bb658 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/non-syntactical-callPackage-by-name/expected @@ -1 +1,9 @@ -pkgs.foo: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/fo/foo/package.nix { ... }` with a non-empty second argument. +- Because pkgs/by-name/fo/foo exists, the attribute `pkgs.foo` must be defined like + + foo = callPackage ./pkgs/by-name/fo/foo/package.nix { /* ... */ }; + + However, in this PR, it isn't defined that way. See the definition in all-packages.nix:4 + + foo = self.bar; + +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/one-letter/expected b/pkgs/test/nixpkgs-check-by-name/tests/one-letter/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/one-letter/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/only-callPackage-derivations/expected b/pkgs/test/nixpkgs-check-by-name/tests/only-callPackage-derivations/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/only-callPackage-derivations/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-different-file/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-different-file/expected index 51479e22d26f..16292c0c0eb1 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-different-file/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-different-file/expected @@ -1 +1,9 @@ -pkgs.nonDerivation: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/no/nonDerivation/package.nix { ... }` with a non-empty second argument. +- Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like + + nonDerivation = callPackage ./pkgs/by-name/no/nonDerivation/package.nix { /* ... */ }; + + However, in this PR, the first `callPackage` argument is the wrong path. See the definition in all-packages.nix:2: + + nonDerivation = callPackage ./someDrv.nix { /* ... */ }; + +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg-gradual/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg-gradual/expected index e69de29bb2d1..defae2634c34 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg-gradual/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg-gradual/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg/expected index 51479e22d26f..f3306aadbbb7 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-empty-arg/expected @@ -1 +1,11 @@ -pkgs.nonDerivation: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/no/nonDerivation/package.nix { ... }` with a non-empty second argument. +- Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like + + nonDerivation = callPackage ./pkgs/by-name/no/nonDerivation/package.nix { /* ... */ }; + + However, in this PR, the second argument is empty. See the definition in all-packages.nix:2: + + nonDerivation = self.callPackage ./pkgs/by-name/no/nonDerivation/package.nix { }; + + Such a definition is provided automatically and therefore not necessary. Please remove it. + +This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected index 51479e22d26f..d91d58d629f2 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-no-call-package/expected @@ -1 +1,9 @@ -pkgs.nonDerivation: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/no/nonDerivation/package.nix { ... }` with a non-empty second argument. +- Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like + + nonDerivation = callPackage ./pkgs/by-name/no/nonDerivation/package.nix { /* ... */ }; + + However, in this PR, it isn't defined that way. See the definition in all-packages.nix:2 + + nonDerivation = self.someDrv; + +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected index 51479e22d26f..807c440dd3d2 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-no-file/expected @@ -1 +1,9 @@ -pkgs.nonDerivation: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/no/nonDerivation/package.nix { ... }` with a non-empty second argument. +- Because pkgs/by-name/no/nonDerivation exists, the attribute `pkgs.nonDerivation` must be defined like + + nonDerivation = callPackage ./pkgs/by-name/no/nonDerivation/package.nix { /* ... */ }; + + However, in this PR, the first `callPackage` argument is not a path. See the definition in all-packages.nix:2: + + nonDerivation = self.callPackage ({ someDrv }: someDrv) { }; + +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/all-packages.nix b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/all-packages.nix new file mode 100644 index 000000000000..f07e7a42744a --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/all-packages.nix @@ -0,0 +1,5 @@ +self: super: { + + foo = self.callPackage ({ someDrv, someFlag }: someDrv) { someFlag = true; }; + +} diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/default.nix b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/default.nix new file mode 100644 index 000000000000..861260cdca4b --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/default.nix @@ -0,0 +1 @@ +import { root = ./.; } diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/expected new file mode 100644 index 000000000000..4adbaf66edc0 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/expected @@ -0,0 +1,9 @@ +- Because pkgs/by-name/fo/foo exists, the attribute `pkgs.foo` must be defined like + + foo = callPackage ./pkgs/by-name/fo/foo/package.nix { /* ... */ }; + + However, in this PR, the first `callPackage` argument is not a path. See the definition in all-packages.nix:3: + + foo = self.callPackage ({ someDrv, someFlag }: someDrv) { someFlag = true; }; + +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/pkgs/by-name/fo/foo/package.nix b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/pkgs/by-name/fo/foo/package.nix new file mode 100644 index 000000000000..a1b92efbbadb --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-non-path/pkgs/by-name/fo/foo/package.nix @@ -0,0 +1 @@ +{ someDrv }: someDrv diff --git a/pkgs/test/nixpkgs-check-by-name/tests/override-success/expected b/pkgs/test/nixpkgs-check-by-name/tests/override-success/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/override-success/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/package-dir-is-file/expected b/pkgs/test/nixpkgs-check-by-name/tests/package-dir-is-file/expected index 3ad4b8f820f5..adee1d0137fa 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/package-dir-is-file/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/package-dir-is-file/expected @@ -1 +1,2 @@ pkgs/by-name/fo/foo: This path is a file, but it should be a directory. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/package-nix-dir/expected b/pkgs/test/nixpkgs-check-by-name/tests/package-nix-dir/expected index 67a0c69fe29e..d03e1eceea26 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/package-nix-dir/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/package-nix-dir/expected @@ -1 +1,2 @@ pkgs/by-name/fo/foo: "package.nix" must be a file. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/package-variants/expected b/pkgs/test/nixpkgs-check-by-name/tests/package-variants/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/package-variants/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/ref-absolute/expected b/pkgs/test/nixpkgs-check-by-name/tests/ref-absolute/expected index 7d20c32aad68..0bdb00f20cb9 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/ref-absolute/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/ref-absolute/expected @@ -1 +1,2 @@ pkgs/by-name/aa/aa: File package.nix at line 2 contains the path expression "/foo" which cannot be resolved: No such file or directory (os error 2). +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/ref-escape/expected b/pkgs/test/nixpkgs-check-by-name/tests/ref-escape/expected index 3d7fb64e80a3..2e4338ccc7ae 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/ref-escape/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/ref-escape/expected @@ -1 +1,2 @@ pkgs/by-name/aa/aa: File package.nix at line 2 contains the path expression "../." which may point outside the directory of that package. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/ref-nix-path/expected b/pkgs/test/nixpkgs-check-by-name/tests/ref-nix-path/expected index b0cdff4a4778..30125570794a 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/ref-nix-path/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/ref-nix-path/expected @@ -1 +1,2 @@ pkgs/by-name/aa/aa: File package.nix at line 2 contains the nix search path expression "" which may point outside the directory of that package. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/ref-path-subexpr/expected b/pkgs/test/nixpkgs-check-by-name/tests/ref-path-subexpr/expected index ad662af27a86..6567439b77f8 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/ref-path-subexpr/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/ref-path-subexpr/expected @@ -1 +1,2 @@ pkgs/by-name/aa/aa: File package.nix at line 2 contains the path expression "./${"test"}", which is not yet supported and may point outside the directory of that package. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/ref-success/expected b/pkgs/test/nixpkgs-check-by-name/tests/ref-success/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/ref-success/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/shard-file/expected b/pkgs/test/nixpkgs-check-by-name/tests/shard-file/expected index 447b38e6b6c1..689cee41f1e3 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/shard-file/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/shard-file/expected @@ -1 +1,2 @@ pkgs/by-name/fo: This is a file, but it should be a directory. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/sorted-order/expected b/pkgs/test/nixpkgs-check-by-name/tests/sorted-order/expected index 349e9ad47c41..8a8104b73720 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/sorted-order/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/sorted-order/expected @@ -1,4 +1,31 @@ -pkgs.a: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/a/a/package.nix { ... }` with a non-empty second argument. -pkgs.b: This is a new top-level package of the form `callPackage ... { }`. Please define it in pkgs/by-name/b/b/package.nix instead. See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is `{ }`, no manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is needed anymore. -pkgs.c: This attribute is manually defined (most likely in pkgs/top-level/all-packages.nix), which is only allowed if the definition is of the form `pkgs.callPackage pkgs/by-name/c/c/package.nix { ... }` with a non-empty second argument. -pkgs.d: This is a new top-level package of the form `callPackage ... { }`. Please define it in pkgs/by-name/d/d/package.nix instead. See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is `{ }`, no manual `callPackage` (e.g. in `pkgs/top-level/all-packages.nix`) is needed anymore. +- Because pkgs/by-name/a/a exists, the attribute `pkgs.a` must be defined like + + a = callPackage ./pkgs/by-name/a/a/package.nix { /* ... */ }; + + However, in this PR, the second argument is empty. See the definition in all-packages.nix:2: + + a = self.callPackage ./pkgs/by-name/a/a/package.nix { }; + + Such a definition is provided automatically and therefore not necessary. Please remove it. + +- Attribute `pkgs.b` is a new top-level package using `pkgs.callPackage ... { /* ... */ }`. + Please define it in pkgs/by-name/b/b/package.nix instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is `{ }`, no manual `callPackage` in all-packages.nix is needed anymore. + +- Because pkgs/by-name/c/c exists, the attribute `pkgs.c` must be defined like + + c = callPackage ./pkgs/by-name/c/c/package.nix { /* ... */ }; + + However, in this PR, the second argument is empty. See the definition in all-packages.nix:4: + + c = self.callPackage ./pkgs/by-name/c/c/package.nix { }; + + Such a definition is provided automatically and therefore not necessary. Please remove it. + +- Attribute `pkgs.d` is a new top-level package using `pkgs.callPackage ... { /* ... */ }`. + Please define it in pkgs/by-name/d/d/package.nix instead. + See `pkgs/by-name/README.md` for more details. + Since the second `callPackage` argument is `{ }`, no manual `callPackage` in all-packages.nix is needed anymore. + +This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/success/expected b/pkgs/test/nixpkgs-check-by-name/tests/success/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/success/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/symlink-escape/expected b/pkgs/test/nixpkgs-check-by-name/tests/symlink-escape/expected index 335c5d6b6e5d..cd555c658a09 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/symlink-escape/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/symlink-escape/expected @@ -1 +1,2 @@ pkgs/by-name/fo/foo: Path package.nix is a symlink pointing to a path outside the directory of that package. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/expected b/pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/expected index c1e7a28205a7..1b06bcf4972b 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/symlink-invalid/expected @@ -1 +1,2 @@ pkgs/by-name/fo/foo: Path foo is a symlink which cannot be resolved: No such file or directory (os error 2). +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/expected b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/expected index 2a248c23ab50..608843d93903 100644 --- a/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/expected +++ b/pkgs/test/nixpkgs-check-by-name/tests/unknown-location/expected @@ -1 +1,2 @@ pkgs.foo: Cannot determine the location of this attribute using `builtins.unsafeGetAttrPos`. +This PR introduces the problems listed above. Please fix them before merging, otherwise the base branch would break. diff --git a/pkgs/test/nixpkgs-check-by-name/tests/uppercase/expected b/pkgs/test/nixpkgs-check-by-name/tests/uppercase/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/uppercase/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/test/nixpkgs-check-by-name/tests/with-readme/expected b/pkgs/test/nixpkgs-check-by-name/tests/with-readme/expected new file mode 100644 index 000000000000..defae2634c34 --- /dev/null +++ b/pkgs/test/nixpkgs-check-by-name/tests/with-readme/expected @@ -0,0 +1 @@ +Validated successfully diff --git a/pkgs/tools/admin/fioctl/default.nix b/pkgs/tools/admin/fioctl/default.nix index 06c30bda2be0..e384f38f6499 100644 --- a/pkgs/tools/admin/fioctl/default.nix +++ b/pkgs/tools/admin/fioctl/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "fioctl"; - version = "0.40"; + version = "0.41"; src = fetchFromGitHub { owner = "foundriesio"; repo = "fioctl"; rev = "v${version}"; - sha256 = "sha256-G1CHm5z2D7l3NDmUMhubJsrXYUHb6FJ70EsYQShhsDE="; + sha256 = "sha256-N+bLW1Gf0lr5FKgd1lr84HVrhdjB+npaeS3nzYXoVl0="; }; - vendorHash = "sha256-j0tdFvOEp9VGx8OCfUruCzwVSB8thcenpvVNn7Rf0dA="; + vendorHash = "sha256-cu1TwCWdDQi2ZR96SvEeH/LIP7sZOVZoly3VczKZfRw="; ldflags = [ "-s" "-w" diff --git a/pkgs/tools/archivers/7zz/default.nix b/pkgs/tools/archivers/7zz/default.nix index 48b072b0cf4b..a10283dc59f8 100644 --- a/pkgs/tools/archivers/7zz/default.nix +++ b/pkgs/tools/archivers/7zz/default.nix @@ -99,6 +99,8 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = lib.optionals useUasm [ uasm ]; + setupHook = ./setup-hook.sh; + enableParallelBuilding = true; preBuild = "cd CPP/7zip/Bundles/Alone2"; diff --git a/pkgs/tools/archivers/7zz/setup-hook.sh b/pkgs/tools/archivers/7zz/setup-hook.sh new file mode 100644 index 000000000000..97f2cc8a7694 --- /dev/null +++ b/pkgs/tools/archivers/7zz/setup-hook.sh @@ -0,0 +1,5 @@ +unpackCmdHooks+=(_tryUnpackDmg) +_tryUnpackDmg() { + if ! [[ "$curSrc" =~ \.dmg$ ]]; then return 1; fi + 7zz x "$curSrc" +} diff --git a/pkgs/tools/filesystems/garage/default.nix b/pkgs/tools/filesystems/garage/default.nix index e34822845b40..b374618037bd 100644 --- a/pkgs/tools/filesystems/garage/default.nix +++ b/pkgs/tools/filesystems/garage/default.nix @@ -70,6 +70,11 @@ let "sqlite" ]; + disabledTests = [ + # Upstream told us this test is flakey. + "k2v::poll::test_poll_item" + ]; + passthru.tests = nixosTests.garage; meta = { @@ -89,22 +94,23 @@ rec { # we have to keep all the numbers in the version to handle major/minor/patch level. # for <1.0. - garage_0_8_5 = generic { - version = "0.8.5"; - sha256 = "sha256-YRxkjETSmI1dcHP9qTPLcOMqXx9B2uplVR3bBjJWn3I="; - cargoSha256 = "sha256-VOcymlvqqQRdT1MFzRcMuD+Xo3fc3XTuRA12tW7ZjdI="; + garage_0_8_6 = generic { + version = "0.8.6"; + sha256 = "sha256-N0AOcwpuBHwTZtHcz6a2d9GOimHevhohEOzVkIt0RDE="; + cargoSha256 = "sha256-e72FQKL77CZOi/pa+hE7PCyc1+HSJgEsKGgWlfVw51k="; broken = stdenv.isDarwin; }; - garage_0_8 = garage_0_8_5; + garage_0_8 = garage_0_8_6; - garage_0_9_1 = generic { - version = "0.9.1"; - sha256 = "sha256-AXLaifVmZU4j5D/wKn/0TzhjHZBzZW1+tMyhsAo2eBU="; - cargoSha256 = "sha256-4/+OsM73TroBB1TGqare2xASO5KhqVyNkkss0Y0JZXg="; + garage_0_9_2 = generic { + version = "0.9.2"; + sha256 = "sha256-6a400/wOZunVH+LAByd6BEA0gs56Rxyh+gvM4hUO4Y8="; + cargoSha256 = "sha256-1p6bB2gMOCHDdILEwgoJ1EqvgGhLPcThNkwaz6NMZhQ="; + broken = stdenv.isDarwin; }; - garage_0_9 = garage_0_9_1; + garage_0_9 = garage_0_9_2; garage = garage_0_9; } diff --git a/pkgs/tools/filesystems/mergerfs/default.nix b/pkgs/tools/filesystems/mergerfs/default.nix index 1ff360bc3399..c5dca0278ecb 100644 --- a/pkgs/tools/filesystems/mergerfs/default.nix +++ b/pkgs/tools/filesystems/mergerfs/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "mergerfs"; - version = "2.40.1"; + version = "2.40.2"; src = fetchFromGitHub { owner = "trapexit"; repo = pname; rev = version; - sha256 = "sha256-EeAgDkm8WyD9OCM8/tHydp/slDGPwCAljeOrUCIWAqQ="; + sha256 = "sha256-3DfSGuTtM+h0IdtsIhLVXQxX5/Tj9G5Qcha3DWmyyq4="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/inputmethods/fcitx5/default.nix b/pkgs/tools/inputmethods/fcitx5/default.nix index a3b5e180bcfb..865134947be5 100644 --- a/pkgs/tools/inputmethods/fcitx5/default.nix +++ b/pkgs/tools/inputmethods/fcitx5/default.nix @@ -44,13 +44,13 @@ let in stdenv.mkDerivation rec { pname = "fcitx5"; - version = "5.1.7"; + version = "5.1.8"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - hash = "sha256-XI4E+fWDIYDiYBv6HezytaZmhzv4NUaNam1T5Fyx+LI="; + hash = "sha256-MeknggrpOzpkT1EXZCftIrlevuMEEHM5d8vszKRp+DI="; }; prePatch = '' diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix index 385043ef9a29..0699f23e3aab 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix @@ -1,5 +1,5 @@ { lib -, mkDerivation +, stdenv , fetchurl , fetchFromGitHub , cmake @@ -13,6 +13,7 @@ , opencc , curl , fmt +, qtbase , luaSupport ? true }: @@ -29,15 +30,15 @@ let }; in -mkDerivation rec { +stdenv.mkDerivation rec { pname = "fcitx5-chinese-addons"; - version = "5.1.3"; + version = "5.1.4"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - sha256 = "sha256-z+udRjvAZbnu6EcvvdaFVCr0OKLxFBJbgoYpH9QjrDI="; + sha256 = "sha256-OqVoXZ8SIO8KRs3ehxul9Ug4sV47cxVCbLCBh6/8EoE="; }; nativeBuildInputs = [ @@ -62,6 +63,12 @@ mkDerivation rec { fmt ] ++ lib.optional luaSupport fcitx5-lua; + cmakeFlags = [ + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) + ]; + + dontWrapQtApps = true; + meta = with lib; { description = "Addons related to Chinese, including IME previous bundled inside fcitx4"; homepage = "https://github.com/fcitx/fcitx5-chinese-addons"; diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix index b726a3515508..f0553a5d52f7 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix @@ -1,60 +1,81 @@ { lib -, mkDerivation +, stdenv , fetchFromGitHub , cmake , extra-cmake-modules +, pkg-config , fcitx5 , fcitx5-qt -, qtx11extras -, qtquickcontrols2 +, qtbase +, qtsvg +, qtwayland +, qtdeclarative +, qtx11extras ? null +, kitemviews , kwidgetsaddons +, qtquickcontrols2 ? null +, kcoreaddons , kdeclarative -, kirigami2 +, kirigami ? null +, kirigami2 ? null , isocodes , xkeyboardconfig , libxkbfile -, libXdmcp -, plasma5Packages -, plasma-framework +, libplasma ? null +, plasma-framework ? null +, wrapQtAppsHook , kcmSupport ? true }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "fcitx5-configtool"; - version = "5.1.3"; + version = "5.1.4"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - sha256 = "sha256-IwGlhIeON0SenW738p07LWZAzVDMtxOSMuUIAgfmTEg="; + sha256 = "sha256-jYO1jdiuDjt6e98qhwMpTQTnGxoIYWMKkORGJbmk3mk="; }; cmakeFlags = [ - "-DKDE_INSTALL_USE_QT_SYS_PATHS=ON" + (lib.cmakeBool "KDE_INSTALL_USE_QT_SYS_PATHS" true) + (lib.cmakeBool "ENABLE_KCM" kcmSupport) + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) ]; nativeBuildInputs = [ cmake extra-cmake-modules + pkg-config + wrapQtAppsHook ]; buildInputs = [ fcitx5 fcitx5-qt - qtx11extras - qtquickcontrols2 - kirigami2 + qtbase + qtsvg + qtwayland + kitemviews + kwidgetsaddons isocodes xkeyboardconfig libxkbfile - libXdmcp - ] ++ lib.optionals kcmSupport [ + ] ++ lib.optionals (lib.versions.major qtbase.version == "5") [ + qtx11extras + ] ++ lib.optionals kcmSupport ([ + qtdeclarative + kcoreaddons kdeclarative - kwidgetsaddons - plasma5Packages.kiconthemes + ] ++ lib.optionals (lib.versions.major qtbase.version == "5") [ + qtquickcontrols2 plasma-framework - ]; + kirigami2 + ] ++ lib.optionals (lib.versions.major qtbase.version == "6") [ + libplasma + kirigami + ]); meta = with lib; { description = "Configuration Tool for Fcitx5"; diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix index 1036b28685c3..6be9e49886f8 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix @@ -26,13 +26,13 @@ stdenv.mkDerivation rec { pname = "fcitx5-gtk"; - version = "5.1.1"; + version = "5.1.2"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - sha256 = "sha256-Ex24cHTsYsZjP8o+vrCdgGogk1UotWpd8xaLZAqzgaQ="; + sha256 = "sha256-iNqY/VORDEPR4rc0LjVgcojZlMcT+LBdrdOwBkC5Vkk="; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix index 9a1a2c8eca24..23aabde1e653 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "fcitx5-hangul"; - version = "5.1.1"; + version = "5.1.2"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - sha256 = "sha256-3gkZh+ZzgTdpTbQe92gxJlG0x6Yhl7LfMiFEq5mb92o="; + sha256 = "sha256-S5TGjb5vD0rk7V88b4yRziszLrwO1pgVFWuEGMp48oY="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix index 5311d20ffa32..b0cd6dc6d59b 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "fcitx"; - repo = pname; + repo = "fcitx5-qt"; rev = version; sha256 = "sha256-bVH2US/uEZGERslnAh/fyUbzR9fK1UfG4J+mOmrIE8Y="; }; diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix index 3698abeed8aa..4fecf46e5e3b 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix @@ -14,11 +14,11 @@ stdenv.mkDerivation rec { pname = "fcitx5-rime"; - version = "5.1.4"; + version = "5.1.5"; src = fetchurl { url = "https://download.fcitx-im.org/fcitx5/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-tbCIWenH5brJUVIsmOiw/E/uIXAWwK1yangIVlkeOAs="; + hash = "sha256-/eVgF5kgf1gmbkOInoGbmH/eH0vO2xj3X6k+wzeEssM="; }; cmakeFlags = [ diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix index 31ecbed35bc9..6cfced6a632e 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix @@ -10,19 +10,18 @@ , libskk , qtbase , skk-dicts -, wrapQtAppsHook , enableQt ? false }: stdenv.mkDerivation rec { pname = "fcitx5-skk"; - version = "5.1.1"; + version = "5.1.2"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - sha256 = "sha256-a+ZsuFEan61U0oOuhrTFoK5J4Vd0jj463jQ8Mk7TdbA="; + sha256 = "sha256-vg79zJ/ZoUjCKU11krDUjO0rAyZxDMsBnHqJ/I6NTTA="; }; nativeBuildInputs = [ @@ -30,7 +29,7 @@ stdenv.mkDerivation rec { extra-cmake-modules gettext pkg-config - ] ++ lib.optional enableQt wrapQtAppsHook; + ]; buildInputs = [ fcitx5 @@ -41,10 +40,13 @@ stdenv.mkDerivation rec { ]; cmakeFlags = [ - "-DENABLE_QT=${toString enableQt}" + (lib.cmakeBool "ENABLE_QT" enableQt) + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) "-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.L" ]; + dontWrapQtApps = true; + meta = with lib; { description = "Input method engine for Fcitx5, which uses libskk as its backend"; homepage = "https://github.com/fcitx/fcitx5-skk"; diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix index 0320fa5c4f01..dea3e2d03802 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "fcitx5-table-extra"; - version = "5.1.3"; + version = "5.1.4"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - hash = "sha256-w4JFZvYFL3fHrDgZqYND2bl3lT9/O1GXgfOwR7WyzWY="; + hash = "sha256-Lb8CYFQl48arJEn9gemZ7imD/gdKjN+7Wnm21/0/Sko="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix index b0129a923438..410413bf30d8 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "fcitx5-table-other"; - version = "5.1.0"; + version = "5.1.1"; src = fetchFromGitHub { owner = "fcitx"; repo = pname; rev = version; - sha256 = "sha256-ymHAKaPmQckxM/XHoDOVSzEWpyQGb7zVG21CDwNfyjg="; + sha256 = "sha256-G34hPEdcdi5agWiFEgUHWD18ozOgBCaoS6HMAklUcO4="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix index aa87d725f104..a1a077264b3a 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix @@ -6,23 +6,37 @@ , fcitx5 , fcitx5-qt , gettext -, wrapQtAppsHook +, qtbase }: stdenv.mkDerivation rec { pname = "fcitx5-unikey"; - version = "5.1.2"; + version = "5.1.3"; src = fetchFromGitHub { owner = "fcitx"; repo = "fcitx5-unikey"; rev = version; - sha256 = "sha256-tLooADS8HojS9i178i5FJVqZtKrTXlzOBPlE9K49Tjc="; + sha256 = "sha256-wrsA0gSexOZgsJunozt49GyP9R3Xe2Aci7Q8p3zAM9Q="; }; - nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ]; + nativeBuildInputs = [ + cmake + extra-cmake-modules + ]; - buildInputs = [ fcitx5 fcitx5-qt gettext ]; + buildInputs = [ + qtbase + fcitx5 + fcitx5-qt + gettext + ]; + + cmakeFlags = [ + (lib.cmakeBool "USE_QT6" (lib.versions.major qtbase.version == "6")) + ]; + + dontWrapQtApps = true; meta = with lib; { description = "Unikey engine support for Fcitx5"; diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index 625f86c1da47..5bac5602c79f 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -79,11 +79,11 @@ # Note: when upgrading this package, please run the list-missing-tools.sh script as described below! python3.pkgs.buildPythonApplication rec { pname = "diffoscope"; - version = "257"; + version = "259"; src = fetchurl { url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2"; - hash = "sha256-Fejp4i0uzsK9+9JBVPsE1AdDwshtRlxpxPfJdqRQQH4="; + hash = "sha256-WYgFWM6HKFt3xVcRNytQPWOf3ZpH1cG7Cghhu/AES80="; }; outputs = [ diff --git a/pkgs/tools/misc/direnv/default.nix b/pkgs/tools/misc/direnv/default.nix index 9395cade650b..4bb9d9bacaff 100644 --- a/pkgs/tools/misc/direnv/default.nix +++ b/pkgs/tools/misc/direnv/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "direnv"; - version = "2.33.0"; + version = "2.34.0"; src = fetchFromGitHub { owner = "direnv"; repo = "direnv"; rev = "v${version}"; - sha256 = "sha256-/xOqJ3dr+3S502rXHVBcHhgBCctoMYnWpfLqgrxIoN8="; + sha256 = "sha256-EvzqLS/FiWrbIXDkp0L/T8QNKnRGuQkbMWajI3X3BDw="; }; - vendorHash = "sha256-QGPcNgA/iiGt0CdFs2kR3zLL5/SWulSyyf/pW212JpU="; + vendorHash = "sha256-FfKvLPv+jUT5s2qQ7QlzBMArI+acj7nhpE8FGMPpp5E="; # we have no bash at the moment for windows BASH_PATH = diff --git a/pkgs/tools/misc/mmv/default.nix b/pkgs/tools/misc/mmv/default.nix index c8ce33207787..f2d2bd81ae11 100644 --- a/pkgs/tools/misc/mmv/default.nix +++ b/pkgs/tools/misc/mmv/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "mmv"; - version = "2.5.1"; + version = "2.6"; src = fetchFromGitHub { owner = "rrthomas"; repo = "mmv"; rev = "v${version}"; - sha256 = "sha256-01MJjYVPfDaRkzitqKXTJZHbkkZTEaFoyYZEEMizHp0="; + sha256 = "sha256-hYSTENSmkJP5rAemDyTzbzMKFrWYcMpsJDRWq43etTM="; fetchSubmodules = true; }; @@ -19,11 +19,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gengetopt m4 git gnupg perl autoconf automake help2man pkg-config ]; buildInputs = [ boehmgc ]; + enableParallelBuilding = true; env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = toString [ "-Wno-error=implicit-function-declaration" "-Wno-error=implicit-int" + "-Wno-error=int-conversion" ]; }; diff --git a/pkgs/tools/misc/wasm-tools/default.nix b/pkgs/tools/misc/wasm-tools/default.nix index d72e726da863..539850306bfe 100644 --- a/pkgs/tools/misc/wasm-tools/default.nix +++ b/pkgs/tools/misc/wasm-tools/default.nix @@ -5,19 +5,19 @@ rustPlatform.buildRustPackage rec { pname = "wasm-tools"; - version = "1.200.0"; + version = "1.201.0"; src = fetchFromGitHub { owner = "bytecodealliance"; repo = pname; rev = "v${version}"; - hash = "sha256-GuN70HiCmqBRwcosXqzT8sl5SRCTttOPIRl6pxaQiec="; + hash = "sha256-L3wo6a9rxqZ8Rjz8nejbfdTgQclFFp2ShdP6QECbrmg="; fetchSubmodules = true; }; # Disable cargo-auditable until https://github.com/rust-secure-code/cargo-auditable/issues/124 is solved. auditable = false; - cargoHash = "sha256-T9p1PvgiAZrj82ABx7KX2InZACQ/ff7N0zPKGTCTBPk="; + cargoHash = "sha256-XzU43bcoRGHhVmpkcKvdRH9UybjTkQWH8RKBqsM/31M="; cargoBuildFlags = [ "--package" "wasm-tools" ]; cargoTestFlags = [ "--all" ]; diff --git a/pkgs/tools/security/asnmap/default.nix b/pkgs/tools/security/asnmap/default.nix index 44f2e09fc1a9..984f5340eeeb 100644 --- a/pkgs/tools/security/asnmap/default.nix +++ b/pkgs/tools/security/asnmap/default.nix @@ -5,16 +5,21 @@ buildGoModule rec { pname = "asnmap"; - version = "1.0.6"; + version = "1.1.0"; src = fetchFromGitHub { owner = "projectdiscovery"; - repo = pname; + repo = "asnmap"; rev = "refs/tags/v${version}"; - hash = "sha256-uX7mf1y30JngRI4UJYzghk2F4DZh9OQAjgkkNRbAgwc="; + hash = "sha256-Of4IVra6kMHY9btWcF9grM/r3lTWFP/geeT309Seasw="; }; - vendorHash = "sha256-co18Q8nfRjJyDfpmJ1YSJ275DJRJHn2AR3jF8WionNY="; + vendorHash = "sha256-RDv8vkBI3miyeNAbhUsMpuZCYRUZ0ATfXYHxaTgTVfA="; + + ldflags = [ + "-w" + "-s" + ]; # Tests require network access doCheck = false; diff --git a/pkgs/tools/security/cfripper/default.nix b/pkgs/tools/security/cfripper/default.nix index aac55cf46b74..0145fcbb3a12 100644 --- a/pkgs/tools/security/cfripper/default.nix +++ b/pkgs/tools/security/cfripper/default.nix @@ -12,23 +12,24 @@ let }; in python.pkgs.buildPythonApplication rec { pname = "cfripper"; - version = "1.15.4"; + version = "1.15.5"; pyproject = true; src = fetchFromGitHub { owner = "Skyscanner"; repo = "cfripper"; rev = "refs/tags/v${version}"; - hash = "sha256-heVFum+Eaofd9L0dNHqD9GgHP+ckGwJi+NfeFci+ESc="; + hash = "sha256-kT6cWVeP2mKKef/fBfzZWnkJsWqJp2X9uIkndR+gwoY="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "pluggy~=0.13.1" "pluggy" \ - ''; + pythonRelaxDeps = [ + "pluggy" + ]; nativeBuildInputs = with python.pkgs; [ + pythonRelaxDepsHook setuptools + setuptools-scm ]; propagatedBuildInputs = with python.pkgs; [ diff --git a/pkgs/tools/security/exploitdb/default.nix b/pkgs/tools/security/exploitdb/default.nix index 6e7a553cf167..96d6408f4a46 100644 --- a/pkgs/tools/security/exploitdb/default.nix +++ b/pkgs/tools/security/exploitdb/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "exploitdb"; - version = "2024-02-27"; + version = "2024-03-01"; src = fetchFromGitLab { owner = "exploit-database"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-bFCh1kNm7D71PoRoSHdm1qYGGNvYnEb9cLbZerVy5vw="; + hash = "sha256-6kBirGsaDfUgp/NiUa17SE+Cq8dmH9v3uuBooFMnMM0="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/security/gotestwaf/default.nix b/pkgs/tools/security/gotestwaf/default.nix index 69afb96a47e2..41887131d9ec 100644 --- a/pkgs/tools/security/gotestwaf/default.nix +++ b/pkgs/tools/security/gotestwaf/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "gotestwaf"; - version = "0.4.12"; + version = "0.4.13"; src = fetchFromGitHub { owner = "wallarm"; repo = "gotestwaf"; rev = "refs/tags/v${version}"; - hash = "sha256-av6N6RQ+9iW+xG1FpmFjBHL1leU4P0IPiqf7kvJxm6M="; + hash = "sha256-juqxturQzGOlRTw7EEuRoEmwLtBdJJpbBzCKFxmL5m8="; }; vendorHash = null; diff --git a/pkgs/tools/security/knockpy/default.nix b/pkgs/tools/security/knockpy/default.nix index a3342e0b3809..5b68560c1fa3 100644 --- a/pkgs/tools/security/knockpy/default.nix +++ b/pkgs/tools/security/knockpy/default.nix @@ -5,30 +5,39 @@ python3.pkgs.buildPythonApplication rec { pname = "knockpy"; - version = "6.1.0"; - format = "setuptools"; + version = "7.0.0"; + pyproject = true; src = fetchFromGitHub { owner = "guelfoweb"; repo = "knock"; rev = "refs/tags/${version}"; - hash = "sha256-O4tXq4pDzuTBEGAls2I9bfBRdHssF4rFBec4OtfUx6A="; + hash = "sha256-Xtv7K19OBS2iHFFoSasNcy9VLL15eQ8AD79wAEhxCHk="; }; + pythonRelaxDeps = [ + "beautifulsoup4" + "tqdm" + ]; + + nativeBuildInputs = with python3.pkgs; [ + pythonRelaxDepsHook + setuptools + ]; + propagatedBuildInputs = with python3.pkgs; [ beautifulsoup4 - colorama - matplotlib - networkx - pyqt5 + dnspython + pyopenssl requests + tqdm ]; # Project has no tests doCheck = false; pythonImportsCheck = [ - "knockpy" + "knock" ]; meta = with lib; { diff --git a/pkgs/tools/security/kube-bench/default.nix b/pkgs/tools/security/kube-bench/default.nix index 28b90f3d4bae..673dde4a58a1 100644 --- a/pkgs/tools/security/kube-bench/default.nix +++ b/pkgs/tools/security/kube-bench/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "kube-bench"; - version = "0.7.1"; + version = "0.7.2"; src = fetchFromGitHub { owner = "aquasecurity"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-EsUjGc7IIu5PK9KaODlQSfmm8jpjuBXvGZPNjSc1824="; + hash = "sha256-e8iB66fXc8lKwFEZlkk4qbsgExKUrf5WpEVCOiHiZUg="; }; - vendorHash = "sha256-i4k7eworPUvLUustr5U53qizHqUVw8yqGjdPQT6UIf4="; + vendorHash = "sha256-8DWjuweGCx2yxocm1GvcP+O3QYWYUdOFKmu6neQfWI4="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/security/ldeep/default.nix b/pkgs/tools/security/ldeep/default.nix index 6e44829f7ee9..ddbff2357271 100644 --- a/pkgs/tools/security/ldeep/default.nix +++ b/pkgs/tools/security/ldeep/default.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "ldeep"; - version = "1.0.52"; + version = "1.0.53"; pyproject = true; src = fetchFromGitHub { owner = "franc-pentest"; repo = "ldeep"; rev = "refs/tags/${version}"; - hash = "sha256-I51vz3zF1J3223hcO3cdfsNBfpq/UolDxUEXyqx3dLI="; + hash = "sha256-67jVpzvdjEcjFmTRE2YjPr4AO1iN+PakwoKcjvimt8g="; }; pythonRelaxDeps = [ diff --git a/pkgs/tools/system/bfs/default.nix b/pkgs/tools/system/bfs/default.nix index db663f46d70e..9ea63fafdeda 100644 --- a/pkgs/tools/system/bfs/default.nix +++ b/pkgs/tools/system/bfs/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "bfs"; - version = "3.1.1"; + version = "3.1.2"; src = fetchFromGitHub { repo = "bfs"; owner = "tavianator"; rev = version; - hash = "sha256-lsVfsNVjFX38YaYVBJWEst3c3RhUCbK2ycteqZZUM3M="; + hash = "sha256-xq29KzONDkq+KeABl8rpu0vr50KKFw/UKPFDXcAMNoo="; }; buildInputs = [ oniguruma ] ++ lib.optionals stdenv.isLinux [ libcap acl liburing ]; diff --git a/pkgs/tools/text/scraper/default.nix b/pkgs/tools/text/scraper/default.nix index 05c4957f27dd..c148f1e57f3f 100644 --- a/pkgs/tools/text/scraper/default.nix +++ b/pkgs/tools/text/scraper/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "scraper"; - version = "0.18.1"; + version = "0.19.0"; src = fetchCrate { inherit pname version; - hash = "sha256-fnX2v7VxVFgn9UT1+qWBvN+oDDI2DbK6UFKmby5aB5c="; + hash = "sha256-HfZ8zyjghTXIyIYS+MaGF5OdMLJv6NIjQswdn/tvQbU="; }; - cargoHash = "sha256-HeT3U4H/OM/91BdXTvZq+gpmOnt/P4wTlqc2dl4erlQ="; + cargoHash = "sha256-py8VVciNJ36/aSTlTH+Bx36yrh/8AuzB9XNNv/PrFak="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/virtualization/cloud-init/default.nix b/pkgs/tools/virtualization/cloud-init/default.nix index 2bbdf2104954..dd6e6c483a33 100644 --- a/pkgs/tools/virtualization/cloud-init/default.nix +++ b/pkgs/tools/virtualization/cloud-init/default.nix @@ -17,14 +17,14 @@ python3.pkgs.buildPythonApplication rec { pname = "cloud-init"; - version = "23.4.3"; + version = "23.4.4"; namePrefix = ""; src = fetchFromGitHub { owner = "canonical"; repo = "cloud-init"; rev = "refs/tags/${version}"; - hash = "sha256-oYZr0Zvo6hn9sWtgSAGgfK2stHO247f0WUbzIIWUP18="; + hash = "sha256-imA3C2895W4vbBT9TsELT1H9QfNIxntNQLsniv+/FGg="; }; patches = [ diff --git a/pkgs/tools/virtualization/distrobuilder/default.nix b/pkgs/tools/virtualization/distrobuilder/default.nix index da2f1a909156..fb08c7110039 100644 --- a/pkgs/tools/virtualization/distrobuilder/default.nix +++ b/pkgs/tools/virtualization/distrobuilder/default.nix @@ -51,7 +51,10 @@ buildGoModule rec { ''; passthru = { - tests.incus = nixosTests.incus.container; + tests = { + incus-old-init = nixosTests.incus.container-old-init; + incus-new-init = nixosTests.incus.container-new-init; + }; generator = callPackage ./generator.nix { inherit src version; }; }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 20c3ddbfc53f..7cf15fc5a928 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -321,6 +321,12 @@ mapAliases ({ fcitx-engines = throw "fcitx-engines is deprecated, please use fcitx5 instead."; # Added 2023-03-13 fcitx-configtool = throw "fcitx-configtool is deprecated, please use fcitx5 instead."; # Added 2023-03-13 + fcitx5-chinese-addons = libsForQt5.fcitx5-chinese-addons; # Added 2024-03-01 + fcitx5-configtool = libsForQt5.fcitx5-configtool; # Added 2024-03-01 + fcitx5-skk-qt = libsForQt5.fcitx5-skk-qt; # Added 2024-03-01 + fcitx5-unikey = libsForQt5.fcitx5-unikey; # Added 2024-03-01 + fcitx5-with-addons = libsForQt5.fcitx5-with-addons; # Added 2024-03-01 + ### G ### g4py = python3Packages.geant4; # Added 2020-06-06 @@ -1217,6 +1223,8 @@ mapAliases ({ ### Z ### zabbix40 = throw "'zabbix40' has been removed as it has reached end of life"; # Added 2024-01-07 + zfsStable = zfs; # Added 2024-02-26 + zfsUnstable = zfs_unstable; # Added 2024-02-26 zinc = zincsearch; # Added 2023-05-28 zkg = throw "'zkg' has been replaced by 'zeek'"; zq = zed.overrideAttrs (old: { meta = old.meta // { mainProgram = "zq"; }; }); # Added 2023-02-06 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c3a817f0bd84..82acc1b1d4a7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8042,29 +8042,17 @@ with pkgs; chewing-editor = libsForQt5.callPackage ../applications/misc/chewing-editor { }; - fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { }; - - fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { }; + fcitx5 = callPackage ../tools/inputmethods/fcitx5 { }; fcitx5-bamboo = callPackage ../tools/inputmethods/fcitx5/fcitx5-bamboo.nix { }; - fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; - fcitx5-mozc = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-mozc.nix { abseil-cpp = abseil-cpp.override { cxxStandard = "17"; }; }; - fcitx5-skk = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { }; - - fcitx5-skk-qt = fcitx5-skk.override { - enableQt = true; - }; - - fcitx5-unikey = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; - - fcitx5-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { }; + fcitx5-skk = qt6Packages.callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { }; fcitx5-anthy = callPackage ../tools/inputmethods/fcitx5/fcitx5-anthy.nix { }; @@ -8417,7 +8405,7 @@ with pkgs; }) garage garage_0_8 garage_0_9 - garage_0_8_5 garage_0_9_1; + garage_0_8_6 garage_0_9_2; garmintools = callPackage ../development/libraries/garmintools { }; @@ -10747,8 +10735,6 @@ with pkgs; mbuffer = callPackage ../tools/misc/mbuffer { }; - mdsh = callPackage ../development/tools/documentation/mdsh { }; - mecab = let mecab-nodic = callPackage ../tools/text/mecab/nodic.nix { }; @@ -24414,7 +24400,7 @@ with pkgs; qt6 = recurseIntoAttrs (callPackage ../development/libraries/qt-6 { }); qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix { - inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget; + inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsHostTarget kdePackages; stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; }); @@ -25792,17 +25778,17 @@ with pkgs; }; # Steel Bank Common Lisp - sbcl_2_4_0 = wrapLisp { - pkg = callPackage ../development/compilers/sbcl { version = "2.4.0"; }; - faslExt = "fasl"; - flags = [ "--dynamic-space-size" "3000" ]; - }; sbcl_2_4_1 = wrapLisp { pkg = callPackage ../development/compilers/sbcl { version = "2.4.1"; }; faslExt = "fasl"; flags = [ "--dynamic-space-size" "3000" ]; }; - sbcl = sbcl_2_4_1; + sbcl_2_4_2 = wrapLisp { + pkg = callPackage ../development/compilers/sbcl { version = "2.4.2"; }; + faslExt = "fasl"; + flags = [ "--dynamic-space-size" "3000" ]; + }; + sbcl = sbcl_2_4_2; sbclPackages = recurseIntoAttrs sbcl.pkgs; @@ -28695,16 +28681,22 @@ with pkgs; zenmonitor = callPackage ../os-specific/linux/zenmonitor { }; - zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix { - configFile = "user"; - }; - zfsStable = callPackage ../os-specific/linux/zfs/stable.nix { - configFile = "user"; - }; - zfsUnstable = callPackage ../os-specific/linux/zfs/unstable.nix { - configFile = "user"; - }; - zfs = zfsStable; + inherit + ({ + zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix { + configFile = "user"; + }; + zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix { + configFile = "user"; + }; + zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix { + configFile = "user"; + }; + }) + zfs_2_1 + zfs_2_2 + zfs_unstable; + zfs = zfs_2_2; ### DATA @@ -30255,7 +30247,9 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Cocoa CoreAudio Foundation; }; - ptcollab = libsForQt5.callPackage ../applications/audio/ptcollab { }; + ptcollab = callPackage ../by-name/pt/ptcollab/package.nix { + stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + }; schismtracker = callPackage ../applications/audio/schismtracker { inherit (darwin.apple_sdk.frameworks) Cocoa; @@ -35175,8 +35169,6 @@ with pkgs; spotify-player = callPackage ../applications/audio/spotify-player { }; - spotifywm = callPackage ../applications/audio/spotifywm { }; - psst = callPackage ../applications/audio/psst { }; squeezelite = darwin.apple_sdk_11_0.callPackage ../applications/audio/squeezelite { @@ -37090,8 +37082,6 @@ with pkgs; lpairs2 = callPackage ../games/lgames/lpairs2 { }; - ltris = callPackage ../games/lgames/ltris { }; - maelstrom = callPackage ../games/maelstrom { }; mar1d = callPackage ../games/mar1d { } ; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index ffb572730050..5f0fe736d38a 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -559,15 +559,15 @@ in { configFile = "kernel"; inherit pkgs kernel; }; - zfsStable = callPackage ../os-specific/linux/zfs/stable.nix { + zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix { configFile = "kernel"; inherit pkgs kernel; }; - zfsUnstable = callPackage ../os-specific/linux/zfs/unstable.nix { + zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix { configFile = "kernel"; inherit pkgs kernel; }; - zfs = zfsStable; + zfs = zfs_2_2; can-isotp = callPackage ../os-specific/linux/can-isotp { }; diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index e6d5aab36956..0cf6ab88c323 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -100,6 +100,16 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { }; + fcitx5-chinese-addons = callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; + + fcitx5-configtool = callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { }; + + fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; }; + + fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; + + fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { }; + futuresql = callPackage ../development/libraries/futuresql { }; qgpgme = callPackage ../development/libraries/gpgme { }; diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index 68f73dad7634..07bff4a9c327 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -10,6 +10,7 @@ , generateSplicesForMkScope , stdenv , pkgsHostTarget +, kdePackages }: let @@ -32,8 +33,18 @@ makeScopeWithSplicing' { accounts-qt = callPackage ../development/libraries/accounts-qt { }; appstream-qt = callPackage ../development/libraries/appstream/qt.nix { }; + fcitx5-chinese-addons = callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; + + fcitx5-configtool = kdePackages.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { }; + fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { }; + fcitx5-skk-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-skk.nix { enableQt = true; }; + + fcitx5-unikey = callPackage ../tools/inputmethods/fcitx5/fcitx5-unikey.nix { }; + + fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { }; + kdsoap = callPackage ../development/libraries/kdsoap { }; kcolorpicker = callPackage ../development/libraries/kcolorpicker { };