diff --git a/ci/OWNERS b/ci/OWNERS index bf76b2bdf1fd..7f54633c4a9b 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -466,9 +466,8 @@ nixos/tests/incus/ @adamcstephens pkgs/by-name/in/incus/ @adamcstephens pkgs/by-name/lx/lxc* @adamcstephens -# ExpidusOS, Flutter +# Flutter /pkgs/development/compilers/flutter @RossComputerGuy -/pkgs/desktops/expidus @RossComputerGuy # GNU Tar & Zip /pkgs/by-name/gn/gnutar @RossComputerGuy diff --git a/lib/licenses/licenses.nix b/lib/licenses/licenses.nix index 018cdbe3998e..42eda4e3138b 100644 --- a/lib/licenses/licenses.nix +++ b/lib/licenses/licenses.nix @@ -1617,6 +1617,13 @@ lib.mapAttrs mkLicense ( fullName = "Universal Permissive License"; }; + valveSDK = { + fullName = "Valve Corporation Steamworks SDK Access Agreement"; + url = "https://partner.steamgames.com/documentation/sdk_access_agreement"; + free = false; + redistributable = true; + }; + vim = { spdxId = "Vim"; fullName = "Vim License"; diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 1a39ae78c427..ed1f2c3b5540 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7597,12 +7597,6 @@ githubId = 81854406; name = "Chew Cheng Hong"; }; - drew-dirac = { - email = "drew@diracinc.com"; - github = "drew-dirac"; - githubId = 187309685; - name = "Drew Council"; - }; drperceptron = { github = "drperceptron"; githubId = 92106371; @@ -17002,6 +16996,17 @@ matrix = "@lux:ontheblueplanet.com"; name = "Lux"; }; + luytan = { + email = "luytan@khora.me"; + github = "luytan"; + githubId = 221864923; + name = "Luytan"; + keys = [ + { + fingerprint = "E7B7 215C 0DFB 3D8C 17EE 95E0 E0AD 187A 4F2B 41EF"; + } + ]; + }; luz = { email = "luz666@daum.net"; github = "Luz"; diff --git a/nixos/doc/manual/release-notes/rl-2611.section.md b/nixos/doc/manual/release-notes/rl-2611.section.md index a837dc7d2bd6..fafd7c8af491 100644 --- a/nixos/doc/manual/release-notes/rl-2611.section.md +++ b/nixos/doc/manual/release-notes/rl-2611.section.md @@ -34,6 +34,8 @@ - [tranquil](https://tangled.org/tranquil.farm/tranquil-pds) is an ATProto PDS (personal data server) implementation in Rust. A featureful, spec conscious and community driven alternative to the Bluesky reference implementation PDS. Available as [services.tranquil-pds](#opt-services.tranquil-pds.enable). +- [Cardwire](https://github.com/OpenGamingCollective/cardwire), a GPU manager for Linux that uses eBPF+LSM hooks to control GPUs. Available as [services.cardwired](#opt-services.cardwired.enable). + - [Moonlight Qt](https://moonlight-stream.org/), a client for playing your PC games on almost any device. Available as [programs.moonlight-qt](#opt-programs.moonlight-qt.enable). - [RomM](https://romm.app/), a self-hosted ROM manager and player. Available as [services.romm](#opt-services.romm.enable). @@ -223,6 +225,8 @@ - `boot.supportedFilesystems.ntfs` installs `ntfsprogs-plus` instead of `ntfs3g` on kernel version 7.1 and later, unless `boot.supportedFilesystems.ntfs-3g` is explicitly enabled. +- `services.i2pd` has been refactored to take [RFC42](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md)-compliant `settings`. In order to migrate, you will need to move existing config under `settings` and rename them in accordance with the [upstream config format](https://docs.i2pd.website/en/latest/user-guide/configuration/#available-options). In addition, `inTunnels` and `outTunnels` needs to be renamed to `serverTunnels` and `clientTunnels` respectively. + - The `programs.fuse` module, which provides the `fusermount3` executable and the `/etc/fuse.conf` config file, is now opt-in. The obligation to enable it has been shifted to its various consumers (e.g. gvfs, flatpak, appimage, sshfs). This can break fuse consumers at runtime, that don't explicitly declare that dependency with a module, e.g the mounting functionality in various backup tools (borg, restic, rclone, ...). - `services.plausible` can now again seed an initial admin user declaratively via [`services.plausible.adminUser.email`](#opt-services.plausible.adminUser.email). @@ -231,6 +235,8 @@ - `services.gitlab.registry` now uses PostgreSQL as database storage for new installations and supports old installations that use the filesystem as metadata storage. It creates the required PostgreSQL database and user. Users can manually migrate their filesystem based metadata storage. See [GitLab Container Registry Migration to database metadata store](#module-services-gitlab-registry-database-migration). +- Enabling [`services.userborn`](#opt-services.userborn.enable) on a system that was previously managed by the default `update-users-groups.pl` script now imports the legacy state from `/var/lib/nixos/` on the first switch. Locked stub entries are added to `/etc/passwd` and `/etc/group` for every name recorded in `uid-map`/`gid-map` that no longer has a live entry, so a previously-used UID/GID cannot be reassigned to a different user. If the import fails, userborn does not start and the user database is left untouched. Inspect `journalctl -u userborn-import-legacy.service`, fix or remove the legacy state, and switch again. The import can be skipped entirely with [`services.userborn.importLegacyState`](#opt-services.userborn.importLegacyState)` = false`. + - The `newuidmap` and `newgidmap` security wrappers are now installed with `cap_setuid`/`cap_setgid` file capabilities instead of the setuid-root bit, matching shadow's `--with-fcaps` install mode and other major distributions. Rootless containers (podman, docker-rootless, unprivileged user namespaces) are unaffected. The only behavioural change is that mapping host uid 0 via `/etc/subuid` (which NixOS never configures by default) additionally requires `cap_setfcap`; users who explicitly grant uid 0 in a subuid range can restore the previous behaviour with `security.wrappers.newuidmap.capabilities = lib.mkForce "cap_setuid,cap_setfcap+ep";`. - The `authelia` module now uses systemd's `LoadCredential` to load all files defined in `secrets`. As such, these files no longer need to be readable by the authelia user and group: they can for example be set to be only readable by the root user. diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 30278aa4fc41..a80947a02063 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -194,7 +194,7 @@ in redmine = 147; #seeks = 148; # removed 2020-06-21 prosody = 149; - i2pd = 150; + # i2pd = 150; # dynamically allocated as of 2026-08-07 systemd-coredump = 151; systemd-network = 152; systemd-resolve = 153; @@ -534,7 +534,7 @@ in redmine = 147; #seeks = 148; # removed 2020-06-21 prosody = 149; - i2pd = 150; + # i2pd = 150; # dynamically allocated as of 2026-08-07 systemd-network = 152; systemd-resolve = 153; systemd-timesync = 154; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 2342c75b3ba2..d981c49c7813 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -684,6 +684,7 @@ ./services/hardware/bolt.nix ./services/hardware/brltty.nix ./services/hardware/buffyboard.nix + ./services/hardware/cardwired.nix ./services/hardware/ddccontrol.nix ./services/hardware/deepcool-digital-linux.nix ./services/hardware/dell-bios-fan-control.nix diff --git a/nixos/modules/services/hardware/cardwired.nix b/nixos/modules/services/hardware/cardwired.nix new file mode 100644 index 000000000000..a1c50905f7eb --- /dev/null +++ b/nixos/modules/services/hardware/cardwired.nix @@ -0,0 +1,134 @@ +{ + lib, + config, + pkgs, + ... +}: + +let + inherit (lib) + mkEnableOption + mkIf + mkOption + types + mkPackageOption + getExe' + ; + cfg = config.services.cardwired; + tomlFormat = pkgs.formats.toml { }; +in +{ + options.services.cardwired = { + enable = mkEnableOption "Cardwire eBPF-based GPU manager daemon"; + + package = mkPackageOption pkgs "cardwire" { }; + + settings = mkOption { + type = types.submodule { + options = { + auto_apply_gpu_state = mkOption { + type = types.bool; + default = true; + description = '' + Automatically restore GPU states on manual mode. + ''; + }; + experimental_nvidia_block = mkOption { + type = types.bool; + default = false; + description = '' + Enable blocking specifics Nvidia files. This setting is experimental + because these files can be shared across multiple Nvidia GPUs. + ''; + }; + battery_auto_switch = mkOption { + type = types.bool; + default = false; + description = '' + Automatically switch mode on AC power. + ''; + }; + battery_auto_switch_mode = mkOption { + type = types.enum [ + "integrated" + "hybrid" + "manual" + "smart" + ]; + default = "hybrid"; + description = '' + The mode cardwire switches on AC power. + ''; + }; + external_display_auto_switch = mkOption { + type = types.bool; + default = false; + description = '' + Automatically make GPUs available for displays connected to dGPU-only ports. + ''; + }; + }; + }; + default = { }; + description = '' + Configuration for {file}`/etc/cardwire.toml` + See + ''; + }; + }; + + config = mkIf cfg.enable { + environment.etc."cardwire/cardwire.toml".source = tomlFormat.generate "cardwire.toml" cfg.settings; + + services.dbus.enable = true; + services.dbus.packages = [ cfg.package ]; + environment.systemPackages = [ cfg.package ]; + + systemd.services.cardwired = { + description = "Cardwire Daemon"; + + restartTriggers = [ config.environment.etc."cardwire/cardwire.toml".source ]; + + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + Type = "dbus"; + BusName = "org.opengamingcollective.cardwire"; + ExecStart = getExe' cfg.package "cardwired"; + Restart = "on-failure"; + RestartSec = "5s"; + User = "root"; + PrivateNetwork = true; + PrivateTmp = true; + ProtectHostname = true; + NoNewPrivileges = true; + ProtectClock = true; + ProtectSystem = "strict"; + StateDirectory = "cardwire"; + StateDirectoryMode = "0700"; + ConfigurationDirectory = "cardwire"; + ConfigurationDirectoryMode = "0700"; + ProtectHome = "read-only"; + ProtectKernelLogs = true; + ProtectControlGroups = true; + ProtectKernelModules = true; + RestrictAddressFamilies = [ + "AF_UNIX" + "AF_NETLINK" + ]; + RestrictNamespaces = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + LockPersonality = true; + UMask = "0077"; + IPAddressDeny = "any"; + CapabilityBoundingSet = [ + "CAP_SYS_ADMIN" + "CAP_BPF" + "CAP_SYS_PTRACE" + "CAP_DAC_OVERRIDE" + ]; + }; + }; + }; +} diff --git a/nixos/modules/services/networking/i2pd.nix b/nixos/modules/services/networking/i2pd.nix index a8b04c4ebfe1..611662fbfb96 100644 --- a/nixos/modules/services/networking/i2pd.nix +++ b/nixos/modules/services/networking/i2pd.nix @@ -6,784 +6,553 @@ }: let - inherit (lib) - mkIf - mkOption - mkDefault - mkEnableOption - types - optional - optionals - ; - inherit (lib.types) - nullOr - bool - listOf - str - attrsOf - submodule - ; + inherit (lib) types; - cfg = config.services.i2pd; + coerceMap = + mapping: finalType: + types.coercedTo (types.enum (lib.attrNames mapping)) (x: mapping.${x}) finalType; - homeDir = "/var/lib/i2pd"; - - strOpt = k: v: k + " = " + v; - boolOpt = k: v: k + " = " + lib.boolToString v; - intOpt = k: v: k + " = " + toString v; - lstOpt = k: xs: k + " = " + lib.concatStringsSep "," xs; - optionalNullString = o: s: optional (s != null) (strOpt o s); - optionalNullBool = o: b: optional (b != null) (boolOpt o b); - optionalNullInt = o: i: optional (i != null) (intOpt o i); - optionalEmptyList = o: l: optional ([ ] != l) (lstOpt o l); - - mkEnableTrueOption = name: mkEnableOption name // { default = true; }; - - mkEndpointOpt = name: addr: port: { - enable = mkEnableOption name; - name = mkOption { - type = types.str; - default = name; - description = "The endpoint name."; - }; - address = mkOption { - type = types.str; - default = addr; - description = "Bind address for ${name} endpoint."; - }; - port = mkOption { - type = types.port; - default = port; - description = "Bind port for ${name} endpoint."; + /* + Credential handling pipeline: + - Buildtime + - User sets { _secret = ...; } for every value expected to be substituted at runtime + - credential.finalize recursively traverses configuration inserting placeholder values like "" + - Runtime + - Systemd ensures that given path exists (`RequiresMountsFor`) + - Systemd reads value of each credential to `$CREDENTIALS_DIRECTORY/` + - loadCredentialsScript copies config files from /nix/store to /tmp and finally substitutes credentials + */ + credAttrType = "_secret"; + credPlaceholderAttrType = "_secretPlaceholder"; + credType = types.addCheck types.attrs (attrs: attrs ? ${credAttrType}) // { + merge = loc: defs: { + ${credAttrType} = + let + def = lib.mergeEqualOption loc defs; + val = def.${credAttrType}; + path = + if types.path.check val then + val + else + throw "Provided `{ ${credAttrType} = ...; }` is not of type `lib.types.path`"; + id = builtins.hashString "sha256" path; + placeholder = if def ? ${credPlaceholderAttrType} then def.${credPlaceholderAttrType} else id; + in + { + inherit path id placeholder; + }; }; }; - - i2cpOpts = name: { - length = mkOption { - type = types.int; - description = "Guaranteed minimum hops for ${name} tunnels."; - default = 3; - }; - quantity = mkOption { - type = types.int; - description = "Number of simultaneous ${name} tunnels."; - default = 5; - }; - }; - - mkKeyedEndpointOpt = - name: addr: port: keyloc: - (mkEndpointOpt name addr port) - // { - keys = mkOption { - type = nullOr str; - default = keyloc; - description = '' - File to persist ${lib.toUpper name} keys. - ''; - }; - inbound = i2cpOpts name; - outbound = i2cpOpts name; - latency.min = mkOption { - type = with types; nullOr int; - description = "Min latency for tunnels."; - default = null; - }; - latency.max = mkOption { - type = with types; nullOr int; - description = "Max latency for tunnels."; - default = null; - }; - }; - - commonTunOpts = - name: - { - outbound = i2cpOpts name; - inbound = i2cpOpts name; - crypto.tagsToSend = mkOption { - type = types.int; - description = "Number of ElGamal/AES tags to send."; - default = 40; - }; - keys = mkOption { - type = types.str; - default = name + "-keys.dat"; - description = "Keyset used for tunnel identity."; - }; - } - // mkEndpointOpt name "127.0.0.1" 0; - - sec = name: "\n[" + name + "]"; - notice = "# DO NOT EDIT -- this file has been generated automatically."; - i2pdConf = - let - opts = [ - notice - (strOpt "loglevel" cfg.logLevel) - (boolOpt "logclftime" cfg.logCLFTime) - (boolOpt "ipv4" cfg.enableIPv4) - (boolOpt "ipv6" cfg.enableIPv6) - (boolOpt "notransit" cfg.notransit) - (boolOpt "floodfill" cfg.floodfill) - (intOpt "netid" cfg.netid) - ] - ++ (optionalNullInt "bandwidth" cfg.bandwidth) - ++ (optionalNullInt "port" cfg.port) - ++ (optionalNullString "family" cfg.family) - ++ (optionalNullString "datadir" cfg.dataDir) - ++ (optionalNullInt "share" cfg.share) - ++ (optionalNullBool "ssu" cfg.ssu) - ++ (optionalNullBool "ntcp" cfg.ntcp) - ++ (optionalNullString "ntcpproxy" cfg.ntcpProxy) - ++ (optionalNullString "ifname" cfg.ifname) - ++ (optionalNullString "ifname4" cfg.ifname4) - ++ (optionalNullString "ifname6" cfg.ifname6) - ++ [ - (sec "limits") - (intOpt "transittunnels" cfg.limits.transittunnels) - (intOpt "coresize" cfg.limits.coreSize) - (intOpt "openfiles" cfg.limits.openFiles) - (intOpt "ntcphard" cfg.limits.ntcpHard) - (intOpt "ntcpsoft" cfg.limits.ntcpSoft) - (intOpt "ntcpthreads" cfg.limits.ntcpThreads) - (sec "upnp") - (boolOpt "enabled" cfg.upnp.enable) - (sec "precomputation") - (boolOpt "elgamal" cfg.precomputation.elgamal) - (sec "reseed") - (boolOpt "verify" cfg.reseed.verify) - ] - ++ (optionalNullString "file" cfg.reseed.file) - ++ (optionalEmptyList "urls" cfg.reseed.urls) - ++ (optionalNullString "floodfill" cfg.reseed.floodfill) - ++ (optionalNullString "zipfile" cfg.reseed.zipfile) - ++ (optionalNullString "proxy" cfg.reseed.proxy) - ++ [ - (sec "trust") - (boolOpt "enabled" cfg.trust.enable) - (boolOpt "hidden" cfg.trust.hidden) - ] - ++ (optionalEmptyList "routers" cfg.trust.routers) - ++ (optionalNullString "family" cfg.trust.family) - ++ [ - (sec "websockets") - (boolOpt "enabled" cfg.websocket.enable) - (strOpt "address" cfg.websocket.address) - (intOpt "port" cfg.websocket.port) - (sec "exploratory") - (intOpt "inbound.length" cfg.exploratory.inbound.length) - (intOpt "inbound.quantity" cfg.exploratory.inbound.quantity) - (intOpt "outbound.length" cfg.exploratory.outbound.length) - (intOpt "outbound.quantity" cfg.exploratory.outbound.quantity) - (sec "ntcp2") - (boolOpt "enabled" cfg.ntcp2.enable) - (boolOpt "published" cfg.ntcp2.published) - (intOpt "port" cfg.ntcp2.port) - (sec "ssu2") - (boolOpt "enabled" cfg.ssu2.enable) - (boolOpt "published" cfg.ssu2.published) - (intOpt "port" cfg.ssu2.port) - (sec "addressbook") - (strOpt "defaulturl" cfg.addressbook.defaulturl) - ] - ++ (optionalEmptyList "subscriptions" cfg.addressbook.subscriptions) - ++ [ - (sec "meshnets") - (boolOpt "yggdrasil" cfg.yggdrasil.enable) - ] - ++ (optionalNullString "yggaddress" cfg.yggdrasil.address) - ++ (lib.flip map (lib.collect (proto: proto ? port && proto ? address) cfg.proto) ( - proto: - let - protoOpts = [ - (sec proto.name) - (boolOpt "enabled" proto.enable) - (strOpt "address" proto.address) - (intOpt "port" proto.port) - ] - ++ (optionals (proto ? keys) (optionalNullString "keys" proto.keys)) - ++ (optionals (proto ? auth) (optionalNullBool "auth" proto.auth)) - ++ (optionals (proto ? user) (optionalNullString "user" proto.user)) - ++ (optionals (proto ? pass) (optionalNullString "pass" proto.pass)) - ++ (optionals (proto ? strictHeaders) (optionalNullBool "strictheaders" proto.strictHeaders)) - ++ (optionals (proto ? hostname) (optionalNullString "hostname" proto.hostname)) - ++ (optionals (proto ? outproxy) (optionalNullString "outproxy" proto.outproxy)) - ++ (optionals (proto ? outproxyPort) (optionalNullInt "outproxyport" proto.outproxyPort)) - ++ (optionals (proto ? outproxyEnable) (optionalNullBool "outproxy.enabled" proto.outproxyEnable)); - in - (lib.concatStringsSep "\n" protoOpts) - )); - in - pkgs.writeText "i2pd.conf" (lib.concatStringsSep "\n" opts); - - tunnelConf = - let - mkOutTunnel = - tun: - let - outTunOpts = [ - (sec tun.name) - (intOpt "type" tun.type) - (intOpt "port" tun.port) - (strOpt "destination" tun.destination) - ] - ++ (optionals (tun ? destinationPort) (optionalNullInt "destinationport" tun.destinationPort)) - ++ (optionals (tun ? keys) (optionalNullString "keys" tun.keys)) - ++ (optionals (tun ? address) (optionalNullString "address" tun.address)) - ++ (optionals (tun ? inbound.length) (optionalNullInt "inbound.length" tun.inbound.length)) - ++ (optionals (tun ? inbound.quantity) (optionalNullInt "inbound.quantity" tun.inbound.quantity)) - ++ (optionals (tun ? outbound.length) (optionalNullInt "outbound.length" tun.outbound.length)) - ++ (optionals (tun ? outbound.quantity) (optionalNullInt "outbound.quantity" tun.outbound.quantity)) - ++ (optionals (tun ? crypto.tagsToSend) ( - optionalNullInt "crypto.tagstosend" tun.crypto.tagsToSend - )); - in - lib.concatStringsSep "\n" outTunOpts; - - mkInTunnel = - tun: - let - inTunOpts = [ - (sec tun.name) - (intOpt "type" tun.type) - (intOpt "port" tun.port) - (strOpt "host" tun.address) - ] - ++ (optionals (tun ? keys) (optionalNullString "keys" tun.keys)) - ++ (optionals (tun ? inPort) (optionalNullInt "inport" tun.inPort)) - ++ (optionals (tun ? accessList) (optionalEmptyList "accesslist" tun.accessList)) - ++ (optionals (tun ? inbound.length) (optionalNullInt "inbound.length" tun.inbound.length)) - ++ (optionals (tun ? inbound.quantity) (optionalNullInt "inbound.quantity" tun.inbound.quantity)) - ++ (optionals (tun ? outbound.length) (optionalNullInt "outbound.length" tun.outbound.length)) - ++ (optionals (tun ? outbound.quantity) (optionalNullInt "outbound.quantity" tun.outbound.quantity)) - ++ (optionals (tun ? crypto.tagsToSend) ( - optionalNullInt "crypto.tagstosend" tun.crypto.tagsToSend - )); - in - lib.concatStringsSep "\n" inTunOpts; - - allOutTunnels = lib.collect (tun: tun ? port && tun ? destination) cfg.outTunnels; - allInTunnels = lib.collect (tun: tun ? port && tun ? address) cfg.inTunnels; - - opts = [ notice ] ++ (map mkOutTunnel allOutTunnels) ++ (map mkInTunnel allInTunnels); - in - pkgs.writeText "i2pd-tunnels.conf" (lib.concatStringsSep "\n" opts); - - i2pdFlags = lib.concatStringsSep " " ( - optional (cfg.address != null) ("--host=" + cfg.address) - ++ [ - "--service" - ("--conf=" + i2pdConf) - ("--tunconf=" + tunnelConf) - ] - ); - + credSubstituteRec = + attr: x: + if credType.check x then + x.${credAttrType}.${attr} + else if lib.isList x then + map (credSubstituteRec attr) x + else if lib.isAttrs x then + lib.mapAttrs (_: v: credSubstituteRec attr v) x + else + x; + credCollectRec = + x: + if credType.check x then + [ x.${credAttrType} ] + else if lib.isList x then + lib.flatten (lib.map credCollectRec x) + else if lib.isAttrs x then + lib.flatten (lib.mapAttrsToList (_: v: credCollectRec v) x) + else + [ ]; in - { + ###### Interface ##### - imports = [ - (lib.mkRenamedOptionModule [ "services" "i2pd" "extIp" ] [ "services" "i2pd" "address" ]) - ]; + options.services.i2pd = + let + freeformType = + with types; + let + base = [ + bool + int + str + credType + ]; + in + attrsOf ( + nullOr ( + oneOf ( + base + ++ [ + (listOf (oneOf base)) + freeformType + ] + ) + ) + ) + // { + description = "nested (bool, int, string or list of bool, int or string)"; + }; - ###### interface + intOrCoerceMap = + mapping: description: + lib.mkOption { + type = with types; nullOr (coerceMap mapping int); + default = null; + inherit description; + }; - options = { - - services.i2pd = { - - enable = mkEnableOption "I2Pd daemon" // { - description = '' - Enables I2Pd as a running service upon activation. - Please read for further - configuration help. - ''; + # Hopefully helpful enum mappings + templates = { + # https://i2pd.readthedocs.io/en/latest/user-guide/tunnels/#i2cp-parameters + i2cp = { + leaseSetType = intOrCoerceMap { + "standard" = 3; + "encrypted" = 5; + } "Type of LeaseSet to be sent"; + leaseSetEncType = intOrCoerceMap { + "ELGAMAL" = 0; + "ECIES_P256_SHA256_AES256CBC" = 1; + "ECIES_X25519_AEAD" = 4; + "ECIES_MLKEM512_X25519_AEAD" = 5; + "ECIES_MLKEM768_X25519_AEAD" = 6; + "ECIES_MLKEM1024_X25519_AEAD" = 7; + } "List of LeaseSet encryption types"; + leaseSetAuthType = intOrCoerceMap { + "none" = 0; + "DH" = 1; + "PSK" = 2; + } "Authentication type for encrypted LeaseSet"; + }; + i2p.streaming.profile = intOrCoerceMap { + "bulk" = 1; + "interactive" = 2; + } "Bandwidth usage profile"; + # This option is part of both client and server tunnels, but not documented as i2cp parameter + signaturetype = + intOrCoerceMap + { + "ECDSA-P256" = 1; + "ECDSA-P384" = 2; + "ECDSA-P521" = 3; + "ED25519-SHA512" = 7; + "GOSTR3410-A-GOSTR3411-256" = 9; + "GOSTR3410-TC26-A-GOSTR3411-512" = 10; + "RED25519-SHA512" = 11; + "ML-DSA-44" = 12; + } + '' + Signature type for new keys. + `ED25519-SHA512` is default. + `RED25519-SHA512` is recommended for encrypted leaseset. + ''; }; - + in + { + enable = lib.mkEnableOption "`i2pd` (I2P network router)"; package = lib.mkPackageOption pkgs "i2pd" { }; - - logLevel = mkOption { - type = types.enum [ - "debug" - "info" - "warn" - "error" - ]; - default = "error"; + gracefulShutdown = lib.mkEnableOption "" // { description = '' - The log level. {command}`i2pd` defaults to "info" - but that generates copious amounts of log messages. - - We default to "error" which is similar to the default log - level of {command}`tor`. + If true, i2pd will wait for transit connections to close. + Enabling this option **may delay system shutdown/reboot/rebuild-switch up to 10 minutes!** ''; }; - - logCLFTime = mkEnableOption "full CLF-formatted date and time to log"; - - address = mkOption { - type = nullOr str; - default = null; - description = '' - Your external IP or hostname. - ''; + autoRestart = lib.mkEnableOption "" // { + default = true; + description = "If true, i2pd will be restarted on failure (does not affect clean exit)"; }; - - family = mkOption { - type = nullOr str; - default = null; + settings = lib.mkOption { description = '' - Specify a family the router belongs to. + Free-form main i2pd configuration. Options are passed to `i2pd.conf`. + See + + Any free-formed option value can be substituted with contents of a + provided file by setting it to `{ ${credAttrType} = ; }`. The + file is read **at runtime** before i2pd service starts, file + permissions are ignored. ''; - }; + type = types.submodule { + inherit freeformType; + options = { + loglevel = lib.mkOption { + type = types.enum [ + "debug" + "info" + "warn" + "error" + "critical" + "none" + ]; + default = "error"; + description = "The log level"; + }; + bandwidth = lib.mkOption { + type = + with types; + nullOr ( + coerceMap + { + "32KBps" = "L"; + "256KBps" = "O"; + "2048KBps" = "P"; + "UNLIMITED" = "X"; + } + (oneOf [ + ints.positive + (enum [ + "L" + "O" + "P" + "X" + ]) + ]) + ); + default = null; + description = '' + Set a router bandwidth limit: integer in KBps or alias. + Note that integer bandwidth will be rounded. + If not set, i2pd defaults to `32KBps`. + ''; + }; + }; + config = { + http.enabled = lib.mkDefault true; + httpproxy.enabled = lib.mkDefault true; + socksproxy.enabled = lib.mkDefault true; + sam.enabled = lib.mkDefault false; + bob.enabled = lib.mkDefault false; + i2cp.enabled = lib.mkDefault false; + i2pcontrol.enabled = lib.mkDefault false; - dataDir = mkOption { - type = nullOr str; - default = null; - description = '' - Alternative path to storage of i2pd data (RI, keys, peer profiles, ...) - ''; - }; + precomputation.elgamal = lib.mkDefault true; - share = mkOption { - type = types.int; - default = 100; - description = '' - Limit of transit traffic from max bandwidth in percents. - ''; - }; - - ifname = mkOption { - type = nullOr str; - default = null; - description = '' - Network interface to bind to. - ''; - }; - - ifname4 = mkOption { - type = nullOr str; - default = null; - description = '' - IPv4 interface to bind to. - ''; - }; - - ifname6 = mkOption { - type = nullOr str; - default = null; - description = '' - IPv6 interface to bind to. - ''; - }; - - ntcpProxy = mkOption { - type = nullOr str; - default = null; - description = '' - Proxy URL for NTCP transport. - ''; - }; - - ntcp = mkEnableTrueOption "ntcp"; - ssu = mkEnableTrueOption "ssu"; - - notransit = mkEnableOption "notransit" // { - description = '' - Tells the router to not accept transit tunnels during startup. - ''; - }; - - floodfill = mkEnableOption "floodfill" // { - description = '' - Makes your router a floodfill, that means what other routers will - publish and get LeaseSets and RouterInfos on your router. - ''; - }; - - netid = mkOption { - type = types.int; - default = 2; - description = '' - I2P overlay netid. - ''; - }; - - bandwidth = mkOption { - type = with types; nullOr int; - default = null; - description = '' - Set a router bandwidth limit integer in KBps. - If not set, {command}`i2pd` defaults to 32KBps. - ''; - }; - - port = mkOption { - type = with types; nullOr port; - default = null; - description = '' - I2P listen port. If no one is given the router will pick between 9111 and 30777. - ''; - }; - - enableIPv4 = mkEnableTrueOption "IPv4 connectivity"; - enableIPv6 = mkEnableOption "IPv6 connectivity"; - nat = mkEnableTrueOption "NAT bypass"; - - upnp.enable = mkEnableOption "UPnP service discovery"; - upnp.name = mkOption { - type = types.str; - default = "I2Pd"; - description = '' - Name i2pd appears in UPnP forwardings list. - ''; - }; - - precomputation.elgamal = mkEnableTrueOption "Precomputed ElGamal tables" // { - description = '' - Whenever to use precomputated tables for ElGamal. - {command}`i2pd` defaults to `false` - to save 64M of memory (and looses some performance). - - We default to `true` as that is what most - users want anyway. - ''; - }; - - reseed.verify = mkEnableOption "SU3 signature verification"; - - reseed.file = mkOption { - type = nullOr str; - default = null; - description = '' - Full path to SU3 file to reseed from. - ''; - }; - - reseed.urls = mkOption { - type = listOf str; - default = [ ]; - description = '' - Reseed URLs. - ''; - }; - - reseed.floodfill = mkOption { - type = nullOr str; - default = null; - description = '' - Path to router info of floodfill to reseed from. - ''; - }; - - reseed.zipfile = mkOption { - type = nullOr str; - default = null; - description = '' - Path to local .zip file to reseed from. - ''; - }; - - reseed.proxy = mkOption { - type = nullOr str; - default = null; - description = '' - URL for reseed proxy, supports http/socks. - ''; - }; - - addressbook.defaulturl = mkOption { - type = types.str; - default = "http://joajgazyztfssty4w2on5oaqksz6tqoxbduy553y34mf4byv6gpq.b32.i2p/export/alive-hosts.txt"; - description = '' - AddressBook subscription URL for initial setup - ''; - }; - addressbook.subscriptions = mkOption { - type = listOf str; - default = [ - "http://inr.i2p/export/alive-hosts.txt" - "http://i2p-projekt.i2p/hosts.txt" - "http://stats.i2p/cgi-bin/newhosts.txt" - ]; - description = '' - AddressBook subscription URLs - ''; - }; - - trust.enable = mkEnableOption "explicit trust options"; - - trust.family = mkOption { - type = nullOr str; - default = null; - description = '' - Router Family to trust for first hops. - ''; - }; - - trust.routers = mkOption { - type = listOf str; - default = [ ]; - description = '' - Only connect to the listed routers. - ''; - }; - - trust.hidden = mkEnableOption "router concealment"; - - websocket = mkEndpointOpt "websockets" "127.0.0.1" 7666; - - exploratory.inbound = i2cpOpts "exploratory"; - exploratory.outbound = i2cpOpts "exploratory"; - - ntcp2.enable = mkEnableTrueOption "NTCP2"; - ntcp2.published = mkEnableOption "NTCP2 publication"; - ntcp2.port = mkOption { - type = types.port; - default = 0; - description = '' - Port to listen for incoming NTCP2 connections (0=auto). - ''; - }; - - ssu2 = { - enable = mkEnableTrueOption "SSU2"; - published = mkEnableOption "SSU2 publication"; - port = mkOption { - type = types.port; - default = 0; - description = '' - Port to listen for incoming SSU2 connections (0=auto). - ''; + # Overridden as CLI args + conf = null; + tunconf = null; + datadir = null; + # May not work as expected with DynamicUser=true + pidfile = null; + log = null; + logfile = null; + # May interfere with the systemd service + daemon = null; + service = null; + }; }; - }; - - limits.transittunnels = mkOption { - type = types.int; - default = 2500; - description = '' - Maximum number of active transit sessions. - ''; - }; - - limits.coreSize = mkOption { - type = types.int; - default = 0; - description = '' - Maximum size of corefile in Kb (0 - use system limit). - ''; - }; - - limits.openFiles = mkOption { - type = types.int; - default = 0; - description = '' - Maximum number of open files (0 - use system default). - ''; - }; - - limits.ntcpHard = mkOption { - type = types.int; - default = 0; - description = '' - Maximum number of active transit sessions. - ''; - }; - - limits.ntcpSoft = mkOption { - type = types.int; - default = 0; - description = '' - Threshold to start probabalistic backoff with ntcp sessions (default: use system limit). - ''; - }; - - limits.ntcpThreads = mkOption { - type = types.int; - default = 1; - description = '' - Maximum number of threads used by NTCP DH worker. - ''; - }; - - yggdrasil.enable = mkEnableOption "Yggdrasil"; - - yggdrasil.address = mkOption { - type = nullOr str; - default = null; - description = '' - Your local yggdrasil address. Specify it if you want to bind your router to a - particular address. - ''; - }; - - proto.http = (mkEndpointOpt "http" "127.0.0.1" 7070) // { - - auth = mkEnableOption "webconsole authentication"; - - user = mkOption { - type = types.str; - default = "i2pd"; - description = '' - Username for webconsole access - ''; - }; - - pass = mkOption { - type = types.str; - default = "i2pd"; - description = '' - Password for webconsole access. - ''; - }; - - strictHeaders = mkOption { - type = nullOr bool; - default = null; - description = '' - Enable strict host checking on WebUI. - ''; - }; - - hostname = mkOption { - type = nullOr str; - default = null; - description = '' - Expected hostname for WebUI. - ''; - }; - }; - - proto.httpProxy = (mkKeyedEndpointOpt "httpproxy" "127.0.0.1" 4444 "httpproxy-keys.dat") // { - outproxy = mkOption { - type = nullOr str; - default = null; - description = "Upstream outproxy bind address."; - }; - }; - proto.socksProxy = (mkKeyedEndpointOpt "socksproxy" "127.0.0.1" 4447 "socksproxy-keys.dat") // { - outproxyEnable = mkEnableOption "SOCKS outproxy"; - outproxy = mkOption { - type = types.str; - default = "127.0.0.1"; - description = "Upstream outproxy bind address."; - }; - outproxyPort = mkOption { - type = types.port; - default = 4444; - description = "Upstream outproxy bind port."; - }; - }; - - proto.sam = mkEndpointOpt "sam" "127.0.0.1" 7656; - proto.bob = mkEndpointOpt "bob" "127.0.0.1" 2827; - proto.i2cp = mkEndpointOpt "i2cp" "127.0.0.1" 7654; - proto.i2pControl = mkEndpointOpt "i2pcontrol" "127.0.0.1" 7650; - - outTunnels = mkOption { default = { }; - type = attrsOf ( - submodule ( - { name, ... }: - { - options = { - type = mkOption { - type = types.enum [ - "client" - "udpclient" - ]; - default = "client"; - description = "Tunnel type."; - }; - destination = mkOption { - type = types.str; - description = "Remote endpoint, I2P hostname or b32.i2p address."; - }; - destinationPort = mkOption { - type = with types; nullOr port; - default = null; - description = "Connect to particular port at destination."; - }; - } - // commonTunOpts name; - config = { - name = mkDefault name; + example = lib.literalExpression '' + { + meshnets.yggdrasil = true; # Enable yggdrasil network support + + port = { + ${credAttrType} = "/run/secrets/i2pd-port"; + ${credPlaceholderAttrType} = 0; # An optional placeholder value used when checking configuration + }; + } + ''; + }; + + # Server/generic tunnels + serverTunnels = lib.mkOption { + description = '' + Free-form "server" tunnels. Options are passed to `tunnels.conf`. + Mnemonic: we serving some service to others. + See + ''; + type = types.attrsOf ( + types.submodule { + inherit freeformType; + options = { + host = lib.mkOption { + type = types.either types.str credType; + description = "IP address of server (on this address i2pd will send data from I2P)"; }; - } + port = lib.mkOption { + type = types.port; + description = "Port of server tunnel (on this port i2pd will send data from I2P)"; + }; + inherit (templates) signaturetype i2cp i2p; + }; + } + ); + default = { }; + }; + + # Client tunnels + clientTunnels = lib.mkOption { + description = '' + Free-form "client" tunnels. Options are passed to `tunnels.conf`. + Mnemonic: we connect to someone as a client. + See + ''; + type = types.attrsOf ( + types.submodule { + inherit freeformType; + options = { + port = lib.mkOption { + type = types.port; + description = "Port of client tunnel (on this port i2pd will receive data)"; + }; + destination = lib.mkOption { + type = types.either types.str credType; + description = "Remote endpoint, I2P hostname or b32.i2p address"; + }; + inherit (templates) signaturetype i2cp i2p; + }; + } + ); + default = { }; + # Taken from i2pd's contrib/tunnels.conf + # LiteralExpression prevents unpacking of `i2p.streaming.profile` + example = lib.literalExpression '' + { + "irc-ilita" = { + address = "127.0.0.1"; + port = 6668; + destination = "irc.ilita.i2p"; + destinationport = 6667; + keys = "irc-keys.dat"; + i2p.streaming.profile = "interactive"; + }; + } + ''; + }; + + # TODO: Remove in NixOS 27.11 + mkSecret = lib.mkOption { + type = types.anything; + readOnly = true; + default = + path: + lib.warn "`mkSecret` function is deprecated. Replace it with `{ ${credAttrType} = ; }`" { + ${credAttrType} = path; + }; + description = "Deprecated. Use `{ ${credAttrType} = ; }` directly"; + }; + }; + + imports = + let + option = option: lib.splitString "." "services.i2pd.${option}"; + rename = from: to: lib.mkRenamedOptionModule (option from) (option to); + in + [ + (rename "inTunnels" "serverTunnels") + (rename "outTunnels" "clientTunnels") + ]; + + ###### Implementation ###### + + config = + let + cfg = config.services.i2pd; + + /* + Configuration generator. Similar to `pkgs.formats.ini`, but with few distinctions: + - Out-of-section options are allowed and printed on top of a file. + - Nested sub-values (`a.b.c = ...`) coerced to (`"a.b.c" = ...`). + */ + unwrapPrefixes = + attrset: + let + unwrap = ( + prefix: attrset: + lib.concatLists ( + lib.mapAttrsToList ( + k: v: + if lib.isAttrs v then + unwrap (prefix + k + ".") v + else + [ + { + name = prefix + k; + value = v; + } + ] + ) attrset + ) + ); + in + lib.listToAttrs (unwrap "" attrset); + + removeNulls = lib.filterAttrsRecursive (_: v: !isNull v); + + # I2pd-style ini allows lists, dented by comma separated values, and spaces between key and value + ini = pkgs.formats.iniWithGlobalSection { + listToValue = lib.concatMapStringsSep "," (lib.generators.mkValueStringDefault { }); + mkKeyValue = lib.generators.mkKeyValueDefault { } " = "; + }; + + genConfig = + name: attrs: + ini.generate name { + globalSection = removeNulls (lib.filterAttrs (_: v: !lib.isAttrs v) attrs); + sections = removeNulls ( + lib.mapAttrs (_: v: unwrapPrefixes v) (lib.filterAttrs (_: v: lib.isAttrs v) attrs) + ); + }; + + genTunnels = + name: attrs: + ini.generate name { + sections = (lib.mapAttrs (_: unwrapPrefixes) (removeNulls attrs)); + }; + + gen = attr: { + conf = genConfig "i2pd.conf" (credSubstituteRec attr cfg.settings); + tunconf = genTunnels "i2pd-tunnels.conf" ( + lib.mapAttrs' (k: v: lib.nameValuePair "client-${k}" (v // { "type" = "client"; })) ( + credSubstituteRec attr cfg.clientTunnels + ) + // lib.mapAttrs' (k: v: lib.nameValuePair "server-${k}" (v // { "type" = "server"; })) ( + credSubstituteRec attr cfg.serverTunnels ) ); - description = '' - Connect to someone as a client and establish a local accept endpoint - ''; }; - inTunnels = mkOption { - default = { }; - type = attrsOf ( - submodule ( - { name, ... }: - { - options = { - type = mkOption { - type = types.enum [ - "server" - "http" - "irc" - "udpserver" - ]; - default = "server"; - description = "Tunnel type."; - }; - inPort = mkOption { - type = types.port; - default = 0; - description = "Service port. Default to the tunnel's listen port."; - }; - accessList = mkOption { - type = listOf str; - default = [ ]; - description = "I2P nodes that are allowed to connect to this service."; - }; - } - // commonTunOpts name; - config = { - name = mkDefault name; - }; - } - ) - ); - description = '' - Serve something on I2P network at port and delegate requests to address inPort. - ''; + i2pdConfig = gen "id"; + i2pdCheckedConfig = gen "placeholder"; + + # List of all passed credentials: `[ { id = ...; path = ...; } ... ]` + credentials = credCollectRec [ + cfg.settings + cfg.clientTunnels + cfg.serverTunnels + ]; + + loadCredentialsScript = + pkgs.writeShellScript "i2pd-load-credentials" + # sh + '' + set -euo pipefail + + # If no credential declared, `CREDENTIALS_DIRECTORY` is unset + ids=(''${CREDENTIALS_DIRECTORY:+$(ls "$CREDENTIALS_DIRECTORY")}) + + # For every cli argument + for arg in "$@"; do + # Split argument at "=", assign first part to `out` and second part to `in` + arg=(''${arg//=/ }) + out="''${arg[0]}" + in="''${arg[1]}" + + # Copy file, set permissions + cp "$in" "$out" + chmod u=rw,g=,o= "$out" + + # Try substitute all known credentials + for id in "''${ids[@]}"; do + ${lib.getExe pkgs.replace-secret} "$id" "$CREDENTIALS_DIRECTORY/$id" "$out" + done + done + ''; + in + lib.mkIf cfg.enable { + system.checks = lib.optional (with pkgs.stdenv; buildPlatform.system == hostPlatform.system) ( + pkgs.runCommand "services.i2pd.check-i2pd.conf" { } + # sh + '' + set -euo pipefail + i2pd="${lib.getExe cfg.package}" + conf="${i2pdCheckedConfig.conf}" + tunconf="${i2pdCheckedConfig.tunconf}" + + # Disable connectivity, in case build sandbox is disabled + echo "ipv4 = false" >>conf + echo "ipv6 = false" >>conf + grep -Pv "^(ipv4|ipv6)[\s=]" "$conf" >>conf + opts="$("$i2pd" --help | grep -Eo "^ --\S*port(udp)? arg" | sed "s/ arg\$/=0/g")" + + echo Checking "$conf" + ok= + while read line; do + case "$line" in + *none*i2pd*starting...*) + [[ -z "$ok" ]] && ok=1 + kill -s INT $(cat pidfile) + ;; + *critical*) + ok=0 + ;; + esac + done < <( + "$i2pd" \ + --pidfile=pidfile --loglevel=critical --datadir=datadir \ + --conf="$conf" --tunconf="$tunconf" \ + $opts 2>&1 \ + | tee /dev/stderr + ) + [[ "$ok" != "1" ]] && exit 1 + + touch $out + '' + ); + + systemd.services.i2pd = { + description = "Minimal I2P router"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + unitConfig = { + RequiresMountsFor = map (cred: cred.path) credentials; + }; + + serviceConfig = { + User = "i2pd"; + Group = "i2pd"; + DynamicUser = true; + StateDirectory = [ "i2pd" ]; + + # Load credentials + LoadCredential = lib.forEach credentials (cred: "${cred.id}:${cred.path}"); + ExecStartPre = lib.escapeShellArgs [ + loadCredentialsScript + "%T/conf=${i2pdConfig.conf}" # "%T" is temporary directory, usually `/tmp` + "%T/tunconf=${i2pdConfig.tunconf}" + ]; + + ExecStart = lib.escapeShellArgs [ + "${lib.getExe cfg.package}" + "--datadir=%S/i2pd" # "%S" is systemd state directory, usually `/var/lib` + "--conf=%T/conf" + "--tunconf=%T/tunconf" + ]; + Restart = if cfg.autoRestart then "on-failure" else "no"; + KillSignal = if cfg.gracefulShutdown then "SIGINT" else "SIGTERM"; + TimeoutStopSec = if cfg.gracefulShutdown then "10m" else "30s"; + SendSIGKILL = true; + # Hardening + # Taken from https://gitlab.archlinux.org/archlinux/packaging/packages/i2pd/-/blob/8b18a2084e3955fa14a1853fc7fcaa58cc05e21a/030-i2pd-systemd-service-hardening.patch + PrivateTmp = true; + ProtectSystem = "strict"; + ProtectHome = true; + PrivateDevices = true; + ProtectKernelTunables = true; + ProtectControlGroups = true; + NoNewPrivileges = true; + MemoryDenyWriteExecute = true; + LockPersonality = true; + SystemCallFilter = "@system-service"; + RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_NETLINK"; + ProtectHostname = true; + ProtectClock = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectProc = "invisible"; + ProcSubset = "pid"; + PrivateMounts = true; + PrivateUsers = true; + RemoveIPC = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + SystemCallArchitectures = "native"; + }; }; }; - }; - ###### implementation - - config = mkIf cfg.enable { - - users.users.i2pd = { - group = "i2pd"; - description = "I2Pd User"; - home = homeDir; - createHome = true; - uid = config.ids.uids.i2pd; - }; - - users.groups.i2pd.gid = config.ids.gids.i2pd; - - systemd.services.i2pd = { - description = "Minimal I2P router"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - User = "i2pd"; - WorkingDirectory = homeDir; - Restart = "on-abort"; - ExecStart = "${cfg.package}/bin/i2pd ${i2pdFlags}"; - }; - }; + meta = { + maintainers = with lib.maintainers; [ + N4CH723HR3R + one-d-wide + ]; }; } diff --git a/nixos/modules/services/system/userborn.nix b/nixos/modules/services/system/userborn.nix index a6042c752c0d..515a664ccd4d 100644 --- a/nixos/modules/services/system/userborn.nix +++ b/nixos/modules/services/system/userborn.nix @@ -96,6 +96,20 @@ in ''; }; + importLegacyState = lib.mkOption { + type = lib.types.bool; + default = !cfg.static; + defaultText = lib.literalExpression "!config.services.userborn.static"; + description = '' + Whether to include one-shot migration services that import the state + left behind by the perl activation script (`update-users-groups.pl`), + so id and subid allocations survive the switch to userborn. + + Disable this if you want to keep the migration tooling out of your + system closure. + ''; + }; + }; config = lib.mkIf cfg.enable { @@ -141,6 +155,33 @@ in ) userCfg.users ); + # One-shot import of update-users-groups.pl state. Runs before + # userborn so removed users' ids are reserved before allocation. + # Remove once the perl path has been gone for two releases. + services.userborn-import-legacy = lib.mkIf cfg.importLegacyState { + wantedBy = [ "sysinit.target" ]; + requiredBy = [ "userborn.service" ]; + before = [ + "userborn.service" + "shutdown.target" + ]; + after = [ "systemd-remount-fs.service" ]; + conflicts = [ "shutdown.target" ]; + unitConfig = { + Description = "Import legacy update-users-groups.pl state for userborn"; + DefaultDependencies = false; + ConditionPathExists = [ + "/var/lib/nixos/uid-map" + "!/var/lib/userborn" + ]; + }; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = "${lib.getExe pkgs.userborn-import-legacy} --nogroup-gid ${toString config.ids.gids.nogroup} ${cfg.passwordFilesLocation}"; + }; + }; + services.userborn = lib.mkIf (!cfg.static) { wantedBy = [ "sysinit.target" ]; requiredBy = [ "sysinit-reactivation.target" ]; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index d1264176df3e..647f548ba3d3 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -328,6 +328,7 @@ in calibre-server = import ./calibre-server.nix { inherit pkgs runTest; }; calibre-web = runTest ./calibre-web.nix; canaille = runTest ./canaille.nix; + cardwire = runTest ./cardwire.nix; cassandra = runTest { imports = [ ./cassandra.nix ]; _module.args.getPackage = pkgs: pkgs.cassandra; @@ -810,6 +811,7 @@ in hub = runTest ./git/hub.nix; hydra = runTest ./hydra; i18n = runTest ./i18n.nix; + i2pd = runTest ./i2pd.nix; i3wm = runTest ./i3wm.nix; icecast = runTest ./icecast.nix; icingaweb2 = runTest ./icingaweb2.nix; @@ -1841,6 +1843,7 @@ in userborn = runTest ./userborn.nix; userborn-immutable-etc = runTest ./userborn-immutable-etc.nix; userborn-immutable-users = runTest ./userborn-immutable-users.nix; + userborn-migration = runTest ./userborn-migration.nix; userborn-mutable-etc = runTest ./userborn-mutable-etc.nix; userborn-mutable-users = runTest ./userborn-mutable-users.nix; userborn-static = runTest ./userborn-static.nix; diff --git a/nixos/tests/cardwire.nix b/nixos/tests/cardwire.nix new file mode 100644 index 000000000000..24573dda5a4d --- /dev/null +++ b/nixos/tests/cardwire.nix @@ -0,0 +1,65 @@ +{ pkgs, ... }: + +{ + name = "cardwire"; + + nodes.machine = + { pkgs, lib, ... }: + { + services.cardwired.enable = true; + services.dbus.enable = true; + + boot.kernelParams = [ + "intel_iommu=on" + "iommu=pt" + ]; + + virtualisation.qemu.options = [ + "-machine q35,accel=kvm,kernel-irqchip=split" + "-device intel-iommu,intremap=on,device-iotlb=on" + "-vga none" + "-device virtio-gpu-pci,id=igpu,max_outputs=2" + "-device virtio-gpu-pci,id=dgpu,max_outputs=1" + ]; + }; + + testScript = '' + machine.start() + machine.wait_for_unit("default.target") + with subtest("Wait for boot and services"): + machine.wait_for_unit("multi-user.target") + machine.wait_for_unit("dbus.service") + machine.wait_for_unit("cardwired.service") + + with subtest("Check for DRM Devices"): + dri_out = machine.succeed("ls -a /dev/dri") + assert "renderD128" in dri_out, "Missing DRM" + assert "card0" in dri_out, "Missing DRM" + assert "renderD129" in dri_out, "Missing DRM" + assert "card1" in dri_out, "Missing DRM" + + with subtest("Ensure cardwire is started and dbus works"): + machine.wait_until_succeeds("cardwire help") + + with subtest("Ensure files are present"): + machine.succeed("cat /etc/cardwire/cardwire.toml") + machine.succeed("cat /var/lib/cardwire/gpu_state.json") + machine.succeed("cat /var/lib/cardwire/mode.json") + + with subtest("Switch to Integrated mode"): + assert "renderD128" in machine.succeed("cardwire list"), "Missing RenderD128 in cardwire" + machine.succeed("test -e /dev/dri/renderD129") + assert "Mode has been set to Integrated" in machine.succeed("cardwire set integrated") + machine.fail(": < /dev/dri/renderD129") + assert "integrated" in machine.succeed("cat /var/lib/cardwire/mode.json") + + with subtest("Switchback to hybrid mode"): + assert "Mode has been set to Hybrid" in machine.succeed("cardwire set hybrid") + machine.succeed(": < /dev/dri/renderD129") + assert "hybrid" in machine.succeed("cat /var/lib/cardwire/mode.json") + + with subtest("Try to block default gpu"): + cardwire_out = machine.fail("cardwire gpu 0 --block 2>&1") + assert "Per GPU block is only available on manual mode" in cardwire_out, "Default gpu got blocked" + ''; +} diff --git a/nixos/tests/i2pd.nix b/nixos/tests/i2pd.nix new file mode 100644 index 000000000000..663290df05fe --- /dev/null +++ b/nixos/tests/i2pd.nix @@ -0,0 +1,210 @@ +{ lib, ... }: +{ + name = "i2pd"; + meta.maintainers = with lib.maintainers; [ h7x4 ]; + + nodes = { + server = + { config, pkgs, ... }: + { + virtualisation.vlans = [ 1 ]; + networking = { + useDHCP = false; + interfaces.eth1.useDHCP = false; + firewall.allowedTCPPorts = [ 12345 ]; + firewall.allowedUDPPorts = [ 12345 ]; + }; + + systemd.services."test-web-server" = { + wantedBy = [ "multi-user.target" ]; + before = [ "i2pd.service" ]; + serviceConfig = { + ExecStart = '' + ${lib.getExe' pkgs.python3 "python3"} \ + -m http.server 8080 \ + --bind 127.0.0.1 \ + --directory ${pkgs.writeTextDir "index.html" "hello world"} + ''; + DynamicUser = true; + }; + }; + + services.i2pd = { + enable = true; + settings = { + # Needed to retrieve b32 address + loglevel = "info"; + # Avoid real I2P network ID (2), just in case + # there are any hidden assumptions tied to it. + netid = 77; + host = config.networking.primaryIPAddress; + port = 12345; + # Allow use of local addresses + reservedrange = false; + # No reseed infra available, and we seed netDb manually anyway + reseed.urls = ""; + reseed.yggurls = ""; + + # "router" is the only other node reachable, so every tunnel + # is a single hop through it. + shareddest.inbound.length = 1; + shareddest.outbound.length = 1; + exploratory.inbound.length = 1; + exploratory.outbound.length = 1; + }; + + serverTunnels.testserver = { + host = "127.0.0.1"; + port = 8080; + keys = "testserver-keys.dat"; + inbound.length = 1; + outbound.length = 1; + }; + }; + }; + + router = + { config, ... }: + { + virtualisation.vlans = [ 1 ]; + networking = { + useDHCP = false; + interfaces.eth1.useDHCP = false; + firewall.allowedTCPPorts = [ 12345 ]; + firewall.allowedUDPPorts = [ 12345 ]; + }; + + services.i2pd = { + enable = true; + settings = { + loglevel = "info"; + netid = 77; + host = config.networking.primaryIPAddress; + port = 12345; + reservedrange = false; + reseed.urls = ""; + reseed.yggurls = ""; + floodfill = true; + + # "router" has no peer to hop through for its own pools. + shareddest.inbound.length = 0; + shareddest.outbound.length = 0; + exploratory.inbound.length = 0; + exploratory.outbound.length = 0; + }; + }; + }; + + client = + { config, ... }: + { + virtualisation.vlans = [ 1 ]; + networking = { + useDHCP = false; + interfaces.eth1.useDHCP = false; + }; + + # i2pd asserts this exists before it starts, the test script + # overwrites it with the server's actual address once known. + systemd.tmpfiles.rules = [ + "f /run/i2pd-secrets/server-destination 0400 root root - unknown.b32.i2p" + ]; + + services.i2pd = { + enable = true; + settings = { + loglevel = "info"; + netid = 77; + host = config.networking.primaryIPAddress; + reservedrange = false; + reseed.urls = ""; + reseed.yggurls = ""; + + httpproxy.inbound.length = 1; + httpproxy.outbound.length = 1; + shareddest.inbound.length = 1; + shareddest.outbound.length = 1; + exploratory.inbound.length = 1; + exploratory.outbound.length = 1; + }; + + clientTunnels.toServer = { + port = 10800; + destination._secret = "/run/i2pd-secrets/server-destination"; + inbound.length = 1; + outbound.length = 1; + }; + }; + }; + }; + + testScript = + # python + '' + import re + + start_all() + server.wait_for_unit("i2pd.service") + client.wait_for_unit("i2pd.service") + router.wait_for_unit("i2pd.service") + server.wait_for_file("/var/lib/i2pd/router.info") + client.wait_for_file("/var/lib/i2pd/router.info") + router.wait_for_file("/var/lib/i2pd/router.info") + + with subtest("Exchange router info"): + server.wait_until_succeeds( + "journalctl -u i2pd -o cat --grep 'Local address \\S+ created'" + ) + server_log_line = server.succeed( + "journalctl -u i2pd -o cat --grep 'Local address \\S+ created' --reverse -n 1" + ) + server_b32_match = re.search(r"Local address (\S+) created", server_log_line) + assert server_b32_match is not None + server_b32 = server_b32_match.group(1) + client.succeed( + "mkdir -p /run/i2pd-secrets", + f"printf '%s' '{server_b32}.b32.i2p' > /run/i2pd-secrets/server-destination", + ) + + # We don't have any reseed infra available, so we manually seed each + # of server/client with "router"'s identity, and vice versa. + router.copy_from_machine("/var/lib/i2pd/router.info", "router-identity") + server.copy_from_machine("/var/lib/i2pd/router.info", "server-identity") + client.copy_from_machine("/var/lib/i2pd/router.info", "client-identity") + + router_identity = str(router.out_dir / "router-identity" / "router.info") + server.copy_from_host(router_identity, "/var/lib/i2pd/netDb/r0/router.dat") + client.copy_from_host(router_identity, "/var/lib/i2pd/netDb/r0/router.dat") + + router.copy_from_host( + str(server.out_dir / "server-identity" / "router.info"), + "/var/lib/i2pd/netDb/r0/server.dat", + ) + router.copy_from_host( + str(client.out_dir / "client-identity" / "router.info"), + "/var/lib/i2pd/netDb/r0/client.dat", + ) + + client.systemctl("restart i2pd.service") + server.systemctl("restart i2pd.service") + router.systemctl("restart i2pd.service") + client.wait_for_unit("i2pd.service") + server.wait_for_unit("i2pd.service") + router.wait_for_unit("i2pd.service") + client.wait_for_open_port(4444) + + server.wait_for_unit("test-web-server.service") + + with subtest("Request content using the HTTP proxy"): + # This is intended to keep on failing until the client eventually receives + # a LeaseSet from the server. + client.wait_until_succeeds( + f"curl --fail -x 127.0.0.1:4444 http://{server_b32}.b32.i2p/ | grep -q 'hello world'", + ) + + with subtest("Request content using a port-forwarding tunnel"): + client.wait_until_succeeds( + "curl --fail http://127.0.0.1:10800/ | grep -q 'hello world'", + ) + ''; +} diff --git a/nixos/tests/userborn-migration.nix b/nixos/tests/userborn-migration.nix new file mode 100644 index 000000000000..e4071b8608da --- /dev/null +++ b/nixos/tests/userborn-migration.nix @@ -0,0 +1,144 @@ +{ lib, ... }: + +# Verifies that switching from update-users-groups.pl to userborn honours +# /var/lib/nixos/{uid,gid}-map and declarative-{users,groups}, so removed +# users keep their ids reserved and are not reassigned. + +{ + name = "userborn-migration"; + + meta.maintainers = with lib.maintainers; [ rvdp ]; + + nodes.machine = { + services.userborn.enable = false; + systemd.sysusers.enable = false; + users.mutableUsers = true; + + users.users = { + survivor = { + isNormalUser = true; + }; + ghost = { + isNormalUser = true; + }; + intruder = { + isNormalUser = true; + # Only created under userborn. Must not get ghost's old uid. + enable = lib.mkDefault false; + }; + }; + + specialisation = { + # Still perl-managed. ghost is removed but kept in uid-map. + base-ghost-removed.configuration = { + users.users.ghost.enable = lib.mkForce false; + }; + + # Switch to userborn with ghost gone and a new unpinned user. + userborn.configuration = { + services.userborn.enable = lib.mkForce true; + users.users.ghost.enable = lib.mkForce false; + users.users.intruder.enable = true; + }; + + # ghost re-added under userborn. Must keep its original uid. + userborn-revived.configuration = { + services.userborn.enable = lib.mkForce true; + users.users.intruder.enable = true; + }; + + # The migration service must be removable from the closure. + userborn-without-import.configuration = { + services.userborn.enable = lib.mkForce true; + services.userborn.importLegacyState = false; + users.users.intruder.enable = true; + }; + }; + }; + + testScript = + # python + '' + import json + + machine.wait_for_unit("multi-user.target") + + def uid(name: str) -> int: + return int(machine.succeed(f"id --user {name}").strip()) + + def switch(specialisation: str) -> None: + machine.succeed( + f"/run/booted-system/specialisation/{specialisation}/bin/switch-to-configuration switch 2>&1 | tee /dev/stderr" + ) + + with subtest("perl: capture allocated state"): + survivor_uid = uid("survivor") + ghost_uid = uid("ghost") + + uid_map = json.loads(machine.succeed("cat /var/lib/nixos/uid-map")) + t.assertEqual(uid_map["ghost"], ghost_uid) + t.assertEqual(uid_map["survivor"], survivor_uid) + + with subtest("perl: remove ghost"): + switch("base-ghost-removed") + machine.fail("getent passwd ghost") + + uid_map = json.loads(machine.succeed("cat /var/lib/nixos/uid-map")) + t.assertEqual( + uid_map["ghost"], ghost_uid, "perl script must retain removed users in uid-map" + ) + + with subtest("userborn: legacy state is imported"): + # The import only runs while userborn's state directory is absent. + machine.fail("test -e /var/lib/userborn") + switch("userborn") + machine.succeed("test -d /var/lib/userborn") + + # ghost must be a locked stub with its original uid. + ghost_passwd = machine.succeed("getent passwd ghost").strip() + t.assertEqual( + int(ghost_passwd.split(":")[2]), + ghost_uid, + f"ghost stub has wrong uid: {ghost_passwd}", + ) + ghost_shadow = machine.succeed("getent shadow ghost").strip() + t.assertTrue( + ghost_shadow.split(":")[1].startswith("!"), + f"ghost stub is not locked: {ghost_shadow}", + ) + + # previous-userborn.json is replaced by ExecStartPost after use, + # so check the journal instead. + machine.succeed( + "journalctl -u userborn-import-legacy.service --grep 'synthesised.*previous-userborn.json'" + ) + + with subtest("userborn: no uid collision for new user"): + intruder_uid = uid("intruder") + t.assertNotEqual( + intruder_uid, + ghost_uid, + "intruder was allocated ghost's old uid; migration failed to reserve it", + ) + t.assertEqual(uid("survivor"), survivor_uid, "survivor uid changed across migration") + + with subtest("userborn: revival keeps original uid"): + switch("userborn-revived") + t.assertEqual( + uid("ghost"), + ghost_uid, + "ghost was not revived with its original uid", + ) + + with subtest("idempotency"): + machine.succeed("systemctl restart userborn-import-legacy.service") + result = machine.succeed( + "systemctl show -p ConditionResult userborn-import-legacy.service" + ).strip() + t.assertEqual(result, "ConditionResult=no") + + with subtest("legacy import service can be excluded"): + switch("userborn-without-import") + machine.fail("systemctl cat userborn-import-legacy.service") + ''; +} diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 64617dcc6b1c..e0680b9f5101 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -5086,8 +5086,8 @@ let mktplcRef = { name = "vstuc"; publisher = "VisualStudioToolsForUnity"; - version = "1.2.2"; - hash = "sha256-Yh4nhRTOmQiL34wYnd7Y2OMdl837fexRm5r2hHfhjIg="; + version = "1.3.1"; + hash = "sha256-lpkqFXLod/m95DsvIcsb6si0ekIawYO5CI2H6GPML6c="; }; meta = { description = "Integrates Visual Studio Code for Unity"; diff --git a/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix b/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix index 613d5ddeaf86..f97d52deb484 100644 --- a/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix +++ b/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix @@ -5,13 +5,13 @@ }: mkLibretroCore { core = "mame2003-plus"; - version = "0-unstable-2026-07-28"; + version = "0-unstable-2026-08-13"; src = fetchFromGitHub { owner = "libretro"; repo = "mame2003-plus-libretro"; - rev = "d6bf36f65f36853120d7e97cdf4fa3720de66728"; - hash = "sha256-9fXl/tMtLlKBzpnhFy4Ac5Xp7G2S9kT/qlVMYAChsO8="; + rev = "5bbb84086c548a0ee0738f0b38966d7d4a5ff946"; + hash = "sha256-fQ3wIylfkG6Q0LmU/mE3jc/GToubcXPJPSBKpBfThlY="; }; makefile = "Makefile"; diff --git a/pkgs/applications/emulators/libretro/cores/snes9x2010.nix b/pkgs/applications/emulators/libretro/cores/snes9x2010.nix index 20a6b0dcd843..7418728918f5 100644 --- a/pkgs/applications/emulators/libretro/cores/snes9x2010.nix +++ b/pkgs/applications/emulators/libretro/cores/snes9x2010.nix @@ -5,13 +5,13 @@ }: mkLibretroCore rec { core = "snes9x2010"; - version = "0-unstable-2026-07-23"; + version = "0-unstable-2026-08-11"; src = fetchFromGitHub { owner = "libretro"; repo = "snes9x2010"; - rev = "da064275845dfa57e14eb0e5b5c7ddcc117e9f06"; - hash = "sha256-uNmgQjIVXMhVinkSZnH6P/Nm4ESPEYjURj5TEf4hoxY="; + rev = "421a8d9449031245f1dfdb632b84548a9f19fddd"; + hash = "sha256-/F5/kU8zJzQGhy59c/0CwTM1Pb3aI9+iAWekwf74zDs="; }; makeFlags = [ "GIT_VERSION=${builtins.substring 0 7 src.rev}" ]; diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 51049e588065..b5530d1fc660 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -73,11 +73,11 @@ "vendorHash": "sha256-L9IGENsL8Kibq5O/JOgCxLRUxgS7q9G/NovC/Q7tw48=" }, "auth0_auth0": { - "hash": "sha256-jODs72Ve7OZ/lzhcZVZpjDvpl5m0pPvRVhz+35M2Afs=", + "hash": "sha256-lqlQglt3zbNkoE4ORBWIq85r7/SYucIOPgIzJ7NrYaQ=", "homepage": "https://registry.terraform.io/providers/auth0/auth0", "owner": "auth0", "repo": "terraform-provider-auth0", - "rev": "v1.54.0", + "rev": "v1.54.1", "spdx": "MPL-2.0", "vendorHash": "sha256-gQHnTp3reX/1fmwQqjpqtjlb2z3wYk8E8vRf73jh48E=" }, @@ -472,22 +472,22 @@ "vendorHash": "sha256-xl92EeXmhKNEbdCmzfd0p8EVkCjLi2gM47A69IXXAyE=" }, "goharbor_harbor": { - "hash": "sha256-+HtvOLOD8PEYky+ws/deCcX8Tea5pR/77eb7LXJhseg=", + "hash": "sha256-daV5W/fLW4+5XG0Lh8rcF7A9CKHq232/9kiMT5OzI1s=", "homepage": "https://registry.terraform.io/providers/goharbor/harbor", "owner": "goharbor", "repo": "terraform-provider-harbor", - "rev": "v3.12.3", + "rev": "v3.12.4", "spdx": "MIT", - "vendorHash": "sha256-Zie1NyDPnk+UX2UBxGlpJaok9PeRyu0/tuMQS7WCvZI=" + "vendorHash": "sha256-vEQ++yk7BYUsgejppHiRJeMGzG4QOLfdPixCTLz9sbI=" }, "grafana_grafana": { - "hash": "sha256-PtMpesJeG7HEJQ7AaRCu2UrkX6yVpxKZeyieoaoGjlg=", + "hash": "sha256-pd7bq2m8PC/kWWoWd04MpIrrQPYKRVRGFTbXJjTGuac=", "homepage": "https://registry.terraform.io/providers/grafana/grafana", "owner": "grafana", "repo": "terraform-provider-grafana", - "rev": "v4.43.0", + "rev": "v4.45.1", "spdx": "MPL-2.0", - "vendorHash": "sha256-Lq0DV5RJRqi1oZNm4XRoJbDE71uGBjR8KjTghucpf7M=" + "vendorHash": "sha256-B/XiioxXXK3dzlKTDH8y7QQMx0ztqQ7TaE1Cbt8Kj3M=" }, "gridscale_gridscale": { "hash": "sha256-FAKvQ/MEod5Ck0PG4ffQ+gQp6zZ0JDRXPOrOiDpWMls=", @@ -1481,13 +1481,13 @@ "vendorHash": "sha256-GRnVhGpVgFI83Lg34Zv1xgV5Kp8ioKTFV5uaqS80ATg=" }, "vpsfreecz_vpsadmin": { - "hash": "sha256-Yi5mFhJsGGPg3IyOdgV2mTfj5ZVd76vu3/JFNrh5+Wc=", + "hash": "sha256-T+az9OH9/ZMSJewZpC9VLSXOZ5N/wz00VRnl9Ab4aeI=", "homepage": "https://registry.terraform.io/providers/vpsfreecz/vpsadmin", "owner": "vpsfreecz", "repo": "terraform-provider-vpsadmin", - "rev": "v1.2.0", + "rev": "v1.3.0", "spdx": "MPL-2.0", - "vendorHash": "sha256-rUYHapEVqRupLOPVbcAH8YP0cuXclMmYTQUkqeOwCN0=" + "vendorHash": "sha256-98lrEH7j4Fl0oSEoL75e0h+8ySLacPK2k0OehY3jqhA=" }, "vultr_vultr": { "hash": "sha256-hK4/Pzj0UtWDLQS3cRMC73ZRr20HCWqI+jUlTUHcHaw=", diff --git a/pkgs/by-name/ac/acdi/package.nix b/pkgs/by-name/ac/acdi/package.nix new file mode 100644 index 000000000000..d7e5d5e68973 --- /dev/null +++ b/pkgs/by-name/ac/acdi/package.nix @@ -0,0 +1,38 @@ +{ + lib, + fetchFromGitHub, + nix-update-script, + rustPlatform, + versionCheckHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "acdi"; + version = "0.5.2"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "vral-parmar"; + repo = "acdi"; + tag = "v${finalAttrs.version}"; + hash = "sha256-IYFsUi+MF6fjzSS+2Muoh08lD6tCMxz9wjubX7Inlbk="; + }; + + cargoHash = "sha256-J9raJea/7jjVdYn/8WvjkPDXzOs5jzPyyAWEsqr2BhM="; + + nativeInstallCheckInputs = [ versionCheckHook ]; + + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Automated Cryptography Discovery & Inventory Scanner"; + homepage = "https://github.com/vral-parmar/acdi"; + changelog = "https://github.com/vral-parmar/acdi/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "acdi"; + }; +}) diff --git a/pkgs/by-name/ar/arduino-ide/package.nix b/pkgs/by-name/ar/arduino-ide/package.nix index 111db6b4257f..b53c0782019a 100644 --- a/pkgs/by-name/ar/arduino-ide/package.nix +++ b/pkgs/by-name/ar/arduino-ide/package.nix @@ -2,6 +2,7 @@ appimageTools, fetchurl, lib, + python3, }: let @@ -24,7 +25,12 @@ appimageTools.wrapType2 { substituteInPlace $out/share/applications/arduino-ide.desktop --replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=arduino-ide %U' ''; - extraPkgs = pkgs: [ pkgs.libsecret ]; + extraPkgs = pkgs: [ + pkgs.libsecret + (python3.withPackages (ps: [ + ps.pyserial # for esptool + ])) + ]; meta = { description = "Open-source electronics prototyping platform"; diff --git a/pkgs/by-name/bi/bit-logo/package.nix b/pkgs/by-name/bi/bit-logo/package.nix index 81369089cf39..7ca0cb164386 100644 --- a/pkgs/by-name/bi/bit-logo/package.nix +++ b/pkgs/by-name/bi/bit-logo/package.nix @@ -7,13 +7,13 @@ buildGoModule (finalAttrs: { pname = "bit-logo"; - version = "0.3.0"; + version = "0.4.0"; src = fetchFromGitHub { owner = "paulilaaso"; repo = "bit"; tag = "v${finalAttrs.version}"; - hash = "sha256-iLwWKn8csoRkr5H8R2kpZVZCxsL0LDWHNvNoxyM6y98="; + hash = "sha256-CCRJFxVHe7FNGX5XC2SYWAzcMVNlHjUBt0El41Zo9Ww="; }; vendorHash = "sha256-Zxw0NyZfM42ytn+vDExLwRgNLWsdGVLC3iNVpQd8VMw="; diff --git a/pkgs/by-name/ca/cardwire/package.nix b/pkgs/by-name/ca/cardwire/package.nix new file mode 100644 index 000000000000..f344cc629a79 --- /dev/null +++ b/pkgs/by-name/ca/cardwire/package.nix @@ -0,0 +1,128 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + hwdata, + libdrm, + bpf-linker, + pkg-config, + nixosTests, + makeBinaryWrapper, + udev, + wayland, + libxkbcommon, + vulkan-loader, + libGL, + installShellFiles, + libxcb, + libglvnd, + versionCheckHook, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "cardwire"; + version = "0.12.0"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "opengamingcollective"; + repo = "cardwire"; + tag = "v${finalAttrs.version}"; + hash = "sha256-WuXFztiy6G2HYCu3KpKrjR8YCpcLePfGEZ+f71x1WnM="; + }; + cargoHash = "sha256-8eJSxL9RkHtbUxXuKPvyxhvSJD/0JeNaEM/oZf0n2Q4="; + + postPatch = '' + # Workaround to build cardwire-ebpf, when RUSTC_BOOTSTRAP is set to 1 + # aya-build appends build_std to the cargo args, removing this + # make the crate builds + # + substituteInPlace ../cardwire-*-vendor/*/aya-build-*/src/lib.rs \ + --replace-fail "if use_build_std" "if !use_build_std" + + substituteInPlace crates/cardwire-daemon/src/core/pci/pci_device.rs \ + --replace-fail "/usr/share/hwdata/pci.ids" "${hwdata}/share/hwdata/pci.ids" + + substituteInPlace crates/cardwire-daemon/src/core/gpu/device_info.rs \ + --replace-fail "/usr/share/libdrm/amdgpu.ids" "${libdrm}/share/libdrm/amdgpu.ids" + ''; + + env = { + RUSTFLAGS = "-C target-feature="; + RUSTC_BOOTSTRAP = 1; + }; + + nativeBuildInputs = [ + pkg-config + bpf-linker + makeBinaryWrapper + installShellFiles + ]; + + buildInputs = [ + libxcb + udev + ]; + + postInstall = '' + install -Dm444 ./assets/org.opengamingcollective.cardwire.conf \ + $out/share/dbus-1/system.d/org.opengamingcollective.cardwire.conf + + install -Dm444 ./assets/org.opengamingcollective.cardwire.metainfo.xml \ + $out/share/metainfo/org.opengamingcollective.cardwire.metainfo.xml + + install -Dm444 ./assets/cardwire-gui.desktop \ + $out/share/applications/cardwire-gui.desktop + + for icon in ./assets/icons/*.svg; do + install -Dm444 "$icon" "$out/share/icons/hicolor/scalable/apps/$(basename "$icon")" + done + + wrapProgram $out/bin/cardwired \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + vulkan-loader + libglvnd + ] + } + + wrapProgram $out/bin/cardwire-gui \ + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + wayland + libxkbcommon + vulkan-loader + libGL + ] + } + + '' + + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd cardwire \ + --fish <($out/bin/cardwire completion fish) \ + --bash <($out/bin/cardwire completion bash) \ + --zsh <($out/bin/cardwire completion zsh) + ''; + + doInstallCheck = true; + + nativeInstallCheckInputs = [ versionCheckHook ]; + + passthru.tests.cardwire = nixosTests.cardwire; + + meta = { + description = "GPU manager for laptop and workstation"; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; + homepage = "https://opengamingcollective.github.io/cardwire/"; + changelog = "https://github.com/OpenGamingCollective/cardwire/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ + luytan + ]; + mainProgram = "cardwire"; + }; +}) diff --git a/pkgs/by-name/cb/cbom/package.nix b/pkgs/by-name/cb/cbom/package.nix new file mode 100644 index 000000000000..9b6c0f09e5de --- /dev/null +++ b/pkgs/by-name/cb/cbom/package.nix @@ -0,0 +1,38 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + nix-update-script, + versionCheckHook, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "cbom"; + version = "0.1.1"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "qelens"; + repo = "cbom"; + tag = "v${finalAttrs.version}"; + hash = "sha256-xwMuipbwgzhaORPQ9U0eVi+68Ml7J/SH+naWcjV5n2w="; + }; + + cargoHash = "sha256-+vvABoPyaeH6+CPITeT7OtsLfVfdZQfjF8DU1yE1Hmw="; + + nativeInstallCheckInputs = [ versionCheckHook ]; + + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "CBOM Generator & PQC Readiness Scanner"; + homepage = "https://github.com/qelens/cbom"; + changelog = "https://github.com/qelens/cbom/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "cbom"; + }; +}) diff --git a/pkgs/by-name/cg/cgal/package.nix b/pkgs/by-name/cg/cgal/package.nix index f49fbddeae49..606d37b70376 100644 --- a/pkgs/by-name/cg/cgal/package.nix +++ b/pkgs/by-name/cg/cgal/package.nix @@ -54,7 +54,6 @@ stdenv.mkDerivation (finalAttrs: { platforms = lib.platforms.all; maintainers = with lib.maintainers; [ raskin - drew-dirac ylannl ]; }; diff --git a/pkgs/by-name/da/dashy-ui/package.nix b/pkgs/by-name/da/dashy-ui/package.nix index b18f82c0f514..bbc8d7667afa 100644 --- a/pkgs/by-name/da/dashy-ui/package.nix +++ b/pkgs/by-name/da/dashy-ui/package.nix @@ -17,16 +17,16 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "dashy-ui"; - version = "4.5.6"; + version = "4.5.10"; src = fetchFromGitHub { owner = "lissy93"; repo = "dashy"; tag = finalAttrs.version; - hash = "sha256-gj1U9w4GkY/CZ9tyXmONIQOUIYZAK0NhgKDek7zjRm4="; + hash = "sha256-oHTe2vilrtvApLQ7x8L+upTgkhz2TsXsbA8KcvsZg64="; }; yarnOfflineCache = fetchYarnDeps { yarnLock = finalAttrs.src + "/yarn.lock"; - hash = "sha256-UjcA3z3jnnDizjYIb1D76OWC7n9UcN0HhQnwfW7y8BU="; + hash = "sha256-43z3gn58eb7Dh9QXLDoeAJAViCQX+8IeSN4xx+hYfPI="; }; passthru = { diff --git a/pkgs/by-name/de/devilutionx/package.nix b/pkgs/by-name/de/devilutionx/package.nix index a65c8c68011d..7f37b1261e88 100644 --- a/pkgs/by-name/de/devilutionx/package.nix +++ b/pkgs/by-name/de/devilutionx/package.nix @@ -13,7 +13,7 @@ SDL_audiolib, simpleini, flac, - fmt, + fmt_11, libogg, libpng, libtiff, @@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ bzip2 flac - fmt + fmt_11 libogg libpng libtiff diff --git a/pkgs/by-name/di/diskwatch/package.nix b/pkgs/by-name/di/diskwatch/package.nix index 7dc74441391c..103066e2b5b2 100644 --- a/pkgs/by-name/di/diskwatch/package.nix +++ b/pkgs/by-name/di/diskwatch/package.nix @@ -3,6 +3,10 @@ rustPlatform, fetchFromGitHub, versionCheckHook, + + # full SMART attribute tables. Else, fallback to basic verified/failing flag from diskutil + withSmartmontools ? false, + smartmontools, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -22,16 +26,19 @@ rustPlatform.buildRustPackage (finalAttrs: { nativeCheckInputs = [ versionCheckHook ]; - doInstallCheck = true; + buildInputs = lib.optionals withSmartmontools [ smartmontools ]; - versionCheckProgramArg = [ "-V" ]; + doInstallCheck = true; meta = { description = "Single-host, read-only disk diagnostics TUI"; - homepage = "https://github.com/matthart1983/diskwatch"; + homepage = "https://www.netwatchlabs.com/labs/diskwatch"; changelog = "https://github.com/matthart1983/diskwatch/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ fab ]; + maintainers = with lib.maintainers; [ + fab + tomasrivera + ]; mainProgram = "diskwatch"; }; }) diff --git a/pkgs/by-name/fl/flare-signal/package.nix b/pkgs/by-name/fl/flare-signal/package.nix index d49c700fd800..75fdd3302ed7 100644 --- a/pkgs/by-name/fl/flare-signal/package.nix +++ b/pkgs/by-name/fl/flare-signal/package.nix @@ -24,18 +24,18 @@ stdenv.mkDerivation (finalAttrs: { pname = "flare"; - version = "0.22.0"; + version = "0.22.1"; src = fetchFromGitLab { owner = "schmiddi-on-mobile"; repo = "flare"; tag = finalAttrs.version; - hash = "sha256-amFFQIR5BFJLsNarhw4Ov2Jo+zFZJt+vtavNup75QgI="; + hash = "sha256-ddBNRCPS0ykgigUzhufDfwlv6+97zdCYwQxlm7zLt/E="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; - hash = "sha256-tssFy/dMh0UGBrBsLoibuMuDXOqIVQ9/FgOHz4IVU5o="; + hash = "sha256-Sb9n7QIEPkdj5I+LP5WZRCezr/y86Oe6VZh+hhyiafk="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/gi/git-wt/package.nix b/pkgs/by-name/gi/git-wt/package.nix index 380901785d6a..3fdb94260143 100644 --- a/pkgs/by-name/gi/git-wt/package.nix +++ b/pkgs/by-name/gi/git-wt/package.nix @@ -7,16 +7,16 @@ buildGoModule (finalAttrs: { pname = "git-wt"; - version = "0.29.0"; + version = "0.29.1"; src = fetchFromGitHub { owner = "k1LoW"; repo = "git-wt"; tag = "v${finalAttrs.version}"; - hash = "sha256-1u0GDC1Sc4Xy4URuM6TnR/ENsdIWa94Ixu3mL6WrmFg="; + hash = "sha256-8WePARXoLC9NV8Z5PSkM2A4UXFxAZOhT6QbSCY+jtaw="; }; - vendorHash = "sha256-ppbY3ZJo2L/FbWlOiywqk6W4kVDQKkwf5VjRHucb78A="; + vendorHash = "sha256-P8+KiaGZt8j4rRQ4OKP/pQOU8+g2H1snra5dS9Dd8tc="; nativeCheckInputs = [ git ]; diff --git a/pkgs/development/libraries/physics/hepmc3/default.nix b/pkgs/by-name/he/hepmc3/package.nix similarity index 72% rename from pkgs/development/libraries/physics/hepmc3/default.nix rename to pkgs/by-name/he/hepmc3/package.nix index ddced644e357..ef3ca3e59c1d 100644 --- a/pkgs/development/libraries/physics/hepmc3/default.nix +++ b/pkgs/by-name/he/hepmc3/package.nix @@ -4,35 +4,37 @@ fetchurl, cmake, coreutils, - python, root, + enablePython ? false, + python ? null, }: +assert enablePython -> python != null; + let pythonVersion = with lib.versions; "${major python.version}${minor python.version}"; - withPython = python != null; # ensure that root is built with the same python interpreter, as it links against numpy - root_py = if withPython then root.override { python3 = python; } else root; + root_py = if enablePython then root.override { python3 = python; } else root; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "hepmc3"; version = "3.3.1"; src = fetchurl { - url = "https://hepmc.web.cern.ch/hepmc/releases/HepMC3-${version}.tar.gz"; - sha256 = "sha256-CCQBYLDyjcMpOqTWHOZeLWfNWXrPb6ykOfLkZiX355M="; + url = "https://hepmc.web.cern.ch/hepmc/releases/HepMC3-${finalAttrs.version}.tar.gz"; + hash = "sha256-CCQBYLDyjcMpOqTWHOZeLWfNWXrPb6ykOfLkZiX355M="; }; nativeBuildInputs = [ cmake ] - ++ lib.optional withPython python.pkgs.pythonImportsCheckHook; + ++ lib.optional enablePython python.pkgs.pythonImportsCheckHook; buildInputs = [ root_py ] - ++ lib.optional withPython python; + ++ lib.optional enablePython python; # error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0' preConfigure = @@ -44,9 +46,9 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DHEPMC3_CXX_STANDARD=17" - "-DHEPMC3_ENABLE_PYTHON=${if withPython then "ON" else "OFF"}" + "-DHEPMC3_ENABLE_PYTHON=${if enablePython then "ON" else "OFF"}" ] - ++ lib.optionals withPython [ + ++ lib.optionals enablePython [ "-DHEPMC3_PYTHON_VERSIONS=${if python.isPy3k then "3.X" else "2.X"}" "-DHEPMC3_Python_SITEARCH${pythonVersion}=${placeholder "out"}/${python.sitePackages}" ]; @@ -67,4 +69,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ veprbl ]; }; -} +}) diff --git a/pkgs/by-name/hy/hyprutils/package.nix b/pkgs/by-name/hy/hyprutils/package.nix index 0ee825ffbf46..f131c53c6c14 100644 --- a/pkgs/by-name/hy/hyprutils/package.nix +++ b/pkgs/by-name/hy/hyprutils/package.nix @@ -10,13 +10,13 @@ gcc16Stdenv.mkDerivation (finalAttrs: { pname = "hyprutils"; - version = "0.14.0"; + version = "0.14.1"; src = fetchFromGitHub { owner = "hyprwm"; repo = "hyprutils"; tag = "v${finalAttrs.version}"; - hash = "sha256-XnAVV+H4f8Xdv0yZcSwJ5kCjLyE8fHxPeLX6a3HSrAU="; + hash = "sha256-WGAG9f7YnEjAu33WWxL6kkOyZGgcpiASwdNxpkwr2AQ="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/im/impression/package.nix b/pkgs/by-name/im/impression/package.nix index b5e4f8638f93..68f186a6da7d 100644 --- a/pkgs/by-name/im/impression/package.nix +++ b/pkgs/by-name/im/impression/package.nix @@ -17,25 +17,27 @@ glib, gtk4, libadwaita, + libcdio, openssl, pango, + wimlib, nix-update-script, }: stdenv.mkDerivation (finalAttrs: { pname = "impression"; - version = "3.7.0"; + version = "3.8.0"; src = fetchFromGitLab { owner = "adhami3310"; repo = "Impression"; tag = "v${finalAttrs.version}"; - hash = "sha256-EyVbK+E9X9q+O/2RItJDXjQNsLZ3cn2YmK9Ct98w8IQ="; + hash = "sha256-kUes+hNtoi6jvZFDon2pFUPsLq7wOJ2SDrPBGzg3AIo="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; - hash = "sha256-Mvpy5aDeu4qycSj+fp4DfRNLv6T2Ksqgjt5GFTkjS6U="; + hash = "sha256-PL+PJ5Diy9WvAuBJQQNp8bvjPK3Uvd0Um/B6lZHypXw="; }; nativeBuildInputs = [ @@ -57,8 +59,10 @@ stdenv.mkDerivation (finalAttrs: { glib gtk4 libadwaita + libcdio openssl pango + wimlib ]; passthru = { diff --git a/pkgs/by-name/ka/karakeep/package.nix b/pkgs/by-name/ka/karakeep/package.nix index 3cb1de13e404..a74ce6d94be0 100644 --- a/pkgs/by-name/ka/karakeep/package.nix +++ b/pkgs/by-name/ka/karakeep/package.nix @@ -18,13 +18,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "karakeep"; - version = "0.33.0"; + version = "0.33.1"; src = fetchFromGitHub { owner = "karakeep-app"; repo = "karakeep"; tag = "cli/v${finalAttrs.version}"; - hash = "sha256-WL4M2rpbIDUTUUCuw2T5tG4VCMGZaLsWq+BCAQBa2Sc="; + hash = "sha256-/rEVeNxLgqeoxJTyzArZAGzAbJjfOjHuG+zpOnf40Mk="; }; patches = [ @@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: { ; pnpm = pnpm_11; fetcherVersion = 4; - hash = "sha256-JhD1soZj8l6ZVtTOSZc1lMfWfi3R0PU/SsVHEvr50PI="; + hash = "sha256-0ExBj87CbzgTis9/Z0J2d82051SXlEOgwXO+jAWxCi4="; }; buildPhase = '' runHook preBuild diff --git a/pkgs/by-name/ki/kiro-cli/package.nix b/pkgs/by-name/ki/kiro-cli/package.nix index 233b48779c11..4c09874bac07 100644 --- a/pkgs/by-name/ki/kiro-cli/package.nix +++ b/pkgs/by-name/ki/kiro-cli/package.nix @@ -2,8 +2,9 @@ lib, stdenv, buildFHSEnv, - symlinkJoin, + makeWrapper, testers, + writeShellScript, kiro-cli-unwrapped, # On Wayland, kiro-cli shells out to wl-clipboard (wl-copy/wl-paste) for # clipboard access. Enabling this puts wl-clipboard on the runtime PATH so @@ -15,45 +16,52 @@ let inherit (kiro-cli-unwrapped) version meta; - # Each of kiro-cli's user-facing commands, run inside a minimal FHS sandbox. + # All of kiro-cli's user-facing commands run inside one minimal FHS sandbox. # The sandbox provides a standard /lib64/ld-linux-x86-64.so.2 plus libgcc_s/ # libstdc++ (via stdenv.cc.cc.lib), so the generic-glibc `bun` that # kiro-cli-chat extracts at runtime just works — no binary patching of the # extracted asset, and no build-time execution of the tool. - fhsFor = - executableName: - buildFHSEnv { - pname = executableName; - inherit version; - inherit executableName; - runScript = executableName; + # + # buildFHSEnv provides a single entry point per environment, so instead of + # building one environment per command (which would give kiro-cli, kiro-cli-chat + # and kiro-cli-term separate derivations, each with its own unfree license and + # each requiring its own entry in the unfree allowlist), we build a single + # environment whose entry point dispatches to whichever command is passed to + # it, and expose one thin wrapper per command via `extraInstallCommands`. + # This keeps the unfree allowlist to two entries (`kiro-cli` and + # `kiro-cli-unwrapped`) instead of four. The three binaries ship in the same + # upstream artifact and share the same runtime needs, so there is no + # per-command sandbox to lose. + fhsenv = buildFHSEnv { + pname = "kiro-cli"; + inherit version; - targetPkgs = - pkgs: - [ - kiro-cli-unwrapped - pkgs.stdenv.cc.cc.lib # libstdc++.so.6, libgcc_s.so.1 for the extracted bun - ] - ++ lib.optional waylandSupport pkgs.wl-clipboard; + runScript = writeShellScript "kiro-cli" '' + command="$1" + shift + exec "$command" "$@" + ''; + + targetPkgs = + pkgs: + [ + kiro-cli-unwrapped + pkgs.stdenv.cc.cc.lib # libstdc++.so.6, libgcc_s.so.1 for the extracted bun + ] + ++ lib.optional waylandSupport pkgs.wl-clipboard; + + nativeBuildInputs = [ makeWrapper ]; + + extraInstallCommands = '' + mkdir -p $out/libexec/kiro-cli + mv $out/bin/kiro-cli $out/libexec/kiro-cli/kiro-cli-wrapper + + for command in kiro-cli kiro-cli-chat kiro-cli-term; do + makeWrapper "$out/libexec/kiro-cli/kiro-cli-wrapper" "$out/bin/$command" \ + --add-flags "$command" + done + ''; - meta = meta // { - mainProgram = executableName; - }; - }; -in -# Darwin ships a normal .app bundle with no embedded-bun problem, so it needs -# no FHS sandbox; hand back the unwrapped derivation under the public name. -if stdenv.hostPlatform.isLinux then - symlinkJoin { - name = "kiro-cli-${version}"; - # Preserve the strictDeps = true that the unwrapped derivation exposes, so - # the top-level attribute keeps it too (nixpkgs-vet NPV-165). - strictDeps = true; - paths = map fhsFor [ - "kiro-cli" - "kiro-cli-chat" - "kiro-cli-term" - ]; passthru = { unwrapped = kiro-cli-unwrapped; tests.version = testers.testVersion { @@ -64,7 +72,15 @@ if stdenv.hostPlatform.isLinux then inherit version; }; }; - inherit meta; - } + + meta = meta // { + mainProgram = "kiro-cli"; + }; + }; +in +# Darwin ships a normal .app bundle with no embedded-bun problem, so it needs +# no FHS sandbox; hand back the unwrapped derivation under the public name. +if stdenv.hostPlatform.isLinux then + fhsenv else kiro-cli-unwrapped.overrideAttrs { pname = "kiro-cli"; } diff --git a/pkgs/by-name/li/libvgm/package.nix b/pkgs/by-name/li/libvgm/package.nix index 4097c05e8d16..63f32bc4b272 100644 --- a/pkgs/by-name/li/libvgm/package.nix +++ b/pkgs/by-name/li/libvgm/package.nix @@ -38,13 +38,13 @@ assert enableTools -> enableAudio && enableEmulation && enableLibplayer; stdenv.mkDerivation (finalAttrs: { pname = "libvgm"; - version = "0-unstable-2026-06-23"; + version = "0-unstable-2026-08-11"; src = fetchFromGitHub { owner = "ValleyBell"; repo = "libvgm"; - rev = "867223e7c33d63de115d1ab955f784c44f19040a"; - hash = "sha256-GuvngfkqLy3E5Esb+HOnY6G1XYDyDzv1yz+NccaclGI="; + rev = "61fc6725644886abc3168e240e4e51588d74bdf7"; + hash = "sha256-b/jd0ltSICRarZW/2RJYgNM/qyMaweOJFEZ2KHDCpnE="; }; outputs = [ diff --git a/pkgs/by-name/ma/materialx/package.nix b/pkgs/by-name/ma/materialx/package.nix new file mode 100644 index 000000000000..dbb9473444bc --- /dev/null +++ b/pkgs/by-name/ma/materialx/package.nix @@ -0,0 +1,89 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + libGL, + libx11, + libxt, + imath, + openimageio, + python3Packages, + pythonSupport ? false, + testers, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "materialx"; + version = "1.39.5"; + + src = fetchFromGitHub { + owner = "AcademySoftwareFoundation"; + repo = "MaterialX"; + rev = "v${finalAttrs.version}"; + hash = "sha256-7aY1SI5b5hVjvTtucQh6XpkwkhPZWDhsTVYLKM667/k="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ] + ++ lib.optional pythonSupport python3Packages.python + ++ lib.optional ( + pythonSupport && stdenv.buildPlatform == stdenv.hostPlatform + ) python3Packages.pythonImportsCheckHook; + + buildInputs = [ + imath + openimageio + libGL + ]; + + # create meta package providing dist-info for python3Packages.materialx + propagatedBuildInputs = + lib.optionals (!stdenv.hostPlatform.isDarwin) [ + libx11 + libxt + ] + ++ lib.optionals pythonSupport [ + (python3Packages.mkPythonMetaPackage { + inherit (finalAttrs) pname version meta; + }) + ]; + + cmakeFlags = [ + (lib.cmakeBool "MATERIALX_BUILD_OIIO" true) + (lib.cmakeBool "MATERIALX_BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + (lib.cmakeBool "MATERIALX_BUILD_PYTHON" pythonSupport) + (lib.cmakeBool "MATERIALX_BUILD_GEN_MSL" true) + ]; + + pythonImportsCheck = [ "MaterialX" ]; + + postInstall = lib.optionalString pythonSupport '' + # Make python lib properly accessible + target_dir=$out/${python3Packages.python.sitePackages} + mkdir -p $(dirname $target_dir) + # required for cmake to find the bindings, when included in other projects + ln -s $out/python $target_dir + ''; + + passthru = { + tests = { + cmake-config = testers.hasCmakeConfigModules { + moduleNames = [ "MaterialX" ]; + package = finalAttrs.finalPackage; + }; + }; + }; + + meta = { + changelog = "https://github.com/AcademySoftwareFoundation/MaterialX/blob/v${finalAttrs.version}/CHANGELOG.md"; + description = "Open standard for representing rich material and look-development content in computer graphics"; + homepage = "https://materialx.org"; + maintainers = with lib.maintainers; [ gador ]; + platforms = lib.platforms.unix; + license = lib.licenses.asl20; + }; +}) diff --git a/pkgs/by-name/mi/mistral-rs/package.nix b/pkgs/by-name/mi/mistral-rs/package.nix index b7799c0aa1a6..17dcc8d3cade 100644 --- a/pkgs/by-name/mi/mistral-rs/package.nix +++ b/pkgs/by-name/mi/mistral-rs/package.nix @@ -74,14 +74,14 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "mistral-rs"; - version = "0.9.0"; + version = "0.9.1"; __structuredAttrs = true; src = fetchFromGitHub { owner = "EricLBuehler"; repo = "mistral.rs"; tag = "v${finalAttrs.version}"; - hash = "sha256-3p/e7UZ8BLwT+dpb61NmzX2Z1QxxEgkgjlNzv5lWybM="; + hash = "sha256-5W/CBFw28xBC7GnbpQ9jxRAdxXBtTdsD3X/YNR6z6iI="; }; patches = [ @@ -130,7 +130,7 @@ rustPlatform.buildRustPackage (finalAttrs: { "" ''; - cargoHash = "sha256-TULJ3mEAWp1ktPDPeBbUJGHhsEuo5T2qh3/JpS+8+ds="; + cargoHash = "sha256-VivnZNtIjnu1JOKaE7nEIse8300oB9oqGP0aly+9/OQ="; nativeBuildInputs = [ pkg-config @@ -242,6 +242,8 @@ rustPlatform.buildRustPackage (finalAttrs: { # mistralrs: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory doInstallCheck = !cudaSupport; + __darwinAllowLocalNetworking = true; + passthru = { tests = { withMkl = lib.optionalAttrs (hostPlatform.isLinux && hostPlatform.isx86_64) ( diff --git a/pkgs/by-name/ne/netwatch/package.nix b/pkgs/by-name/ne/netwatch/package.nix index 97ac7cddcca2..f53b4eb4667b 100644 --- a/pkgs/by-name/ne/netwatch/package.nix +++ b/pkgs/by-name/ne/netwatch/package.nix @@ -35,8 +35,8 @@ rustPlatform.buildRustPackage (finalAttrs: { meta = { description = "Real-time network diagnostics in your terminal."; - homepage = "https://github.com/matthart1983/netwatch"; - changelog = "https://github.com/matthart1983/netwatch/releases/tag/${finalAttrs.src.tag}"; + homepage = "https://www.netwatchlabs.com/labs/netwatch"; + changelog = "https://github.com/matthart1983/netwatch/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; mainProgram = "netwatch"; maintainers = with lib.maintainers; [ tomasrivera ]; diff --git a/pkgs/by-name/nx/nxv/package.nix b/pkgs/by-name/nx/nxv/package.nix index 038d39ddae5c..fd7f45b1078e 100644 --- a/pkgs/by-name/nx/nxv/package.nix +++ b/pkgs/by-name/nx/nxv/package.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "nxv"; - version = "0.7.1"; + version = "0.7.3"; src = fetchFromGitHub { owner = "utensils"; repo = "nxv"; tag = "v${finalAttrs.version}"; - hash = "sha256-CkwOJaOumxBx5kGOfkEHDmEBxrTzGXVNKJdZld3uxdA="; + hash = "sha256-PJs+qvzLKBa3b5a4ZWGU02BVAqyoZj3+mhphBTSmpS0="; }; - cargoHash = "sha256-itYpea4CBSGVdzFiRtA1Yib3U2mFyMmo/P9jicrJCrc="; + cargoHash = "sha256-2nZpwkaVedkH3dHkaB/QSTthylwMw6S08JhgiZaBX7M="; # Tests use mockito which needs to bind to localhost __darwinAllowLocalNetworking = true; diff --git a/pkgs/by-name/pa/payload-dumper-go/package.nix b/pkgs/by-name/pa/payload-dumper-go/package.nix index b99f80f22e3c..20209a45e223 100644 --- a/pkgs/by-name/pa/payload-dumper-go/package.nix +++ b/pkgs/by-name/pa/payload-dumper-go/package.nix @@ -7,16 +7,16 @@ buildGoModule (finalAttrs: { pname = "payload-dumper-go"; - version = "1.3.0"; + version = "2.0.0"; src = fetchFromGitHub { owner = "ssut"; repo = "payload-dumper-go"; tag = finalAttrs.version; - hash = "sha256-TFnBWylOoyleuBx3yYfHl1kWO6jVBiqsi8AMYLMuuk0="; + hash = "sha256-A9WVPn/MeLTt1ySmN8Xge/Ye8BDhtETJstxB6mI5FFU="; }; - vendorHash = "sha256-XeD47PsFjDT9777SNE8f2LbKZ1cnL5HNPr3Eg7UIpJ0="; + vendorHash = "sha256-hjVgIVOwci1IXaV+0AHgB36pMSgQsYi3A+9NIMsSz54="; buildInputs = [ xz ]; diff --git a/pkgs/by-name/pi/pico-sdk/package.nix b/pkgs/by-name/pi/pico-sdk/package.nix index 7f6b66a1460b..cfefabda222f 100644 --- a/pkgs/by-name/pi/pico-sdk/package.nix +++ b/pkgs/by-name/pi/pico-sdk/package.nix @@ -66,7 +66,10 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/raspberrypi/pico-sdk"; changelog = "https://github.com/raspberrypi/pico-sdk/releases/tag/${finalAttrs.version}"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ muscaln ]; + maintainers = with lib.maintainers; [ + muscaln + nulleric + ]; platforms = lib.platforms.unix; }; }) diff --git a/pkgs/by-name/pi/picotool/package.nix b/pkgs/by-name/pi/picotool/package.nix index 589aa49b0c86..3fb26d4a3f04 100644 --- a/pkgs/by-name/pi/picotool/package.nix +++ b/pkgs/by-name/pi/picotool/package.nix @@ -62,7 +62,10 @@ stdenv.mkDerivation (finalAttrs: { changelog = "https://github.com/raspberrypi/picotool/releases/tag/${finalAttrs.version}"; mainProgram = "picotool"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ muscaln ]; + maintainers = with lib.maintainers; [ + muscaln + nulleric + ]; platforms = lib.platforms.unix; }; }) diff --git a/pkgs/by-name/pi/pioasm/package.nix b/pkgs/by-name/pi/pioasm/package.nix index 33145e8e08ae..67cce5b2cf21 100644 --- a/pkgs/by-name/pi/pioasm/package.nix +++ b/pkgs/by-name/pi/pioasm/package.nix @@ -36,7 +36,10 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/raspberrypi/pico-sdk"; changelog = "https://github.com/raspberrypi/pico-sdk/releases/tag/${finalAttrs.version}"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ emilytrau ]; + maintainers = with lib.maintainers; [ + emilytrau + nulleric + ]; platforms = lib.platforms.unix; mainProgram = "pioasm"; }; diff --git a/pkgs/by-name/pr/prismlauncher/package.nix b/pkgs/by-name/pr/prismlauncher/package.nix index ec5a189be201..bc8ac03846f4 100644 --- a/pkgs/by-name/pr/prismlauncher/package.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -11,14 +11,15 @@ kdePackages, lib, libGL, + libdecor, + libjack2, + libpulseaudio, + libusb1, libx11, libxcursor, libxext, libxrandr, libxxf86vm, - libjack2, - libpulseaudio, - libusb1, openal, pciutils, pipewire, @@ -105,6 +106,7 @@ symlinkJoin { libxrandr libxxf86vm wayland + libdecor udev # oshi diff --git a/pkgs/by-name/pr/proto/package.nix b/pkgs/by-name/pr/proto/package.nix index 1733f1dd194a..27b6485d37ba 100644 --- a/pkgs/by-name/pr/proto/package.nix +++ b/pkgs/by-name/pr/proto/package.nix @@ -11,16 +11,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "proto"; - version = "0.60.0"; + version = "0.60.2"; src = fetchFromGitHub { owner = "moonrepo"; repo = "proto"; rev = "v${finalAttrs.version}"; - hash = "sha256-Fzrio8LwfZW//k10aqj/gwVDcrmui/GlQS/BmZASG1A="; + hash = "sha256-Lp5H5dpjb1M31uIRv1EaicXnWEIDAYsiQj36ANaQsm0="; }; - cargoHash = "sha256-QoX2ubtcjhTM7Q5pTPdI2QH1ZC9rssG3KHdocdQ26Lk="; + cargoHash = "sha256-kxAtZXhKbU6Apgn1S2byjK19Ig2RdBv+dOpb33YoC3A="; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv diff --git a/pkgs/by-name/pr/protolint/package.nix b/pkgs/by-name/pr/protolint/package.nix index 7a027ce9847f..fcb8d3cc7c19 100644 --- a/pkgs/by-name/pr/protolint/package.nix +++ b/pkgs/by-name/pr/protolint/package.nix @@ -5,16 +5,16 @@ }: buildGoModule rec { pname = "protolint"; - version = "0.56.4"; + version = "0.57.0"; src = fetchFromGitHub { owner = "yoheimuta"; repo = "protolint"; rev = "v${version}"; - hash = "sha256-2R+TW8z3XgjavK19PGy9hMpN8WOSeWbb/vcSWbbBmJc="; + hash = "sha256-n3/O1ZgEDrPfPaytT88dfZeECd65rIPs7SBb9uwJXEU="; }; - vendorHash = "sha256-RS0t7n6pLYVKHluQtXsMjYL1SvN7IZFdKmkxOI8wFoE="; + vendorHash = "sha256-XuURqNSOJXb3kg8tyohixS12I2M+UWbYhhyhHOJvNo4="; # Something about the way we run tests causes issues. It doesn't happen # when using "go test" directly: diff --git a/pkgs/by-name/py/pyldapsearch/package.nix b/pkgs/by-name/py/pyldapsearch/package.nix new file mode 100644 index 000000000000..f25615801c1b --- /dev/null +++ b/pkgs/by-name/py/pyldapsearch/package.nix @@ -0,0 +1 @@ +{ python3Packages }: with python3Packages; toPythonApplication pyldapsearch diff --git a/pkgs/development/libraries/physics/pythia/default.nix b/pkgs/by-name/py/pythia/package.nix similarity index 83% rename from pkgs/development/libraries/physics/pythia/default.nix rename to pkgs/by-name/py/pythia/package.nix index 88460017f792..cbb0fa60c5dc 100644 --- a/pkgs/development/libraries/physics/pythia/default.nix +++ b/pkgs/by-name/py/pythia/package.nix @@ -5,21 +5,25 @@ boost, fastjet, fixDarwinDylibNames, - hepmc, + hepmc2, lhapdf, rsync, zlib, }: -stdenv.mkDerivation rec { +let + hepmc = hepmc2; +in + +stdenv.mkDerivation (finalAttrs: { pname = "pythia"; version = "8.317"; src = fetchurl { url = "https://pythia.org/download/pythia83/pythia${ - builtins.replaceStrings [ "." ] [ "" ] version + builtins.replaceStrings [ "." ] [ "" ] finalAttrs.version }.tgz"; - sha256 = "sha256-GuVR0U2sSV3f5rNEeSA16+QQ/mxgBNRKM14Ozg50Wt8="; + hash = "sha256-GuVR0U2sSV3f5rNEeSA16+QQ/mxgBNRKM14Ozg50Wt8="; }; nativeBuildInputs = [ rsync ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; @@ -56,4 +60,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ veprbl ]; }; -} +}) diff --git a/pkgs/by-name/ra/rawtherapee/package.nix b/pkgs/by-name/ra/rawtherapee/package.nix index 6c0ab412d0cd..572c6829e525 100644 --- a/pkgs/by-name/ra/rawtherapee/package.nix +++ b/pkgs/by-name/ra/rawtherapee/package.nix @@ -33,27 +33,21 @@ exiv2, libraw, libjxl, + fmt, }: stdenv.mkDerivation (finalAttrs: { pname = "rawtherapee"; - version = "5.12"; + version = "5.13"; src = fetchurl { # The developers ask not to use the tarball from GitHub releases, see # https://www.rawtherapee.com/downloads/5.12/#news-relevant-to-package-maintainers - url = "https://rawtherapee.com/shared/source/rawtherapee-${finalAttrs.version}.tar.xz"; - hash = "sha256-2abBBTfWSihbxGVnX+WaqpTOMiOCPfvs8K4slZkILVc="; + url = "https://github.com/RawTherapee/RawTherapee/releases/download/${finalAttrs.version}/rawtherapee-${finalAttrs.version}.tar.xz"; + hash = "sha256-I73/SxgX4SdMEalLEdIcrFnpwbHSCXldMZRxDuc+d78="; }; postPatch = '' - # https://github.com/NixOS/nixpkgs/issues/475835 - # https://github.com/RawTherapee/RawTherapee/issues/7443#issuecomment-3014132156 - # remove for 5.13 - substituteInPlace rtengine/procparams.cc --replace \ - 'outputProfile(options.rtSettings.srgb),' \ - 'outputProfile("RTv4_sRGB"),' - cat < ReleaseInfo.cmake set(GIT_DESCRIBE ${finalAttrs.version}) set(GIT_BRANCH ${finalAttrs.version}) @@ -102,6 +96,7 @@ stdenv.mkDerivation (finalAttrs: { exiv2 libraw libjxl + fmt ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcanberra-gtk3 @@ -114,6 +109,7 @@ stdenv.mkDerivation (finalAttrs: { "-DPROC_TARGET_NUMBER=2" "-DCACHE_NAME_SUFFIX=\"\"" "-DWITH_SYSTEM_LIBRAW=\"ON\"" + "-DWITH_SYSTEM_FMT=\"ON\"" "-DWITH_JXL=\"ON\"" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ @@ -145,6 +141,9 @@ stdenv.mkDerivation (finalAttrs: { description = "RAW converter and digital photo processing software"; homepage = "http://www.rawtherapee.com/"; license = lib.licenses.gpl3Plus; + sourceProvenance = with lib.sourceTypes; [ + fromSource + ]; maintainers = with lib.maintainers; [ jcumming mahe diff --git a/pkgs/by-name/re/resticprofile/package.nix b/pkgs/by-name/re/resticprofile/package.nix index c8bab6c9c211..af5c5fe080cc 100644 --- a/pkgs/by-name/re/resticprofile/package.nix +++ b/pkgs/by-name/re/resticprofile/package.nix @@ -11,19 +11,16 @@ buildGoModule (finalAttrs: { pname = "resticprofile"; - version = "0.31.0"; + version = "0.33.1"; src = fetchFromGitHub { owner = "creativeprojects"; repo = "resticprofile"; tag = "v${finalAttrs.version}"; - hash = "sha256-ezelvyroQG1EW3SU63OVHJ/T4qjN5DRllvPIXnei1Z4="; + hash = "sha256-L6L1JfBa/nsrwtvIw2U++jIDLJTxxweqcXQ3SomtS1A="; }; postPatch = '' - substituteInPlace schedule_jobs.go \ - --replace-fail "os.Executable()" "\"$out/bin/resticprofile\", nil" - substituteInPlace shell/command.go \ --replace-fail '"bash"' '"${lib.getExe bash}"' @@ -32,7 +29,7 @@ buildGoModule (finalAttrs: { ''; - vendorHash = "sha256-M9S6F/Csz7HnOq8PSWjpENKm1704kVx9zDts1ieraTE="; + vendorHash = "sha256-dYzx27HtIME/mrtQrRg7064Ii20715FVYj5uw4Aian0="; ldflags = [ "-X main.version=${finalAttrs.version}" @@ -57,6 +54,15 @@ buildGoModule (finalAttrs: { rm util/tempdir_test.go # expects normal environment ''; + checkFlags = + let + skippedTests = [ + # mount: fusermount: exec: "fusermount": executable file not found in $PATH + "TestMemFS" + ]; + in + [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; + installPhase = '' runHook preInstall @@ -85,7 +91,10 @@ buildGoModule (finalAttrs: { lgpl3 # bash shell completion ]; mainProgram = "resticprofile"; - maintainers = with lib.maintainers; [ tomasajt ]; - platforms = lib.platforms.linux ++ lib.platforms.darwin; + maintainers = with lib.maintainers; [ + tomasajt + bbigras + ]; + platforms = lib.platforms.unix; }; }) diff --git a/pkgs/by-name/ri/rimsort/package.nix b/pkgs/by-name/ri/rimsort/package.nix index 3c2a7d6b4b51..392520ea3a19 100644 --- a/pkgs/by-name/ri/rimsort/package.nix +++ b/pkgs/by-name/ri/rimsort/package.nix @@ -184,12 +184,7 @@ stdenv.mkDerivation (finalAttrs: { license = with lib.licenses; [ gpl3Only # For libsteam_api.so - ( - unfreeRedistributable - // { - url = "https://partner.steamgames.com/documentation/sdk_access_agreement"; - } - ) + valveSDK ]; maintainers = with lib.maintainers; [ weirdrock ]; mainProgram = "rimsort"; diff --git a/pkgs/by-name/sa/samira/package.nix b/pkgs/by-name/sa/samira/package.nix index 0585ede64ad3..5b5a0b5cc5f7 100644 --- a/pkgs/by-name/sa/samira/package.nix +++ b/pkgs/by-name/sa/samira/package.nix @@ -68,17 +68,7 @@ rustPlatform.buildRustPackage (finalAttrs: { changelog = "https://github.com/jsnli/Samira/releases/tag/v${finalAttrs.version}"; license = [ lib.licenses.gpl3 - ( - # while the license itself is unfree, it allows redistributing files - # inside "redistributable_bin/" directory, that `libsteam_api.so` - # conveniently is inside that folder - lib.licenses.unfreeRedistributableFirmware - // { - fullName = "Valve Corporation Steamworks SDK Access Agreement"; - shortName = "valveSDKLicense"; - url = "https://partner.steamgames.com/documentation/sdk_access_agreement"; - } - ) + lib.licenses.valveSDK ]; # the libsteam_api.so supports only x86_64-linux platforms = [ "x86_64-linux" ]; diff --git a/pkgs/by-name/sd/SDL_audiolib/package.nix b/pkgs/by-name/sd/SDL_audiolib/package.nix index 22f782e32fc9..3d570de6fd3c 100644 --- a/pkgs/by-name/sd/SDL_audiolib/package.nix +++ b/pkgs/by-name/sd/SDL_audiolib/package.nix @@ -5,8 +5,9 @@ fetchFromGitHub, pkg-config, stdenv, + libogg, flac, - fmt, + fmt_11, }: stdenv.mkDerivation (finalAttrs: { @@ -29,8 +30,9 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ SDL2 + libogg # required by flac flac - fmt + fmt_11 ]; strictDeps = true; diff --git a/pkgs/by-name/se/sea-orm-cli/package.nix b/pkgs/by-name/se/sea-orm-cli/package.nix index 3e553321b5f2..df78401f1a2e 100644 --- a/pkgs/by-name/se/sea-orm-cli/package.nix +++ b/pkgs/by-name/se/sea-orm-cli/package.nix @@ -9,14 +9,14 @@ }: rustPlatform.buildRustPackage (finalAttrs: { pname = "sea-orm-cli"; - version = "2.0.1"; + version = "2.0.2"; src = fetchCrate { inherit (finalAttrs) pname version; - hash = "sha256-TpHNjY8r9a8d6senzeQLJl/n0hytytx+NV+atjyti1k="; + hash = "sha256-tkyZSsTE1a08AIif5NNkBazASs+pvBgP69CnZhEZkhw="; }; - cargoHash = "sha256-eE777DE1g87NobNPHdMhqCFc8RZtQyL/QM29iFJV8p4="; + cargoHash = "sha256-4+rFHOBRyUGF6DXxT4Y54Y2s4F9MGcNF/ELWj/4fPWo="; strictDeps = true; __structuredAttrs = true; diff --git a/pkgs/by-name/sk/sketchybar-app-font/package.nix b/pkgs/by-name/sk/sketchybar-app-font/package.nix index bb090200ced3..7ec81bff584b 100644 --- a/pkgs/by-name/sk/sketchybar-app-font/package.nix +++ b/pkgs/by-name/sk/sketchybar-app-font/package.nix @@ -10,13 +10,13 @@ }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "sketchybar-app-font"; - version = "2.0.71"; + version = "2.0.75"; src = fetchFromGitHub { owner = "kvndrsslr"; repo = "sketchybar-app-font"; tag = "v${finalAttrs.version}"; - hash = "sha256-Xyj2yPU7Sd6WTWHrVAmx2JGGvUihM5jq79yXbLUz9Qk="; + hash = "sha256-o6Nq1vQWv2YMd0S2jUPtxPK3KrKyS1bF3RBNEM5ZHBg="; }; pnpmDeps = fetchPnpmDeps { diff --git a/pkgs/by-name/sp/speakeasy-cli/package.nix b/pkgs/by-name/sp/speakeasy-cli/package.nix index 7d5e3202833b..9991060f943d 100644 --- a/pkgs/by-name/sp/speakeasy-cli/package.nix +++ b/pkgs/by-name/sp/speakeasy-cli/package.nix @@ -11,7 +11,7 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "speakeasy-cli"; - version = "1.791.3"; + version = "1.793.1"; sourceRoot = "."; src = @@ -33,15 +33,15 @@ stdenv.mkDerivation (finalAttrs: { sources = { "x86_64-linux" = fetchurl { url = "https://github.com/speakeasy-api/speakeasy/releases/download/v${finalAttrs.version}/speakeasy_linux_amd64.zip"; - hash = "sha256-NMkvraMA2vz1PQkvTL8OBwi9KiyapCt432sS4KFkMA4="; + hash = "sha256-2gsFSOKf+r2vRk6m6Rv6Ox2Bp8U1MDdWihAQe05Y5Ss="; }; "aarch64-darwin" = fetchurl { url = "https://github.com/speakeasy-api/speakeasy/releases/download/v${finalAttrs.version}/speakeasy_darwin_arm64.zip"; - hash = "sha256-KJ24NQRnidoCFZaswL1u3ep0UUCK5P8G60IDQJ1nmUI="; + hash = "sha256-laJqK432x4N3CkrVNVELOxroDxypLLBy1aOj2ja2LcI="; }; "aarch64-linux" = fetchurl { url = "https://github.com/speakeasy-api/speakeasy/releases/download/v${finalAttrs.version}/speakeasy_linux_arm64.zip"; - hash = "sha256-JU7u4+vFzxiQRico3ulDCZlpF14I3JEbrd1csNkuY9M="; + hash = "sha256-XosrVGX38WhF+KbBKMU/Q6CYPsqx1mt/abTE16/P1Zo="; }; }; updateScript = writeShellScript "update-speakeasy" '' diff --git a/pkgs/by-name/sy/syswatch/package.nix b/pkgs/by-name/sy/syswatch/package.nix index a7ea8ee56d6b..8017640d5f7c 100644 --- a/pkgs/by-name/sy/syswatch/package.nix +++ b/pkgs/by-name/sy/syswatch/package.nix @@ -24,14 +24,15 @@ rustPlatform.buildRustPackage (finalAttrs: { doInstallCheck = true; - versionCheckProgramArg = [ "-V" ]; - meta = { description = "Single-host system diagnostics TUI tool"; - homepage = "https://github.com/matthart1983/syswatch"; + homepage = "https://www.netwatchlabs.com/labs/syswatch"; changelog = "https://github.com/matthart1983/syswatch/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ fab ]; + maintainers = with lib.maintainers; [ + fab + tomasrivera + ]; mainProgram = "syswatch"; }; }) diff --git a/pkgs/by-name/ta/ta-lib/package.nix b/pkgs/by-name/ta/ta-lib/package.nix index 0a03243552c0..7250f9dcf79f 100644 --- a/pkgs/by-name/ta/ta-lib/package.nix +++ b/pkgs/by-name/ta/ta-lib/package.nix @@ -8,17 +8,24 @@ stdenv.mkDerivation (finalAttrs: { pname = "ta-lib"; version = "0.7.1"; + + __structuredAttrs = true; + strictDeps = true; + src = fetchFromGitHub { owner = "TA-Lib"; repo = "ta-lib"; tag = "v${finalAttrs.version}"; hash = "sha256-tme5YuTWdf4lCsWXF97kSeka7Vmqte0vTjwtaUNN+kA="; }; + nativeBuildInputs = [ autoreconfHook ]; + meta = { description = "Add technical analysis to your own financial market trading applications"; mainProgram = "ta-lib-config"; homepage = "https://ta-lib.org/"; + changelog = "https://github.com/TA-Lib/ta-lib-python/blob/${finalAttrs.src.rev}/CHANGELOG"; license = lib.licenses.bsd3; platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ rafael ]; diff --git a/pkgs/by-name/te/teams-for-linux/package.nix b/pkgs/by-name/te/teams-for-linux/package.nix index 4a83647f5f47..3d5a5e8befce 100644 --- a/pkgs/by-name/te/teams-for-linux/package.nix +++ b/pkgs/by-name/te/teams-for-linux/package.nix @@ -19,16 +19,16 @@ let in buildNpmPackage rec { pname = "teams-for-linux"; - version = "2.14.1"; + version = "2.15.0"; src = fetchFromGitHub { owner = "IsmaelMartinez"; repo = "teams-for-linux"; tag = "v${version}"; - hash = "sha256-0urL/M7XBBPB+RiLglUx0CQUii+Fji1dXurha/2URug="; + hash = "sha256-PYRl0Q7vsx7nKz7pkoCg3f3rRIcgCAvGiALQxHEOIjE="; }; - npmDepsHash = "sha256-F8FxTkVDfCLp0ukNm9/ixWtglYRiJt9+va6qJdB06qI="; + npmDepsHash = "sha256-FPnkCO1zf5Ts2arOa0InC7l4esRs4AuXYlVF/OYR6AI="; nativeBuildInputs = [ makeWrapper diff --git a/pkgs/by-name/us/userborn-import-legacy/Cargo.lock b/pkgs/by-name/us/userborn-import-legacy/Cargo.lock new file mode 100644 index 000000000000..46d2d9dd087e --- /dev/null +++ b/pkgs/by-name/us/userborn-import-legacy/Cargo.lock @@ -0,0 +1,112 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "syn" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a207d6d6a2b7fc470b80443726053f18a2481b7e1eee970597051596567987a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "userborn-import-legacy" +version = "0.1.0" +dependencies = [ + "anyhow", + "serde_json", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/pkgs/by-name/us/userborn-import-legacy/Cargo.toml b/pkgs/by-name/us/userborn-import-legacy/Cargo.toml new file mode 100644 index 000000000000..ed593a5f3f0b --- /dev/null +++ b/pkgs/by-name/us/userborn-import-legacy/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "userborn-import-legacy" +description = "One-shot migration from update-users-groups.pl state to userborn" +version = "0.1.0" +edition = "2024" +license = "MIT" + +[dependencies] +anyhow = "1" +serde_json = "1" + +[profile.release] +lto = true +strip = true diff --git a/pkgs/by-name/us/userborn-import-legacy/package.nix b/pkgs/by-name/us/userborn-import-legacy/package.nix new file mode 100644 index 000000000000..659b6d8a41f4 --- /dev/null +++ b/pkgs/by-name/us/userborn-import-legacy/package.nix @@ -0,0 +1,38 @@ +{ + lib, + rustPlatform, + nixosTests, +}: + +rustPlatform.buildRustPackage { + __structuredAttrs = true; + strictDeps = true; + + pname = "userborn-import-legacy"; + version = (lib.importTOML ./Cargo.toml).package.version; + + src = builtins.filterSource (name: _: !(lib.hasSuffix ".nix" name)) ./.; + + cargoLock.lockFile = ./Cargo.lock; + + passthru.tests = { inherit (nixosTests) userborn-migration; }; + + meta = { + description = "One-shot migration from update-users-groups.pl state to userborn"; + longDescription = '' + Runs once before userborn on systems migrating from + update-users-groups.pl. Adds locked stub entries to + /etc/{passwd,group,shadow} for every name in + /var/lib/nixos/{uid,gid}-map without a live entry so freed ids are + not reassigned, and creates previous-userborn.json based on + declarative-{users,groups}. + + Temporary. Will be removed once the perl implementation has been + gone for two NixOS releases. + ''; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ rvdp ]; + platforms = lib.platforms.linux; + mainProgram = "userborn-import-legacy"; + }; +} diff --git a/pkgs/by-name/us/userborn-import-legacy/src/main.rs b/pkgs/by-name/us/userborn-import-legacy/src/main.rs new file mode 100644 index 000000000000..a32af3103395 --- /dev/null +++ b/pkgs/by-name/us/userborn-import-legacy/src/main.rs @@ -0,0 +1,397 @@ +//! One-shot migration from `update-users-groups.pl` state in `/var/lib/nixos` +//! to the on-disk databases userborn treats as authoritative. +//! +//! userborn never deletes passwd/group entries, so /etc/passwd is its +//! uid-map. We make it a superset of /var/lib/nixos/uid-map by adding a +//! locked stub for every recorded name without a live entry, so the id is +//! neither reassigned nor lost if the name is later re-added. +//! +//! Runs once: the unit is skipped when `/var/lib/userborn` already exists, +//! which userborn creates on its first run. Will be removed once the perl +//! implementation is gone. + +use std::collections::{BTreeMap, HashMap, HashSet}; +use std::fs::{self, File, OpenOptions}; +use std::io::{self, Write}; +use std::os::unix::fs::{DirBuilderExt, OpenOptionsExt, PermissionsExt}; +use std::path::{Path, PathBuf}; +use std::process::ExitCode; + +use anyhow::{Context, Result, bail}; + +const LEGACY: &str = "/var/lib/nixos"; +const USERBORN_STATE: &str = "/var/lib/userborn"; +const PREVIOUS_NAME: &str = "previous-userborn.json"; + +fn main() -> ExitCode { + match run() { + Ok(()) => ExitCode::SUCCESS, + Err(e) => { + // printk prefix for journald level. + eprintln!("<3>userborn-import-legacy: {e:#}"); + ExitCode::FAILURE + } + } +} + +#[derive(Debug)] +struct Args { + directory: PathBuf, + /// Primary group for stub passwd entries when the legacy gid-map has no + /// record for the user's name. Passed in from `config.ids.gids.nogroup`; + /// the stub is locked and has no shell, so any valid gid would do. + nogroup_gid: u32, +} + +impl Args { + const USAGE: &str = "usage: userborn-import-legacy [--nogroup-gid GID] [DIRECTORY]"; + + fn parse() -> Result { + let mut directory: Option = None; + let mut nogroup_gid = 65534u32; + let mut iter = std::env::args().skip(1); + while let Some(arg) = iter.next() { + match arg.as_str() { + "--nogroup-gid" => { + nogroup_gid = iter + .next() + .context("--nogroup-gid requires a value")? + .parse() + .context("--nogroup-gid must be an integer")?; + } + "--help" | "-h" => { + println!("{}", Self::USAGE); + std::process::exit(0); + } + opt if opt.starts_with('-') => { + bail!("unknown option {opt:?}\n{}", Self::USAGE); + } + _ if directory.is_some() => { + bail!("unexpected extra argument {arg:?}\n{}", Self::USAGE); + } + _ => directory = Some(PathBuf::from(arg)), + } + } + Ok(Self { + directory: directory.unwrap_or_else(|| PathBuf::from("/etc")), + nogroup_gid, + }) + } +} + +fn run() -> Result<()> { + let args = Args::parse()?; + + create_dir_recursive(&args.directory, 0o755)?; + + import_ids(&args)?; + + // Creating userborn's state directory marks the import as done. Only + // create it after a successful import so failed runs are retried on + // the next boot. + create_dir_recursive(Path::new(USERBORN_STATE), 0o755)?; + synthesise_previous_config()?; + Ok(()) +} + +fn info(msg: &str) { + eprintln!("<6>userborn-import-legacy: {msg}"); +} + +fn warn(msg: &str) { + eprintln!("<4>userborn-import-legacy: {msg}"); +} + +/// Load `/var/lib/nixos/{uid,gid}-map`: `{"name": id, ...}`. +fn load_id_map(path: &Path) -> Result> { + match fs::read(path) { + Ok(bytes) => { + serde_json::from_slice(&bytes).with_context(|| format!("parsing {}", path.display())) + } + Err(e) if e.kind() == io::ErrorKind::NotFound => Ok(BTreeMap::new()), + Err(e) => Err(e).with_context(|| format!("reading {}", path.display())), + } +} + +/// Return `(names, id->name)` from a passwd/group style file. +fn load_colon_db(path: &Path) -> Result<(HashSet, HashMap)> { + let mut names = HashSet::new(); + let mut by_id = HashMap::new(); + let text = match fs::read_to_string(path) { + Ok(t) => t, + Err(e) if e.kind() == io::ErrorKind::NotFound => return Ok((names, by_id)), + Err(e) => return Err(e).with_context(|| format!("reading {}", path.display())), + }; + for line in text.lines() { + let mut fields = line.splitn(4, ':'); + let Some(name) = fields.next().filter(|n| !n.is_empty()) else { + // Tolerate blank lines, warn on anything else. + if !line.is_empty() { + warn(&format!( + "{}: ignoring line without a name: {line:?}", + path.display() + )); + } + continue; + }; + let _passwd = fields.next(); + let Some(id) = fields.next().and_then(|s| s.parse::().ok()) else { + warn(&format!( + "{}: ignoring entry {name:?} without a numeric id", + path.display() + )); + continue; + }; + names.insert(name.to_owned()); + by_id.insert(id, name.to_owned()); + } + Ok((names, by_id)) +} + +/// Create `path` and any missing parents with the given mode. +/// +/// Doesn't touch the permissions of directories that already exist. +fn create_dir_recursive(path: &Path, mode: u32) -> Result<()> { + fs::DirBuilder::new() + .recursive(true) + .mode(mode) + .create(path) + .with_context(|| format!("creating {}", path.display())) +} + +/// Atomically replace `path` with `content`: write a temporary file in the +/// same directory, fsync it, and rename it into place, so a crash cannot +/// leave a partially written database behind for the next boot. +fn atomic_write(path: &Path, content: &[u8], mode: u32) -> Result<()> { + let dir = path.parent().context("path has no parent")?; + let tmp = path.with_added_extension("tmp"); + let mut f = OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .mode(mode) + .open(&tmp) + .with_context(|| format!("creating {}", tmp.display()))?; + // The mode passed to open is masked by the umask, so make sure we set + // the actual permissions. + f.set_permissions(fs::Permissions::from_mode(mode)) + .with_context(|| format!("chmod {}", tmp.display()))?; + f.write_all(content) + .with_context(|| format!("writing {}", tmp.display()))?; + f.sync_all()?; + drop(f); + fs::rename(&tmp, path) + .with_context(|| format!("renaming {} to {}", tmp.display(), path.display()))?; + File::open(dir)?.sync_all()?; + Ok(()) +} + +/// Append `lines` to `path` via a whole-file rewrite and an atomic rename, +/// inserting a newline first if the file lacks a trailing one. Assumes the +/// file already exists (see `touch`). +fn append_lines(path: &Path, lines: &[String]) -> Result<()> { + if lines.is_empty() { + return Ok(()); + } + let mut content = fs::read(path).with_context(|| format!("reading {}", path.display()))?; + if !content.is_empty() && !content.ends_with(b"\n") { + content.push(b'\n'); + } + for line in lines { + content.extend_from_slice(line.as_bytes()); + content.push(b'\n'); + } + // mode() returns the full st_mode; mask off the file type bits. + let mode = fs::metadata(path) + .with_context(|| format!("stat {}", path.display()))? + .permissions() + .mode() + & 0o7777; + atomic_write(path, &content, mode) +} + +fn touch(path: &Path, mode: u32) -> Result<()> { + if path.exists() { + return Ok(()); + } + File::create(path).with_context(|| format!("creating {}", path.display()))?; + fs::set_permissions(path, fs::Permissions::from_mode(mode)) + .with_context(|| format!("chmod {}", path.display()))?; + Ok(()) +} + +fn import_ids(args: &Args) -> Result<()> { + let passwd = args.directory.join("passwd"); + let group = args.directory.join("group"); + let shadow = args.directory.join("shadow"); + + touch(&passwd, 0o644)?; + touch(&group, 0o644)?; + touch(&shadow, 0o000)?; + + let (mut user_names, mut user_ids) = load_colon_db(&passwd)?; + let (mut group_names, mut group_ids) = load_colon_db(&group)?; + + let legacy = Path::new(LEGACY); + let gid_map = load_id_map(&legacy.join("gid-map"))?; + let uid_map = load_id_map(&legacy.join("uid-map"))?; + + let mut new_group = Vec::new(); + for (name, &gid) in &gid_map { + if group_names.contains(name) { + continue; + } + if let Some(owner) = group_ids.get(&gid) { + warn(&format!( + "gid {gid} from gid-map for {name:?} is already used by {owner:?}; skipping" + )); + continue; + } + info(&format!("reserving gid {gid} for removed group {name:?}")); + new_group.push(format!("{name}:x:{gid}:")); + group_names.insert(name.clone()); + group_ids.insert(gid, name.clone()); + } + append_lines(&group, &new_group)?; + + let mut new_passwd = Vec::new(); + let mut new_shadow = Vec::new(); + for (name, &uid) in &uid_map { + if user_names.contains(name) { + continue; + } + if let Some(owner) = user_ids.get(&uid) { + warn(&format!( + "uid {uid} from uid-map for {name:?} is already used by {owner:?}; skipping" + )); + continue; + } + let gid = gid_map.get(name).copied().unwrap_or(args.nogroup_gid); + info(&format!("reserving uid {uid} for removed user {name:?}")); + new_passwd.push(format!( + "{name}:x:{uid}:{gid}::/var/empty:/run/current-system/sw/bin/nologin" + )); + new_shadow.push(format!("{name}:!*:1::::::")); + user_names.insert(name.clone()); + user_ids.insert(uid, name.clone()); + } + append_lines(&passwd, &new_passwd)?; + append_lines(&shadow, &new_shadow)?; + + Ok(()) +} + +/// Populate `previous-userborn.json` from `declarative-{users,groups}`. +/// +/// Under `mutableUsers`, userborn diffs the current config against the +/// previous one to decide which entries to lock/drain vs leave alone. +/// Without a previous config on the first run, formerly-declarative users +/// dropped in the same switch would be treated as imperative and left +/// enabled. Translate the perl script's declarative-{users,groups} into +/// the minimal JSON userborn expects so its first run behaves correctly. +fn synthesise_previous_config() -> Result<()> { + let previous = Path::new(USERBORN_STATE).join(PREVIOUS_NAME); + if previous.exists() { + // Unreachable via the unit's ConditionPathExists, but never clobber + // a real previous config. + warn(&format!( + "{} already exists; not overwriting", + previous.display() + )); + return Ok(()); + } + + let names = |path: &Path| -> Result> { + let text = match fs::read_to_string(path) { + Ok(t) => t, + Err(e) if e.kind() == io::ErrorKind::NotFound => return Ok(Vec::new()), + Err(e) => return Err(e).with_context(|| format!("reading {}", path.display())), + }; + Ok(text + .split_whitespace() + .map(|n| serde_json::json!({ "name": n })) + .collect()) + }; + + let legacy = Path::new(LEGACY); + let doc = serde_json::json!({ + "users": names(&legacy.join("declarative-users"))?, + "groups": names(&legacy.join("declarative-groups"))?, + }); + atomic_write(&previous, &serde_json::to_vec(&doc)?, 0o644) + .with_context(|| format!("writing {}", previous.display()))?; + info(&format!( + "synthesised {} from declarative-users/groups", + previous.display() + )); + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn colon_db() { + let dir = tempdir(); + let p = dir.join("passwd"); + fs::write( + &p, + "root:x:0:0::/root:/bin/sh\n\ + nobody:x:65534:65534::/var/empty:/bin/nologin\n\ + :::\n\ + bogus:x:notanumber:0::\n", + ) + .unwrap(); + let (names, ids) = load_colon_db(&p).unwrap(); + assert!(names.contains("root")); + assert!(names.contains("nobody")); + assert_eq!(ids.get(&0), Some(&"root".to_owned())); + assert!(!names.contains("bogus")); + } + + #[test] + fn append_adds_missing_newline() { + let dir = tempdir(); + let p = dir.join("f"); + fs::write(&p, "a:x:1:").unwrap(); + append_lines(&p, &["b:x:2:".into()]).unwrap(); + assert_eq!(fs::read_to_string(&p).unwrap(), "a:x:1:\nb:x:2:\n"); + } + + #[test] + fn append_keeps_mode() { + let dir = tempdir(); + let p = dir.join("shadow"); + fs::write(&p, "a:!:1::::::\n").unwrap(); + fs::set_permissions(&p, fs::Permissions::from_mode(0o600)).unwrap(); + append_lines(&p, &["b:!*:1::::::".into()]).unwrap(); + assert_eq!( + fs::metadata(&p).unwrap().permissions().mode() & 0o7777, + 0o600 + ); + assert_eq!( + fs::read_to_string(&p).unwrap(), + "a:!:1::::::\nb:!*:1::::::\n" + ); + } + + #[test] + fn id_map_missing_is_empty() { + let dir = tempdir(); + assert!(load_id_map(&dir.join("nope")).unwrap().is_empty()); + } + + fn tempdir() -> PathBuf { + let p = std::env::temp_dir().join(format!( + "uil-test-{}-{}", + std::process::id(), + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_nanos() + )); + fs::create_dir_all(&p).unwrap(); + p + } +} diff --git a/pkgs/by-name/us/userborn/package.nix b/pkgs/by-name/us/userborn/package.nix index 2346a7a47f3d..f17bdc88ef9b 100644 --- a/pkgs/by-name/us/userborn/package.nix +++ b/pkgs/by-name/us/userborn/package.nix @@ -33,6 +33,7 @@ rustPlatform.buildRustPackage (finalAttrs: { tests = { inherit (nixosTests) userborn + userborn-migration userborn-mutable-users userborn-mutable-etc userborn-immutable-users diff --git a/pkgs/by-name/ve/versatiles/package.nix b/pkgs/by-name/ve/versatiles/package.nix index 4268d32f4f6d..7a843a45a67b 100644 --- a/pkgs/by-name/ve/versatiles/package.nix +++ b/pkgs/by-name/ve/versatiles/package.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "versatiles"; - version = "4.6.1"; + version = "4.7.0"; src = fetchFromGitHub { owner = "versatiles-org"; repo = "versatiles-rs"; tag = "v${finalAttrs.version}"; - hash = "sha256-J15w0WLewK9E5FVYzMJ1NkiZ9/qbEXxmfX2bM6m+zU8="; + hash = "sha256-WgC5KO6Uz0FQt4Fh08FhZh1RMfDA32Bq70pfMGoDvxU="; }; - cargoHash = "sha256-buVcK5MQrB3Gu7GPKkeofqTrVOv3xXYQd8VlLV5q1u0="; + cargoHash = "sha256-HzTpvnuODTl+fTgYFdbkerquWjjrFw440+pJDGzRnFk="; nativeBuildInputs = [ pkg-config diff --git a/pkgs/by-name/yt/ytt/package.nix b/pkgs/by-name/yt/ytt/package.nix index 3cc9ba41663e..b276e3baed17 100644 --- a/pkgs/by-name/yt/ytt/package.nix +++ b/pkgs/by-name/yt/ytt/package.nix @@ -8,13 +8,13 @@ }: buildGoModule (finalAttrs: { pname = "ytt"; - version = "0.55.1"; + version = "0.55.2"; src = fetchFromGitHub { owner = "carvel-dev"; repo = "ytt"; tag = "v${finalAttrs.version}"; - hash = "sha256-HysL71PTCjWxgrqF8Ua7fUtzpxcf/XEbTlek+CvfUxA="; + hash = "sha256-IwM39J5DRCW2CuAmq7Q+KkeqDMLFcktU3NDbBh8wt7g="; }; vendorHash = null; diff --git a/pkgs/desktops/expidus/calculator/default.nix b/pkgs/desktops/expidus/calculator/default.nix deleted file mode 100644 index f005dcf52969..000000000000 --- a/pkgs/desktops/expidus/calculator/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - lib, - flutter, - fetchFromGitHub, -}: -flutter.buildFlutterApplication rec { - pname = "expidus-calculator"; - version = "0.1.1-alpha"; - - src = fetchFromGitHub { - owner = "ExpidusOS"; - repo = "calculator"; - rev = version; - hash = "sha256-O3LHp10Fo3PW3zoN7mFSQEKh+AAaR+IqkRtc6nQrIZE="; - }; - - flutterBuildFlags = [ - "--dart-define=COMMIT_HASH=a5d8f54404b9994f83beb367a1cd11e04a6420cb" - ]; - - pubspecLock = lib.importJSON ./pubspec.lock.json; - - gitHashes = { - libtokyo = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU="; - libtokyo_flutter = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU="; - }; - - postInstall = '' - rm $out/bin/calculator - ln -s $out/app/$pname/calculator $out/bin/expidus-calculator - - mkdir -p $out/share/applications - mv $out/app/$pname/data/com.expidusos.calculator.desktop $out/share/applications - - mkdir -p $out/share/icons - mv $out/app/$pname/data/com.expidusos.calculator.png $out/share/icons - - mkdir -p $out/share/metainfo - mv $out/app/$pname/data/com.expidusos.calculator.metainfo.xml $out/share/metainfo - - substituteInPlace "$out/share/applications/com.expidusos.calculator.desktop" \ - --replace "Exec=calculator" "Exec=$out/bin/expidus-calculator" \ - --replace "Icon=com.expidusos.calculator" "Icon=$out/share/icons/com.expidusos.calculator.png" - ''; - - meta = { - broken = true; - description = "ExpidusOS Calculator"; - homepage = "https://expidusos.com"; - license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [ RossComputerGuy ]; - platforms = [ - "x86_64-linux" - "aarch64-linux" - ]; - mainProgram = "expidus-calculator"; - }; -} diff --git a/pkgs/desktops/expidus/calculator/pubspec.lock.json b/pkgs/desktops/expidus/calculator/pubspec.lock.json deleted file mode 100644 index a2e6f2e46776..000000000000 --- a/pkgs/desktops/expidus/calculator/pubspec.lock.json +++ /dev/null @@ -1,790 +0,0 @@ -{ - "packages": { - "args": { - "dependency": "transitive", - "description": { - "name": "args", - "sha256": "eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.4.2" - }, - "async": { - "dependency": "transitive", - "description": { - "name": "async", - "sha256": "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.11.0" - }, - "bitsdojo_window": { - "dependency": "direct main", - "description": { - "name": "bitsdojo_window", - "sha256": "1118bc1cd16e6f358431ca4473af57cc1b287d2ceab46dfab6d59a9463160622", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.5" - }, - "bitsdojo_window_linux": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_linux", - "sha256": "d3804a30315fcbb43b28acc86d1180ce0be22c0c738ad2da9e5ade4d8dbd9655", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.3" - }, - "bitsdojo_window_macos": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_macos", - "sha256": "d2a9886c74516c5b84c1dd65ab8ee5d1c52055b265ebf0e7d664dee28366b521", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.3" - }, - "bitsdojo_window_platform_interface": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_platform_interface", - "sha256": "65daa015a0c6dba749bdd35a0f092e7a8ba8b0766aa0480eb3ef808086f6e27c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.2" - }, - "bitsdojo_window_windows": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_windows", - "sha256": "8766a40aac84a6d7bdcaa716b24997e028fc9a9a1800495fc031721fd5a22ed0", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.5" - }, - "boolean_selector": { - "dependency": "transitive", - "description": { - "name": "boolean_selector", - "sha256": "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.1" - }, - "characters": { - "dependency": "transitive", - "description": { - "name": "characters", - "sha256": "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.3.0" - }, - "clock": { - "dependency": "transitive", - "description": { - "name": "clock", - "sha256": "cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.1.1" - }, - "collection": { - "dependency": "transitive", - "description": { - "name": "collection", - "sha256": "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.17.1" - }, - "crypto": { - "dependency": "transitive", - "description": { - "name": "crypto", - "sha256": "ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.3" - }, - "fake_async": { - "dependency": "transitive", - "description": { - "name": "fake_async", - "sha256": "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.3.1" - }, - "ffi": { - "dependency": "transitive", - "description": { - "name": "ffi", - "sha256": "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.0" - }, - "file": { - "dependency": "transitive", - "description": { - "name": "file", - "sha256": "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.1.4" - }, - "filesize": { - "dependency": "transitive", - "description": { - "name": "filesize", - "sha256": "f53df1f27ff60e466eefcd9df239e02d4722d5e2debee92a87dfd99ac66de2af", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.1" - }, - "flutter": { - "dependency": "direct main", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "flutter_adaptive_scaffold": { - "dependency": "direct main", - "description": { - "name": "flutter_adaptive_scaffold", - "sha256": "3e78be8b9c95b1c9832b2f8ec4a845adac205c4bb5e7bd3fb204b07990229167", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.7+1" - }, - "flutter_lints": { - "dependency": "direct dev", - "description": { - "name": "flutter_lints", - "sha256": "a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.3" - }, - "flutter_localizations": { - "dependency": "direct main", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "flutter_markdown": { - "dependency": "direct main", - "description": { - "name": "flutter_markdown", - "sha256": "d4a1cb250c4e059586af0235f32e02882860a508e189b61f2b31b8810c1e1330", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.6.17+2" - }, - "flutter_test": { - "dependency": "direct dev", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "flutter_web_plugins": { - "dependency": "transitive", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "http": { - "dependency": "transitive", - "description": { - "name": "http", - "sha256": "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.13.6" - }, - "http_parser": { - "dependency": "transitive", - "description": { - "name": "http_parser", - "sha256": "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "4.0.2" - }, - "intl": { - "dependency": "transitive", - "description": { - "name": "intl", - "sha256": "a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.18.0" - }, - "js": { - "dependency": "transitive", - "description": { - "name": "js", - "sha256": "f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.6.7" - }, - "libtokyo": { - "dependency": "direct main", - "description": { - "path": "packages/libtokyo", - "ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "url": "https://github.com/ExpidusOS/libtokyo.git" - }, - "source": "git", - "version": "0.1.0" - }, - "libtokyo_flutter": { - "dependency": "direct main", - "description": { - "path": "packages/libtokyo_flutter", - "ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "url": "https://github.com/ExpidusOS/libtokyo.git" - }, - "source": "git", - "version": "0.1.0" - }, - "lints": { - "dependency": "transitive", - "description": { - "name": "lints", - "sha256": "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.1" - }, - "markdown": { - "dependency": "direct main", - "description": { - "name": "markdown", - "sha256": "acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "7.1.1" - }, - "matcher": { - "dependency": "transitive", - "description": { - "name": "matcher", - "sha256": "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.12.15" - }, - "material_color_utilities": { - "dependency": "transitive", - "description": { - "name": "material_color_utilities", - "sha256": "d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.2.0" - }, - "material_theme_builder": { - "dependency": "transitive", - "description": { - "name": "material_theme_builder", - "sha256": "380ab70835e01f4ee0c37904eebae9e36ed37b5cf8ed40d67412ea3244a2afd6", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.4" - }, - "math_expressions": { - "dependency": "direct main", - "description": { - "name": "math_expressions", - "sha256": "3576593617c3870d75728a751f6ec6e606706d44e363f088ac394b5a28a98064", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.4.0" - }, - "meta": { - "dependency": "transitive", - "description": { - "name": "meta", - "sha256": "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.9.1" - }, - "nested": { - "dependency": "transitive", - "description": { - "name": "nested", - "sha256": "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.0" - }, - "package_info_plus": { - "dependency": "direct main", - "description": { - "name": "package_info_plus", - "sha256": "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.2" - }, - "package_info_plus_platform_interface": { - "dependency": "transitive", - "description": { - "name": "package_info_plus_platform_interface", - "sha256": "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.1" - }, - "path": { - "dependency": "transitive", - "description": { - "name": "path", - "sha256": "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.8.3" - }, - "path_provider_linux": { - "dependency": "transitive", - "description": { - "name": "path_provider_linux", - "sha256": "f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.1" - }, - "path_provider_platform_interface": { - "dependency": "transitive", - "description": { - "name": "path_provider_platform_interface", - "sha256": "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.1" - }, - "path_provider_windows": { - "dependency": "transitive", - "description": { - "name": "path_provider_windows", - "sha256": "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.1" - }, - "platform": { - "dependency": "transitive", - "description": { - "name": "platform", - "sha256": "ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.2" - }, - "plugin_platform_interface": { - "dependency": "transitive", - "description": { - "name": "plugin_platform_interface", - "sha256": "da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.6" - }, - "provider": { - "dependency": "direct main", - "description": { - "name": "provider", - "sha256": "cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.0.5" - }, - "pub_semver": { - "dependency": "direct main", - "description": { - "name": "pub_semver", - "sha256": "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.4" - }, - "pubspec": { - "dependency": "direct main", - "description": { - "name": "pubspec", - "sha256": "f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.0" - }, - "quiver": { - "dependency": "transitive", - "description": { - "name": "quiver", - "sha256": "b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.2.1" - }, - "sentry": { - "dependency": "transitive", - "description": { - "name": "sentry", - "sha256": "39c23342fc96105da449914f7774139a17a0ca8a4e70d9ad5200171f7e47d6ba", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "7.9.0" - }, - "sentry_flutter": { - "dependency": "direct main", - "description": { - "name": "sentry_flutter", - "sha256": "ff68ab31918690da004a42e20204242a3ad9ad57da7e2712da8487060ac9767f", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "7.9.0" - }, - "shared_preferences": { - "dependency": "direct main", - "description": { - "name": "shared_preferences", - "sha256": "b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.1" - }, - "shared_preferences_android": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_android", - "sha256": "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.1" - }, - "shared_preferences_foundation": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_foundation", - "sha256": "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.4" - }, - "shared_preferences_linux": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_linux", - "sha256": "c2eb5bf57a2fe9ad6988121609e47d3e07bb3bdca5b6f8444e4cf302428a128a", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.1" - }, - "shared_preferences_platform_interface": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_platform_interface", - "sha256": "d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.1" - }, - "shared_preferences_web": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_web", - "sha256": "d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.1" - }, - "shared_preferences_windows": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_windows", - "sha256": "f763a101313bd3be87edffe0560037500967de9c394a714cd598d945517f694f", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.1" - }, - "sky_engine": { - "dependency": "transitive", - "description": "flutter", - "source": "sdk", - "version": "0.0.99" - }, - "source_span": { - "dependency": "transitive", - "description": { - "name": "source_span", - "sha256": "dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.9.1" - }, - "stack_trace": { - "dependency": "transitive", - "description": { - "name": "stack_trace", - "sha256": "c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.11.0" - }, - "stream_channel": { - "dependency": "transitive", - "description": { - "name": "stream_channel", - "sha256": "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.1" - }, - "string_scanner": { - "dependency": "transitive", - "description": { - "name": "string_scanner", - "sha256": "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.2.0" - }, - "term_glyph": { - "dependency": "transitive", - "description": { - "name": "term_glyph", - "sha256": "a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.2.1" - }, - "test_api": { - "dependency": "transitive", - "description": { - "name": "test_api", - "sha256": "eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.5.1" - }, - "typed_data": { - "dependency": "transitive", - "description": { - "name": "typed_data", - "sha256": "facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.3.2" - }, - "uri": { - "dependency": "transitive", - "description": { - "name": "uri", - "sha256": "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.0" - }, - "url_launcher": { - "dependency": "direct main", - "description": { - "name": "url_launcher", - "sha256": "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.1.14" - }, - "url_launcher_android": { - "dependency": "transitive", - "description": { - "name": "url_launcher_android", - "sha256": "b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.1.0" - }, - "url_launcher_ios": { - "dependency": "transitive", - "description": { - "name": "url_launcher_ios", - "sha256": "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.1.5" - }, - "url_launcher_linux": { - "dependency": "transitive", - "description": { - "name": "url_launcher_linux", - "sha256": "b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.6" - }, - "url_launcher_macos": { - "dependency": "transitive", - "description": { - "name": "url_launcher_macos", - "sha256": "b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.7" - }, - "url_launcher_platform_interface": { - "dependency": "transitive", - "description": { - "name": "url_launcher_platform_interface", - "sha256": "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.5" - }, - "url_launcher_web": { - "dependency": "transitive", - "description": { - "name": "url_launcher_web", - "sha256": "ba140138558fcc3eead51a1c42e92a9fb074a1b1149ed3c73e66035b2ccd94f2", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.19" - }, - "url_launcher_windows": { - "dependency": "transitive", - "description": { - "name": "url_launcher_windows", - "sha256": "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.8" - }, - "uuid": { - "dependency": "transitive", - "description": { - "name": "uuid", - "sha256": "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.7" - }, - "vector_math": { - "dependency": "transitive", - "description": { - "name": "vector_math", - "sha256": "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.4" - }, - "win32": { - "dependency": "transitive", - "description": { - "name": "win32", - "sha256": "a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.4" - }, - "xdg_directories": { - "dependency": "transitive", - "description": { - "name": "xdg_directories", - "sha256": "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.3" - }, - "yaml": { - "dependency": "transitive", - "description": { - "name": "yaml", - "sha256": "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.2" - } - }, - "sdks": { - "dart": ">=3.0.5 <4.0.0", - "flutter": ">=3.10.0" - } -} diff --git a/pkgs/desktops/expidus/default.nix b/pkgs/desktops/expidus/default.nix deleted file mode 100644 index 3506e1e51699..000000000000 --- a/pkgs/desktops/expidus/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ callPackage, flutterPackages }: -{ - calculator = callPackage ./calculator { - flutter = flutterPackages.v3_35; - }; - - file-manager = callPackage ./file-manager { - flutter = flutterPackages.v3_35; - }; -} diff --git a/pkgs/desktops/expidus/file-manager/default.nix b/pkgs/desktops/expidus/file-manager/default.nix deleted file mode 100644 index ffd2c4dd838f..000000000000 --- a/pkgs/desktops/expidus/file-manager/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - lib, - flutter, - fetchFromGitHub, -}: -flutter.buildFlutterApplication rec { - pname = "expidus-file-manager"; - version = "0.2.1"; - - src = fetchFromGitHub { - owner = "ExpidusOS"; - repo = "file-manager"; - rev = version; - hash = "sha256-R6eszy4Dz8tAPRTwZzRiZWIgVMiGv5zlhFB/HcD6gqg="; - }; - - flutterBuildFlags = [ - "--dart-define=COMMIT_HASH=b4181b9cff18a07e958c81d8f41840d2d36a6705" - ]; - - pubspecLock = lib.importJSON ./pubspec.lock.json; - - gitHashes = { - libtokyo = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU="; - libtokyo_flutter = "sha256-T0+vyfSfijLv7MvM+zt3bkVpb3aVrlDnse2xyNMp9GU="; - }; - - postInstall = '' - rm $out/bin/file_manager - ln -s $out/app/$pname/file_manager $out/bin/expidus-file-manager - - mkdir -p $out/share/applications - mv $out/app/$pname/data/com.expidusos.file_manager.desktop $out/share/applications - - mkdir -p $out/share/icons - mv $out/app/$pname/data/com.expidusos.file_manager.png $out/share/icons - - mkdir -p $out/share/metainfo - mv $out/app/$pname/data/com.expidusos.file_manager.metainfo.xml $out/share/metainfo - - substituteInPlace "$out/share/applications/com.expidusos.file_manager.desktop" \ - --replace "Exec=file_manager" "Exec=$out/bin/expidus-file-manager" \ - --replace "Icon=com.expidusos.file_manager" "Icon=$out/share/icons/com.expidusos.file_manager.png" - ''; - - meta = { - broken = true; - description = "ExpidusOS File Manager"; - homepage = "https://expidusos.com"; - license = lib.licenses.gpl3; - maintainers = with lib.maintainers; [ RossComputerGuy ]; - platforms = [ - "x86_64-linux" - "aarch64-linux" - ]; - mainProgram = "expidus-file-manager"; - }; -} diff --git a/pkgs/desktops/expidus/file-manager/pubspec.lock.json b/pkgs/desktops/expidus/file-manager/pubspec.lock.json deleted file mode 100644 index 048127e70dab..000000000000 --- a/pkgs/desktops/expidus/file-manager/pubspec.lock.json +++ /dev/null @@ -1,910 +0,0 @@ -{ - "packages": { - "args": { - "dependency": "transitive", - "description": { - "name": "args", - "sha256": "eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.4.2" - }, - "async": { - "dependency": "transitive", - "description": { - "name": "async", - "sha256": "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.11.0" - }, - "bitsdojo_window": { - "dependency": "direct main", - "description": { - "name": "bitsdojo_window", - "sha256": "1118bc1cd16e6f358431ca4473af57cc1b287d2ceab46dfab6d59a9463160622", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.5" - }, - "bitsdojo_window_linux": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_linux", - "sha256": "d3804a30315fcbb43b28acc86d1180ce0be22c0c738ad2da9e5ade4d8dbd9655", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.3" - }, - "bitsdojo_window_macos": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_macos", - "sha256": "d2a9886c74516c5b84c1dd65ab8ee5d1c52055b265ebf0e7d664dee28366b521", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.3" - }, - "bitsdojo_window_platform_interface": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_platform_interface", - "sha256": "65daa015a0c6dba749bdd35a0f092e7a8ba8b0766aa0480eb3ef808086f6e27c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.2" - }, - "bitsdojo_window_windows": { - "dependency": "transitive", - "description": { - "name": "bitsdojo_window_windows", - "sha256": "8766a40aac84a6d7bdcaa716b24997e028fc9a9a1800495fc031721fd5a22ed0", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.5" - }, - "boolean_selector": { - "dependency": "transitive", - "description": { - "name": "boolean_selector", - "sha256": "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.1" - }, - "characters": { - "dependency": "transitive", - "description": { - "name": "characters", - "sha256": "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.3.0" - }, - "clock": { - "dependency": "transitive", - "description": { - "name": "clock", - "sha256": "cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.1.1" - }, - "collection": { - "dependency": "direct main", - "description": { - "name": "collection", - "sha256": "f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.17.2" - }, - "crypto": { - "dependency": "transitive", - "description": { - "name": "crypto", - "sha256": "ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.3" - }, - "dbus": { - "dependency": "transitive", - "description": { - "name": "dbus", - "sha256": "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.7.8" - }, - "fake_async": { - "dependency": "transitive", - "description": { - "name": "fake_async", - "sha256": "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.3.1" - }, - "ffi": { - "dependency": "direct main", - "description": { - "name": "ffi", - "sha256": "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.0" - }, - "file": { - "dependency": "transitive", - "description": { - "name": "file", - "sha256": "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.1.4" - }, - "filesize": { - "dependency": "direct main", - "description": { - "name": "filesize", - "sha256": "f53df1f27ff60e466eefcd9df239e02d4722d5e2debee92a87dfd99ac66de2af", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.1" - }, - "flutter": { - "dependency": "direct main", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "flutter_adaptive_scaffold": { - "dependency": "direct main", - "description": { - "name": "flutter_adaptive_scaffold", - "sha256": "4f448902314bc9b6cf820c85d5bad4de6489c0eff75dcedf5098f3a53ec981ee", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.6" - }, - "flutter_lints": { - "dependency": "direct dev", - "description": { - "name": "flutter_lints", - "sha256": "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.2" - }, - "flutter_localizations": { - "dependency": "direct main", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "flutter_markdown": { - "dependency": "direct main", - "description": { - "name": "flutter_markdown", - "sha256": "2b206d397dd7836ea60035b2d43825c8a303a76a5098e66f42d55a753e18d431", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.6.17+1" - }, - "flutter_test": { - "dependency": "direct dev", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "flutter_web_plugins": { - "dependency": "transitive", - "description": "flutter", - "source": "sdk", - "version": "0.0.0" - }, - "http": { - "dependency": "transitive", - "description": { - "name": "http", - "sha256": "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.13.6" - }, - "http_parser": { - "dependency": "transitive", - "description": { - "name": "http_parser", - "sha256": "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "4.0.2" - }, - "intl": { - "dependency": "direct main", - "description": { - "name": "intl", - "sha256": "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.18.1" - }, - "libtokyo": { - "dependency": "direct main", - "description": { - "path": "packages/libtokyo", - "ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "url": "https://github.com/ExpidusOS/libtokyo.git" - }, - "source": "git", - "version": "0.1.0" - }, - "libtokyo_flutter": { - "dependency": "direct main", - "description": { - "path": "packages/libtokyo_flutter", - "ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "resolved-ref": "f48d528ebfc22fe827fe9f2d1965be1d339ccfb7", - "url": "https://github.com/ExpidusOS/libtokyo.git" - }, - "source": "git", - "version": "0.1.0" - }, - "lints": { - "dependency": "transitive", - "description": { - "name": "lints", - "sha256": "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.1" - }, - "markdown": { - "dependency": "transitive", - "description": { - "name": "markdown", - "sha256": "acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "7.1.1" - }, - "matcher": { - "dependency": "transitive", - "description": { - "name": "matcher", - "sha256": "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.12.16" - }, - "material_color_utilities": { - "dependency": "transitive", - "description": { - "name": "material_color_utilities", - "sha256": "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.5.0" - }, - "material_theme_builder": { - "dependency": "transitive", - "description": { - "name": "material_theme_builder", - "sha256": "380ab70835e01f4ee0c37904eebae9e36ed37b5cf8ed40d67412ea3244a2afd6", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.4" - }, - "meta": { - "dependency": "transitive", - "description": { - "name": "meta", - "sha256": "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.9.1" - }, - "nested": { - "dependency": "transitive", - "description": { - "name": "nested", - "sha256": "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.0" - }, - "open_file_plus": { - "dependency": "direct main", - "description": { - "name": "open_file_plus", - "sha256": "f087e32722ffe4bac71925e7a1a9848a1008fd789e47c6628da3ed7845922227", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.4.1" - }, - "package_info_plus": { - "dependency": "direct main", - "description": { - "name": "package_info_plus", - "sha256": "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.2" - }, - "package_info_plus_platform_interface": { - "dependency": "transitive", - "description": { - "name": "package_info_plus_platform_interface", - "sha256": "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.1" - }, - "path": { - "dependency": "direct main", - "description": { - "name": "path", - "sha256": "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.8.3" - }, - "path_provider": { - "dependency": "direct main", - "description": { - "name": "path_provider", - "sha256": "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.0" - }, - "path_provider_android": { - "dependency": "transitive", - "description": { - "name": "path_provider_android", - "sha256": "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.0" - }, - "path_provider_foundation": { - "dependency": "transitive", - "description": { - "name": "path_provider_foundation", - "sha256": "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.0" - }, - "path_provider_linux": { - "dependency": "transitive", - "description": { - "name": "path_provider_linux", - "sha256": "ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.0" - }, - "path_provider_platform_interface": { - "dependency": "direct main", - "description": { - "name": "path_provider_platform_interface", - "sha256": "bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.0" - }, - "path_provider_windows": { - "dependency": "direct main", - "description": { - "name": "path_provider_windows", - "sha256": "ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.0" - }, - "permission_handler": { - "dependency": "direct main", - "description": { - "name": "permission_handler", - "sha256": "63e5216aae014a72fe9579ccd027323395ce7a98271d9defa9d57320d001af81", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "10.4.3" - }, - "permission_handler_android": { - "dependency": "transitive", - "description": { - "name": "permission_handler_android", - "sha256": "2ffaf52a21f64ac9b35fe7369bb9533edbd4f698e5604db8645b1064ff4cf221", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "10.3.3" - }, - "permission_handler_apple": { - "dependency": "transitive", - "description": { - "name": "permission_handler_apple", - "sha256": "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "9.1.4" - }, - "permission_handler_platform_interface": { - "dependency": "transitive", - "description": { - "name": "permission_handler_platform_interface", - "sha256": "7c6b1500385dd1d2ca61bb89e2488ca178e274a69144d26bbd65e33eae7c02a9", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.11.3" - }, - "permission_handler_windows": { - "dependency": "transitive", - "description": { - "name": "permission_handler_windows", - "sha256": "cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.3" - }, - "petitparser": { - "dependency": "transitive", - "description": { - "name": "petitparser", - "sha256": "cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "5.4.0" - }, - "platform": { - "dependency": "transitive", - "description": { - "name": "platform", - "sha256": "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.0" - }, - "plugin_platform_interface": { - "dependency": "transitive", - "description": { - "name": "plugin_platform_interface", - "sha256": "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.5" - }, - "provider": { - "dependency": "direct main", - "description": { - "name": "provider", - "sha256": "cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.0.5" - }, - "pub_semver": { - "dependency": "direct main", - "description": { - "name": "pub_semver", - "sha256": "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.4" - }, - "pubspec": { - "dependency": "direct main", - "description": { - "name": "pubspec", - "sha256": "f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.0" - }, - "quiver": { - "dependency": "transitive", - "description": { - "name": "quiver", - "sha256": "b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.2.1" - }, - "sentry": { - "dependency": "transitive", - "description": { - "name": "sentry", - "sha256": "39c23342fc96105da449914f7774139a17a0ca8a4e70d9ad5200171f7e47d6ba", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "7.9.0" - }, - "sentry_flutter": { - "dependency": "direct main", - "description": { - "name": "sentry_flutter", - "sha256": "ff68ab31918690da004a42e20204242a3ad9ad57da7e2712da8487060ac9767f", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "7.9.0" - }, - "shared_preferences": { - "dependency": "direct main", - "description": { - "name": "shared_preferences", - "sha256": "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.0" - }, - "shared_preferences_android": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_android", - "sha256": "fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.0" - }, - "shared_preferences_foundation": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_foundation", - "sha256": "f39696b83e844923b642ce9dd4bd31736c17e697f6731a5adf445b1274cf3cd4", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.2" - }, - "shared_preferences_linux": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_linux", - "sha256": "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.0" - }, - "shared_preferences_platform_interface": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_platform_interface", - "sha256": "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.0" - }, - "shared_preferences_web": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_web", - "sha256": "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.2.0" - }, - "shared_preferences_windows": { - "dependency": "transitive", - "description": { - "name": "shared_preferences_windows", - "sha256": "f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.3.0" - }, - "sky_engine": { - "dependency": "transitive", - "description": "flutter", - "source": "sdk", - "version": "0.0.99" - }, - "source_span": { - "dependency": "transitive", - "description": { - "name": "source_span", - "sha256": "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.10.0" - }, - "stack_trace": { - "dependency": "transitive", - "description": { - "name": "stack_trace", - "sha256": "c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.11.0" - }, - "stream_channel": { - "dependency": "transitive", - "description": { - "name": "stream_channel", - "sha256": "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.1" - }, - "string_scanner": { - "dependency": "transitive", - "description": { - "name": "string_scanner", - "sha256": "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.2.0" - }, - "term_glyph": { - "dependency": "transitive", - "description": { - "name": "term_glyph", - "sha256": "a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.2.1" - }, - "test_api": { - "dependency": "transitive", - "description": { - "name": "test_api", - "sha256": "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.6.0" - }, - "typed_data": { - "dependency": "transitive", - "description": { - "name": "typed_data", - "sha256": "facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.3.2" - }, - "udisks": { - "dependency": "direct main", - "description": { - "name": "udisks", - "sha256": "847144fb868b9e3602895e89f438f77c2a4fda9e4b02f7d368dc1d2c6a40b475", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.4.0" - }, - "uri": { - "dependency": "transitive", - "description": { - "name": "uri", - "sha256": "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.0" - }, - "url_launcher": { - "dependency": "direct main", - "description": { - "name": "url_launcher", - "sha256": "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.1.12" - }, - "url_launcher_android": { - "dependency": "transitive", - "description": { - "name": "url_launcher_android", - "sha256": "3dd2388cc0c42912eee04434531a26a82512b9cb1827e0214430c9bcbddfe025", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.0.38" - }, - "url_launcher_ios": { - "dependency": "transitive", - "description": { - "name": "url_launcher_ios", - "sha256": "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.1.4" - }, - "url_launcher_linux": { - "dependency": "transitive", - "description": { - "name": "url_launcher_linux", - "sha256": "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.5" - }, - "url_launcher_macos": { - "dependency": "transitive", - "description": { - "name": "url_launcher_macos", - "sha256": "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.6" - }, - "url_launcher_platform_interface": { - "dependency": "transitive", - "description": { - "name": "url_launcher_platform_interface", - "sha256": "bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.3" - }, - "url_launcher_web": { - "dependency": "transitive", - "description": { - "name": "url_launcher_web", - "sha256": "cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.0.18" - }, - "url_launcher_windows": { - "dependency": "transitive", - "description": { - "name": "url_launcher_windows", - "sha256": "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.7" - }, - "uuid": { - "dependency": "transitive", - "description": { - "name": "uuid", - "sha256": "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.0.7" - }, - "vector_math": { - "dependency": "transitive", - "description": { - "name": "vector_math", - "sha256": "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "2.1.4" - }, - "web": { - "dependency": "transitive", - "description": { - "name": "web", - "sha256": "dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "0.1.4-beta" - }, - "win32": { - "dependency": "direct main", - "description": { - "name": "win32", - "sha256": "a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.4" - }, - "xdg_directories": { - "dependency": "direct main", - "description": { - "name": "xdg_directories", - "sha256": "f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "1.0.2" - }, - "xml": { - "dependency": "transitive", - "description": { - "name": "xml", - "sha256": "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "6.3.0" - }, - "yaml": { - "dependency": "transitive", - "description": { - "name": "yaml", - "sha256": "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5", - "url": "https://pub.dev" - }, - "source": "hosted", - "version": "3.1.2" - } - }, - "sdks": { - "dart": ">=3.1.0-185.0.dev <4.0.0", - "flutter": ">=3.10.0" - } -} diff --git a/pkgs/development/compilers/flutter/build-support/build-flutter-application.nix b/pkgs/development/compilers/flutter/build-support/build-flutter-application.nix index a2adc097947e..53ad58b8b303 100644 --- a/pkgs/development/compilers/flutter/build-support/build-flutter-application.nix +++ b/pkgs/development/compilers/flutter/build-support/build-flutter-application.nix @@ -158,6 +158,8 @@ lib.extendMkDerivation { }; in { + inherit universal; + linux = universal // { outputs = universal.outputs or [ ] ++ [ "debug" ]; diff --git a/pkgs/development/compilers/flutter/default.nix b/pkgs/development/compilers/flutter/default.nix index 2c886bf529fc..59453eb93b8d 100644 --- a/pkgs/development/compilers/flutter/default.nix +++ b/pkgs/development/compilers/flutter/default.nix @@ -1,5 +1,4 @@ { - useNixpkgsEngine ? false, callPackage, fetchzip, fetchFromGitHub, @@ -22,10 +21,6 @@ let { version, engineVersion, - engineSwiftShaderHash, - engineSwiftShaderRev, - engineHashes, - enginePatches, dartVersion, flutterHash, dartHash, @@ -39,14 +34,9 @@ let inherit version engineVersion - engineSwiftShaderRev - engineSwiftShaderHash - engineHashes - enginePatches patches pubspecLock artifactHashes - useNixpkgsEngine channel ; @@ -123,7 +113,6 @@ let mkFlutter ( { patches = (getPatches ./patches) ++ (getPatches (versionDir + "/patches")); - enginePatches = (getPatches ./engine/patches) ++ (getPatches (versionDir + "/engine/patches")); } // data ) diff --git a/pkgs/development/compilers/flutter/engine/constants.nix b/pkgs/development/compilers/flutter/engine/constants.nix deleted file mode 100644 index 768f103e849f..000000000000 --- a/pkgs/development/compilers/flutter/engine/constants.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ lib, platform }: -let - self = { - os = - if platform.isLinux then - "linux" - else if platform.isDarwin then - "macos" - else if platform.isWindows then - "windows" - else - throw "Unsupported OS \"${platform.parsed.kernel.name}\""; - - alt-os = if platform.isDarwin then "mac" else self.os; - - arch = - if platform.isx86_64 then - "amd64" - else if platform.isx86 && platform.is32bit then - "386" - else if platform.isAarch64 then - "arm64" - else if platform.isMips && platform.parsed.cpu.significantByte == "littleEndian" then - "mipsle" - else if platform.isMips64 then - "mips64${lib.optionalString (platform.parsed.cpu.significantByte == "littleEndian") "le"}" - else if platform.isPower64 then - "ppc64${lib.optionalString (platform.parsed.cpu.significantByte == "littleEndian") "le"}" - else if platform.isS390x then - "s390x" - else if platform.isRiscV64 then - "riscv64" - else - throw "Unsupported CPU \"${platform.parsed.cpu.name}\""; - - alt-arch = - if platform.isx86_64 then - "x64" - else if platform.isAarch64 then - "arm64" - else - platform.parsed.cpu.name; - - platform = "${self.os}-${self.arch}"; - alt-platform = "${self.os}-${self.alt-arch}"; - }; -in -self diff --git a/pkgs/development/compilers/flutter/engine/dart.nix b/pkgs/development/compilers/flutter/engine/dart.nix deleted file mode 100644 index 4846392aa8ba..000000000000 --- a/pkgs/development/compilers/flutter/engine/dart.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ engine, runCommand }: -runCommand "flutter-engine-${engine.version}-dart" - { - version = engine.dartSdkVersion; - - meta = engine.meta // { - description = "Dart SDK compiled from the Flutter Engine"; - }; - } - '' - ln --symbolic ${engine}/out/${engine.outName}/dart-sdk $out - '' diff --git a/pkgs/development/compilers/flutter/engine/default.nix b/pkgs/development/compilers/flutter/engine/default.nix deleted file mode 100644 index ca6684d00e9e..000000000000 --- a/pkgs/development/compilers/flutter/engine/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - callPackage, - dartSdkVersion, - flutterVersion, - swiftshaderHash, - swiftshaderRev, - version, - hashes, - url, - patches, - runtimeModes, - lib, - stdenv, - ... -}@args: -let - mainRuntimeMode = args.mainRuntimeMode or builtins.elemAt runtimeModes 0; - altRuntimeMode = args.altRuntimeMode or builtins.elemAt runtimeModes 1; - - runtimeModesBuilds = lib.genAttrs runtimeModes ( - runtimeMode: - callPackage ./package.nix { - inherit - dartSdkVersion - flutterVersion - swiftshaderHash - swiftshaderRev - version - hashes - url - patches - runtimeMode - ; - isOptimized = args.isOptimized or runtimeMode != "debug"; - } - ); -in -stdenv.mkDerivation ( - { - pname = "flutter-engine"; - inherit url runtimeModes altRuntimeMode; - inherit (runtimeModesBuilds.${mainRuntimeMode}) version src meta; - - strictDeps = true; - __structuredAttrs = true; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - runHook preInstall - - mkdir --parents $out/out - '' - + lib.concatMapStrings ( - runtimeMode: - let - runtimeModeBuild = runtimeModesBuilds.${runtimeMode}; - runtimeModeOut = runtimeModeBuild.outName; - in - '' - ln --symbolic --force ${runtimeModeBuild}/out/${runtimeModeOut} $out/out/${runtimeModeOut} - '' - ) runtimeModes - + '' - runHook postInstall - ''; - - passthru = { - inherit (runtimeModesBuilds.${mainRuntimeMode}) - dartSdkVersion - isOptimized - runtimeMode - outName - dart - swiftshader - ; - }; - } - // runtimeModesBuilds -) diff --git a/pkgs/development/compilers/flutter/engine/package.nix b/pkgs/development/compilers/flutter/engine/package.nix deleted file mode 100644 index 9c3fc0d2bb43..000000000000 --- a/pkgs/development/compilers/flutter/engine/package.nix +++ /dev/null @@ -1,389 +0,0 @@ -{ - lib, - callPackage, - fetchurl, - bash, - symlinkJoin, - darwin, - clang, - tools ? callPackage ./tools.nix { - inherit (stdenv) - hostPlatform - buildPlatform - ; - }, - stdenv, - dart, - fetchgit, - llvmPackages, - patchelf, - gn, - openbox, - xorg-server, - libxxf86vm, - libxrender, - libxrandr, - libxi, - libxinerama, - libxfixes, - libxext, - libxcursor, - libx11, - xorgproto, - libxcb, - libglvnd, - libepoxy, - wayland, - freetype, - pango, - glib, - harfbuzz, - cairo, - gdk-pixbuf, - at-spi2-atk, - zlib, - gtk3, - pkg-config, - ninja, - python312, - gitMinimal, - version, - flutterVersion, - dartSdkVersion, - swiftshaderHash, - swiftshaderRev, - hashes, - patches, - url, - runtimeMode ? "release", - isOptimized ? runtimeMode != "debug", -}: -let - constants = callPackage ./constants.nix { platform = stdenv.targetPlatform; }; - - python3 = python312; - - src = callPackage ./source.nix { - inherit - flutterVersion - version - hashes - url - ; - inherit (stdenv) - hostPlatform - buildPlatform - targetPlatform - ; - }; - - swiftshader = fetchgit { - url = "https://swiftshader.googlesource.com/SwiftShader.git"; - hash = swiftshaderHash; - rev = swiftshaderRev; - - postFetch = '' - rm --recursive --force $out/third_party/llvm-project - ''; - }; - - llvm = symlinkJoin { - name = "llvm"; - paths = [ - clang - llvmPackages.llvm - ]; - }; - - outName = "host_${runtimeMode}${lib.optionalString (!isOptimized) "_unopt"}"; - - dartPath = "flutter/third_party/dart"; -in -stdenv.mkDerivation (finalAttrs: { - pname = "flutter-engine-${runtimeMode}${lib.optionalString (!isOptimized) "-unopt"}"; - inherit version src patches; - - setOutputFlags = false; - doStrip = isOptimized; - - toolchain = symlinkJoin { - name = "flutter-engine-toolchain-${version}"; - - paths = - lib.flatten ( - map (dep: lib.optionals (lib.isDerivation dep) ([ dep ] ++ map (output: dep.${output}) dep.outputs)) - ( - lib.optionals (stdenv.hostPlatform.isLinux) [ - gtk3 - wayland - libepoxy - libglvnd - freetype - at-spi2-atk - glib - gdk-pixbuf - harfbuzz - pango - cairo - libxcb - libx11 - libxcursor - libxrandr - libxrender - libxinerama - libxi - libxext - libxfixes - libxxf86vm - xorgproto - zlib - ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ - clang - llvm - ] - ) - ) - ++ [ - stdenv.cc.libc_dev - stdenv.cc.libc_lib - ]; - - # Needed due to Flutter expecting everything to be relative to $out - # and not true absolute path (ie relative to "/"). - postBuild = '' - mkdir --parents $(dirname $(dirname "$out/$out")) - ln --symbolic $(dirname "$out") $out/$(dirname "$out") - ''; - }; - - NIX_CFLAGS_COMPILE = [ - "-I${finalAttrs.toolchain}/include" - "-O2" - "-Wno-error" - "-Wno-absolute-value" - "-Wno-implicit-float-conversion" - ] - ++ lib.optional (!isOptimized) "-U_FORTIFY_SOURCE"; - - nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ - xorg-server - openbox - ]; - - nativeBuildInputs = [ - (python3.withPackages ( - ps: with ps; [ - pyyaml - ] - )) - (tools.vpython python3) - gitMinimal - pkg-config - ninja - dart - ] - ++ lib.optionals (stdenv.hostPlatform.isLinux) [ patchelf ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ - darwin.system_cmds - darwin.xcode - tools.xcode-select - ] - ++ lib.optionals (stdenv.cc.libc ? bin) [ stdenv.cc.libc.bin ]; - - buildInputs = [ - gtk3 - libepoxy - ] - ++ lib.optionals (lib.versionAtLeast flutterVersion "3.41") [ - at-spi2-atk - glib - ]; - - dontPatch = true; - - env.patchgit = toString [ - dartPath - "flutter" - "." - "flutter/third_party/skia" - ]; - - postUnpack = - lib.optionalString (lib.versionAtLeast flutterVersion "3.38") '' - chmod +w . - mkdir --parents bin/internal - echo '#!${lib.getExe bash}' > bin/internal/content_aware_hash.sh - echo 'echo 1111111111111111111111111111111111111111' >> bin/internal/content_aware_hash.sh - chmod +x bin/internal/content_aware_hash.sh - '' - + '' - pushd ${finalAttrs.src.name} - - cp ${ - fetchurl { - url = "https://raw.githubusercontent.com/chromium/chromium/631a813125b886a52274653144019fd1681a0e97/build/config/linux/pkg-config.py"; - hash = "sha256-9coRpgCewlkFXSGrMVkudaZUll0IFc9jDRBP+2PloOI="; - } - } src/build/config/linux/pkg-config.py - - cp --preserve=mode,ownership,timestamps --recursive --reflink=auto ${swiftshader} src/flutter/third_party/swiftshader - chmod --recursive u+w -- src/flutter/third_party/swiftshader - - ln --symbolic ${llvmPackages.llvm.monorepoSrc} src/flutter/third_party/swiftshader/third_party/llvm-project - - mkdir --parents src/flutter/buildtools/${constants.alt-platform} - ln --symbolic ${llvm} src/flutter/buildtools/${constants.alt-platform}/clang - - mkdir --parents src/buildtools/${constants.alt-platform} - ln --symbolic ${llvm} src/buildtools/${constants.alt-platform}/clang - - mkdir --parents src/${dartPath}/tools/sdks - ln --symbolic ${dart} src/${dartPath}/tools/sdks/dart-sdk - - mkdir --parents src/flutter/third_party/gn/ - ln --symbolic --force ${lib.getExe gn} src/flutter/third_party/gn/gn - - for dir in ''${patchgit[@]}; do - pushd src/$dir - rm --recursive --force .git - git init - git add . - git config user.name "nobody" - git config user.email "nobody@local.host" - git commit --all --message="$dir" --quiet - popd - done - - dart src/${dartPath}/tools/generate_package_config.dart - echo "${dartSdkVersion}" >src/${dartPath}/sdk/version - python3 src/flutter/third_party/dart/tools/generate_sdk_version_file.py - rm --recursive --force src/third_party/angle/.git - python3 src/flutter/tools/pub_get_offline.py - - pushd src/flutter - - for p in ''${patches[@]}; do - patch -p1 -i $p - done - - popd - '' - # error: 'close_range' is missing exception specification 'noexcept(true)' - + lib.optionalString (lib.versionAtLeast flutterVersion "3.35") '' - substituteInPlace src/flutter/third_party/dart/runtime/bin/process_linux.cc \ - --replace-fail "(unsigned int first, unsigned int last, int flags)" "(unsigned int first, unsigned int last, int flags) noexcept(true)" - '' - # src/flutter/third_party/libcxx/include/__type_traits/is_referenceable.h:33:1: error: templates must have C++ linkage - + lib.optionalString (lib.versionAtLeast flutterVersion "3.41") '' - substituteInPlace src/flutter/shell/platform/linux/fl_view_accessible.cc \ - --replace-fail "// Workaround missing C code compatibility in ATK header." "#include " - '' - + '' - popd - ''; - - configureFlags = [ - "--no-prebuilt-dart-sdk" - "--embedder-for-target" - "--no-goma" - "--no-dart-version-git-info" - ] - ++ lib.optionals (stdenv.targetPlatform.isx86_64 == false) [ - "--linux" - "--linux-cpu ${constants.alt-arch}" - ] - ++ lib.optional (!isOptimized) "--unoptimized" - ++ lib.optional (runtimeMode == "debug") "--no-stripped" - ++ lib.optional finalAttrs.finalPackage.doCheck "--enable-unittests" - ++ lib.optional (!finalAttrs.finalPackage.doCheck) "--no-enable-unittests"; - - configurePhase = '' - runHook preConfigure - - export PYTHONPATH=$src/src/build - '' - + lib.optionalString stdenv.hostPlatform.isDarwin '' - export PATH=${darwin.xcode}/Contents/Developer/usr/bin/:$PATH - '' - + '' - python3 ./src/flutter/tools/gn $configureFlags \ - --runtime-mode ${runtimeMode} \ - --out-dir $out \ - --target-sysroot ${finalAttrs.toolchain} \ - --target-dir ${outName} \ - --target-triple ${stdenv.targetPlatform.config} \ - --enable-fontconfig - - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - - export TERM=dumb - '' - # ValueError: ZIP does not support timestamps before 1980 - + '' - substituteInPlace src/flutter/build/zip.py \ - --replace-fail "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED)" "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False)" - '' - + '' - ninja -C $out/out/${outName} -j$NIX_BUILD_CORES - - runHook postBuild - ''; - - # Tests are broken - doCheck = false; - checkPhase = '' - runHook preCheck - - ln --symbolic $out/out src/out - touch src/out/run_tests.log - sh src/flutter/testing/run_tests.sh ${outName} - rm src/out/run_tests.log - - runHook postCheck - ''; - - installPhase = '' - runHook preInstall - - rm --recursive --force $out/out/${outName}/{obj,exe.unstripped,lib.unstripped,zip_archives} - rm $out/out/${outName}/{args.gn,build.ninja,build.ninja.d,compile_commands.json,toolchain.ninja} - find $out/out/${outName} -name '*_unittests' -delete - find $out/out/${outName} -name '*_benchmarks' -delete - '' - + lib.optionalString (finalAttrs.finalPackage.doCheck) '' - rm $out/out/${outName}/{display_list_rendertests,flutter_tester} - '' - + '' - runHook postInstall - ''; - - passthru = { - inherit - dartSdkVersion - isOptimized - runtimeMode - outName - swiftshader - ; - dart = callPackage ./dart.nix { engine = finalAttrs.finalPackage; }; - }; - - meta = { - # Very broken on Darwin - broken = stdenv.hostPlatform.isDarwin; - description = "Flutter engine"; - homepage = "https://flutter.dev"; - maintainers = with lib.maintainers; [ RossComputerGuy ]; - license = lib.licenses.bsd3; - platforms = [ - "x86_64-linux" - "aarch64-linux" - "aarch64-darwin" - ]; - }; -}) diff --git a/pkgs/development/compilers/flutter/engine/source.nix b/pkgs/development/compilers/flutter/engine/source.nix deleted file mode 100644 index e95828c0b8ab..000000000000 --- a/pkgs/development/compilers/flutter/engine/source.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ - lib, - callPackage, - curlMinimal, - pkg-config, - gitMinimal, - python312, - runCommand, - writeText, - cacert, - flutterVersion, - version, - hashes, - url, - hostPlatform, - targetPlatform, - buildPlatform, - ... -}@pkgs: -let - target-constants = callPackage ./constants.nix { platform = targetPlatform; }; - build-constants = callPackage ./constants.nix { platform = buildPlatform; }; - tools = pkgs.tools or (callPackage ./tools.nix { inherit hostPlatform buildPlatform; }); - - boolOption = value: if value then "True" else "False"; - - gclient = writeText "flutter-${version}.gclient" '' - solutions = [{ - "managed": False, - "name": ".", - "url": "${url}", - "custom_vars": { - "download_fuchsia_deps": False, - "download_android_deps": False, - "download_linux_deps": ${boolOption targetPlatform.isLinux}, - "setup_githooks": False, - "download_esbuild": False, - "download_dart_sdk": True, - "host_cpu": "${build-constants.alt-arch}", - "host_os": "${build-constants.alt-os}", - }, - }] - - target_os_only = True - target_os = [ - "${target-constants.alt-os}" - ] - - target_cpu_only = True - target_cpu = [ - "${target-constants.alt-arch}" - ] - ''; -in -runCommand "flutter-engine-source-${version}-${buildPlatform.system}-${targetPlatform.system}" - { - pname = "flutter-engine-source"; - inherit version; - - nativeBuildInputs = [ - curlMinimal - pkg-config - gitMinimal - tools.cipd - (python312.withPackages ( - ps: with ps; [ - httplib2 - six - ] - )) - ]; - - env = { - NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; - GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt"; - SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; - DEPOT_TOOLS_UPDATE = "0"; - DEPOT_TOOLS_COLLECT_METRICS = "0"; - PYTHONDONTWRITEBYTECODE = "1"; - }; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = - (hashes."${buildPlatform.system}" or { })."${targetPlatform.system}" - or (throw "Hash not set for ${targetPlatform.system} on ${buildPlatform.system}"); - } - '' - source ${../../../../build-support/fetchgit/deterministic-git} - export -f clean_git - export -f make_deterministic_repo - - mkdir --parents flutter - cp ${gclient} flutter/.gclient - cd flutter - export PATH=$PATH:${tools.depot_tools} - python3 ${tools.depot_tools}/gclient.py sync --no-history --shallow --nohooks -j $NIX_BUILD_CORES - mv engine $out - - find $out -name '.git' -exec rm --recursive --force {} \; || true - - rm --recursive $out/src/flutter/{buildtools,prebuilts,third_party/swiftshader,third_party/gn/.versions,third_party/dart/tools/sdks/dart-sdk} - '' diff --git a/pkgs/development/compilers/flutter/engine/tools.nix b/pkgs/development/compilers/flutter/engine/tools.nix index fcc841eaae47..0076fab49667 100644 --- a/pkgs/development/compilers/flutter/engine/tools.nix +++ b/pkgs/development/compilers/flutter/engine/tools.nix @@ -2,7 +2,7 @@ stdenv, buildPlatform, hostPlatform, - callPackage, + lib, fetchgit, fetchurl, writeText, @@ -34,9 +34,66 @@ }, }: let - constants = callPackage ./constants.nix { platform = buildPlatform; }; - host-constants = callPackage ./constants.nix { platform = hostPlatform; }; - stdenv-constants = callPackage ./constants.nix { platform = stdenv.hostPlatform; }; + # Pure function computing the CIPD platform string for a given nixpkgs + # platform. Previously lived in ./constants.nix, which was removed together + # with the flutterPackages-source mechanism (#546540). + mkConstants = + platform: + let + os = + if platform.isLinux then + "linux" + else if platform.isDarwin then + "macos" + else if platform.isWindows then + "windows" + else + throw "Unsupported OS \"${platform.parsed.kernel.name}\""; + + alt-os = if platform.isDarwin then "mac" else os; + + arch = + if platform.isx86_64 then + "amd64" + else if platform.isx86 && platform.is32bit then + "386" + else if platform.isAarch64 then + "arm64" + else if platform.isMips && platform.parsed.cpu.significantByte == "littleEndian" then + "mipsle" + else if platform.isMips64 then + "mips64${lib.optionalString (platform.parsed.cpu.significantByte == "littleEndian") "le"}" + else if platform.isPower64 then + "ppc64${lib.optionalString (platform.parsed.cpu.significantByte == "littleEndian") "le"}" + else if platform.isS390x then + "s390x" + else if platform.isRiscV64 then + "riscv64" + else + throw "Unsupported CPU \"${platform.parsed.cpu.name}\""; + + alt-arch = + if platform.isx86_64 then + "x64" + else if platform.isAarch64 then + "arm64" + else + platform.parsed.cpu.name; + in + { + inherit + os + alt-os + arch + alt-arch + ; + platform = "${os}-${arch}"; + alt-platform = "${os}-${alt-arch}"; + }; + + constants = mkConstants buildPlatform; + host-constants = mkConstants hostPlatform; + stdenv-constants = mkConstants stdenv.hostPlatform; in { depot_tools = fetchgit { diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index 4f546902fd30..6011f1523b0f 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -1,16 +1,6 @@ { - useNixpkgsEngine ? false, version, engineVersion, - engineHashes ? { }, - engineUrl ? "https://github.com/flutter/flutter.git@${engineVersion}", - enginePatches ? [ ], - engineRuntimeModes ? [ - "release" - "debug" - ], - engineSwiftShaderHash, - engineSwiftShaderRev, patches, channel, dart, @@ -31,24 +21,7 @@ }@args: let - engine = - if args.useNixpkgsEngine or false then - callPackage ./engine/default.nix { - inherit (args) dart; - dartSdkVersion = args.dart.version; - flutterVersion = version; - swiftshaderRev = engineSwiftShaderRev; - swiftshaderHash = engineSwiftShaderHash; - version = engineVersion; - hashes = engineHashes; - url = engineUrl; - patches = enginePatches; - runtimeModes = engineRuntimeModes; - } - else - null; - - dart = if args.useNixpkgsEngine or false then engine.dart else args.dart; + dart = args.dart; flutterTools = args.flutterTools or (callPackage ./flutter-tools.nix { @@ -197,15 +170,9 @@ let # When other derivations wrap this one, any unmodified files # found here should be included as-is, for tooling compatibility. sdk = unwrapped; - } - // lib.optionalAttrs (engine != null) { - inherit engine; }; meta = { - # TODO: investigate why nixpkgs engine fails for versions >= 3.34 - broken = - ((lib.versionOlder version "3.32") || lib.versionAtLeast version "3.34") && useNixpkgsEngine; description = "Makes it easy and fast to build beautiful apps for mobile and beyond"; longDescription = '' Flutter is Google's SDK for crafting beautiful, @@ -213,9 +180,7 @@ let ''; homepage = "https://flutter.dev"; license = lib.licenses.bsd3; - sourceProvenance = - with lib.sourceTypes; - if useNixpkgsEngine then [ fromSource ] else [ binaryNativeCode ]; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; platforms = [ "x86_64-linux" "aarch64-linux" diff --git a/pkgs/development/compilers/flutter/update/get-engine-hashes.nix.in b/pkgs/development/compilers/flutter/update/get-engine-hashes.nix.in deleted file mode 100644 index c96a7b9adad2..000000000000 --- a/pkgs/development/compilers/flutter/update/get-engine-hashes.nix.in +++ /dev/null @@ -1,36 +0,0 @@ -{ - callPackage, - symlinkJoin, - lib, -}: -let - nixpkgsRoot = "@nixpkgs_root@"; - version = "@flutter_version@"; - engineVersion = "@engine_version@"; - - systemPlatforms = [ - "x86_64-linux" - "aarch64-linux" - ]; - - derivations = lib.foldl' ( - acc: buildPlatform: - acc - ++ (map ( - targetPlatform: - callPackage "${nixpkgsRoot}/pkgs/development/compilers/flutter/engine/source.nix" { - targetPlatform = lib.systems.elaborate targetPlatform; - hostPlatform = lib.systems.elaborate buildPlatform; - buildPlatform = lib.systems.elaborate buildPlatform; - flutterVersion = version; - version = engineVersion; - url = "https://github.com/flutter/flutter.git@${engineVersion}"; - hashes."${buildPlatform}"."${targetPlatform}" = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; - } - ) systemPlatforms) - ) [ ] systemPlatforms; -in -symlinkJoin { - name = "evaluate-derivations"; - paths = derivations; -} diff --git a/pkgs/development/compilers/flutter/update/get-engine-swiftshader.nix.in b/pkgs/development/compilers/flutter/update/get-engine-swiftshader.nix.in deleted file mode 100644 index aa71f8ae2ad3..000000000000 --- a/pkgs/development/compilers/flutter/update/get-engine-swiftshader.nix.in +++ /dev/null @@ -1,10 +0,0 @@ -{ fetchgit }: -fetchgit { - url = "https://swiftshader.googlesource.com/SwiftShader.git"; - rev = "@engine_swiftshader_rev@"; - - # Keep with in sync of pkgs/development/compilers/flutter/engine/package.nix - postFetch = '' - rm -rf $out/third_party/llvm-project - ''; -} diff --git a/pkgs/development/compilers/flutter/update/update.py b/pkgs/development/compilers/flutter/update/update.py index 971af0d17285..34e4b2fbf97c 100755 --- a/pkgs/development/compilers/flutter/update/update.py +++ b/pkgs/development/compilers/flutter/update/update.py @@ -16,9 +16,8 @@ import yaml FAKE_HASH = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" NIXPKGS_ROOT = ( - subprocess.Popen( - ["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE, text=True - ) + subprocess + .Popen(["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE, text=True) .communicate()[0] .strip() ) @@ -95,35 +94,6 @@ def nix_build_to_fail(code): return stderr -def get_engine_hashes(engine_version, flutter_version): - code = load_code( - "get-engine-hashes.nix", - nixpkgs_root=NIXPKGS_ROOT, - flutter_version=flutter_version, - engine_version=engine_version, - ) - - stderr = nix_build_to_fail(code) - - pattern = re.compile( - rf"/nix/store/.*-flutter-engine-source-{engine_version}-(.+?-.+?)-(.+?-.+?).drv':\n\s+specified: .*\n\s+got:\s+(.+?)\n" - ) - matches = pattern.findall(stderr) - result_dict = {} - - for match in matches: - flutter_platform, architecture, got = match - result_dict.setdefault(flutter_platform, {})[architecture] = got - - def sort_dict_recursive(d): - return { - k: sort_dict_recursive(v) if isinstance(v, dict) else v - for k, v in sorted(d.items()) - } - - return sort_dict_recursive(result_dict) - - def get_artifact_hashes(flutter_compact_version): code = load_code( "get-artifact-hashes.nix", @@ -210,37 +180,11 @@ def get_pubspec_lock(flutter_compact_version, flutter_src): return yaml.safe_load(pubspec_lock_yaml) -def get_engine_swiftshader_rev(engine_version): - with urllib.request.urlopen( - f"https://github.com/flutter/flutter/raw/{engine_version}/DEPS" - ) as f: - deps = f.read().decode("utf-8") - pattern = re.compile( - r"Var\('swiftshader_git'\) \+ '\/SwiftShader\.git' \+ '@' \+ \'([0-9a-fA-F]{40})\'\," - ) - return pattern.findall(deps)[0] - - -def get_engine_swiftshader_hash(engine_swiftshader_rev): - code = load_code( - "get-engine-swiftshader.nix", - engine_swiftshader_rev=engine_swiftshader_rev, - hash="", - ) - - stderr = nix_build_to_fail(code) - pattern = re.compile(r"got:\s+(.+?)\n") - return pattern.findall(stderr)[0] - - def write_data( nixpkgs_flutter_version_directory, flutter_version, channel, engine_hash, - engine_hashes, - engine_swiftshader_hash, - engine_swiftshader_rev, dart_version, dart_hash, flutter_hash, @@ -255,10 +199,7 @@ def write_data( { "version": flutter_version, "engineVersion": engine_hash, - "engineSwiftShaderHash": engine_swiftshader_hash, - "engineSwiftShaderRev": engine_swiftshader_rev, "channel": channel, - "engineHashes": engine_hashes, "dartVersion": dart_version, "dartHash": dart_hash, "flutterHash": flutter_hash, @@ -282,9 +223,6 @@ def update_all_packages(): new_content = [ "flutterPackages-bin = recurseIntoAttrs (callPackage ../development/compilers/flutter { });", - "flutterPackages-source = recurseIntoAttrs (", - " callPackage ../development/compilers/flutter { useNixpkgsEngine = true; }", - ");", "flutterPackages = flutterPackages-bin;", "flutter = flutterPackages.stable;", ] + [ @@ -319,7 +257,7 @@ def update_all_packages(): file.write("".join(lines)) -# Finds Flutter version, Dart version, and Engine hash. +# Finds Flutter version, and Dart version. # If the Flutter version is given, it uses that. Otherwise finds the # latest stable Flutter version. def find_versions(flutter_version=None, channel=None): @@ -345,7 +283,8 @@ def find_versions(flutter_version=None, channel=None): flutter_version = release["version"] tags = ( - subprocess.Popen( + subprocess + .Popen( ["git", "ls-remote", "--tags", "https://github.com/flutter/flutter.git"], stdout=subprocess.PIPE, text=True, @@ -445,9 +384,6 @@ def main(): write_data( pubspec_lock={}, artifact_hashes={}, - engine_hashes={}, - engine_swiftshader_hash=FAKE_HASH, - engine_swiftshader_rev="0", **common_data_args, ) @@ -456,9 +392,6 @@ def main(): write_data( pubspec_lock=pubspec_lock, artifact_hashes={}, - engine_hashes={}, - engine_swiftshader_hash=FAKE_HASH, - engine_swiftshader_rev="0", **common_data_args, ) @@ -467,32 +400,18 @@ def main(): write_data( pubspec_lock=pubspec_lock, artifact_hashes=artifact_hashes, - engine_hashes={}, - engine_swiftshader_hash=FAKE_HASH, - engine_swiftshader_rev="0", **common_data_args, ) - engine_hashes = get_engine_hashes(engine_hash, flutter_version) - write_data( pubspec_lock=pubspec_lock, artifact_hashes=artifact_hashes, - engine_hashes=engine_hashes, - engine_swiftshader_hash=FAKE_HASH, - engine_swiftshader_rev="0", **common_data_args, ) - engine_swiftshader_rev = get_engine_swiftshader_rev(engine_hash) - engine_swiftshader_hash = get_engine_swiftshader_hash(engine_swiftshader_rev) - write_data( pubspec_lock=pubspec_lock, artifact_hashes=artifact_hashes, - engine_hashes=engine_hashes, - engine_swiftshader_hash=engine_swiftshader_hash, - engine_swiftshader_rev=engine_swiftshader_rev, **common_data_args, ) diff --git a/pkgs/development/compilers/flutter/versions/3_29/data.json b/pkgs/development/compilers/flutter/versions/3_29/data.json index 4c6757f3bace..2a490d7086ac 100644 --- a/pkgs/development/compilers/flutter/versions/3_29/data.json +++ b/pkgs/development/compilers/flutter/versions/3_29/data.json @@ -1,19 +1,7 @@ { "version": "3.29.3", "engineVersion": "cf56914b326edb0ccb123ffdc60f00060bd513fa", - "engineSwiftShaderHash": "sha256-mRLCvhNkmHz7Rv6GzXkY7OB1opBSq+ATWZ466qZdgto=", - "engineSwiftShaderRev": "2fa7e9b99ae4e70ea5ae2cc9c8d3afb43391384f", "channel": "stable", - "engineHashes": { - "aarch64-linux": { - "aarch64-linux": "sha256-3BIBG9z433CDsBqX1T6K2y5kUI5ZTqXBBXLoCrX/f2A=", - "x86_64-linux": "sha256-3BIBG9z433CDsBqX1T6K2y5kUI5ZTqXBBXLoCrX/f2A=" - }, - "x86_64-linux": { - "aarch64-linux": "sha256-+4CswkW7+0gBcZKrLjugTIG5NWAxCB8y39iUxdND2I4=", - "x86_64-linux": "sha256-+4CswkW7+0gBcZKrLjugTIG5NWAxCB8y39iUxdND2I4=" - } - }, "dartVersion": "3.7.2", "dartHash": { "x86_64-linux": "sha256-ClgSWEu0+lLcPIlabVvBY197/c/kyio6Zoq3KppbW3Y=", diff --git a/pkgs/development/compilers/flutter/versions/3_32/data.json b/pkgs/development/compilers/flutter/versions/3_32/data.json index 53b3a3840ba2..711d79907722 100644 --- a/pkgs/development/compilers/flutter/versions/3_32/data.json +++ b/pkgs/development/compilers/flutter/versions/3_32/data.json @@ -1,19 +1,7 @@ { "version": "3.32.8", "engineVersion": "ef0cd000916d64fa0c5d09cc809fa7ad244a5767", - "engineSwiftShaderHash": "sha256-ATVcuxqPHqHOWYyO7DoX9LdgUiO3INUi7m9Mc6ccc1M=", - "engineSwiftShaderRev": "d040a5bab638bf7c226235c95787ba6288bb6416", "channel": "stable", - "engineHashes": { - "aarch64-linux": { - "aarch64-linux": "sha256-JrbIMYwdfe36y6bHj1eAjYOKPGGp7mfWxWDCoCm7wiQ=", - "x86_64-linux": "sha256-JrbIMYwdfe36y6bHj1eAjYOKPGGp7mfWxWDCoCm7wiQ=" - }, - "x86_64-linux": { - "aarch64-linux": "sha256-R0ut5hzzBgfjbZFB1ofK4jEmr3CcBKHFJUl3c7nmn0E=", - "x86_64-linux": "sha256-R0ut5hzzBgfjbZFB1ofK4jEmr3CcBKHFJUl3c7nmn0E=" - } - }, "dartVersion": "3.8.1", "dartHash": { "x86_64-linux": "sha256-3eE40VMwrPFD502lIaz+CkD7mBnSI/WqJ3C4DVQ01Z4=", diff --git a/pkgs/development/compilers/flutter/versions/3_35/data.json b/pkgs/development/compilers/flutter/versions/3_35/data.json index 8fb3d6bbd85e..5ae15afa580b 100644 --- a/pkgs/development/compilers/flutter/versions/3_35/data.json +++ b/pkgs/development/compilers/flutter/versions/3_35/data.json @@ -1,19 +1,7 @@ { "version": "3.35.7", "engineVersion": "035316565ad77281a75305515e4682e6c4c6f7ca", - "engineSwiftShaderHash": "sha256-ATVcuxqPHqHOWYyO7DoX9LdgUiO3INUi7m9Mc6ccc1M=", - "engineSwiftShaderRev": "d040a5bab638bf7c226235c95787ba6288bb6416", "channel": "stable", - "engineHashes": { - "aarch64-linux": { - "aarch64-linux": "sha256-v2L0MQRTXvWngb8fu/AR9iofq2CDq1HFedXE8cSzOws=", - "x86_64-linux": "sha256-v2L0MQRTXvWngb8fu/AR9iofq2CDq1HFedXE8cSzOws=" - }, - "x86_64-linux": { - "aarch64-linux": "sha256-RKfKhFwlwVEguWqI6OinTqdCM3yNTP/5PwevREmS4Nk=", - "x86_64-linux": "sha256-RKfKhFwlwVEguWqI6OinTqdCM3yNTP/5PwevREmS4Nk=" - } - }, "dartVersion": "3.9.2", "dartHash": { "x86_64-linux": "sha256-ZJcii2WBCE4PNt5+S2nH4hj+WoZuhRLFkzMlSZEa01Y=", diff --git a/pkgs/development/compilers/flutter/versions/3_38/data.json b/pkgs/development/compilers/flutter/versions/3_38/data.json index 0561fac74b8b..f324eb631f91 100644 --- a/pkgs/development/compilers/flutter/versions/3_38/data.json +++ b/pkgs/development/compilers/flutter/versions/3_38/data.json @@ -1,19 +1,7 @@ { "version": "3.38.10", "engineVersion": "cafcda5721a78a7884db92f13c5e89f7643d52dd", - "engineSwiftShaderHash": "sha256-ATVcuxqPHqHOWYyO7DoX9LdgUiO3INUi7m9Mc6ccc1M=", - "engineSwiftShaderRev": "d040a5bab638bf7c226235c95787ba6288bb6416", "channel": "stable", - "engineHashes": { - "aarch64-linux": { - "aarch64-linux": "sha256-qhOj6VT1aKhBApEr5R10NwalozUPMQKuUXfhcscTDTs=", - "x86_64-linux": "sha256-qhOj6VT1aKhBApEr5R10NwalozUPMQKuUXfhcscTDTs=" - }, - "x86_64-linux": { - "aarch64-linux": "sha256-VriQI7YmeM/HrZvLPRllxn5D/0r5xJiCzsn4XeBXO+A=", - "x86_64-linux": "sha256-VriQI7YmeM/HrZvLPRllxn5D/0r5xJiCzsn4XeBXO+A=" - } - }, "dartVersion": "3.10.9", "dartHash": { "x86_64-linux": "sha256-Js8cesRAseVfa5CCQSmnJJVBYl+S7Zy7ax/vNbWMjQ0=", diff --git a/pkgs/development/compilers/flutter/versions/3_41/data.json b/pkgs/development/compilers/flutter/versions/3_41/data.json index 8bc39d31b938..94852c605734 100644 --- a/pkgs/development/compilers/flutter/versions/3_41/data.json +++ b/pkgs/development/compilers/flutter/versions/3_41/data.json @@ -1,19 +1,7 @@ { "version": "3.41.9", "engineVersion": "42d3d75a56efe1a2e9902f52dc8006099c45d937", - "engineSwiftShaderHash": "sha256-qbtCl2nTpmtp9dnaoXc7rF3RqLnAZEmzw1BzPoCRWrc=", - "engineSwiftShaderRev": "794b0cfce1d828d187637e6d932bae484fbe0976", "channel": "stable", - "engineHashes": { - "aarch64-linux": { - "aarch64-linux": "sha256-2nXNMgSXP2bwYUrHxofN1uu8ZnIPSVewR7Lg50BIW0E=", - "x86_64-linux": "sha256-2nXNMgSXP2bwYUrHxofN1uu8ZnIPSVewR7Lg50BIW0E=" - }, - "x86_64-linux": { - "aarch64-linux": "sha256-Tu0gC4wxbV8sGU46bODhQETlVs3D8fI4ziuL26Gt8Fw=", - "x86_64-linux": "sha256-Tu0gC4wxbV8sGU46bODhQETlVs3D8fI4ziuL26Gt8Fw=" - } - }, "dartVersion": "3.11.5", "dartHash": { "x86_64-linux": "sha256-V/OrWsJIgwYLH/ErzaxHLtdlY+xzZOiPim1B5PDbB18=", diff --git a/pkgs/development/compilers/flutter/versions/3_44/data.json b/pkgs/development/compilers/flutter/versions/3_44/data.json index a8de805e4bb6..d32f78d79a9f 100644 --- a/pkgs/development/compilers/flutter/versions/3_44/data.json +++ b/pkgs/development/compilers/flutter/versions/3_44/data.json @@ -1,19 +1,7 @@ { "version": "3.44.4", "engineVersion": "a10d8ac38de835021c8d2f920dbf50a920ccc030", - "engineSwiftShaderHash": "sha256-qbtCl2nTpmtp9dnaoXc7rF3RqLnAZEmzw1BzPoCRWrc=", - "engineSwiftShaderRev": "794b0cfce1d828d187637e6d932bae484fbe0976", "channel": "stable", - "engineHashes": { - "aarch64-linux": { - "aarch64-linux": "sha256-R9xvuvdeoHLX4K52S7lAQW8iA7DIuIMjjntk1RcMVR8=", - "x86_64-linux": "sha256-R9xvuvdeoHLX4K52S7lAQW8iA7DIuIMjjntk1RcMVR8=" - }, - "x86_64-linux": { - "aarch64-linux": "sha256-zEbGTWZbsRG91YgHsyDU3wbXCLM0nk5TdbOAyjq1uMM=", - "x86_64-linux": "sha256-zEbGTWZbsRG91YgHsyDU3wbXCLM0nk5TdbOAyjq1uMM=" - } - }, "dartVersion": "3.12.2", "dartHash": { "x86_64-linux": "sha256-KOR7RM8HXzZ3EEbAaLsNF0IBz5x2CHRK7RzCMgQpnC0=", diff --git a/pkgs/development/compilers/flutter/versions/3_44/patches/gradle-flutter-tools-wrapper.patch b/pkgs/development/compilers/flutter/versions/3_44/patches/gradle-flutter-tools-wrapper.patch index 4c5b258be373..45a3eaf069a5 100644 --- a/pkgs/development/compilers/flutter/versions/3_44/patches/gradle-flutter-tools-wrapper.patch +++ b/pkgs/development/compilers/flutter/versions/3_44/patches/gradle-flutter-tools-wrapper.patch @@ -1,35 +1,41 @@ -This patch introduces an intermediate Gradle build step to alter the behavior -of flutter_tools' Gradle project, specifically moving the creation of `build` -and `.gradle` directories from within the Nix Store to somewhere in `$HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev`. + +This patch redirects flutter_tools' Gradle project to build in a writable +directory at `$HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev`, +instead of within the read-only Nix Store. Without this patch, flutter_tools' Gradle project tries to generate `build` and `.gradle` directories within the Nix Store. Resulting in read-only errors when trying to build a -Flutter Android app at runtime. +Flutter Android app at runtime. In Gradle 9+, even the project directory itself must be +writable. -This patch takes advantage of the fact settings.gradle takes priority over settings.gradle.kts to build the intermediate Gradle project -when a Flutter app runs `includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")` +This patch takes advantage of the fact settings.gradle takes priority over settings.gradle.kts. +When a Flutter app runs `includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")`, +Gradle evaluates the `settings.gradle` we add, which: +1. Creates symlinks to `build.gradle.kts` and `src/` in the writable cache directory +2. Sets `rootProject.projectDir` to the writable cache directory +3. Applies the original `settings.gradle.kts` for dependency resolution +4. Redirects `buildDirectory` to the cache -`rootProject.buildFileName = "/dev/null"` so that the intermediate project doesn't use `build.gradle.kts` that's in the same directory. - -The intermediate project makes a `settings.gradle` file in `$HOME/.cache/flutter/nix-flutter-tools-gradle//` and `includeBuild`s it. -This Gradle project will build the actual `packages/flutter_tools/gradle` project by setting -`rootProject.projectDir = new File("$settingsDir")` and `apply from: new File("$settingsDir/settings.gradle.kts")`. - -To move `build` to `$HOME/.cache/flutter/nix-flutter-tools-gradle//`, we need to set `buildDirectory`. To move `.gradle` as well, the `--project-cache-dir` argument must be passed to the Gradle wrapper. -Changing the `GradleUtils.getExecutable` function signature is a delibarate choice, to ensure that no new unpatched usages slip in. +Changing the `GradleUtils.getExecutable` function signature is a deliberate choice, to ensure that no new unpatched usages slip in. --- /dev/null +++ b/packages/flutter_tools/gradle/settings.gradle -@@ -0,0 +1,19 @@ -+rootProject.buildFileName = "/dev/null" -+ +@@ -0,0 +1,22 @@ +def engineShortRev = (new File("$settingsDir/../../../bin/internal/engine.version")).text.take(10) +def dir = new File("$System.env.HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev") +dir.mkdirs() -+def file = new File(dir, "settings.gradle") + -+file.text = """ -+rootProject.projectDir = new File("$settingsDir") ++def buildScript = new File(dir, "build.gradle.kts") ++if (!buildScript.exists()) { ++ java.nio.file.Files.createSymbolicLink(buildScript.toPath(), new File("$settingsDir/build.gradle.kts").toPath()) ++} ++def srcLink = new File(dir, "src") ++if (!srcLink.exists()) { ++ java.nio.file.Files.createSymbolicLink(srcLink.toPath(), new File("$settingsDir/src").toPath()) ++} ++ ++rootProject.projectDir = dir ++ +apply from: new File("$settingsDir/settings.gradle.kts") + +gradle.allprojects { project -> @@ -37,9 +43,6 @@ Changing the `GradleUtils.getExecutable` function signature is a delibarate choi + project.layout.buildDirectory = new File("$dir/build") + } +} -+""" -+ -+includeBuild(dir) --- a/packages/flutter_tools/gradle/build.gradle.kts +++ b/packages/flutter_tools/gradle/build.gradle.kts @@ -4,6 +4,11 @@ diff --git a/pkgs/development/compilers/flutter/versions/3_47/data.json b/pkgs/development/compilers/flutter/versions/3_47/data.json new file mode 100644 index 000000000000..edacf2e7461d --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_47/data.json @@ -0,0 +1,1071 @@ +{ + "version": "3.47.0", + "engineVersion": "5f77625673248ee5846fbcaf5d3e1a3878386fd7", + "channel": "stable", + "dartVersion": "3.13.0", + "dartHash": { + "x86_64-linux": "sha256-h5Alc/rNisrKx+4f5z+o0GaOBgZQFgaOLtbFyZxrHuA=", + "aarch64-linux": "sha256-IBQaBlMyeTm7IMS4eyMSJr66ESjYqa7bswy1rxonkNQ=", + "aarch64-darwin": "sha256-GBLWAq7Qqc9ygck/UUoeGuz2DcNFxDN9uk/yj6jTmMo=" + }, + "flutterHash": "sha256-UI0QwBIbwa8WIg3do3ctv+/9XdgWFbwNkTz3xeOxTKs=", + "artifactHashes": { + "android": { + "aarch64-darwin": "sha256-gxOVXVzaooofJu2QY9Y33xRLPbq/5Sih9rX6XYOeVMg=", + "aarch64-linux": "sha256-hbyWNOD6YLSKJWYSjtNgmKrleh62BqikAbdMLd4w+Es=", + "x86_64-linux": "sha256-hbyWNOD6YLSKJWYSjtNgmKrleh62BqikAbdMLd4w+Es=" + }, + "fuchsia": { + "aarch64-darwin": "sha256-8lP0zSOWb1Ra+C/EJioQNN+AMnG6PH1RNXcJT/5Zkdo=", + "aarch64-linux": "sha256-8lP0zSOWb1Ra+C/EJioQNN+AMnG6PH1RNXcJT/5Zkdo=", + "x86_64-linux": "sha256-8lP0zSOWb1Ra+C/EJioQNN+AMnG6PH1RNXcJT/5Zkdo=" + }, + "ios": { + "aarch64-darwin": "sha256-f2wU9wkogt2ByWnIeOa8i4+f1ZoJT/MnI4UjNPNrw9U=", + "aarch64-linux": "sha256-f2wU9wkogt2ByWnIeOa8i4+f1ZoJT/MnI4UjNPNrw9U=", + "x86_64-linux": "sha256-f2wU9wkogt2ByWnIeOa8i4+f1ZoJT/MnI4UjNPNrw9U=" + }, + "linux": { + "aarch64-darwin": "sha256-b+70ax/GeP6pAXOejPcpwt1CN7hLFL/1xj2rKFWyvdU=", + "aarch64-linux": "sha256-b+70ax/GeP6pAXOejPcpwt1CN7hLFL/1xj2rKFWyvdU=", + "x86_64-linux": "sha256-9hhmo/w/8mv3QVv0W+2Tkz5h0HQqQ6z5dfctmvvldOo=" + }, + "macos": { + "aarch64-darwin": "sha256-7UDjHQ6u88gMT1AghTxuxHPUl3dEoBvxOLTnRaViPY0=", + "aarch64-linux": "sha256-7UDjHQ6u88gMT1AghTxuxHPUl3dEoBvxOLTnRaViPY0=", + "x86_64-linux": "sha256-7UDjHQ6u88gMT1AghTxuxHPUl3dEoBvxOLTnRaViPY0=" + }, + "universal": { + "aarch64-darwin": "sha256-JNMUgnMn89WlNXqoYJA42J7zmutHz4WI845Z4O2Jsy4=", + "aarch64-linux": "sha256-r1y7KANJziEP0PAMmwZaj6wKLMg0ijunYvA8VO6UDxo=", + "x86_64-linux": "sha256-cfBb5bFjq4gf0zc6I7r2CajZOad1X3zYFdqvsoIzOlM=" + }, + "web": { + "aarch64-darwin": "sha256-2ew9goqJs/CLSDehL+sE2eI9iQEvnxEYatqDucDc1YA=", + "aarch64-linux": "sha256-2ew9goqJs/CLSDehL+sE2eI9iQEvnxEYatqDucDc1YA=", + "x86_64-linux": "sha256-2ew9goqJs/CLSDehL+sE2eI9iQEvnxEYatqDucDc1YA=" + }, + "windows": { + "aarch64-darwin": "sha256-RcwABWmCizfVQbVds/JRDPLihA/ieauwutvcSZvKy2A=", + "aarch64-linux": "sha256-RcwABWmCizfVQbVds/JRDPLihA/ieauwutvcSZvKy2A=", + "x86_64-linux": "sha256-KMtl3vrs7N28JKzAQPp23SUVlLM2OhO9p6h0fU8G2Sw=" + } + }, + "pubspecLock": { + "packages": { + "_fe_analyzer_shared": { + "dependency": "direct main", + "description": { + "name": "_fe_analyzer_shared", + "sha256": "0e4db51a88671b676adc09e923ffebd765a1f0c2b04dc19b08b35a335de2972c", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "95.0.0" + }, + "analyzer": { + "dependency": "direct main", + "description": { + "name": "analyzer", + "sha256": "3d577a36cde804a46bd1d89e673c3d87c3538c49a39c35d4d336f7760b48c319", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "10.1.0" + }, + "archive": { + "dependency": "direct main", + "description": { + "name": "archive", + "sha256": "cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.6.1" + }, + "args": { + "dependency": "direct main", + "description": { + "name": "args", + "sha256": "d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.7.0" + }, + "async": { + "dependency": "direct main", + "description": { + "name": "async", + "sha256": "e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.13.1" + }, + "boolean_selector": { + "dependency": "direct main", + "description": { + "name": "boolean_selector", + "sha256": "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.2" + }, + "browser_launcher": { + "dependency": "direct main", + "description": { + "name": "browser_launcher", + "sha256": "ca2557663d3033845f2ef2b60f94fc249528324fd1affddccb7c63ac0ccd6c67", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.1.3" + }, + "built_collection": { + "dependency": "direct main", + "description": { + "name": "built_collection", + "sha256": "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "5.1.1" + }, + "built_value": { + "dependency": "direct main", + "description": { + "name": "built_value", + "sha256": "34e4067d30ce212937df995f03b69992eea683539ceeac7f679a1f1eba055b56", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "8.12.6" + }, + "checked_yaml": { + "dependency": "direct dev", + "description": { + "name": "checked_yaml", + "sha256": "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.0.4" + }, + "cli_config": { + "dependency": "direct main", + "description": { + "name": "cli_config", + "sha256": "ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.2.0" + }, + "clock": { + "dependency": "direct main", + "description": { + "name": "clock", + "sha256": "fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.1.2" + }, + "code_assets": { + "dependency": "direct main", + "description": { + "name": "code_assets", + "sha256": "bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.2.1" + }, + "code_builder": { + "dependency": "direct main", + "description": { + "name": "code_builder", + "sha256": "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.11.1" + }, + "collection": { + "dependency": "direct main", + "description": { + "name": "collection", + "sha256": "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.19.1" + }, + "completion": { + "dependency": "direct main", + "description": { + "name": "completion", + "sha256": "82fa09800c0b71a2e8396bf3ca6b36b43cd35fe7ba2aeab53b6349ac671d0f5b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.2" + }, + "convert": { + "dependency": "direct main", + "description": { + "name": "convert", + "sha256": "b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.1.2" + }, + "coverage": { + "dependency": "direct main", + "description": { + "name": "coverage", + "sha256": "956a3de0725ca232ad353565a8290d3357592bf4250f6f298a185e2d949c5d3d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.15.1" + }, + "crypto": { + "dependency": "direct main", + "description": { + "name": "crypto", + "sha256": "c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.0.7" + }, + "csslib": { + "dependency": "direct main", + "description": { + "name": "csslib", + "sha256": "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.2" + }, + "dap": { + "dependency": "direct main", + "description": { + "name": "dap", + "sha256": "42b0b083a09c59a118741769e218fc3738980ab591114f09d1026241d2b9c290", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.4.0" + }, + "dart_service_protocol_shared": { + "dependency": "transitive", + "description": { + "name": "dart_service_protocol_shared", + "sha256": "1737875c176d7e3d87bb3a359182828b542fe20a0b34198b8d31a81af5c7a76d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.0.3" + }, + "dart_style": { + "dependency": "direct main", + "description": { + "name": "dart_style", + "sha256": "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.1.7" + }, + "data_assets": { + "dependency": "direct main", + "description": { + "name": "data_assets", + "sha256": "8bfdbf25ec8a0f4b5a3c993042c4ab9996ba354f0b03d40f4e360f3730d71cae", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.20.0" + }, + "dds": { + "dependency": "direct main", + "description": { + "name": "dds", + "sha256": "6673c5b29e502fd44dbf5836685e7c7c16b11c0fa7f91ef241e0cbf0638c8794", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "5.3.0" + }, + "dds_service_extensions": { + "dependency": "direct main", + "description": { + "name": "dds_service_extensions", + "sha256": "afe0fce921953ac0c5bb276bccd7e36fa5035d7769567d122523fdd09beb4d03", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.0" + }, + "devtools_shared": { + "dependency": "direct main", + "description": { + "name": "devtools_shared", + "sha256": "2daf7a9fba6a470668b26ecbd04200f7bf992aad81a2c31d12457c7791419dea", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "12.1.0" + }, + "dtd": { + "dependency": "direct main", + "description": { + "name": "dtd", + "sha256": "09ddb228b3d1478a093556357692a4c203ff4f9d5f8cda05dfdca0ff3fb7c5d3", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.0.0" + }, + "dwds": { + "dependency": "direct main", + "description": { + "name": "dwds", + "sha256": "280ca49e939f3f8a96f3a77bb17dfc284fd92b5004bd144ccafb2ab3ddb3b7f9", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "27.1.2" + }, + "extension_discovery": { + "dependency": "direct main", + "description": { + "name": "extension_discovery", + "sha256": "de1fce715ab013cdfb00befc3bdf0914bea5e409c3a567b7f8f144bc061611a7", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.0" + }, + "fake_async": { + "dependency": "direct main", + "description": { + "name": "fake_async", + "sha256": "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.3.3" + }, + "ffi": { + "dependency": "direct main", + "description": { + "name": "ffi", + "sha256": "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.2.0" + }, + "file": { + "dependency": "direct main", + "description": { + "name": "file", + "sha256": "a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "7.0.1" + }, + "file_testing": { + "dependency": "direct dev", + "description": { + "name": "file_testing", + "sha256": "eb0c85fd118ddc0d41c295c09f64e0924c256b071087cdc9828d5372c80d554d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.0.2" + }, + "fixnum": { + "dependency": "direct main", + "description": { + "name": "fixnum", + "sha256": "b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.1.1" + }, + "flutter_template_images": { + "dependency": "direct main", + "description": { + "name": "flutter_template_images", + "sha256": "0120589a786dbae4e86af1f61748baccd8530abd56a60e7a13479647a75222fe", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "5.0.0" + }, + "frontend_server_client": { + "dependency": "direct main", + "description": { + "name": "frontend_server_client", + "sha256": "f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.0.0" + }, + "glob": { + "dependency": "direct main", + "description": { + "name": "glob", + "sha256": "c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.3" + }, + "graphs": { + "dependency": "direct main", + "description": { + "name": "graphs", + "sha256": "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.3.2" + }, + "hooks": { + "dependency": "direct main", + "description": { + "name": "hooks", + "sha256": "9a62a50b50b769a737bc0a8ff381f333529df3ab746b2f6b02e83760231455ba", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.0.2" + }, + "hooks_runner": { + "dependency": "direct main", + "description": { + "name": "hooks_runner", + "sha256": "a67ab8106545fcffcf5c43edf84b4be222fc95a9fbec8baef1bcaf4534540cfc", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.5.0" + }, + "html": { + "dependency": "direct main", + "description": { + "name": "html", + "sha256": "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.15.6" + }, + "http": { + "dependency": "direct main", + "description": { + "name": "http", + "sha256": "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.6.0" + }, + "http_multi_server": { + "dependency": "direct main", + "description": { + "name": "http_multi_server", + "sha256": "aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.2.2" + }, + "http_parser": { + "dependency": "direct main", + "description": { + "name": "http_parser", + "sha256": "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.1.2" + }, + "intl": { + "dependency": "direct main", + "description": { + "name": "intl", + "sha256": "1ca20c894b1717686a2319b8548763d812bc0aabdac580420a44c5178c57a867", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.20.3" + }, + "io": { + "dependency": "direct main", + "description": { + "name": "io", + "sha256": "dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.5" + }, + "js": { + "dependency": "direct dev", + "description": { + "name": "js", + "sha256": "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.7.2" + }, + "json_annotation": { + "dependency": "direct dev", + "description": { + "name": "json_annotation", + "sha256": "2a743920d81b7910627f68ee2c9ac1fc0bfee32b9fc3403587d7c6791ca12f80", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.12.0" + }, + "json_rpc_2": { + "dependency": "direct main", + "description": { + "name": "json_rpc_2", + "sha256": "82dfd37d3b2e5030ae4729e1d7f5538cbc45eb1c73d618b9272931facac3bec1", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.1.0" + }, + "logging": { + "dependency": "direct main", + "description": { + "name": "logging", + "sha256": "c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.3.0" + }, + "matcher": { + "dependency": "direct main", + "description": { + "name": "matcher", + "sha256": "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.12.20" + }, + "meta": { + "dependency": "direct main", + "description": { + "name": "meta", + "sha256": "c82594181e3312f3d0695fc95aaaf7758d75b8d4ae2bbecf223b9fd5109a059d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.18.3" + }, + "mime": { + "dependency": "direct main", + "description": { + "name": "mime", + "sha256": "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.0.0" + }, + "multicast_dns": { + "dependency": "direct main", + "description": { + "name": "multicast_dns", + "sha256": "134668a9605c747322d8c3eb0e89a4c0cbdedb29f8d2d5ae29d14daef724987b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.3.3+1" + }, + "mustache_template": { + "dependency": "direct main", + "description": { + "name": "mustache_template", + "sha256": "c689b4d59176f8c7a2860aab765d205916aa5b06cfafff7613bfcc42fa996143", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.0.5" + }, + "native_stack_traces": { + "dependency": "direct main", + "description": { + "name": "native_stack_traces", + "sha256": "d34cf916db87b14d39465b3e3b4b4a8ee1f304bde6ed7605571e34802e3d6a11", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.6.1" + }, + "node_preamble": { + "dependency": "direct dev", + "description": { + "name": "node_preamble", + "sha256": "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.0.2" + }, + "package_config": { + "dependency": "direct main", + "description": { + "name": "package_config", + "sha256": "f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.2.0" + }, + "path": { + "dependency": "direct main", + "description": { + "name": "path", + "sha256": "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.9.1" + }, + "petitparser": { + "dependency": "direct main", + "description": { + "name": "petitparser", + "sha256": "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "7.0.2" + }, + "platform": { + "dependency": "direct main", + "description": { + "name": "platform", + "sha256": "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.1.6" + }, + "pool": { + "dependency": "direct main", + "description": { + "name": "pool", + "sha256": "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.5.2" + }, + "process": { + "dependency": "direct main", + "description": { + "name": "process", + "sha256": "c6248e4526673988586e8c00bb22a49210c258dc91df5227d5da9748ecf79744", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "5.0.5" + }, + "pub_semver": { + "dependency": "direct main", + "description": { + "name": "pub_semver", + "sha256": "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.2.0" + }, + "pubspec_parse": { + "dependency": "direct main", + "description": { + "name": "pubspec_parse", + "sha256": "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.5.0" + }, + "record_use": { + "dependency": "transitive", + "description": { + "name": "record_use", + "sha256": "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.6.0" + }, + "shelf": { + "dependency": "direct main", + "description": { + "name": "shelf", + "sha256": "e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.4.2" + }, + "shelf_packages_handler": { + "dependency": "direct main", + "description": { + "name": "shelf_packages_handler", + "sha256": "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.0.2" + }, + "shelf_proxy": { + "dependency": "direct main", + "description": { + "name": "shelf_proxy", + "sha256": "0c3a7b2b4c111cae8a6d9077701e0622c6013d38a780373ac359d6d45b3aa10b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.5" + }, + "shelf_static": { + "dependency": "direct main", + "description": { + "name": "shelf_static", + "sha256": "c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.1.3" + }, + "shelf_web_socket": { + "dependency": "direct main", + "description": { + "name": "shelf_web_socket", + "sha256": "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.0.0" + }, + "source_map_stack_trace": { + "dependency": "direct main", + "description": { + "name": "source_map_stack_trace", + "sha256": "c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.2" + }, + "source_maps": { + "dependency": "direct main", + "description": { + "name": "source_maps", + "sha256": "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.10.13" + }, + "source_span": { + "dependency": "direct main", + "description": { + "name": "source_span", + "sha256": "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.10.2" + }, + "sprintf": { + "dependency": "direct main", + "description": { + "name": "sprintf", + "sha256": "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "7.0.0" + }, + "sse": { + "dependency": "direct main", + "description": { + "name": "sse", + "sha256": "a9a804dbde8bfd369da3b4aa241d44d63a6486a97388c54ec166073d88c52302", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.2.0" + }, + "stack_trace": { + "dependency": "direct main", + "description": { + "name": "stack_trace", + "sha256": "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.12.1" + }, + "standard_message_codec": { + "dependency": "direct main", + "description": { + "name": "standard_message_codec", + "sha256": "f10b3fbdb4d56c6bc4d160ef5b3d6346df7a998a84876d05886a75d17eb290e6", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.0.1+5" + }, + "stream_channel": { + "dependency": "direct main", + "description": { + "name": "stream_channel", + "sha256": "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.4" + }, + "string_scanner": { + "dependency": "direct main", + "description": { + "name": "string_scanner", + "sha256": "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.4.1" + }, + "sync_http": { + "dependency": "direct main", + "description": { + "name": "sync_http", + "sha256": "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.3.1" + }, + "term_glyph": { + "dependency": "direct main", + "description": { + "name": "term_glyph", + "sha256": "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.2.2" + }, + "test": { + "dependency": "direct dev", + "description": { + "name": "test", + "sha256": "ca578dc12bb8b2f40b67b7d3bd2fac4f31c01a6ff7130a14e2597b919934507f", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.31.1" + }, + "test_api": { + "dependency": "direct main", + "description": { + "name": "test_api", + "sha256": "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.7.12" + }, + "test_core": { + "dependency": "direct main", + "description": { + "name": "test_core", + "sha256": "d2e98ec12998368dc59ddd47ab709f2cd55acd6b66dc7db764455a44082f4bc5", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.6.18" + }, + "typed_data": { + "dependency": "direct main", + "description": { + "name": "typed_data", + "sha256": "f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.4.0" + }, + "unified_analytics": { + "dependency": "direct main", + "description": { + "name": "unified_analytics", + "sha256": "0988c50d794f3cd96f6df92b4b35b7c333bbf869df304fc6062a45ebc7eb0776", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "8.0.15" + }, + "uuid": { + "dependency": "direct main", + "description": { + "name": "uuid", + "sha256": "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.5.3" + }, + "vm_service": { + "dependency": "direct main", + "description": { + "name": "vm_service", + "sha256": "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "15.2.0" + }, + "vm_service_interface": { + "dependency": "direct main", + "description": { + "name": "vm_service_interface", + "sha256": "503c92c26cf9f77d688bf8fca27fa9ec40450adbf02ec1ec5f12828ded508ac0", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.0.1" + }, + "vm_snapshot_analysis": { + "dependency": "direct main", + "description": { + "name": "vm_snapshot_analysis", + "sha256": "5a79b9fbb6be2555090f55b03b23907e75d44c3fd7bdd88da09848aa5a1914c8", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.7.6" + }, + "watcher": { + "dependency": "direct main", + "description": { + "name": "watcher", + "sha256": "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.2.1" + }, + "web": { + "dependency": "direct main", + "description": { + "name": "web", + "sha256": "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.1.1" + }, + "web_socket": { + "dependency": "direct main", + "description": { + "name": "web_socket", + "sha256": "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.1" + }, + "web_socket_channel": { + "dependency": "direct main", + "description": { + "name": "web_socket_channel", + "sha256": "d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.0.3" + }, + "webdriver": { + "dependency": "direct main", + "description": { + "name": "webdriver", + "sha256": "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.1.0" + }, + "webkit_inspection_protocol": { + "dependency": "direct main", + "description": { + "name": "webkit_inspection_protocol", + "sha256": "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.2.1" + }, + "xml": { + "dependency": "direct main", + "description": { + "name": "xml", + "sha256": "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "6.6.1" + }, + "yaml": { + "dependency": "direct main", + "description": { + "name": "yaml", + "sha256": "b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.1.3" + }, + "yaml_edit": { + "dependency": "direct main", + "description": { + "name": "yaml_edit", + "sha256": "07c9e63ba42519745182b88ca12264a7ba2484d8239958778dfe4d44fe760488", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.2.4" + } + }, + "sdks": { + "dart": ">=3.13.0-107.0.dev <4.0.0" + } + } +} diff --git a/pkgs/development/compilers/flutter/versions/3_47/patches/deregister-pub-dependencies-artifact.patch b/pkgs/development/compilers/flutter/versions/3_47/patches/deregister-pub-dependencies-artifact.patch new file mode 100644 index 000000000000..c99d771299fe --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_47/patches/deregister-pub-dependencies-artifact.patch @@ -0,0 +1,21 @@ +diff --git a/packages/flutter_tools/lib/src/flutter_cache.dart b/packages/flutter_tools/lib/src/flutter_cache.dart +index df67547..eacc7c4 100644 +--- a/packages/flutter_tools/lib/src/flutter_cache.dart ++++ b/packages/flutter_tools/lib/src/flutter_cache.dart +@@ -51,16 +51,6 @@ class FlutterCache extends Cache { + registerArtifact(IosUsbArtifacts(artifactName, this, platform: platform)); + } + registerArtifact(FontSubsetArtifacts(this, platform: platform)); +- registerArtifact( +- PubDependencies( +- logger: logger, +- // flutter root and pub must be lazily initialized to avoid accessing +- // before the version is determined. +- flutterRoot: () => Cache.flutterRoot!, +- pub: () => pub, +- projectFactory: projectFactory, +- ), +- ); + } + } + diff --git a/pkgs/development/compilers/flutter/versions/3_47/patches/disable-auto-update.patch b/pkgs/development/compilers/flutter/versions/3_47/patches/disable-auto-update.patch new file mode 100644 index 000000000000..58be974b10db --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_47/patches/disable-auto-update.patch @@ -0,0 +1,29 @@ +diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart +index e4e474ab6e..5548599802 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart +@@ -1693,7 +1693,7 @@ Run 'flutter -h' (or 'flutter -h') for available flutter commands and + + // Populate the cache. We call this before pub get below so that the + // sky_engine package is available in the flutter cache for pub to find. +- if (shouldUpdateCache) { ++ if (false) { + // First always update universal artifacts, as some of these (e.g. + // ios-deploy on macOS) are required to determine `requiredArtifacts`. + final bool offline; +diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +index a1104da..1749d65 100644 +--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart ++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +@@ -437,11 +437,6 @@ + // Required to support `flutter --version` before artifacts are cached. + await globals.cache.updateAll({DevelopmentArtifact.informative}); + +- globals.flutterVersion.ensureVersionFile(); +- if (await _shouldCheckForUpdates(topLevelResults)) { +- await globals.flutterVersion.checkFlutterVersionFreshness(); +- } +- + // See if the user specified a specific device. + final specifiedDeviceId = topLevelResults[FlutterGlobalOptions.kDeviceIdOption] as String?; + if (specifiedDeviceId != null) { diff --git a/pkgs/development/compilers/flutter/versions/3_47/patches/fix-ios-build-xcode-backend-sh.patch b/pkgs/development/compilers/flutter/versions/3_47/patches/fix-ios-build-xcode-backend-sh.patch new file mode 100644 index 000000000000..f668561e5baf --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_47/patches/fix-ios-build-xcode-backend-sh.patch @@ -0,0 +1,39 @@ +Fix iOS build issue with NixOS/nixpkgs flutter + +This patch cleans up xcode_backend.sh to use the FLUTTER_ROOT +environment variable directly, avoiding symlink traversal issues. + +--- a/packages/flutter_tools/bin/xcode_backend.sh ++++ b/packages/flutter_tools/bin/xcode_backend.sh +@@ -10,27 +10,8 @@ + # + # -------------------------------------------------------------------------- # + +-# exit on error, or usage of unset var +-set -euo pipefail ++# Run `dart ./xcode_backend.dart` with the dart from $FLUTTER_ROOT. ++dart="${FLUTTER_ROOT}/bin/dart" ++xcode_backend_dart="${BASH_SOURCE[0]%.sh}.dart" ++exec "${dart}" "${xcode_backend_dart}" "$@" "ios" + +-# Needed because if it is set, cd may print the path it changed to. +-unset CDPATH +- +-function follow_links() ( +- cd -P -- "$(dirname -- "$1")" +- file="$PWD/$(basename -- "$1")" +- while [[ -h "$file" ]]; do +- cd -P -- "$(dirname -- "$file")" +- file="$(readlink -- "$file")" +- cd -P -- "$(dirname -- "$file")" +- file="$PWD/$(basename -- "$file")" +- done +- echo "$file" +-) +- +-PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")" +-BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" +-FLUTTER_ROOT="$BIN_DIR/../../.." +-DART="$FLUTTER_ROOT/bin/dart" +- +-"$DART" "$BIN_DIR/xcode_backend.dart" "$@" "ios" diff --git a/pkgs/development/compilers/flutter/versions/3_47/patches/fix-macos-build-macos-assemble-sh.patch b/pkgs/development/compilers/flutter/versions/3_47/patches/fix-macos-build-macos-assemble-sh.patch new file mode 100644 index 000000000000..7dcdea01e6df --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_47/patches/fix-macos-build-macos-assemble-sh.patch @@ -0,0 +1,48 @@ +Fix for macOS build issue in Flutter >= 3.35 + +Since version 3.35, the behavior of macos_assemble.sh and xcode_backend.sh +is almost identical. This caused the same error for macOS that previously +occurred for iOS. + +Derived from the iOS patch: ./fix-ios-build-xcode-backend-sh.patch + +--- a/packages/flutter_tools/bin/macos_assemble.sh ++++ b/packages/flutter_tools/bin/macos_assemble.sh +@@ -10,32 +10,13 @@ + # + # -------------------------------------------------------------------------- # + +-# exit on error, or usage of unset var +-set -euo pipefail +- +-# Needed because if it is set, cd may print the path it changed to. +-unset CDPATH +- +-function follow_links() ( +- cd -P -- "$(dirname -- "$1")" +- file="$PWD/$(basename -- "$1")" +- while [[ -h "$file" ]]; do +- cd -P -- "$(dirname -- "$file")" +- file="$(readlink -- "$file")" +- cd -P -- "$(dirname -- "$file")" +- file="$PWD/$(basename -- "$file")" +- done +- echo "$file" +-) +- +-PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")" +-BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" +-FLUTTER_ROOT="$BIN_DIR/../../.." +-DART="$FLUTTER_ROOT/bin/dart" ++# Run `dart ./xcode_backend.dart` with the dart from $FLUTTER_ROOT. ++dart="${FLUTTER_ROOT}/bin/dart" ++xcode_backend_dart="$(dirname "${BASH_SOURCE[0]}")/xcode_backend.dart" + + # Main entry point. + if [[ $# == 0 ]]; then +- "$DART" "$BIN_DIR/xcode_backend.dart" "build" "macos" ++ exec "${dart}" "${xcode_backend_dart}" "build" "macos" + else +- "$DART" "$BIN_DIR/xcode_backend.dart" "$@" "macos" ++ exec "${dart}" "${xcode_backend_dart}" "$@" "macos" + fi diff --git a/pkgs/development/compilers/flutter/versions/3_47/patches/gradle-flutter-tools-wrapper.patch b/pkgs/development/compilers/flutter/versions/3_47/patches/gradle-flutter-tools-wrapper.patch new file mode 100644 index 000000000000..45a3eaf069a5 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_47/patches/gradle-flutter-tools-wrapper.patch @@ -0,0 +1,223 @@ + +This patch redirects flutter_tools' Gradle project to build in a writable +directory at `$HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev`, +instead of within the read-only Nix Store. + +Without this patch, flutter_tools' Gradle project tries to generate `build` and `.gradle` +directories within the Nix Store. Resulting in read-only errors when trying to build a +Flutter Android app at runtime. In Gradle 9+, even the project directory itself must be +writable. + +This patch takes advantage of the fact settings.gradle takes priority over settings.gradle.kts. +When a Flutter app runs `includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")`, +Gradle evaluates the `settings.gradle` we add, which: +1. Creates symlinks to `build.gradle.kts` and `src/` in the writable cache directory +2. Sets `rootProject.projectDir` to the writable cache directory +3. Applies the original `settings.gradle.kts` for dependency resolution +4. Redirects `buildDirectory` to the cache + +To move `.gradle` as well, the `--project-cache-dir` argument must be passed to the Gradle wrapper. +Changing the `GradleUtils.getExecutable` function signature is a deliberate choice, to ensure that no new unpatched usages slip in. +--- /dev/null ++++ b/packages/flutter_tools/gradle/settings.gradle +@@ -0,0 +1,22 @@ ++def engineShortRev = (new File("$settingsDir/../../../bin/internal/engine.version")).text.take(10) ++def dir = new File("$System.env.HOME/.cache/flutter/nix-flutter-tools-gradle/$engineShortRev") ++dir.mkdirs() ++ ++def buildScript = new File(dir, "build.gradle.kts") ++if (!buildScript.exists()) { ++ java.nio.file.Files.createSymbolicLink(buildScript.toPath(), new File("$settingsDir/build.gradle.kts").toPath()) ++} ++def srcLink = new File(dir, "src") ++if (!srcLink.exists()) { ++ java.nio.file.Files.createSymbolicLink(srcLink.toPath(), new File("$settingsDir/src").toPath()) ++} ++ ++rootProject.projectDir = dir ++ ++apply from: new File("$settingsDir/settings.gradle.kts") ++ ++gradle.allprojects { project -> ++ project.beforeEvaluate { ++ project.layout.buildDirectory = new File("$dir/build") ++ } ++} +--- a/packages/flutter_tools/gradle/build.gradle.kts ++++ b/packages/flutter_tools/gradle/build.gradle.kts +@@ -4,6 +4,11 @@ + + import org.jetbrains.kotlin.gradle.dsl.JvmTarget + ++// While flutter_tools runs Gradle with a --project-cache-dir, this startParameter ++// is not passed correctly to the Kotlin Gradle plugin for some reason, and so ++// must be set here as well. ++gradle.startParameter.projectCacheDir = layout.buildDirectory.dir("cache").get().asFile ++ + plugins { + `java-gradle-plugin` + groovy +--- a/packages/flutter_tools/lib/src/android/gradle.dart ++++ b/packages/flutter_tools/lib/src/android/gradle.dart +@@ -474,9 +474,9 @@ class AndroidGradleBuilder implements AndroidBuilder { + // from the local.properties file. + updateLocalProperties(project: project, buildInfo: androidBuildInfo.buildInfo); + +- final options = []; +- +- final String gradleExecutablePath = _gradleUtils.getExecutable(project); ++ final [String gradleExecutablePath, ...List options] = _gradleUtils.getExecutable( ++ project, ++ ); + + // All automatically created files should exist. + if (configOnly) { +@@ -797,7 +797,7 @@ class AndroidGradleBuilder implements AndroidBuilder { + 'aar_init_script.gradle', + ); + final command = [ +- _gradleUtils.getExecutable(project), ++ ..._gradleUtils.getExecutable(project), + '-I=$initScript', + '-Pflutter-root=$flutterRoot', + '-Poutput-dir=${outputDirectory.path}', +@@ -912,6 +912,10 @@ class AndroidGradleBuilder implements AndroidBuilder { + final results = []; + + try { ++ final [String gradleExecutablePath, ...List options] = _gradleUtils.getExecutable( ++ project, ++ ); ++ + exitCode = await _runGradleTask( + _kBuildVariantTaskName, + preRunTask: () { +@@ -927,10 +931,10 @@ class AndroidGradleBuilder implements AndroidBuilder { + ), + ); + }, +- options: const ['-q'], ++ options: [...options, '-q'], + project: project, + localGradleErrors: gradleErrors, +- gradleExecutablePath: _gradleUtils.getExecutable(project), ++ gradleExecutablePath: gradleExecutablePath, + outputParser: (String line) { + if (_kBuildVariantRegex.firstMatch(line) case final RegExpMatch match) { + results.add(match.namedGroup(_kBuildVariantRegexGroupName)!); +@@ -964,6 +968,10 @@ class AndroidGradleBuilder implements AndroidBuilder { + late Stopwatch sw; + var exitCode = 1; + try { ++ final [String gradleExecutablePath, ...List options] = _gradleUtils.getExecutable( ++ project, ++ ); ++ + exitCode = await _runGradleTask( + taskName, + preRunTask: () { +@@ -979,10 +987,10 @@ class AndroidGradleBuilder implements AndroidBuilder { + ), + ); + }, +- options: ['-q', '-PoutputPath=$outputPath'], ++ options: [...options, '-q', '-PoutputPath=$outputPath'], + project: project, + localGradleErrors: gradleErrors, +- gradleExecutablePath: _gradleUtils.getExecutable(project), ++ gradleExecutablePath: gradleExecutablePath, + ); + } on Error catch (error) { + _logger.printError(error.toString()); +--- a/packages/flutter_tools/lib/src/android/gradle_errors.dart ++++ b/packages/flutter_tools/lib/src/android/gradle_errors.dart +@@ -228,7 +228,12 @@ final flavorUndefinedHandler = GradleHandledError( + }, + handler: ({required String line, required FlutterProject project, required bool usesAndroidX}) async { + final RunResult tasksRunResult = await globals.processUtils.run( +- [globals.gradleUtils!.getExecutable(project), 'app:tasks', '--all', '--console=auto'], ++ [ ++ ...globals.gradleUtils!.getExecutable(project), ++ 'app:tasks', ++ '--all', ++ '--console=auto', ++ ], + throwOnError: true, + workingDirectory: project.android.hostAppGradleRoot.path, + environment: globals.java?.environment, +--- a/packages/flutter_tools/lib/src/android/gradle_utils.dart ++++ b/packages/flutter_tools/lib/src/android/gradle_utils.dart +@@ -3,6 +3,7 @@ + // found in the LICENSE file. + + import 'package:meta/meta.dart'; ++import 'package:path/path.dart'; + import 'package:process/process.dart'; + import 'package:unified_analytics/unified_analytics.dart'; + +@@ -197,9 +198,29 @@ class GradleUtils { + final Logger _logger; + final OperatingSystemUtils _operatingSystemUtils; + ++ List get _requiredArguments { ++ final String cacheDir = join( ++ switch (globals.platform.environment['XDG_CACHE_HOME']) { ++ final String cacheHome => cacheHome, ++ _ => join( ++ globals.fsUtils.homeDirPath ?? throwToolExit('No cache directory has been specified.'), ++ '.cache', ++ ), ++ }, ++ 'flutter', ++ 'nix-flutter-tools-gradle', ++ globals.flutterVersion.engineRevision.substring(0, 10), ++ ); ++ ++ return [ ++ '--project-cache-dir=${join(cacheDir, 'cache')}', ++ '-Pkotlin.project.persistent.dir=${join(cacheDir, 'kotlin')}', ++ ]; ++ } ++ + /// Gets the Gradle executable path and prepares the Gradle project. + /// This is the `gradlew` or `gradlew.bat` script in the `android/` directory. +- String getExecutable(FlutterProject project) { ++ List getExecutable(FlutterProject project) { + final Directory androidDir = project.android.hostAppGradleRoot; + injectGradleWrapperIfNeeded(androidDir); + +@@ -210,7 +231,7 @@ class GradleUtils { + // If the Gradle executable doesn't have execute permission, + // then attempt to set it. + _operatingSystemUtils.makeExecutable(gradle); +- return gradle.absolute.path; ++ return [gradle.absolute.path, ..._requiredArguments]; + } + throwToolExit( + 'Unable to locate gradlew script. Please check that ${gradle.path} ' +--- a/packages/flutter_tools/test/general.shard/android/android_gradle_builder_test.dart ++++ b/packages/flutter_tools/test/general.shard/android/android_gradle_builder_test.dart +@@ -2606,8 +2606,8 @@ Gradle Crashed + + class FakeGradleUtils extends Fake implements GradleUtils { + @override +- String getExecutable(FlutterProject project) { +- return 'gradlew'; ++ List getExecutable(FlutterProject project) { ++ return const ['gradlew']; + } + } + +--- a/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart ++++ b/packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart +@@ -1633,8 +1633,8 @@ Platform fakePlatform(String name) { + + class FakeGradleUtils extends Fake implements GradleUtils { + @override +- String getExecutable(FlutterProject project) { +- return 'gradlew'; ++ List getExecutable(FlutterProject project) { ++ return const ['gradlew']; + } + } + diff --git a/pkgs/development/compilers/flutter/versions/3_47/patches/override-host-platform-base.patch b/pkgs/development/compilers/flutter/versions/3_47/patches/override-host-platform-base.patch new file mode 100644 index 000000000000..5e260c823516 --- /dev/null +++ b/pkgs/development/compilers/flutter/versions/3_47/patches/override-host-platform-base.patch @@ -0,0 +1,22 @@ +diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart +index 45da89ad4c..0f7d9c2a11 100644 +--- a/packages/flutter_tools/lib/src/base/os.dart ++++ b/packages/flutter_tools/lib/src/base/os.dart +@@ -147,7 +147,17 @@ abstract class OperatingSystemUtils { + /// Represents the platform of the host machine running the Flutter tool. + HostPlatform get hostPlatform { ++ const nixHostPlatform = String.fromEnvironment('NIX_FLUTTER_HOST_PLATFORM'); ++ if (nixHostPlatform.isNotEmpty) { ++ return switch (nixHostPlatform) { ++ 'x86_64-linux' => HostPlatform.linux_x64, ++ 'aarch64-linux' => HostPlatform.linux_arm64, ++ 'x86_64-darwin' => HostPlatform.darwin_x64, ++ 'aarch64-darwin' => HostPlatform.darwin_arm64, ++ String value => throw ArgumentError.value(value, 'NIX_FLUTTER_HOST_PLATFORM', 'Unknown Nix host platform!'), ++ }; ++ } + return switch (_currentAbi) { + Abi.macosX64 => HostPlatform.darwin_x64, + Abi.macosArm64 => HostPlatform.darwin_arm64, + }; + } diff --git a/pkgs/development/compilers/flutter/wrapper.nix b/pkgs/development/compilers/flutter/wrapper.nix index 250c79afb0c4..60cc0234d881 100644 --- a/pkgs/development/compilers/flutter/wrapper.nix +++ b/pkgs/development/compilers/flutter/wrapper.nix @@ -8,7 +8,7 @@ "universal" "web" ] - ++ lib.optional (stdenv.hostPlatform.isLinux && !(flutter ? engine)) "linux" + ++ lib.optional stdenv.hostPlatform.isLinux "linux" ++ lib.optional (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isDarwin) "android" ++ lib.optionals stdenv.hostPlatform.isDarwin [ "macos" @@ -190,12 +190,6 @@ in mkdir --parents $out/bin makeWrapper '${immutableFlutter}' $out/bin/flutter \ --set-default ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \ - '' - + lib.optionalString (flutter ? engine && flutter.engine.meta.available) '' - --set-default FLUTTER_ENGINE "${flutter.engine}" \ - --add-flags "--local-engine-host ${flutter.engine.outName}" \ - '' - + '' --suffix PATH : '${lib.makeBinPath (tools ++ buildTools)}' \ --suffix PKG_CONFIG_PATH : "$FLUTTER_PKG_CONFIG_PATH" \ --suffix LIBRARY_PATH : '${lib.makeLibraryPath appStaticBuildDeps}' \ diff --git a/pkgs/development/python-modules/bahttext/default.nix b/pkgs/development/python-modules/bahttext/default.nix new file mode 100644 index 000000000000..5f8500900ada --- /dev/null +++ b/pkgs/development/python-modules/bahttext/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + unittestCheckHook, + unstableGitUpdater, +}: + +buildPythonPackage (finalAttrs: { + pname = "bahttext"; + version = "1.0.2-unstable-2020-05-31"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "sekz"; + repo = "bahttext"; + rev = "5dc3a6e9056a81cefb199c49ca69f9a7a9fa835b"; + hash = "sha256-q/z64c5Nqq0PbUGBzyODQchTs2bV9ksujCMLB8ZCB/Y="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ unittestCheckHook ]; + + pythonImportsCheck = [ "bahttext" ]; + + passthru.updateScript = unstableGitUpdater { }; + + meta = { + description = "Convert currency numbers to Thai Baht text"; + homepage = "https://github.com/sekz/bahttext"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.lucasew ]; + teams = [ lib.teams.ngi ]; + }; +}) diff --git a/pkgs/development/python-modules/beets-filetote/default.nix b/pkgs/development/python-modules/beets-filetote/default.nix index 918099a45814..ce8ced132f73 100644 --- a/pkgs/development/python-modules/beets-filetote/default.nix +++ b/pkgs/development/python-modules/beets-filetote/default.nix @@ -11,10 +11,7 @@ # tests pytestCheckHook, - beets-audible, mediafile, - reflink, - toml, typeguard, writableTmpDirAsHomeHook, }: @@ -45,10 +42,6 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ pytestCheckHook - beets-audible - mediafile - reflink - toml typeguard writableTmpDirAsHomeHook ]; diff --git a/pkgs/development/python-modules/braintree/default.nix b/pkgs/development/python-modules/braintree/default.nix index 95e8c99681db..193ee8d14868 100644 --- a/pkgs/development/python-modules/braintree/default.nix +++ b/pkgs/development/python-modules/braintree/default.nix @@ -9,7 +9,7 @@ buildPythonPackage (finalAttrs: { pname = "braintree"; - version = "4.45.0"; + version = "4.46.0"; pyproject = true; __structuredAttrs = true; @@ -18,7 +18,7 @@ buildPythonPackage (finalAttrs: { owner = "braintree"; repo = "braintree_python"; tag = finalAttrs.version; - hash = "sha256-cD0TKqf2c/wdFwDc78rEPm4ucZkYS1nk2Uo0oTfcJvE="; + hash = "sha256-n2l0c62BhHKgxNko66aPZVKrzi2w5qXIrqBbJknkhkE="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/columnize/default.nix b/pkgs/development/python-modules/columnize/default.nix index 063baae35f3f..ee80d8305845 100644 --- a/pkgs/development/python-modules/columnize/default.nix +++ b/pkgs/development/python-modules/columnize/default.nix @@ -8,16 +8,18 @@ buildPythonPackage rec { pname = "columnize"; - version = "3.11"; + version = "0.3.11"; pyproject = true; # 3.11 is the git tag for the 0.3.11 version - # r-ryantm keeps trying to change the version to 3.11 + # r-ryantm and update-python-libraries keeps trying to change the version to 3.11 # nixpkgs-update: no auto update + passthru.skipBulkUpdate = true; + src = fetchFromGitHub { owner = "rocky"; repo = "pycolumnize"; - tag = version; + tag = "3.11"; hash = "sha256-YJEIujoRpLvUM4H4CB1nEJaYStFOSVKIGzchnptlt7M="; }; diff --git a/pkgs/development/python-modules/coverage/default.nix b/pkgs/development/python-modules/coverage/default.nix index 5393245ba843..7d47a51c36da 100644 --- a/pkgs/development/python-modules/coverage/default.nix +++ b/pkgs/development/python-modules/coverage/default.nix @@ -11,14 +11,14 @@ buildPythonPackage (finalAttrs: { pname = "coverage"; - version = "7.15.2"; + version = "7.15.4"; pyproject = true; src = fetchFromGitHub { owner = "coveragepy"; repo = "coveragepy"; tag = finalAttrs.version; - hash = "sha256-ZkZ2TAq1JoI1Sl8gPSBEvLX6yP/uf0Lfc4vaWfjCNEY="; + hash = "sha256-0+J44gHiZsetHWvu7CxM0AwkFlUpCpqLiBkZacXiE2U="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/formulas/default.nix b/pkgs/development/python-modules/formulas/default.nix new file mode 100644 index 000000000000..9e9fd8db0ebf --- /dev/null +++ b/pkgs/development/python-modules/formulas/default.nix @@ -0,0 +1,157 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + gitUpdater, + pythonAtLeast, + + # build-system + setuptools, + + # dependencies + bahttext, + click, + click-log, + dictdiffer, + ezodf, + flask, + lxml, + numpy, + numpy-financial, + openpyxl, + python-dateutil, + regex, + schedula, + scipy, + statsmodels, + tqdm, + + # optional-dependencies + docutils, + graphviz, + jinja2, + pygments, + + # tests + ddt, + dill, + pytestCheckHook, + sphinx, + sphinx-click, + sphinx-rtd-theme, + sphinxcontrib-restbuilder, +}: + +buildPythonPackage (finalAttrs: { + pname = "formulas"; + version = "1.3.4"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "vinci1it2000"; + repo = "formulas"; + tag = "v${finalAttrs.version}"; + hash = "sha256-mcHGoXtZtBqZBh68/bsRDz75q1oHCMKoUUVlEsnPdNI="; + }; + + patches = [ + (fetchpatch { + name = "linest-aarch64-blas-rounding.patch"; + url = "https://github.com/vinci1it2000/formulas/commit/2d68e59d1abb10433feefef5c7cdcab378459159.patch"; + hash = "sha256-5jnE7f2HypuFrP8g9rhWZovNw//T+vbHMfbBXhA4UmE="; + }) + ]; + + build-system = [ setuptools ]; + + dependencies = [ + bahttext + click + click-log + dictdiffer + ezodf + flask + lxml + numpy + numpy-financial + openpyxl + python-dateutil + regex + schedula + scipy + statsmodels + tqdm + ]; + + optional-dependencies = + let + excelDeps = [ + dictdiffer + ezodf + lxml + openpyxl + ]; + in + { + excel = excelDeps; + plot = [ + docutils + flask + graphviz + jinja2 + pygments + regex + ]; + cli = excelDeps ++ [ + click-log + flask + ]; + }; + + nativeCheckInputs = [ + ddt + dill + docutils + graphviz + jinja2 + pygments + pytestCheckHook + sphinx + sphinx-click + sphinx-rtd-theme + sphinxcontrib-restbuilder + ]; + + # itertools.count is not picklable on 3.14; schedula stores count().__next__ + # https://github.com/python/cpython/issues/101588 + postPatch = lib.optionalString (pythonAtLeast "3.14") '' + cat > test/conftest.py << 'EOF' + import copyreg + import itertools + + + def _reduce_count(_obj): + return itertools.count, () + + + copyreg.pickle(itertools.count, _reduce_count) + EOF + ''; + + pythonImportsCheck = [ "formulas" ]; + + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + + meta = { + description = "Parse and compile Excel formulas and workbooks in Python code"; + homepage = "https://github.com/vinci1it2000/formulas"; + changelog = "https://github.com/vinci1it2000/formulas/blob/${finalAttrs.src.tag}/CHANGELOG.rst"; + license = lib.licenses.eupl11; + maintainers = [ lib.maintainers.lucasew ]; + teams = [ lib.teams.ngi ]; + mainProgram = "formulas"; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/development/python-modules/histoprint/default.nix b/pkgs/development/python-modules/histoprint/default.nix index 0791320af9ac..11db01cfa41c 100644 --- a/pkgs/development/python-modules/histoprint/default.nix +++ b/pkgs/development/python-modules/histoprint/default.nix @@ -10,16 +10,16 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "histoprint"; - version = "2.6.0"; + version = "2.7.0"; pyproject = true; src = fetchFromGitHub { owner = "scikit-hep"; repo = "histoprint"; - tag = "v${version}"; - hash = "sha256-qMg0Ct39BjdcyWB3KxG74rVqVW4I0DGZ5GS7D3uYq3w="; + tag = "v${finalAttrs.version}"; + hash = "sha256-RIW3azlQH1+F7MIygHIUiBj4Yr1iVEeamUPNGHC605c="; }; build-system = [ @@ -39,7 +39,8 @@ buildPythonPackage rec { description = "Pretty print histograms to the console"; mainProgram = "histoprint"; homepage = "https://github.com/scikit-hep/histoprint"; + changelog = "https://github.com/scikit-hep/histoprint/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ veprbl ]; }; -} +}) diff --git a/pkgs/development/python-modules/huaweicloudsdk/default.nix b/pkgs/development/python-modules/huaweicloudsdk/default.nix new file mode 100644 index 000000000000..6b9bdd084a6d --- /dev/null +++ b/pkgs/development/python-modules/huaweicloudsdk/default.nix @@ -0,0 +1,233 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + huaweicloudsdkcore, +}: + +let + buildHuaweiCloudSdkPackage = + serviceName: + buildPythonPackage (finalAttrs: { + pname = "huaweicloudsdk${serviceName}"; + version = "3.1.210"; + pyproject = true; + + src = fetchFromGitHub { + owner = "huaweicloud"; + repo = "huaweicloud-sdk-python-v3"; + tag = "v${finalAttrs.version}"; + hash = "sha256-F8qJVDuGM1YD4dmdcaRaDGHkGbV/w6onAQ8dbvS8hrk="; + }; + + sourceRoot = "${finalAttrs.src.name}/huaweicloud-sdk-${serviceName}"; + + build-system = [ hatchling ]; + + dependencies = [ huaweicloudsdkcore ]; + + # All components are stored in a mono repo + doCheck = false; + + pythonImportsCheck = [ "huaweicloudsdk${serviceName}" ]; + + meta = { + description = "Module of Huawei Cloud Python SDK (${serviceName})"; + homepage = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3/"; + changelog = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; + }); + +in +{ + huaweicloudsdkaad = buildHuaweiCloudSdkPackage "aad"; + huaweicloudsdkagentarts = buildHuaweiCloudSdkPackage "agentarts"; + huaweicloudsdkagentidentity = buildHuaweiCloudSdkPackage "agentidentity"; + huaweicloudsdkantiddos = buildHuaweiCloudSdkPackage "antiddos"; + huaweicloudsdkaom = buildHuaweiCloudSdkPackage "aom"; + huaweicloudsdkaos = buildHuaweiCloudSdkPackage "aos"; + huaweicloudsdkapig = buildHuaweiCloudSdkPackage "apig"; + huaweicloudsdkapm = buildHuaweiCloudSdkPackage "apm"; + huaweicloudsdkas = buildHuaweiCloudSdkPackage "as"; + huaweicloudsdkasm = buildHuaweiCloudSdkPackage "asm"; + huaweicloudsdkastrozero = buildHuaweiCloudSdkPackage "astrozero"; + huaweicloudsdkbcc = buildHuaweiCloudSdkPackage "bcc"; + huaweicloudsdkbcs = buildHuaweiCloudSdkPackage "bcs"; + huaweicloudsdkbms = buildHuaweiCloudSdkPackage "bms"; + huaweicloudsdkbss = buildHuaweiCloudSdkPackage "bss"; + huaweicloudsdkbssintl = buildHuaweiCloudSdkPackage "bssintl"; + huaweicloudsdkcae = buildHuaweiCloudSdkPackage "cae"; + huaweicloudsdkcampusgo = buildHuaweiCloudSdkPackage "campusgo"; + huaweicloudsdkcbh = buildHuaweiCloudSdkPackage "cbh"; + huaweicloudsdkcbr = buildHuaweiCloudSdkPackage "cbr"; + huaweicloudsdkcbs = buildHuaweiCloudSdkPackage "cbs"; + huaweicloudsdkcc = buildHuaweiCloudSdkPackage "cc"; + huaweicloudsdkcce = buildHuaweiCloudSdkPackage "cce"; + huaweicloudsdkccm = buildHuaweiCloudSdkPackage "ccm"; + huaweicloudsdkcdm = buildHuaweiCloudSdkPackage "cdm"; + huaweicloudsdkcdn = buildHuaweiCloudSdkPackage "cdn"; + huaweicloudsdkces = buildHuaweiCloudSdkPackage "ces"; + huaweicloudsdkcfw = buildHuaweiCloudSdkPackage "cfw"; + huaweicloudsdkclassroom = buildHuaweiCloudSdkPackage "classroom"; + huaweicloudsdkclouddc = buildHuaweiCloudSdkPackage "clouddc"; + huaweicloudsdkcloudide = buildHuaweiCloudSdkPackage "cloudide"; + huaweicloudsdkcloudpond = buildHuaweiCloudSdkPackage "cloudpond"; + huaweicloudsdkcloudrtc = buildHuaweiCloudSdkPackage "cloudrtc"; + huaweicloudsdkcloudtable = buildHuaweiCloudSdkPackage "cloudtable"; + huaweicloudsdkcloudtest = buildHuaweiCloudSdkPackage "cloudtest"; + huaweicloudsdkcoc = buildHuaweiCloudSdkPackage "coc"; + huaweicloudsdkcodeartsartifact = buildHuaweiCloudSdkPackage "codeartsartifact"; + huaweicloudsdkcodeartsbuild = buildHuaweiCloudSdkPackage "codeartsbuild"; + huaweicloudsdkcodeartscheck = buildHuaweiCloudSdkPackage "codeartscheck"; + huaweicloudsdkcodeartsdeploy = buildHuaweiCloudSdkPackage "codeartsdeploy"; + huaweicloudsdkcodeartsgovernance = buildHuaweiCloudSdkPackage "codeartsgovernance"; + huaweicloudsdkcodeartside = buildHuaweiCloudSdkPackage "codeartside"; + huaweicloudsdkcodeartsinspector = buildHuaweiCloudSdkPackage "codeartsinspector"; + huaweicloudsdkcodeartspipeline = buildHuaweiCloudSdkPackage "codeartspipeline"; + huaweicloudsdkcodeartsrepo = buildHuaweiCloudSdkPackage "codeartsrepo"; + huaweicloudsdkcodecraft = buildHuaweiCloudSdkPackage "codecraft"; + huaweicloudsdkconfig = buildHuaweiCloudSdkPackage "config"; + huaweicloudsdkcpcs = buildHuaweiCloudSdkPackage "cpcs"; + huaweicloudsdkcph = buildHuaweiCloudSdkPackage "cph"; + huaweicloudsdkcpts = buildHuaweiCloudSdkPackage "cpts"; + huaweicloudsdkcse = buildHuaweiCloudSdkPackage "cse"; + huaweicloudsdkcsms = buildHuaweiCloudSdkPackage "csms"; + huaweicloudsdkcss = buildHuaweiCloudSdkPackage "css"; + huaweicloudsdkcts = buildHuaweiCloudSdkPackage "cts"; + huaweicloudsdkdas = buildHuaweiCloudSdkPackage "das"; + huaweicloudsdkdataartsfabric = buildHuaweiCloudSdkPackage "dataartsfabric"; + huaweicloudsdkdataartsfabricep = buildHuaweiCloudSdkPackage "dataartsfabricep"; + huaweicloudsdkdataartsstudio = buildHuaweiCloudSdkPackage "dataartsstudio"; + huaweicloudsdkdbss = buildHuaweiCloudSdkPackage "dbss"; + huaweicloudsdkdc = buildHuaweiCloudSdkPackage "dc"; + huaweicloudsdkdcc = buildHuaweiCloudSdkPackage "dcc"; + huaweicloudsdkdcos = buildHuaweiCloudSdkPackage "dcos"; + huaweicloudsdkdcs = buildHuaweiCloudSdkPackage "dcs"; + huaweicloudsdkddm = buildHuaweiCloudSdkPackage "ddm"; + huaweicloudsdkdds = buildHuaweiCloudSdkPackage "dds"; + huaweicloudsdkdeh = buildHuaweiCloudSdkPackage "deh"; + huaweicloudsdkdevstar = buildHuaweiCloudSdkPackage "devstar"; + huaweicloudsdkdgc = buildHuaweiCloudSdkPackage "dgc"; + huaweicloudsdkdis = buildHuaweiCloudSdkPackage "dis"; + huaweicloudsdkdlf = buildHuaweiCloudSdkPackage "dlf"; + huaweicloudsdkdli = buildHuaweiCloudSdkPackage "dli"; + huaweicloudsdkdns = buildHuaweiCloudSdkPackage "dns"; + huaweicloudsdkdris = buildHuaweiCloudSdkPackage "dris"; + huaweicloudsdkdrs = buildHuaweiCloudSdkPackage "drs"; + huaweicloudsdkdsc = buildHuaweiCloudSdkPackage "dsc"; + huaweicloudsdkdwr = buildHuaweiCloudSdkPackage "dwr"; + huaweicloudsdkdws = buildHuaweiCloudSdkPackage "dws"; + huaweicloudsdkec = buildHuaweiCloudSdkPackage "ec"; + huaweicloudsdkecs = buildHuaweiCloudSdkPackage "ecs"; + huaweicloudsdkedgesec = buildHuaweiCloudSdkPackage "edgesec"; + huaweicloudsdkeg = buildHuaweiCloudSdkPackage "eg"; + huaweicloudsdkeihealth = buildHuaweiCloudSdkPackage "eihealth"; + huaweicloudsdkeip = buildHuaweiCloudSdkPackage "eip"; + huaweicloudsdkelb = buildHuaweiCloudSdkPackage "elb"; + huaweicloudsdkeps = buildHuaweiCloudSdkPackage "eps"; + huaweicloudsdker = buildHuaweiCloudSdkPackage "er"; + huaweicloudsdkesw = buildHuaweiCloudSdkPackage "esw"; + huaweicloudsdkevs = buildHuaweiCloudSdkPackage "evs"; + huaweicloudsdkfrs = buildHuaweiCloudSdkPackage "frs"; + huaweicloudsdkfunctiongraph = buildHuaweiCloudSdkPackage "functiongraph"; + huaweicloudsdkga = buildHuaweiCloudSdkPackage "ga"; + huaweicloudsdkgaussdb = buildHuaweiCloudSdkPackage "gaussdb"; + huaweicloudsdkgaussdbfornosql = buildHuaweiCloudSdkPackage "gaussdbfornosql"; + huaweicloudsdkgaussdbforopengauss = buildHuaweiCloudSdkPackage "gaussdbforopengauss"; + huaweicloudsdkgeip = buildHuaweiCloudSdkPackage "geip"; + huaweicloudsdkges = buildHuaweiCloudSdkPackage "ges"; + huaweicloudsdkgsl = buildHuaweiCloudSdkPackage "gsl"; + huaweicloudsdkhilens = buildHuaweiCloudSdkPackage "hilens"; + huaweicloudsdkhss = buildHuaweiCloudSdkPackage "hss"; + huaweicloudsdkiam = buildHuaweiCloudSdkPackage "iam"; + huaweicloudsdkiamaccessanalyzer = buildHuaweiCloudSdkPackage "iamaccessanalyzer"; + huaweicloudsdkidentitycenter = buildHuaweiCloudSdkPackage "identitycenter"; + huaweicloudsdkidentitycenteroidc = buildHuaweiCloudSdkPackage "identitycenteroidc"; + huaweicloudsdkidentitycenterportalapi = buildHuaweiCloudSdkPackage "identitycenterportalapi"; + huaweicloudsdkidentitycenterscim = buildHuaweiCloudSdkPackage "identitycenterscim"; + huaweicloudsdkidentitycenterstore = buildHuaweiCloudSdkPackage "identitycenterstore"; + huaweicloudsdkidme = buildHuaweiCloudSdkPackage "idme"; + huaweicloudsdkidmeclassicapi = buildHuaweiCloudSdkPackage "idmeclassicapi"; + huaweicloudsdkiec = buildHuaweiCloudSdkPackage "iec"; + huaweicloudsdkief = buildHuaweiCloudSdkPackage "ief"; + huaweicloudsdkimage = buildHuaweiCloudSdkPackage "image"; + huaweicloudsdkimagesearch = buildHuaweiCloudSdkPackage "imagesearch"; + huaweicloudsdkims = buildHuaweiCloudSdkPackage "ims"; + huaweicloudsdkiotanalytics = buildHuaweiCloudSdkPackage "iotanalytics"; + huaweicloudsdkiotda = buildHuaweiCloudSdkPackage "iotda"; + huaweicloudsdkiotdm = buildHuaweiCloudSdkPackage "iotdm"; + huaweicloudsdkiotedge = buildHuaweiCloudSdkPackage "iotedge"; + huaweicloudsdkivs = buildHuaweiCloudSdkPackage "ivs"; + huaweicloudsdkkafka = buildHuaweiCloudSdkPackage "kafka"; + huaweicloudsdkkms = buildHuaweiCloudSdkPackage "kms"; + huaweicloudsdkkoomessage = buildHuaweiCloudSdkPackage "koomessage"; + huaweicloudsdkkps = buildHuaweiCloudSdkPackage "kps"; + huaweicloudsdkkvs = buildHuaweiCloudSdkPackage "kvs"; + huaweicloudsdklakeformation = buildHuaweiCloudSdkPackage "lakeformation"; + huaweicloudsdklive = buildHuaweiCloudSdkPackage "live"; + huaweicloudsdklts = buildHuaweiCloudSdkPackage "lts"; + huaweicloudsdkmapds = buildHuaweiCloudSdkPackage "mapds"; + huaweicloudsdkmas = buildHuaweiCloudSdkPackage "mas"; + huaweicloudsdkmastudio = buildHuaweiCloudSdkPackage "mastudio"; + huaweicloudsdkmeeting = buildHuaweiCloudSdkPackage "meeting"; + huaweicloudsdkmetastudio = buildHuaweiCloudSdkPackage "metastudio"; + huaweicloudsdkmodelarts = buildHuaweiCloudSdkPackage "modelarts"; + huaweicloudsdkmoderation = buildHuaweiCloudSdkPackage "moderation"; + huaweicloudsdkmpc = buildHuaweiCloudSdkPackage "mpc"; + huaweicloudsdkmrs = buildHuaweiCloudSdkPackage "mrs"; + huaweicloudsdkmsgsms = buildHuaweiCloudSdkPackage "msgsms"; + huaweicloudsdkmssi = buildHuaweiCloudSdkPackage "mssi"; + huaweicloudsdknat = buildHuaweiCloudSdkPackage "nat"; + huaweicloudsdknlp = buildHuaweiCloudSdkPackage "nlp"; + huaweicloudsdkobs = buildHuaweiCloudSdkPackage "obs"; + huaweicloudsdkocr = buildHuaweiCloudSdkPackage "ocr"; + huaweicloudsdkoctopus = buildHuaweiCloudSdkPackage "octopus"; + huaweicloudsdkoms = buildHuaweiCloudSdkPackage "oms"; + huaweicloudsdkoptverse = buildHuaweiCloudSdkPackage "optverse"; + huaweicloudsdkorganizations = buildHuaweiCloudSdkPackage "organizations"; + huaweicloudsdkorgid = buildHuaweiCloudSdkPackage "orgid"; + huaweicloudsdkoroas = buildHuaweiCloudSdkPackage "oroas"; + huaweicloudsdkosm = buildHuaweiCloudSdkPackage "osm"; + huaweicloudsdkpangulargemodels = buildHuaweiCloudSdkPackage "pangulargemodels"; + huaweicloudsdkprojectman = buildHuaweiCloudSdkPackage "projectman"; + huaweicloudsdkrabbitmq = buildHuaweiCloudSdkPackage "rabbitmq"; + huaweicloudsdkram = buildHuaweiCloudSdkPackage "ram"; + huaweicloudsdkrc = buildHuaweiCloudSdkPackage "rc"; + huaweicloudsdkrds = buildHuaweiCloudSdkPackage "rds"; + huaweicloudsdkres = buildHuaweiCloudSdkPackage "res"; + huaweicloudsdkrfs = buildHuaweiCloudSdkPackage "rfs"; + huaweicloudsdkrgc = buildHuaweiCloudSdkPackage "rgc"; + huaweicloudsdkrms = buildHuaweiCloudSdkPackage "rms"; + huaweicloudsdkrocketmq = buildHuaweiCloudSdkPackage "rocketmq"; + huaweicloudsdkroma = buildHuaweiCloudSdkPackage "roma"; + huaweicloudsdksa = buildHuaweiCloudSdkPackage "sa"; + huaweicloudsdkscm = buildHuaweiCloudSdkPackage "scm"; + huaweicloudsdksdrs = buildHuaweiCloudSdkPackage "sdrs"; + huaweicloudsdksecmaster = buildHuaweiCloudSdkPackage "secmaster"; + huaweicloudsdkservicestage = buildHuaweiCloudSdkPackage "servicestage"; + huaweicloudsdksfsturbo = buildHuaweiCloudSdkPackage "sfsturbo"; + huaweicloudsdksis = buildHuaweiCloudSdkPackage "sis"; + huaweicloudsdksmn = buildHuaweiCloudSdkPackage "smn"; + huaweicloudsdksmnglobal = buildHuaweiCloudSdkPackage "smnglobal"; + huaweicloudsdksms = buildHuaweiCloudSdkPackage "sms"; + huaweicloudsdksmsapi = buildHuaweiCloudSdkPackage "smsapi"; + huaweicloudsdksts = buildHuaweiCloudSdkPackage "sts"; + huaweicloudsdkswr = buildHuaweiCloudSdkPackage "swr"; + huaweicloudsdktics = buildHuaweiCloudSdkPackage "tics"; + huaweicloudsdktms = buildHuaweiCloudSdkPackage "tms"; + huaweicloudsdkucs = buildHuaweiCloudSdkPackage "ucs"; + huaweicloudsdkugo = buildHuaweiCloudSdkPackage "ugo"; + huaweicloudsdkvas = buildHuaweiCloudSdkPackage "vas"; + huaweicloudsdkvcm = buildHuaweiCloudSdkPackage "vcm"; + huaweicloudsdkversatile = buildHuaweiCloudSdkPackage "versatile"; + huaweicloudsdkvod = buildHuaweiCloudSdkPackage "vod"; + huaweicloudsdkvpc = buildHuaweiCloudSdkPackage "vpc"; + huaweicloudsdkvpcep = buildHuaweiCloudSdkPackage "vpcep"; + huaweicloudsdkvpn = buildHuaweiCloudSdkPackage "vpn"; + huaweicloudsdkwaf = buildHuaweiCloudSdkPackage "waf"; + huaweicloudsdkworkspace = buildHuaweiCloudSdkPackage "workspace"; + huaweicloudsdkworkspaceapp = buildHuaweiCloudSdkPackage "workspaceapp"; +} diff --git a/pkgs/development/python-modules/huaweicloudsdk/update.sh b/pkgs/development/python-modules/huaweicloudsdk/update.sh new file mode 100644 index 000000000000..6c53e5068dc4 --- /dev/null +++ b/pkgs/development/python-modules/huaweicloudsdk/update.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq nixfmt-tree nix-update xmlstarlet + +set -eu -o pipefail + +nix-update python3Packages.huaweicloudsdkcore --commit --build + +source_file=pkgs/development/python-modules/huaweicloudsdk/default.nix + +repo=huaweicloud-sdk-python-v3 +owner=huaweicloud + +version=$(curl -s https://pypi.org/pypi/huaweicloudsdkcore/json | jq -r '.info.version') +old_version=$(awk -F'"' '/version = / { print $2; exit }' "$source_file") + +echo "Updating ${repo} from ${old_version} to ${version}" + +if [ "$version" = "$old_version" ]; then + echo "${source_file} already at ${version}; nothing to do" + exit 0 +fi + +archive_url="https://github.com/${owner}/${repo}/archive/refs/tags/v${version}.tar.gz" +prefetched_hash=$(nix-prefetch-url --type sha256 "$archive_url") +sri_hash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$prefetched_hash")" + +tmp_dir=$(mktemp -d) +cleanup() { + rm -rf "$tmp_dir" +} +trap cleanup EXIT + +archive_tar="$tmp_dir/repo.tar.gz" +curl -L --fail --silent --show-error "$archive_url" -o "$archive_tar" +tar -xzf "$archive_tar" -C "$tmp_dir" +repo_root="$tmp_dir/${repo}-${version}" + +if [ ! -d "$repo_root" ]; then + echo "Unable to find extracted repository root: $repo_root" >&2 + exit 1 +fi + +mapfile -t services < <( + find "$repo_root" -maxdepth 1 -mindepth 1 -type d -name 'huaweicloud-sdk-*' \ + -printf '%f\n' \ + | sed 's/^huaweicloud-sdk-//' \ + | sort +) + +if [ "${#services[@]}" -eq 0 ]; then + echo "No service directories found in ${repo_root}" >&2 + exit 1 +fi + +entries_file="$tmp_dir/entries.nix" +for service in "${services[@]}"; do + printf ' huaweicloudsdk%s = buildHuaweiCloudSdkPackage "%s";\n' "$service" "$service" >> "$entries_file" +done + +awk -v version="$version" -v hash="$sri_hash" -v entries_file="$entries_file" ' + BEGIN { + while ((getline line < entries_file) > 0) { + entries = entries line "\n" + } + close(entries_file) + in_attrset = 0 + replaced_attrset = 0 + } + + { + if ($0 ~ /^[[:space:]]*version = /) { + print " version = \"" version "\";" + next + } + if ($0 ~ /^[[:space:]]*hash = /) { + print " hash = \"" hash "\";" + next + } + + if (!replaced_attrset && $0 ~ /^in$/) { + print + in_attrset = 1 + next + } + + if (in_attrset && $0 ~ /^\{$/) { + print + printf "%s", entries + next + } + + if (in_attrset && $0 ~ /^\}$/) { + print + in_attrset = 0 + replaced_attrset = 1 + next + } + + if (in_attrset) { + next + } + + print + } +' "$source_file" > "$tmp_dir/default.nix" + +cp "$tmp_dir/default.nix" "$source_file" + +treefmt "$source_file" + +git commit "$source_file" -m "python3Packages.huaweicloudsdk: ${old_version} -> ${version}" diff --git a/pkgs/development/python-modules/huaweicloudsdkcore/default.nix b/pkgs/development/python-modules/huaweicloudsdkcore/default.nix new file mode 100644 index 000000000000..ef089ae6ebda --- /dev/null +++ b/pkgs/development/python-modules/huaweicloudsdkcore/default.nix @@ -0,0 +1,60 @@ +{ + lib, + buildPythonPackage, + certifi, + defusedxml, + fetchFromGitHub, + hatchling, + pyasn1, + pymongo, + pyyaml, + requests-toolbelt, + simplejson, + six, +}: + +buildPythonPackage (finalAttrs: { + pname = "huaweicloudsdkcore"; + version = "3.1.210"; + pyproject = true; + + src = fetchFromGitHub { + owner = "huaweicloud"; + repo = "huaweicloud-sdk-python-v3"; + tag = "v${finalAttrs.version}"; + hash = "sha256-F8qJVDuGM1YD4dmdcaRaDGHkGbV/w6onAQ8dbvS8hrk="; + }; + + sourceRoot = "${finalAttrs.src.name}/huaweicloud-sdk-core"; + + pythonRelaxDeps = [ + "pyasn1" + "pymongo" + ]; + + build-system = [ hatchling ]; + + dependencies = [ + certifi + defusedxml + pyasn1 + pymongo + pyyaml + requests-toolbelt + simplejson + six + ]; + + # All components are stored in a mono repo + doCheck = false; + + pythonImportsCheck = [ "huaweicloudsdkcore" ]; + + meta = { + description = "Core module of Huawei Cloud Python SDK"; + homepage = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"; + changelog = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +}) diff --git a/pkgs/development/python-modules/intersphinx-registry/default.nix b/pkgs/development/python-modules/intersphinx-registry/default.nix index e503a12c5d7d..a2c7d3ca3e84 100644 --- a/pkgs/development/python-modules/intersphinx-registry/default.nix +++ b/pkgs/development/python-modules/intersphinx-registry/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + pyprojectVersionPatchHook, # build-system flit-core, @@ -33,6 +34,10 @@ buildPythonPackage (finalAttrs: { hash = "sha256-yFpk3NZO2iCjuJ43WvssbDYxNJ6G6KfY5pcTCilsGQs="; }; + nativeBuildInputs = [ + pyprojectVersionPatchHook + ]; + build-system = [ flit-core ]; @@ -73,5 +78,6 @@ buildPythonPackage (finalAttrs: { mainProgram = "intersphinx-registry"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ eljamm ]; + teams = with lib.teams; [ ngi ]; }; }) diff --git a/pkgs/development/python-modules/jupyterlite-core/default.nix b/pkgs/development/python-modules/jupyterlite-core/default.nix index 42ef3224589b..fe3e552791e2 100644 --- a/pkgs/development/python-modules/jupyterlite-core/default.nix +++ b/pkgs/development/python-modules/jupyterlite-core/default.nix @@ -51,5 +51,6 @@ buildPythonPackage (finalAttrs: { mainProgram = "jupyter-lite"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ eljamm ]; + teams = with lib.teams; [ ngi ]; }; }) diff --git a/pkgs/development/python-modules/jupyterlite-sphinx/default.nix b/pkgs/development/python-modules/jupyterlite-sphinx/default.nix index 3e0951f57541..b5d584802208 100644 --- a/pkgs/development/python-modules/jupyterlite-sphinx/default.nix +++ b/pkgs/development/python-modules/jupyterlite-sphinx/default.nix @@ -23,7 +23,7 @@ buildPythonPackage (finalAttrs: { pname = "jupyterlite-sphinx"; - version = "0.22.1"; + version = "0.23.0"; pyproject = true; __structuredAttrs = true; @@ -31,7 +31,7 @@ buildPythonPackage (finalAttrs: { owner = "jupyterlite"; repo = "jupyterlite-sphinx"; tag = "v${finalAttrs.version}"; - hash = "sha256-eww/VyHbAp78Bz2jg43XHmetEDrXEqXK45cnXHElG80="; + hash = "sha256-cMMPf0CE0YMly6nHze2BZQLdNk32bS9tzVFYLAb38Ew="; }; build-system = [ @@ -81,5 +81,6 @@ buildPythonPackage (finalAttrs: { changelog = "https://github.com/jupyterlite/jupyterlite-sphinx/blob/${finalAttrs.src.rev}/CHANGELOG.md"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ eljamm ]; + teams = with lib.teams; [ ngi ]; }; }) diff --git a/pkgs/development/python-modules/materialx/default.nix b/pkgs/development/python-modules/materialx/default.nix deleted file mode 100644 index 21db4a4f35bc..000000000000 --- a/pkgs/development/python-modules/materialx/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchFromGitHub, - cmake, - setuptools, - libx11, - libxt, - libGL, - openimageio, - imath, - python, -}: - -buildPythonPackage rec { - pname = "materialx"; - version = "1.39.4"; - - src = fetchFromGitHub { - owner = "AcademySoftwareFoundation"; - repo = "MaterialX"; - rev = "v${version}"; - hash = "sha256-XNfXOC76zM5Ns2DyyE3mKCJ1iJaszs1M0rBdVLRDo8E="; - }; - - pyproject = false; - - nativeBuildInputs = [ - cmake - setuptools - ]; - - buildInputs = [ - openimageio - imath - ] - ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ - libx11 - libxt - libGL - ]; - - cmakeFlags = [ - "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" - (lib.cmakeBool "MATERIALX_BUILD_OIIO" true) - (lib.cmakeBool "MATERIALX_BUILD_SHARED_LIBS" true) - (lib.cmakeBool "MATERIALX_BUILD_PYTHON" true) - (lib.cmakeBool "MATERIALX_BUILD_GEN_MSL" ( - stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin - )) - ]; - - pythonImportsCheck = [ "MaterialX" ]; - - postInstall = '' - # Make python lib properly accessible - target_dir=$out/${python.sitePackages} - mkdir -p $(dirname $target_dir) - # required for cmake to find the bindings, when included in other projects - ln -s $out/python $target_dir - ''; - - meta = { - changelog = "https://github.com/AcademySoftwareFoundation/MaterialX/blob/${src.rev}/CHANGELOG.md"; - description = "Open standard for representing rich material and look-development content in computer graphics"; - homepage = "https://materialx.org"; - maintainers = [ lib.maintainers.gador ]; - platforms = lib.platforms.unix; - license = lib.licenses.mpl20; - }; -} diff --git a/pkgs/development/python-modules/plotnine/default.nix b/pkgs/development/python-modules/plotnine/default.nix index 78787065e881..cca26afb0d66 100644 --- a/pkgs/development/python-modules/plotnine/default.nix +++ b/pkgs/development/python-modules/plotnine/default.nix @@ -23,7 +23,7 @@ buildPythonPackage (finalAttrs: { pname = "plotnine"; - version = "0.15.7"; + version = "0.15.8"; pyproject = true; __structuredAttrs = true; @@ -31,7 +31,7 @@ buildPythonPackage (finalAttrs: { owner = "has2k1"; repo = "plotnine"; tag = "v${finalAttrs.version}"; - hash = "sha256-7yM7NeUqaZvp/UUXbfpFb1V+9Z0Gz3MUBq1JydJeyDE="; + hash = "sha256-maPKbS8+RPuZFMi1vgiQNWOB0VbHoCviOx5NtmM6VVQ="; }; build-system = [ setuptools-scm ]; diff --git a/pkgs/development/python-modules/py-opensonic/default.nix b/pkgs/development/python-modules/py-opensonic/default.nix index 9f12a6b8ecac..7caaea208414 100644 --- a/pkgs/development/python-modules/py-opensonic/default.nix +++ b/pkgs/development/python-modules/py-opensonic/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "py-opensonic"; - version = "10.2.1"; + version = "10.3.0"; pyproject = true; src = fetchFromGitHub { owner = "khers"; repo = "py-opensonic"; tag = "v${version}"; - hash = "sha256-FEoRN2ba54ClSnl9A+yFUEMdsH1rww4321OpDXL9bvY="; + hash = "sha256-4gUo8qu902lJhBJgp6ynYoazq0K04rNHNDKL/psnr4c="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/pyjks/default.nix b/pkgs/development/python-modules/pyjks/default.nix index 9b63d5a8f619..46aeb527cf2a 100644 --- a/pkgs/development/python-modules/pyjks/default.nix +++ b/pkgs/development/python-modules/pyjks/default.nix @@ -6,20 +6,25 @@ # pythonPackages pyasn1-modules, pycryptodomex, + setuptools, twofish, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pyjks"; version = "20.0.0"; - format = "setuptools"; + + __structuredAttrs = true; + pyproject = true; src = fetchPypi { - inherit pname version; - sha256 = "0378cec15fb11b2ed27ba54dad9fd987d48e6f62f49fcff138f5f7a8b312b044"; + inherit (finalAttrs) pname version; + hash = "sha256-A3jOwV+xGy7Se6VNrZ/Zh9SOb2L0n8/xOPX3qLMSsEQ="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ pyasn1-modules pycryptodomex twofish @@ -30,8 +35,9 @@ buildPythonPackage rec { meta = { description = "Pure-Python Java Keystore (JKS) library"; + changelog = "https://github.com/kurtbrose/pyjks/blob/v${finalAttrs.version}/CHANGELOG.md"; homepage = "https://github.com/kurtbrose/pyjks"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ kamadorueda ]; }; -} +}) diff --git a/pkgs/development/python-modules/pyjnius/default.nix b/pkgs/development/python-modules/pyjnius/default.nix index ca024f6f5f13..fdfea0572834 100644 --- a/pkgs/development/python-modules/pyjnius/default.nix +++ b/pkgs/development/python-modules/pyjnius/default.nix @@ -4,18 +4,28 @@ cython, fetchPypi, jdk, + setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pyjnius"; version = "1.7.0"; - format = "setuptools"; + + __structuredAttrs = true; + pyproject = true; src = fetchPypi { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-n4FwhISwqE6tPrC6hOU6xXnkxDyhDHRvmJip891Q9U0="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "Cython~=3.1.2" "Cython" + ''; + + build-system = [ setuptools ]; + nativeBuildInputs = [ jdk cython @@ -26,8 +36,8 @@ buildPythonPackage rec { meta = { description = "Python module to access Java classes as Python classes using the Java Native Interface (JNI)"; homepage = "https://github.com/kivy/pyjnius"; - changelog = "https://github.com/kivy/pyjnius/blob/${version}/CHANGELOG.md"; + changelog = "https://github.com/kivy/pyjnius/blob/${finalAttrs.version}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ ifurther ]; }; -} +}) diff --git a/pkgs/development/python-modules/pyldapsearch/default.nix b/pkgs/development/python-modules/pyldapsearch/default.nix new file mode 100644 index 000000000000..b72b02350a24 --- /dev/null +++ b/pkgs/development/python-modules/pyldapsearch/default.nix @@ -0,0 +1,63 @@ +{ + lib, + buildPythonPackage, + cffi, + click, + fetchFromGitHub, + hatchling, + impacket, + msldap, + nix-update-script, + pyasn1, + pycryptodome, + rich, + setuptools, + typer, +}: + +buildPythonPackage (finalAttrs: { + pname = "pyldapsearch"; + version = "0.2.0"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "Tw1sm"; + repo = "pyldapsearch"; + tag = "v${finalAttrs.version}"; + hash = "sha256-prypaCGS2BpZGqC/3GrJoRhEhU27dsibVOy2rW+/ePs="; + }; + + pythonRelaxDeps = [ "click" ]; + + build-system = [ hatchling ]; + + dependencies = [ + cffi + click + impacket + msldap + pyasn1 + pycryptodome + rich + setuptools + typer + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ "pyldapsearch" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Tool for issuing manual LDAP queries which offers bofhound compatible output"; + homepage = "https://github.com/Tw1sm/pyldapsearch"; + changelog = "https://github.com/Tw1sm/pyldapsearch/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.bsdOriginal; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "pyldapsearch"; + }; +}) diff --git a/pkgs/development/python-modules/pytweening/default.nix b/pkgs/development/python-modules/pytweening/default.nix index 074af0424899..b8da44f4838e 100644 --- a/pkgs/development/python-modules/pytweening/default.nix +++ b/pkgs/development/python-modules/pytweening/default.nix @@ -2,21 +2,33 @@ lib, buildPythonPackage, fetchPypi, + setuptools, + unittestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pytweening"; version = "1.2.0"; - format = "setuptools"; + + __structuredAttrs = true; + pyproject = true; src = fetchPypi { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-JDMYt3NmmAZsXzYuxcK2Q07PQpfDyOfKqKv+avTKxxs="; }; + build-system = [ setuptools ]; + pythonImportsCheck = [ "pytweening" ]; - checkPhase = '' - python -m unittest tests.basicTests - ''; + + unittestFlags = [ + "-s" + "tests" + "-p" + "basicTests.py" + ]; + + nativeCheckInputs = [ unittestCheckHook ]; meta = { description = "Set of tweening / easing functions implemented in Python"; @@ -24,4 +36,4 @@ buildPythonPackage rec { license = lib.licenses.bsd3; maintainers = [ ]; }; -} +}) diff --git a/pkgs/development/python-modules/qcodes/default.nix b/pkgs/development/python-modules/qcodes/default.nix index 37712459da21..3e5b86d0e0ef 100644 --- a/pkgs/development/python-modules/qcodes/default.nix +++ b/pkgs/development/python-modules/qcodes/default.nix @@ -168,6 +168,8 @@ buildPythonPackage (finalAttrs: { # `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. # The use of platformdirs will be the default in `jupyter_core` v6 "-Wignore::DeprecationWarning" + # impending matplotlib deprecation, does not block distribution + "-Wignore::PendingDeprecationWarning" ]; disabledTestPaths = [ diff --git a/pkgs/development/python-modules/sphinx-gallery/default.nix b/pkgs/development/python-modules/sphinx-gallery/default.nix index 67dcad4afd97..357ad1e3d6ff 100644 --- a/pkgs/development/python-modules/sphinx-gallery/default.nix +++ b/pkgs/development/python-modules/sphinx-gallery/default.nix @@ -130,5 +130,6 @@ buildPythonPackage (finalAttrs: { mainProgram = "sphinx_gallery_py2jupyter"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ eljamm ]; + teams = with lib.teams; [ ngi ]; }; }) diff --git a/pkgs/development/python-modules/sphinxcontrib-restbuilder/default.nix b/pkgs/development/python-modules/sphinxcontrib-restbuilder/default.nix new file mode 100644 index 000000000000..0cc722cdb8c3 --- /dev/null +++ b/pkgs/development/python-modules/sphinxcontrib-restbuilder/default.nix @@ -0,0 +1,56 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + gitUpdater, + setuptools, + sphinx, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "sphinxcontrib-restbuilder"; + version = "0.3"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "sphinx-contrib"; + repo = "restbuilder"; + tag = finalAttrs.version; + hash = "sha256-gm3TxcKorRBn1UcqlZtfjBAshNTE1smgLseSM7dddC0="; + }; + + build-system = [ setuptools ]; + + dependencies = [ sphinx ]; + + postPatch = '' + # pkg_resources.declare_namespace shadows other sphinxcontrib.* packages + substituteInPlace setup.py \ + --replace-fail "from setuptools import setup, find_packages" "from setuptools import setup, find_namespace_packages" \ + --replace-fail "packages=find_packages(exclude=['tests'])," "packages=find_namespace_packages(exclude=['tests*'])," \ + --replace-fail "namespace_packages=['sphinxcontrib']," "" + rm -f sphinxcontrib/__init__.py + # Sphinx 9: versionadded wording is "Added in", goldens still say "New in" + substituteInPlace tests/expected/sphinx-directives/versionadded.rst \ + --replace-fail "New in version" "Added in version" + ''; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonNamespaces = [ "sphinxcontrib" ]; + + pythonImportsCheck = [ "sphinxcontrib.writers.rst" ]; + + passthru.updateScript = gitUpdater { }; + + meta = { + description = "Sphinx extension to output reST files"; + homepage = "https://github.com/sphinx-contrib/restbuilder"; + changelog = "https://github.com/sphinx-contrib/restbuilder/blob/${finalAttrs.version}/CHANGES.rst"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.lucasew ]; + teams = [ lib.teams.ngi ]; + }; +}) diff --git a/pkgs/development/python-modules/sslib/default.nix b/pkgs/development/python-modules/sslib/default.nix index 59697b0d1987..a38a31a4a2cd 100644 --- a/pkgs/development/python-modules/sslib/default.nix +++ b/pkgs/development/python-modules/sslib/default.nix @@ -2,27 +2,35 @@ lib, fetchPypi, buildPythonPackage, + setuptools, isPy3k, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "sslib"; version = "0.2.0"; - format = "setuptools"; + pyproject = true; + + __structuredAttrs = true; + disabled = !isPy3k; src = fetchPypi { - inherit pname version; - sha256 = "0b5zrjkvx4klmv57pzhcmvbkdlyn745mn02k7hp811hvjrhbz417"; + inherit (finalAttrs) pname version; + hash = "sha256-J5C/YJYbhoAuPFMAWws51tM2164M/nvKrnSSvqfMvyw="; }; + build-system = [ setuptools ]; + # No tests available doCheck = false; + pythonImportsCheck = [ "sslib" ]; + meta = { homepage = "https://github.com/jqueiroz/python-sslib"; description = "Python3 library for sharing secrets"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ jqueiroz ]; }; -} +}) diff --git a/pkgs/development/python-modules/stashy/default.nix b/pkgs/development/python-modules/stashy/default.nix index 7af6dafba694..dade72f42edb 100644 --- a/pkgs/development/python-modules/stashy/default.nix +++ b/pkgs/development/python-modules/stashy/default.nix @@ -3,20 +3,25 @@ buildPythonPackage, decorator, fetchPypi, + setuptools, requests, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "stashy"; version = "0.7"; - format = "setuptools"; + pyproject = true; + + __structuredAttrs = true; src = fetchPypi { - inherit pname version; - sha256 = "1x89zazwxnsx6rdfw8nfr372hj4sk8nrcs5hsjxpcxcva0calrcr"; + inherit (finalAttrs) pname version; + hash = "sha256-mWWqGFCbdXa71LBoli2amkgozsjOIu5aNl3bzr/6CfU="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ decorator requests ]; @@ -31,4 +36,4 @@ buildPythonPackage rec { license = lib.licenses.asl20; maintainers = with lib.maintainers; [ mupdt ]; }; -} +}) diff --git a/pkgs/development/python-modules/steamworkspy/default.nix b/pkgs/development/python-modules/steamworkspy/default.nix index 34b7c386bb84..7858c261f1ad 100644 --- a/pkgs/development/python-modules/steamworkspy/default.nix +++ b/pkgs/development/python-modules/steamworkspy/default.nix @@ -65,12 +65,7 @@ buildPythonPackage { license = with lib.licenses; [ mit # For steamworks headers and libsteamapi.so - ( - unfreeRedistributable - // { - url = "https://partner.steamgames.com/documentation/sdk_access_agreement"; - } - ) + valveSDK ]; # steamworksSrc is x86_64-linux only platforms = [ "x86_64-linux" ]; diff --git a/pkgs/development/python-modules/tadasets/default.nix b/pkgs/development/python-modules/tadasets/default.nix index e38bc495a64f..eac180c367cd 100644 --- a/pkgs/development/python-modules/tadasets/default.nix +++ b/pkgs/development/python-modules/tadasets/default.nix @@ -4,34 +4,40 @@ fetchPypi, numpy, matplotlib, - pytest, + pytestCheckHook, + setuptools, scipy, + scikit-learn, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "tadasets"; version = "0.2.2"; - format = "setuptools"; + pyproject = true; src = fetchPypi { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-C+l19J0PHjZTlzAhXbojicaOyr/gjN8fuH7cLyb449w="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ numpy matplotlib ]; nativeCheckInputs = [ - pytest + pytestCheckHook scipy + scikit-learn ]; meta = { description = "Great data sets for Topological Data Analysis"; homepage = "https://tadasets.scikit-tda.org"; + changelog = "https://github.com/scikit-tda/tadasets/blob/v${finalAttrs.version}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = [ ]; }; -} +}) diff --git a/pkgs/development/python-modules/tmodbus/default.nix b/pkgs/development/python-modules/tmodbus/default.nix index 76eca42fe43b..c9ec718ee8c5 100644 --- a/pkgs/development/python-modules/tmodbus/default.nix +++ b/pkgs/development/python-modules/tmodbus/default.nix @@ -15,13 +15,13 @@ }: let - version = "0.5.0"; + version = "0.5.1"; src = fetchFromGitHub { owner = "wlcrs"; repo = "tmodbus"; tag = "v${version}"; - hash = "sha256-NbDa6AEhk28qGg2URqdfySXN6JIu/CMEQt8raNWv+A4="; + hash = "sha256-wBFIEgwzIC7eCzZpMXxwQY384XImTKL16qJ89OgEobc="; }; rmodbus-server = rustPlatform.buildRustPackage (finalAttrs: { diff --git a/pkgs/development/python-modules/uasiren/default.nix b/pkgs/development/python-modules/uasiren/default.nix index 8e915f2e4b03..94aef05ac844 100644 --- a/pkgs/development/python-modules/uasiren/default.nix +++ b/pkgs/development/python-modules/uasiren/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + setuptools, # build time setuptools-scm, @@ -14,25 +15,26 @@ pytestCheckHook, }: -let +buildPythonPackage (finalAttrs: { pname = "uasiren"; version = "0.0.1"; -in + pyproject = true; -buildPythonPackage { - inherit pname version; - format = "setuptools"; + __structuredAttrs = true; src = fetchFromGitHub { owner = "PaulAnnekov"; repo = "uasiren"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-NHrnG5Vhz+JZgcTJyfIgGz0Ye+3dFVv2zLCCqw2++oM="; }; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ + setuptools + setuptools-scm + ]; - propagatedBuildInputs = [ aiohttp ]; + dependencies = [ aiohttp ]; nativeCheckInputs = [ pytest-asyncio @@ -45,10 +47,10 @@ buildPythonPackage { ]; meta = { - changelog = "https://github.com/PaulAnnekov/uasiren/releases/tag/v${version}"; + changelog = "https://github.com/PaulAnnekov/uasiren/releases/tag/${finalAttrs.src.tag}"; description = "Implements siren.pp.ua API - public wrapper for api.ukrainealarm.com API that returns info about Ukraine air-raid alarms"; homepage = "https://github.com/PaulAnnekov/uasiren"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ hexa ]; }; -} +}) diff --git a/pkgs/development/python-modules/uhi/default.nix b/pkgs/development/python-modules/uhi/default.nix index 5c19109236cd..54274af4aa4c 100644 --- a/pkgs/development/python-modules/uhi/default.nix +++ b/pkgs/development/python-modules/uhi/default.nix @@ -19,12 +19,12 @@ buildPythonPackage rec { pname = "uhi"; - version = "1.0.0"; + version = "1.1.1"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-MxGIlJsaScjbnvnVC3xNTfRgYRXRR97ZfE8FDagnDnQ="; + hash = "sha256-05xNwWLWkby0Q1KanPX+mbEeFKOHzfgoQVTMJYcNL/A="; }; build-system = [ diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix index 3c74709b71a2..feafa976c8ff 100644 --- a/pkgs/development/tools/misc/patchelf/unstable.nix +++ b/pkgs/development/tools/misc/patchelf/unstable.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { owner = "NixOS"; repo = "patchelf"; rev = "b49de1b3384e7928bf0df9a889fe5a4e7b3fbddf"; - sha256 = "sha256-0AGK+ZPZDc7zTVAmG6jAAynQhh4nP8skVwOEV5hZKh0="; + hash = "sha256-0AGK+ZPZDc7zTVAmG6jAAynQhh4nP8skVwOEV5hZKh0="; }; # Drop test that fails on musl (?) @@ -27,6 +27,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ autoreconfHook ]; + strictDeps = true; + doCheck = !stdenv.hostPlatform.isDarwin; passthru = { @@ -35,6 +37,8 @@ stdenv.mkDerivation { }; }; + __structuredAttrs = true; + meta = { homepage = "https://github.com/NixOS/patchelf"; license = lib.licenses.gpl3; diff --git a/pkgs/servers/home-assistant/custom-components/ecoflow_cloud/package.nix b/pkgs/servers/home-assistant/custom-components/ecoflow_cloud/package.nix index 9d5678e42f20..de0e907cd617 100644 --- a/pkgs/servers/home-assistant/custom-components/ecoflow_cloud/package.nix +++ b/pkgs/servers/home-assistant/custom-components/ecoflow_cloud/package.nix @@ -11,13 +11,13 @@ buildHomeAssistantComponent rec { owner = "tolwi"; domain = "ecoflow_cloud"; - version = "1.4.1"; + version = "1.5.0-shp3.9"; src = fetchFromGitHub { owner = "tolwi"; repo = "hassio-ecoflow-cloud"; tag = "v${version}"; - hash = "sha256-vN+po7S+/QxAHnVHJ0EpQGoxXBmcKNMRTCOPdeZ0f90="; + hash = "sha256-QwpA3TVhU36QPeejV9rpo24iwGtQ4UeDLDqc384ji7U="; }; ignoreVersionRequirement = [ diff --git a/pkgs/servers/sql/postgresql/14.nix b/pkgs/servers/sql/postgresql/14.nix index 04c9628ceb66..056ff5ab18f3 100644 --- a/pkgs/servers/sql/postgresql/14.nix +++ b/pkgs/servers/sql/postgresql/14.nix @@ -1,7 +1,7 @@ { - version = "14.23"; - rev = "refs/tags/REL_14_23"; - hash = "sha256-fjoboaUhrHFDqusmIXzSS5ZnIpSRHO9+qcqvkchl2dM="; + version = "14.24"; + rev = "refs/tags/REL_14_24"; + hash = "sha256-yfZJFXk10vJ4QEhbUXe1gtz8rBS2YOEcD3unEjSHzjk="; muslPatches = { disable-test-collate-icu-utf8 = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; diff --git a/pkgs/servers/sql/postgresql/15.nix b/pkgs/servers/sql/postgresql/15.nix index 084b353c00ec..b26a89a2c36a 100644 --- a/pkgs/servers/sql/postgresql/15.nix +++ b/pkgs/servers/sql/postgresql/15.nix @@ -1,7 +1,7 @@ { - version = "15.18"; - rev = "refs/tags/REL_15_18"; - hash = "sha256-tw1zzgLXx7Jr4bi8rMKRmTJzOSQFGvrP2nHr9FcVrjs="; + version = "15.19"; + rev = "refs/tags/REL_15_19"; + hash = "sha256-y5QarcJSMifu+ctjsQOdG/Njo9KvFvIgncBJBjCVG3Y="; muslPatches = { dont-use-locale-a = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql15/dont-use-locale-a-on-musl.patch?id=f424e934e6d076c4ae065ce45e734aa283eecb9c"; diff --git a/pkgs/servers/sql/postgresql/16.nix b/pkgs/servers/sql/postgresql/16.nix index 83fa3acab5d1..3eb6e9939b58 100644 --- a/pkgs/servers/sql/postgresql/16.nix +++ b/pkgs/servers/sql/postgresql/16.nix @@ -1,7 +1,7 @@ { - version = "16.14"; - rev = "refs/tags/REL_16_14"; - hash = "sha256-g2+OdB2dGIKBSFJ24Z3Yy7oRAFywNMSVDdWfnsaeJJQ="; + version = "16.15"; + rev = "refs/tags/REL_16_15"; + hash = "sha256-HHNROwOzfTatZif+hog/DZnDafV+mZ2Z9Jrq87XN0cY="; muslPatches = { dont-use-locale-a = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql16/dont-use-locale-a-on-musl.patch?id=08a24be262339fd093e641860680944c3590238e"; diff --git a/pkgs/servers/sql/postgresql/17.nix b/pkgs/servers/sql/postgresql/17.nix index 0f5eb20d649c..c374ca8e5592 100644 --- a/pkgs/servers/sql/postgresql/17.nix +++ b/pkgs/servers/sql/postgresql/17.nix @@ -1,7 +1,7 @@ { - version = "17.10"; - rev = "refs/tags/REL_17_10"; - hash = "sha256-3ZAqlT3R8ywhNH13oqz2VUbSwpOJ2JaICbxZ29awaMw="; + version = "17.11"; + rev = "refs/tags/REL_17_11"; + hash = "sha256-pkVBg4Rxku3rEnNhPvVoAoab55vqrDqZfW1z+umealE="; muslPatches = { dont-use-locale-a = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql17/dont-use-locale-a-on-musl.patch?id=d69ead2c87230118ae7f72cef7d761e761e1f37e"; diff --git a/pkgs/servers/sql/postgresql/18.nix b/pkgs/servers/sql/postgresql/18.nix index 1bccfcc412a0..507e4a23e835 100644 --- a/pkgs/servers/sql/postgresql/18.nix +++ b/pkgs/servers/sql/postgresql/18.nix @@ -1,7 +1,7 @@ { - version = "18.4"; - rev = "refs/tags/REL_18_4"; - hash = "sha256-Ac/Dqcj8vjcW3my5vsnKaMiQqTq/HPtUzckJ3SMyrfA="; + version = "18.6"; + rev = "refs/tags/REL_18_6"; + hash = "sha256-ySffxlG7jlNyzx++BmIN+WuaQ9TMAJt/qER9wIjd6B8="; muslPatches = { dont-use-locale-a = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql17/dont-use-locale-a-on-musl.patch?id=d69ead2c87230118ae7f72cef7d761e761e1f37e"; diff --git a/pkgs/servers/sql/postgresql/19.nix b/pkgs/servers/sql/postgresql/19.nix index f606db9806f7..1b42f5fc9226 100644 --- a/pkgs/servers/sql/postgresql/19.nix +++ b/pkgs/servers/sql/postgresql/19.nix @@ -1,7 +1,7 @@ { - version = "19beta2"; - rev = "refs/tags/REL_19_BETA2"; - hash = "sha256-3bfWDt6+iXJG/Wy2i8R7B+H7fMbLsSSD3qzuOXTpmtc="; + version = "19beta3"; + rev = "refs/tags/REL_19_BETA3"; + hash = "sha256-Mcf46ksAzOn9hqCiF5kUwNskfFCBxrzqvznnxdwHfnM="; muslPatches = { dont-use-locale-a = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql17/dont-use-locale-a-on-musl.patch?id=d69ead2c87230118ae7f72cef7d761e761e1f37e"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a086ec1d5fc9..7dda3774db9b 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -786,6 +786,7 @@ mapAliases { evolve-core = throw "'evolve-core' has been removed, as it hindered the removal of flutter329"; # Added 2026-01-25 eww-wayland = throw "'eww-wayland' has been renamed to/replaced by 'eww'"; # Converted to throw 2025-10-27 ex_doc = warnAlias "'ex_doc' is deprecated in favor of using the beamPackages sets. Use 'beamPackages.ex_doc' instead." beamPackages.ex_doc; # added 2026-06-15 + expidus = throw "'expidus' has been removed from nixpkgs due to it not being maintained"; # Added 2026-07-28 ext4fuse = throw "'ext4fuse' has been removed as it is unmaintained, and depends on the unmaintained fuse2 library"; # added 2026-08-12 f3d_egl = warnAlias "'f3d' now build with egl support by default, so `f3d_egl` is deprecated, consider using 'f3d' instead." f3d; # Added 2025-07-18 fabs = throw "'fabs' has been removed due to being broken for more than a year; see RFC 180"; # Added 2026-02-05 @@ -841,6 +842,7 @@ mapAliases { flutter324 = throw "flutter324 has been removed because it isn't updated anymore, and no packages in nixpkgs use it. If you still need it, use flutter.mkFlutter to get a custom version"; # Added 2025-10-28 flutter326 = throw "flutter326 has been removed because it isn't updated anymore, and no packages in nixpkgs use it. If you still need it, use flutter.mkFlutter to get a custom version"; # Added 2025-06-08 flutter327 = throw "flutter327 has been removed because it isn't updated anymore, and no packages in nixpkgs use it. If you still need it, use flutter.mkFlutter to get a custom version"; # Added 2025-10-28 + flutterPackages-source = throw "'flutterPackages-source' is unmaintained and has been removed"; # Added 2026-07-28 fmsynth = throw "'fmsynth' has been removed as it was broken and unmaintained both upstream and in nixpkgs."; # Added 2025-09-01 follow = warnAlias "follow has been renamed to folo" folo; # Added 2025-05-18 fondo = throw "'fondo' has been removed as it was unmaintained upstream and depended on libsoup 2.4"; # Added 2026-06-07 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec92562a1abc..ee88cde4d479 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1641,8 +1641,6 @@ with pkgs; kaggle = with python3Packages; toPythonApplication kaggle; - materialx = with python3Packages; toPythonApplication materialx; - # while building documentation meson may want to run binaries for host # which needs an emulator # example of an error which this fixes @@ -3213,11 +3211,9 @@ with pkgs; filecheck = with python3Packages; toPythonApplication filecheck; flutterPackages-bin = recurseIntoAttrs (callPackage ../development/compilers/flutter { }); - flutterPackages-source = recurseIntoAttrs ( - callPackage ../development/compilers/flutter { useNixpkgsEngine = true; } - ); flutterPackages = flutterPackages-bin; flutter = flutterPackages.stable; + flutter347 = flutterPackages.v3_47; flutter344 = flutterPackages.v3_44; flutter341 = flutterPackages.v3_41; flutter338 = flutterPackages.v3_38; @@ -10067,14 +10063,6 @@ with pkgs; enlightenment = recurseIntoAttrs (callPackage ../desktops/enlightenment { }); - expidus = recurseIntoAttrs ( - callPackages ../desktops/expidus { - # Use the Nix built Flutter Engine for testing. - # Also needed when we eventually package Genesis Shell. - flutterPackages = flutterPackages-source; - } - ); - gnome = recurseIntoAttrs (callPackage ../desktops/gnome { }); inherit (callPackage ../desktops/gnome/extensions { }) @@ -10445,14 +10433,6 @@ with pkgs; ### SCIENCE / PHYSICS - hepmc3 = callPackage ../development/libraries/physics/hepmc3 { - python = null; - }; - - pythia = callPackage ../development/libraries/physics/pythia { - hepmc = hepmc2; - }; - yoda-with-root = lowPrio ( yoda.override { withRootSupport = true; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8717864e0e09..2d414507d847 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2153,6 +2153,8 @@ self: super: with self; { bagit = callPackage ../development/python-modules/bagit { }; + bahttext = callPackage ../development/python-modules/bahttext { }; + baidu-aip = callPackage ../development/python-modules/baidu-aip { }; baize = callPackage ../development/python-modules/baize { }; @@ -6398,6 +6400,8 @@ self: super: with self; { formulaic = callPackage ../development/python-modules/formulaic { }; + formulas = callPackage ../development/python-modules/formulas { }; + fortiosapi = callPackage ../development/python-modules/fortiosapi { }; fortune = callPackage ../development/python-modules/fortune { }; @@ -7811,6 +7815,198 @@ self: super: with self; { huawei-lte-api = callPackage ../development/python-modules/huawei-lte-api { }; + inherit (callPackage ../development/python-modules/huaweicloudsdk { }) + huaweicloudsdkaad + huaweicloudsdkagentarts + huaweicloudsdkagentidentity + huaweicloudsdkantiddos + huaweicloudsdkaom + huaweicloudsdkaos + huaweicloudsdkapig + huaweicloudsdkapm + huaweicloudsdkas + huaweicloudsdkasm + huaweicloudsdkastrozero + huaweicloudsdkbcc + huaweicloudsdkbcs + huaweicloudsdkbms + huaweicloudsdkbss + huaweicloudsdkbssintl + huaweicloudsdkcae + huaweicloudsdkcampusgo + huaweicloudsdkcbh + huaweicloudsdkcbr + huaweicloudsdkcbs + huaweicloudsdkcc + huaweicloudsdkcce + huaweicloudsdkccm + huaweicloudsdkcdm + huaweicloudsdkcdn + huaweicloudsdkces + huaweicloudsdkcfw + huaweicloudsdkclassroom + huaweicloudsdkclouddc + huaweicloudsdkcloudide + huaweicloudsdkcloudpond + huaweicloudsdkcloudrtc + huaweicloudsdkcloudtable + huaweicloudsdkcloudtest + huaweicloudsdkcoc + huaweicloudsdkcodeartsartifact + huaweicloudsdkcodeartsbuild + huaweicloudsdkcodeartscheck + huaweicloudsdkcodeartsdeploy + huaweicloudsdkcodeartsgovernance + huaweicloudsdkcodeartside + huaweicloudsdkcodeartsinspector + huaweicloudsdkcodeartspipeline + huaweicloudsdkcodeartsrepo + huaweicloudsdkcodecraft + huaweicloudsdkconfig + huaweicloudsdkcpcs + huaweicloudsdkcph + huaweicloudsdkcpts + huaweicloudsdkcse + huaweicloudsdkcsms + huaweicloudsdkcss + huaweicloudsdkcts + huaweicloudsdkdas + huaweicloudsdkdataartsfabric + huaweicloudsdkdataartsfabricep + huaweicloudsdkdataartsstudio + huaweicloudsdkdbss + huaweicloudsdkdc + huaweicloudsdkdcc + huaweicloudsdkdcos + huaweicloudsdkdcs + huaweicloudsdkddm + huaweicloudsdkdds + huaweicloudsdkdeh + huaweicloudsdkdevstar + huaweicloudsdkdgc + huaweicloudsdkdis + huaweicloudsdkdlf + huaweicloudsdkdli + huaweicloudsdkdns + huaweicloudsdkdris + huaweicloudsdkdrs + huaweicloudsdkdsc + huaweicloudsdkdwr + huaweicloudsdkdws + huaweicloudsdkec + huaweicloudsdkecs + huaweicloudsdkedgesec + huaweicloudsdkeg + huaweicloudsdkeihealth + huaweicloudsdkeip + huaweicloudsdkelb + huaweicloudsdkeps + huaweicloudsdker + huaweicloudsdkesw + huaweicloudsdkevs + huaweicloudsdkfrs + huaweicloudsdkfunctiongraph + huaweicloudsdkga + huaweicloudsdkgaussdb + huaweicloudsdkgaussdbfornosql + huaweicloudsdkgaussdbforopengauss + huaweicloudsdkgeip + huaweicloudsdkges + huaweicloudsdkgsl + huaweicloudsdkhilens + huaweicloudsdkhss + huaweicloudsdkiam + huaweicloudsdkiamaccessanalyzer + huaweicloudsdkidentitycenter + huaweicloudsdkidentitycenteroidc + huaweicloudsdkidentitycenterportalapi + huaweicloudsdkidentitycenterscim + huaweicloudsdkidentitycenterstore + huaweicloudsdkidme + huaweicloudsdkidmeclassicapi + huaweicloudsdkiec + huaweicloudsdkief + huaweicloudsdkimage + huaweicloudsdkimagesearch + huaweicloudsdkims + huaweicloudsdkiotanalytics + huaweicloudsdkiotda + huaweicloudsdkiotdm + huaweicloudsdkiotedge + huaweicloudsdkivs + huaweicloudsdkkafka + huaweicloudsdkkms + huaweicloudsdkkoomessage + huaweicloudsdkkps + huaweicloudsdkkvs + huaweicloudsdklakeformation + huaweicloudsdklive + huaweicloudsdklts + huaweicloudsdkmapds + huaweicloudsdkmas + huaweicloudsdkmastudio + huaweicloudsdkmeeting + huaweicloudsdkmetastudio + huaweicloudsdkmodelarts + huaweicloudsdkmoderation + huaweicloudsdkmpc + huaweicloudsdkmrs + huaweicloudsdkmsgsms + huaweicloudsdkmssi + huaweicloudsdknat + huaweicloudsdknlp + huaweicloudsdkobs + huaweicloudsdkocr + huaweicloudsdkoctopus + huaweicloudsdkoms + huaweicloudsdkoptverse + huaweicloudsdkorganizations + huaweicloudsdkorgid + huaweicloudsdkoroas + huaweicloudsdkosm + huaweicloudsdkpangulargemodels + huaweicloudsdkprojectman + huaweicloudsdkrabbitmq + huaweicloudsdkram + huaweicloudsdkrc + huaweicloudsdkrds + huaweicloudsdkres + huaweicloudsdkrfs + huaweicloudsdkrgc + huaweicloudsdkrms + huaweicloudsdkrocketmq + huaweicloudsdkroma + huaweicloudsdksa + huaweicloudsdkscm + huaweicloudsdksdrs + huaweicloudsdksecmaster + huaweicloudsdkservicestage + huaweicloudsdksfsturbo + huaweicloudsdksis + huaweicloudsdksmn + huaweicloudsdksmnglobal + huaweicloudsdksms + huaweicloudsdksmsapi + huaweicloudsdksts + huaweicloudsdkswr + huaweicloudsdktics + huaweicloudsdktms + huaweicloudsdkucs + huaweicloudsdkugo + huaweicloudsdkvas + huaweicloudsdkvcm + huaweicloudsdkversatile + huaweicloudsdkvod + huaweicloudsdkvpc + huaweicloudsdkvpcep + huaweicloudsdkvpn + huaweicloudsdkwaf + huaweicloudsdkworkspace + huaweicloudsdkworkspaceapp + ; + + huaweicloudsdkcore = callPackage ../development/python-modules/huaweicloudsdkcore { }; + hueble = callPackage ../development/python-modules/hueble { }; huepy = callPackage ../development/python-modules/huepy { }; @@ -10242,7 +10438,12 @@ self: super: with self; { material-color-utilities = callPackage ../development/python-modules/material-color-utilities { }; - materialx = callPackage ../development/python-modules/materialx { }; + materialx = toPythonModule ( + pkgs.materialx.override { + python3Packages = self; + pythonSupport = true; + } + ); materialyoucolor = callPackage ../development/python-modules/materialyoucolor { }; @@ -15021,6 +15222,8 @@ self: super: with self; { pyld = callPackage ../development/python-modules/pyld { }; + pyldapsearch = callPackage ../development/python-modules/pyldapsearch { }; + pyldavis = callPackage ../development/python-modules/pyldavis { }; pylddwrap = callPackage ../development/python-modules/pylddwrap { }; @@ -19364,6 +19567,8 @@ self: super: with self; { sphinxcontrib-qthelp = callPackage ../development/python-modules/sphinxcontrib-qthelp { }; + sphinxcontrib-restbuilder = callPackage ../development/python-modules/sphinxcontrib-restbuilder { }; + sphinxcontrib-seqdiag = callPackage ../development/python-modules/sphinxcontrib-seqdiag { }; sphinxcontrib-serializinghtml =