diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index ba2d9f256d34..da42ae4326de 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -34,4 +34,3 @@ ### Additions and Improvements {#sec-nixpkgs-release-25.11-lib-additions-improvements} - Create the first release note entry in this section! - diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 2bdd25f9a199..7628b396dff5 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -11482,6 +11482,12 @@ githubId = 30251156; name = "Jesse Moore"; }; + jethair = { + email = "jethair@duck.com"; + github = "JetHair"; + githubId = 106916147; + name = "JetHair"; + }; jethro = { email = "jethrokuan95@gmail.com"; github = "jethrokuan"; @@ -16824,12 +16830,6 @@ githubId = 72663763; keys = [ { fingerprint = "DB3E A12D B291 594A 79C5 F6B3 10AB 6868 37F6 FA3F"; } ]; }; - mtreca = { - email = "maxime.treca@gmail.com"; - github = "mtreca"; - githubId = 16440823; - name = "Maxime Tréca"; - }; mtreskin = { email = "zerthurd@gmail.com"; github = "Zert"; @@ -24620,6 +24620,12 @@ githubId = 6579555; name = "Jeroen Jetten"; }; + thetaoofsu = { + email = "TheTaoOfSu@protonmail.com"; + github = "TheTaoOfSu"; + githubId = 45526311; + name = "TheTaoOfSu"; + }; theuni = { email = "ct@flyingcircus.io"; github = "ctheune"; @@ -25149,6 +25155,12 @@ github = "totoroot"; githubId = 39650930; }; + tournev = { + name = "Vincent Tourneur"; + email = "vincent@pimoid.fr"; + github = "vtourneur"; + githubId = 48284424; + }; ToxicFrog = { email = "toxicfrog@ancilla.ca"; github = "ToxicFrog"; diff --git a/nixos/doc/manual/redirects.json b/nixos/doc/manual/redirects.json index d8a07c11a916..6f5bbe8b01b5 100644 --- a/nixos/doc/manual/redirects.json +++ b/nixos/doc/manual/redirects.json @@ -50,6 +50,12 @@ "module-services-crab-hole-upstream-options": [ "index.html#module-services-crab-hole-upstream-options" ], + "module-services-opencloud": [ + "index.html#module-services-opencloud" + ], + "module-services-opencloud-basic-usage": [ + "index.html#module-services-opencloud-basic-usage" + ], "module-services-strfry": [ "index.html#module-services-strfry" ], diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 342db4ea6b46..b70490d0de93 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -200,6 +200,8 @@ Alongside many enhancements to NixOS modules and general system improvements, th - [`g3proxy`](https://github.com/bytedance/g3), an open source enterprise forward proxy from ByteDance, similar to Squid or tinyproxy. Available as [services.g3proxy](#opt-services.g3proxy.enable). +- [OpenCloud](https://opencloud.eu/), an open-source, modern file-sync and sharing platform. It is a fork of oCIS, a ground-up rewrite of the well-known PHP-based NextCloud server. Available as [services.opencloud](#opt-services.opencloud.enable). + - [echoip](https://github.com/mpolden/echoip), a simple service for looking up your IP address. Available as [services.echoip](#opt-services.echoip.enable). - [whoami](https://github.com/traefik/whoami), a tiny Go server that prints OS information and HTTP request to output. Available as [services.whoami](#opt-services.whoami.enable). diff --git a/nixos/doc/manual/release-notes/rl-2511.section.md b/nixos/doc/manual/release-notes/rl-2511.section.md index 794c0dc6a633..65bac7327ed9 100644 --- a/nixos/doc/manual/release-notes/rl-2511.section.md +++ b/nixos/doc/manual/release-notes/rl-2511.section.md @@ -4,7 +4,7 @@ -- Create the first release note entry in this section! +- Secure boot support can now be enabled for the Limine bootloader through {option}`boot.loader.limine.secureBoot.enable`. Bootloader install script signs the bootloader, then kernels are hashed during system rebuild and written to a config. This allows Limine to boot only the kernels installed through NixOS system. ## New Modules {#sec-release-25.11-new-modules} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index a0889ddc18b5..ff65ce2125f1 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1610,6 +1610,7 @@ ./services/web-apps/oncall.nix ./services/web-apps/onlyoffice.nix ./services/web-apps/open-web-calendar.nix + ./services/web-apps/opencloud.nix ./services/web-apps/openvscode-server.nix ./services/web-apps/openwebrx.nix ./services/web-apps/outline.nix diff --git a/nixos/modules/services/web-apps/davis.md b/nixos/modules/services/web-apps/davis.md index 9775d8221b5b..d654f2fd7f43 100644 --- a/nixos/modules/services/web-apps/davis.md +++ b/nixos/modules/services/web-apps/davis.md @@ -24,9 +24,10 @@ After that, `davis` can be deployed like this: adminLogin = "admin"; adminPasswordFile = "/run/secrets/davis-admin-password"; appSecretFile = "/run/secrets/davis-app-secret"; - nginx = {}; }; } ``` This deploys Davis using a sqlite database running out of `/var/lib/davis`. + +Logs can be found in `/var/lib/davis/var/log/`. diff --git a/nixos/modules/services/web-apps/davis.nix b/nixos/modules/services/web-apps/davis.nix index 45748c346e2e..23a28ed84fd3 100644 --- a/nixos/modules/services/web-apps/davis.nix +++ b/nixos/modules/services/web-apps/davis.nix @@ -220,10 +220,13 @@ in }; nginx = lib.mkOption { - type = lib.types.submodule ( - lib.recursiveUpdate (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) { } + type = lib.types.nullOr ( + lib.types.submodule ( + lib.recursiveUpdate (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) { + } + ) ); - default = null; + default = { }; example = '' { serverAliases = [ @@ -235,7 +238,7 @@ in } ''; description = '' - With this option, you can customize the nginx virtualHost settings. + Use this option to customize an nginx virtual host. To disable the nginx set this to null. ''; }; @@ -308,18 +311,16 @@ in message = "One of services.davis.database.urlFile or services.davis.database.createLocally must be set."; } { - assertion = (mail.dsn != null) != (mail.dsnFile != null); - message = "One of (and only one of) services.davis.mail.dsn or services.davis.mail.dsnFile must be set."; + assertion = !(mail.dsn != null && mail.dsnFile != null); + message = "services.davis.mail.dsn and services.davis.mail.dsnFile cannot both be set."; } ]; services.davis.config = { APP_ENV = "prod"; APP_CACHE_DIR = "${cfg.dataDir}/var/cache"; - # note: we do not need the log dir (we log to stdout/journald), by davis/symfony will try to create it, and the default value is one in the nix-store - # so we set it to a path under dataDir to avoid something like: Unable to create the "logs" directory (/nix/store/5cfskz0ybbx37s1161gjn5klwb5si1zg-davis-4.4.1/var/log). APP_LOG_DIR = "${cfg.dataDir}/var/log"; - LOG_FILE_PATH = "/dev/stdout"; + LOG_FILE_PATH = "%kernel.logs_dir%/%kernel.environment%.log"; DATABASE_DRIVER = db.driver; INVITE_FROM_ADDRESS = mail.inviteFromAddress; APP_SECRET._secret = cfg.appSecretFile; @@ -330,7 +331,14 @@ in CALDAV_ENABLED = true; CARDDAV_ENABLED = true; } - // (if mail.dsn != null then { MAILER_DSN = mail.dsn; } else { MAILER_DSN._secret = mail.dsnFile; }) + // ( + if mail.dsn != null then + { MAILER_DSN = mail.dsn; } + else if mail.dsnFile != null then + { MAILER_DSN._secret = mail.dsnFile; } + else + { } + ) // ( if db.createLocally then { @@ -381,6 +389,7 @@ in APP_CACHE_DIR = "${cfg.dataDir}/var/cache"; APP_LOG_DIR = "${cfg.dataDir}/var/log"; }; + phpPackage = lib.mkDefault cfg.package.passthru.php; settings = { "listen.mode" = "0660"; diff --git a/nixos/modules/services/web-apps/opencloud.md b/nixos/modules/services/web-apps/opencloud.md new file mode 100644 index 000000000000..5226e7922955 --- /dev/null +++ b/nixos/modules/services/web-apps/opencloud.md @@ -0,0 +1,64 @@ +# OpenCloud {#module-services-opencloud} + +[OpenCloud](https://opencloud.eu/en) is an open-source, modern file-sync and +sharing platform. It is a fork of oCIS, a ground-up rewrite of the well-known +PHP-based NextCloud server. + +The service can be configured using a combination of [](#opt-services.opencloud.settings), +[](#opt-services.opencloud.environment) and [](#opt-services.opencloud.environmentFile). + +## Basic usage {#module-services-opencloud-basic-usage} + +OpenCloud is configured using a combination of YAML and environment +variables. The full documentation can be found at +[OpenCloud Admin Docs](https://docs.opencloud.eu/docs/admin/intro). + +The general flow of configuring OpenCloud is: +- configure services with `services.opencloud.settings.` when possible +- configure global settings that affect multiple services via `services.opencloud.environment` +- allow NixOS to provision a default `opencloud.yaml` for you, containing default credentials + for communication between the microservices +- provide additional secrets via `environmentFile`, provisioned out of band + +Please note that current NixOS module for OpenCloud is configured to run in +`fullstack` mode, which starts all the services for OpenCloud in a single +instance, in so called supervised mode. This will start multiple OpenCloud +services and listen on multiple other ports. + +Current known services and their ports are as below: + +| Service | Group | Port | +|--------------------|---------|-------| +| gateway | api | 9142 | +| sharing | api | 9150 | +| app-registry | api | 9242 | +| ocdav | web | 45023 | +| auth-machine | api | 9166 | +| storage-system | api | 9215 | +| webdav | web | 9115 | +| webfinger | web | 46871 | +| storage-system | web | 9216 | +| web | web | 9100 | +| eventhistory | api | 33177 | +| ocs | web | 9110 | +| storage-publiclink | api | 9178 | +| settings | web | 9190 | +| ocm | api | 9282 | +| settings | api | 9191 | +| ocm | web | 9280 | +| app-provider | api | 9164 | +| storage-users | api | 9157 | +| auth-service | api | 9199 | +| thumbnails | web | 9186 | +| thumbnails | api | 9185 | +| storage-shares | api | 9154 | +| sse | sse | 46833 | +| userlog | userlog | 45363 | +| search | api | 9220 | +| proxy | web | 9200 | +| idp | web | 9130 | +| frontend | web | 9140 | +| groups | api | 9160 | +| graph | graph | 9120 | +| users | api | 9144 | +| auth-basic | api | 9146 | diff --git a/nixos/modules/services/web-apps/opencloud.nix b/nixos/modules/services/web-apps/opencloud.nix new file mode 100644 index 000000000000..0eded3cc96f9 --- /dev/null +++ b/nixos/modules/services/web-apps/opencloud.nix @@ -0,0 +1,242 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) types; + cfg = config.services.opencloud; + + defaultUser = "opencloud"; + defaultGroup = defaultUser; + + settingsFormat = pkgs.formats.yaml { }; +in +{ + options = { + services.opencloud = { + enable = lib.mkEnableOption "OpenCloud"; + + package = lib.mkPackageOption pkgs "opencloud" { }; + webPackage = lib.mkPackageOption pkgs [ "opencloud" "web" ] { }; + idpWebPackage = lib.mkPackageOption pkgs [ "opencloud" "idp-web" ] { }; + + user = lib.mkOption { + type = types.str; + default = defaultUser; + example = "mycloud"; + description = '' + The user to run OpenCloud as. + By default, a user named `${defaultUser}` will be created whose home + directory is [](#opt-services.opencloud.stateDir). + ''; + }; + + group = lib.mkOption { + type = types.str; + default = defaultGroup; + example = "mycloud"; + description = '' + The group to run OpenCloud under. + By default, a group named `${defaultGroup}` will be created. + ''; + }; + + address = lib.mkOption { + type = types.str; + default = "127.0.0.1"; + description = "Web server bind address."; + }; + + port = lib.mkOption { + type = types.port; + default = 9200; + description = "Web server port."; + }; + + url = lib.mkOption { + type = types.str; + default = "https://localhost:9200"; + example = "https://cloud.example.com"; + description = "Web interface root public URL, including scheme and port (if non-default)."; + }; + + stateDir = lib.mkOption { + default = "/var/lib/opencloud"; + type = types.str; + description = "OpenCloud data directory."; + }; + + settings = lib.mkOption { + type = lib.types.attrsOf settingsFormat.type; + default = { }; + description = '' + Additional YAML configuration for OpenCloud services. + + Every item in this attrset will be mapped to a .yaml file in /etc/opencloud. + + The possible config options are currently not well documented, see source code: + https://github.com/opencloud-eu/opencloud/blob/main/pkg/config/config.go + ''; + }; + + environmentFile = lib.mkOption { + type = types.nullOr types.path; + default = null; + example = "/run/keys/opencloud.env"; + description = '' + An environment file as defined in {manpage}`systemd.exec(5)`. + + Use this to inject secrets, e.g. database or auth credentials out of band. + + Configuration provided here will override `settings` and `environment`. + ''; + }; + + environment = lib.mkOption { + type = types.attrsOf types.str; + default = { + OC_INSECURE = "true"; + }; + description = '' + Extra environment variables to set for the service. + + Use this to set configuration that may affect multiple microservices. + + Configuration provided here will override `settings`. + ''; + example = { + OC_INSECURE = "false"; + OC_LOG_LEVEL = "error"; + }; + }; + }; + }; + + config = lib.mkIf cfg.enable { + users.users.${defaultUser} = lib.mkIf (cfg.user == defaultUser) { + group = cfg.group; + home = cfg.stateDir; + isSystemUser = true; + createHome = true; + description = "OpenCloud daemon user"; + }; + + users.groups = lib.mkIf (cfg.group == defaultGroup) { ${defaultGroup} = { }; }; + + systemd = { + services = + let + environment = { + PROXY_HTTP_ADDR = "${cfg.address}:${toString cfg.port}"; + OC_URL = cfg.url; + OC_BASE_DATA_PATH = cfg.stateDir; + WEB_ASSET_CORE_PATH = "${cfg.webPackage}"; + IDP_ASSET_PATH = "${cfg.idpWebPackage}/assets"; + OC_CONFIG_DIR = "/etc/opencloud"; + } // cfg.environment; + commonServiceConfig = { + EnvironmentFile = lib.optional (cfg.environmentFile != null) cfg.environmentFile; + MemoryDenyWriteExecute = true; + NoNewPrivileges = true; + PrivateTmp = true; + PrivateDevices = true; + ProtectSystem = "strict"; + ProtectHome = true; + ProtectControlGroups = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectKernelLogs = true; + RestrictAddressFamilies = [ + "AF_UNIX" + "AF_INET" + "AF_INET6" + ]; + RestrictNamespaces = true; + RestrictRealtime = true; + RestrictSUIDSGID = true; + LockPersonality = true; + SystemCallArchitectures = "native"; + }; + in + { + opencloud-init-config = lib.mkIf (cfg.settings.opencloud or { } == { }) { + description = "Provision initial OpenCloud config"; + before = [ "opencloud.service" ]; + wantedBy = [ "multi-user.target" ]; + + inherit environment; + + serviceConfig = { + Type = "oneshot"; + ReadWritePaths = [ "/etc/opencloud" ]; + } // commonServiceConfig; + + path = [ cfg.package ]; + script = '' + set -x + config="''${OC_CONFIG_DIR}/opencloud.yaml" + if [ ! -e "$config" ]; then + echo "Provisioning initial OpenCloud config..." + opencloud init --insecure "''${OC_INSECURE:false}" --config-path "''${OC_CONFIG_DIR}" + chown ${cfg.user}:${cfg.group} "$config" + fi + ''; + }; + + opencloud = { + description = "OpenCloud - a secure and private way to store, access, and share your files"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + inherit environment; + + serviceConfig = { + Type = "simple"; + ExecStart = "${lib.getExe cfg.package} server"; + WorkingDirectory = cfg.stateDir; + User = cfg.user; + Group = cfg.group; + Restart = "always"; + ReadWritePaths = [ cfg.stateDir ]; + } // commonServiceConfig; + + restartTriggers = lib.mapAttrsToList ( + name: _: config.environment.etc."opencloud/${name}.yaml".source + ) cfg.settings; + }; + }; + }; + + systemd.tmpfiles.settings."10-opencloud" = { + ${cfg.stateDir}.d = { + inherit (cfg) user group; + mode = "0750"; + }; + "${cfg.stateDir}/idm".d = { + inherit (cfg) user group; + mode = "0750"; + }; + }; + + environment.etc = + (lib.mapAttrs' (name: value: { + name = "opencloud/${name}.yaml"; + value.source = settingsFormat.generate "${name}.yaml" value; + }) cfg.settings) + // { + # ensure /etc/opencloud gets created, so we can provision the config + "opencloud/.keep".text = ""; + }; + }; + + meta = { + doc = ./opencloud.md; + maintainers = with lib.maintainers; [ + christoph-heiss + k900 + ]; + }; +} diff --git a/nixos/modules/system/boot/loader/limine/limine-install.py b/nixos/modules/system/boot/loader/limine/limine-install.py index 9279db7f58f0..3407d778d62b 100644 --- a/nixos/modules/system/boot/loader/limine/limine-install.py +++ b/nixos/modules/system/boot/loader/limine/limine-install.py @@ -249,6 +249,10 @@ def main(): partition formatted as FAT. ''')) + if config('secureBoot')['enable'] and not config('secureBoot')['createAndEnrollKeys'] and not os.path.exists("/var/lib/sbctl"): + print("There are no sbctl secure boot keys present. Please generate some.") + sys.exit(1) + if not os.path.exists(limine_dir): os.makedirs(limine_dir) else: @@ -352,6 +356,28 @@ def main(): print('error: failed to enroll limine config.', file=sys.stderr) sys.exit(1) + if config('secureBoot')['enable']: + sbctl = os.path.join(config('secureBoot')['sbctl'], 'bin', 'sbctl') + if config('secureBoot')['createAndEnrollKeys']: + print("TEST MODE: creating and enrolling keys") + try: + subprocess.run([sbctl, 'create-keys']) + except: + print('error: failed to create keys', file=sys.stderr) + sys.exit(1) + try: + subprocess.run([sbctl, 'enroll-keys', '--yes-this-might-brick-my-machine']) + except: + print('error: failed to enroll keys', file=sys.stderr) + sys.exit(1) + + print('signing limine...') + try: + subprocess.run([sbctl, 'sign', dest_path]) + except: + print('error: failed to sign limine', file=sys.stderr) + sys.exit(1) + if not config('efiRemovable') and not config('canTouchEfiVariables'): print('warning: boot.loader.efi.canTouchEfiVariables is set to false while boot.loader.limine.efiInstallAsRemovable.\n This may render the system unbootable.') @@ -362,9 +388,16 @@ def main(): efibootmgr = os.path.join(config('efiBootMgrPath'), 'bin', 'efibootmgr') efi_partition = find_mounted_device(config('efiMountPoint')) efi_disk = find_disk_device(efi_partition) + + efibootmgr_output = subprocess.check_output([efibootmgr], stderr=subprocess.STDOUT, universal_newlines=True) + create_flag = '-c' + # Check the output of `efibootmgr` to find if limine is already installed and present in the boot record + if matches := re.findall(r'Boot[0-9a-fA-F]{4}\*? Limine', efibootmgr_output): + create_flag = '-C' # if present, keep the same boot order + efibootmgr_output = subprocess.check_output([ efibootmgr, - '-c', + create_flag, '-d', efi_disk, '-p', efi_partition.removeprefix(efi_disk).removeprefix('p'), '-l', f'\\efi\\limine\\{boot_file}', diff --git a/nixos/modules/system/boot/loader/limine/limine.nix b/nixos/modules/system/boot/loader/limine/limine.nix index 14aa49ae579d..50a000380287 100644 --- a/nixos/modules/system/boot/loader/limine/limine.nix +++ b/nixos/modules/system/boot/loader/limine/limine.nix @@ -18,6 +18,7 @@ let canTouchEfiVariables = efi.canTouchEfiVariables; efiSupport = cfg.efiSupport; efiRemovable = cfg.efiInstallAsRemovable; + secureBoot = cfg.secureBoot; biosSupport = cfg.biosSupport; biosDevice = cfg.biosDevice; partitionIndex = cfg.partitionIndex; @@ -177,6 +178,41 @@ in ''; }; + secureBoot = { + enable = lib.mkEnableOption null // { + description = '' + Whether to use sign the limine binary with sbctl. + + ::: {.note} + This requires you to already have generated the keys and enrolled them with {command}`sbctl`. + + To create keys use {command}`sbctl create-keys`. + + To enroll them first reset secure boot to "Setup Mode". This is device specific. + Then enroll them using {command}`sbctl enroll-keys -m -f`. + + You can now rebuild your system with this option enabled. + + Afterwards turn setup mode off and enable secure boot. + ::: + ''; + }; + + createAndEnrollKeys = lib.mkEnableOption null // { + internal = true; + description = '' + Creates secure boot signing keys and enrolls them during bootloader installation. + + ::: {.note} + This is used for automated nixos tests. + NOT INTENDED to be used on a real system. + ::: + ''; + }; + + sbctl = lib.mkPackageOption pkgs "sbctl" { }; + }; + style = { wallpapers = lib.mkOption { default = [ ]; @@ -368,5 +404,57 @@ in }; }; }) + (lib.mkIf (cfg.enable && cfg.secureBoot.enable) { + assertions = [ + { + assertion = cfg.enrollConfig; + message = "Disabling enrollConfig allows bypassing secure boot."; + } + { + assertion = cfg.validateChecksums; + message = "Disabling validateChecksums allows bypassing secure boot."; + } + { + assertion = cfg.panicOnChecksumMismatch; + message = "Disabling panicOnChecksumMismatch allows bypassing secure boot."; + } + { + assertion = cfg.efiSupport; + message = "Secure boot is only supported on EFI systems."; + } + ]; + + boot.loader.limine.enrollConfig = true; + boot.loader.limine.validateChecksums = true; + boot.loader.limine.panicOnChecksumMismatch = true; + }) + + # Fwupd binary needs to be signed in secure boot mode + (lib.mkIf (cfg.enable && cfg.secureBoot.enable && config.services.fwupd.enable) { + systemd.services.fwupd = { + environment.FWUPD_EFIAPPDIR = "/run/fwupd-efi"; + }; + + systemd.services.fwupd-efi = { + description = "Sign fwupd EFI app for secure boot"; + wantedBy = [ "fwupd.service" ]; + partOf = [ "fwupd.service" ]; + before = [ "fwupd.service" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + RuntimeDirectory = "fwupd-efi"; + }; + script = '' + cp ${config.services.fwupd.package.fwupd-efi}/libexec/fwupd/efi/fwupd*.efi /run/fwupd-efi/ + chmod +w /run/fwupd-efi/fwupd*.efi + ${lib.getExe pkgs.sbctl} sign /run/fwupd-efi/fwupd*.efi + ''; + }; + + services.fwupd.uefiCapsuleSettings = { + DisableShimForSecureBoot = true; + }; + }) ]; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 03a736fdd7dc..5501ffb8b92b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -975,6 +975,7 @@ in ombi = handleTest ./ombi.nix { }; openarena = handleTest ./openarena.nix { }; openbao = runTest ./openbao.nix; + opencloud = runTest ./opencloud.nix; openldap = handleTest ./openldap.nix { }; opensearch = discoverTests (import ./opensearch.nix); openresty-lua = handleTest ./openresty-lua.nix { }; diff --git a/nixos/tests/brscan5.nix b/nixos/tests/brscan5.nix index ba1916e27d26..f61228bac41e 100644 --- a/nixos/tests/brscan5.nix +++ b/nixos/tests/brscan5.nix @@ -48,10 +48,6 @@ import ./make-test-python.nix ( print(scanimage) assert """device `brother5:net1;dev0' is a Brother b ADS-1200""" in scanimage assert """device `brother5:net1;dev1' is a Brother a ADS-1200""" in scanimage - - # Confirm systemd-udevd no longer logs errors about SYSFS - logs = machine.succeed('journalctl --unit systemd-udevd') - assert "Invalid key 'SYSFS'" not in logs ''; } ) diff --git a/nixos/tests/custom-ca.nix b/nixos/tests/custom-ca.nix index b246f5b9ba57..e6aa31b5845a 100644 --- a/nixos/tests/custom-ca.nix +++ b/nixos/tests/custom-ca.nix @@ -1,6 +1,6 @@ # Checks that `security.pki` options are working in curl and the main browser -# engines: Gecko (via Firefox), Chromium, QtWebEngine (via qutebrowser) and -# WebKitGTK (via Midori). The test checks that certificates issued by a custom +# engines: Gecko (via Firefox), Chromium, QtWebEngine (via qutebrowser). +# The test checks that certificates issued by a custom # trusted CA are accepted but those from an unknown CA are rejected. { @@ -210,8 +210,4 @@ in args = "-T"; error = "Certificate error"; }; - midori = { - args = "-p"; - error = "Security"; - }; } diff --git a/nixos/tests/davis.nix b/nixos/tests/davis.nix index 480191704e2c..0dfa08342801 100644 --- a/nixos/tests/davis.nix +++ b/nixos/tests/davis.nix @@ -1,10 +1,14 @@ -{ pkgs, ... }: +{ + pkgs, + config, + ... +}: { name = "davis"; meta.maintainers = pkgs.davis.meta.maintainers; - nodes.machine = + nodes.machine1 = { config, ... }: { virtualisation = { @@ -24,33 +28,67 @@ adminLogin = "admin"; appSecretFile = "${pkgs.writeText "davisAppSecret" "52882ef142066e09ab99ce816ba72522e789505caba224"}"; adminPasswordFile = "${pkgs.writeText "davisAdminPass" "nixos"}"; - nginx = { }; + }; + }; + nodes.machine2 = + { nodes, config, ... }: + { + virtualisation = { + memorySize = 512; + }; + environment.systemPackages = [ pkgs.fcgi ]; + + # no nginx, and no mail dsn + services.davis = { + enable = true; + hostname = "davis.example.com"; + database = { + driver = "postgresql"; + }; + adminLogin = "admin"; + appSecretFile = "${pkgs.writeText "davisAppSecret" "52882ef142066e09ab99ce816ba72522e789505caba224"}"; + adminPasswordFile = "${pkgs.writeText "davisAdminPass" "nixos"}"; + nginx = null; }; }; testScript = '' start_all() - machine.wait_for_unit("postgresql.service") - machine.wait_for_unit("davis-env-setup.service") - machine.wait_for_unit("davis-db-migrate.service") - machine.wait_for_unit("nginx.service") - machine.wait_for_unit("phpfpm-davis.service") + + machine1.wait_for_unit("postgresql.service") + machine1.wait_for_unit("davis-env-setup.service") + machine1.wait_for_unit("davis-db-migrate.service") + machine1.wait_for_unit("phpfpm-davis.service") with subtest("welcome screen loads"): - machine.succeed( + machine1.succeed( "curl -sSfL --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/ | grep 'Davis'" ) with subtest("login works"): - csrf_token = machine.succeed( + csrf_token = machine1.succeed( "curl -c /tmp/cookies -sSfL --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/login | grep '_csrf_token' | sed -E 's,.*value=\"(.*)\".*,\\1,g'" ) - r = machine.succeed( + r = machine1.succeed( f"curl -b /tmp/cookies --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/login -X POST -F _username=admin -F _password=nixos -F _csrf_token={csrf_token.strip()} -D headers" ) print(r) - machine.succeed( + machine1.succeed( "[[ $(grep -i 'location: ' headers | cut -d: -f2- | xargs echo) == /dashboard* ]]" ) + machine2.wait_for_unit("davis-env-setup.service") + machine2.wait_for_unit("davis-db-migrate.service") + machine2.wait_for_unit("phpfpm-davis.service") + r = machine2.succeed( + "find /var/lib/davis/var/log" + ) + print(r) + env = ( + "SCRIPT_NAME=/index.php", + "SCRIPT_FILENAME=${config.nodes.machine2.services.davis.package}/public/index.php", + "REMOTE_ADDR=127.0.0.1", + "REQUEST_METHOD=GET", + ); + page = machine2.succeed(f"{' '.join(env)} ${pkgs.fcgi}/bin/cgi-fcgi -bind -connect ${config.nodes.machine2.services.phpfpm.pools.davis.socket}") ''; } diff --git a/nixos/tests/limine/default.nix b/nixos/tests/limine/default.nix index 7458b9641633..9497e06a18f6 100644 --- a/nixos/tests/limine/default.nix +++ b/nixos/tests/limine/default.nix @@ -4,5 +4,6 @@ }: { checksum = runTest ./checksum.nix; + secureBoot = runTest ./secure-boot.nix; uefi = runTest ./uefi.nix; } diff --git a/nixos/tests/limine/secure-boot.nix b/nixos/tests/limine/secure-boot.nix new file mode 100644 index 000000000000..9f7969e626a0 --- /dev/null +++ b/nixos/tests/limine/secure-boot.nix @@ -0,0 +1,34 @@ +{ lib, ... }: +{ + name = "secureBoot"; + meta.maintainers = with lib.maintainers; [ + programmerlexi + ]; + meta.platforms = [ + "aarch64-linux" + "i686-linux" + "x86_64-linux" + ]; + nodes.machine = + { pkgs, ... }: + { + virtualisation.useBootLoader = true; + virtualisation.useEFIBoot = true; + virtualisation.useSecureBoot = true; + virtualisation.efi.OVMF = pkgs.OVMFFull.fd; + virtualisation.efi.keepVariables = true; + + boot.loader.efi.canTouchEfiVariables = true; + + boot.loader.limine.enable = true; + boot.loader.limine.efiSupport = true; + boot.loader.limine.secureBoot.enable = true; + boot.loader.limine.secureBoot.createAndEnrollKeys = true; + boot.loader.timeout = 0; + }; + + testScript = '' + machine.start() + assert "Secure Boot: enabled (user)" in machine.succeed("bootctl status") + ''; +} diff --git a/nixos/tests/opencloud.nix b/nixos/tests/opencloud.nix new file mode 100644 index 000000000000..1fdac34b6ccd --- /dev/null +++ b/nixos/tests/opencloud.nix @@ -0,0 +1,110 @@ +{ lib, pkgs, ... }: + +let + certs = import ./common/acme/server/snakeoil-certs.nix; + inherit (certs) domain; + + # this is a demo user created by IDM_CREATE_DEMO_USERS=true + demoUser = "alan"; + demoPassword = "demo"; + + adminUser = "admin"; + adminPassword = "hunter2"; + testRunner = + pkgs.writers.writePython3Bin "test-runner" + { + libraries = [ pkgs.python3Packages.selenium ]; + flakeIgnore = [ "E501" ]; + } + '' + import sys + from selenium.webdriver.common.by import By + from selenium.webdriver import Firefox + from selenium.webdriver.firefox.options import Options + from selenium.webdriver.support.ui import WebDriverWait + from selenium.webdriver.support import expected_conditions as EC + + options = Options() + options.add_argument('--headless') + driver = Firefox(options=options) + + host = sys.argv[1] + user = sys.argv[2] + password = sys.argv[3] + + driver.get(f"https://{host}/") + wait = WebDriverWait(driver, 60) + wait.until(EC.title_contains("Sign in")) + wait.until(EC.url_contains(f"https://{host}/signin/v1/identifier")) + wait.until(EC.visibility_of_element_located((By.ID, 'oc-login-username'))) + driver.find_element(By.ID, 'oc-login-username').send_keys(user) + driver.find_element(By.ID, 'oc-login-password').send_keys(password) + wait.until(EC.visibility_of_element_located((By.XPATH, '//button[@type="submit"]'))) + driver.find_element(By.XPATH, '//button[@type="submit"]').click() + wait.until(EC.visibility_of_element_located((By.ID, 'new-file-menu-btn'))) + wait.until(EC.title_contains("Personal")) + ''; +in + +{ + name = "opencloud"; + + meta.maintainers = with lib.maintainers; [ + christoph-heiss + k900 + ]; + + nodes.machine = { + virtualisation.memorySize = 2048; + environment.systemPackages = [ + pkgs.firefox-unwrapped + pkgs.geckodriver + testRunner + ]; + + networking.hosts."127.0.0.1" = [ domain ]; + security.pki.certificateFiles = [ certs.ca.cert ]; + + services.opencloud = { + enable = true; + url = "https://${domain}:9200"; + environment = { + ADMIN_PASSWORD = adminPassword; + IDM_CREATE_DEMO_USERS = "true"; + IDM_LDAPS_CERT = "${certs.${domain}.cert}"; + IDM_LDAPS_KEY = "${certs.${domain}.key}"; + OC_INSECURE = "false"; + OC_LDAP_URI = "ldaps://${domain}:9235"; + OC_LDAP_CACERT = "${certs.${domain}.cert}"; + OC_HTTP_TLS_ENABLED = "true"; + OC_HTTP_TLS_CERTIFICATE = "${certs.${domain}.cert}"; + OC_HTTP_TLS_KEY = "${certs.${domain}.key}"; + PROXY_TLS = "true"; + PROXY_TRANSPORT_TLS_CERT = "${certs.${domain}.cert}"; + PROXY_TRANSPORT_TLS_KEY = "${certs.${domain}.key}"; + PROXY_INSECURE_BACKENDS = "true"; + }; + }; + }; + + testScript = '' + start_all() + machine.wait_for_unit("opencloud.service") + machine.wait_for_open_port(9200) + + # wait for OpenCloud to fully come up + machine.sleep(10) + + with subtest("opencloud bin works"): + machine.succeed("${lib.getExe pkgs.opencloud} version") + + with subtest("web interface presents start page"): + machine.succeed("curl -sSf https://${domain}:9200 | grep 'OpenCloud'") + + with subtest("use the web interface to log in with the provisioned admin user"): + machine.succeed("PYTHONUNBUFFERED=1 systemd-cat -t test-runner test-runner ${domain}:9200 ${adminUser} ${adminPassword}") + + with subtest("use the web interface to log in with a demo user"): + machine.succeed("PYTHONUNBUFFERED=1 systemd-cat -t test-runner test-runner ${domain}:9200 ${demoUser} ${demoPassword}") + ''; +} diff --git a/nixos/tests/spiped.nix b/nixos/tests/spiped.nix index a39fc2fd722b..994ec2be02e4 100644 --- a/nixos/tests/spiped.nix +++ b/nixos/tests/spiped.nix @@ -5,7 +5,7 @@ in { name = "spiped"; meta = with pkgs.lib.maintainers; { - maintainers = [ tomfitzhenry ]; + maintainers = [ ]; }; nodes = { diff --git a/pkgs/applications/audio/vorbis-tools/default.nix b/pkgs/applications/audio/vorbis-tools/default.nix index 8ff65cef581d..2632fafb6751 100644 --- a/pkgs/applications/audio/vorbis-tools/default.nix +++ b/pkgs/applications/audio/vorbis-tools/default.nix @@ -22,13 +22,6 @@ stdenv.mkDerivation rec { hash = "sha256-of493Gd3vc6/a3l+ft/gQ3lUskdW/8yMa4FrY+BGDd4="; }; - # ld64 on darwin doesn't support nested archives and as the nested lib - # (libbase64.a) is not required to build so leave it out - postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace share/Makefile.am \ - --replace-fail libpicture_a_LIBADD '#libpicture_a_LIBADD' - ''; - nativeBuildInputs = [ autoreconfHook pkg-config diff --git a/pkgs/applications/networking/cluster/k3s/docs/USAGE.md b/pkgs/applications/networking/cluster/k3s/docs/USAGE.md index 326118e1712a..e3f3dfb8d38c 100644 --- a/pkgs/applications/networking/cluster/k3s/docs/USAGE.md +++ b/pkgs/applications/networking/cluster/k3s/docs/USAGE.md @@ -28,6 +28,7 @@ Multi-node setup it is simple to create a cluster of multiple nodes in a highly available setup (all nodes are in the control-plane and are a part of the etcd cluster). The first node is configured like this: + ``` { services.k3s = { @@ -55,3 +56,11 @@ Any other subsequent nodes can be added with a slightly different config: For this to work you need to open the aforementioned API, etcd, and flannel ports in the firewall. Official documentation on what ports need to be opened for specific use cases can be found on [k3s' documentation site](https://docs.k3s.io/installation/requirements#inbound-rules-for-k3s-nodes). Note that it is [recommended](https://etcd.io/docs/v3.3/faq/#why-an-odd-number-of-cluster-members) to use an odd number of nodes in such a cluster. Tip: If you run into connectivity issues between nodes for specific applications (e.g. ingress controller), please verify the firewall settings you have enabled (example under [Single Node](#single-node)) against the documentation for that specific application. In the ingress controller example, you may want to open 443 or 80 depending on your use case. + +## Quirks + +### `prefer-bundled-bin` + +K3s has a config setting `prefer-bundled-bin` (and CLI flag `--prefer-bundled-bin`) that makes k3s use binaries from the `/var/lib/rancher/k3s/data/current/bin/aux/` directory, as unpacked by the k3s binary, before the system `$PATH`. +This works with the official distribution of k3s but not with the package from nixpkgs, as it does not bundle the upstream binaries from [`k3s-root`](https://github.com/k3s-io/k3s-root) into the k3s binary. +Thus the `prefer-bundled-bin` setting **cannot** be used to work around issues (like [this `mount` regression](https://github.com/util-linux/util-linux/issues/3474)) with binaries used/called by the kubelet. diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index f6c9158d42a8..82de95739948 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -112,7 +112,6 @@ buildGoModule rec { mainProgram = "rclone"; maintainers = with maintainers; [ SuperSandro2000 - tomfitzhenry ]; }; } diff --git a/pkgs/applications/science/electronics/librepcb/default.nix b/pkgs/applications/science/electronics/librepcb/default.nix index ef645d36b079..6a706e5a81c4 100644 --- a/pkgs/applications/science/electronics/librepcb/default.nix +++ b/pkgs/applications/science/electronics/librepcb/default.nix @@ -10,17 +10,20 @@ libGLU, cmake, wrapQtAppsHook, + rustPlatform, + cargo, + rustc, }: stdenv.mkDerivation rec { pname = "librepcb"; - version = "1.2.0"; + version = "1.3.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - hash = "sha256-/Hw7ZTv2CbDcKuyI27wC46IxCcTnrXDS/Mf7csUTc7w="; + hash = "sha256-J4y0ikZNuOguN9msmEQzgcY0/REnOEOoDkY/ga+Cfd8="; fetchSubmodules = true; }; @@ -32,9 +35,20 @@ stdenv.mkDerivation rec { wrapQtAppsHook opencascade-occt libGLU + rustPlatform.cargoSetupHook + cargo + rustc ]; buildInputs = [ qtbase ]; + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src; + sourceRoot = "source/${cargoRoot}"; + hash = "sha256-1td3WjxbDq2lX7c0trpYRhO82ChNAG/ZABBRsekYtq4="; + }; + + cargoRoot = "libs/librepcb/rust-core"; + meta = with lib; { description = "Free EDA software to develop printed circuit boards"; homepage = "https://librepcb.org/"; diff --git a/pkgs/applications/virtualization/lima/bin.nix b/pkgs/applications/virtualization/lima/bin.nix deleted file mode 100644 index f9ee61291426..000000000000 --- a/pkgs/applications/virtualization/lima/bin.nix +++ /dev/null @@ -1,127 +0,0 @@ -{ - stdenvNoCC, - lib, - fetchurl, - writeScript, - installShellFiles, - qemu, - makeBinaryWrapper, - autoPatchelfHook, -}: - -let - version = "0.22.0"; - - dist = { - aarch64-darwin = rec { - archSuffix = "Darwin-arm64"; - url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz"; - sha256 = "271e0224d3e678450424abd4e6766a14ea52b146824bf8cfac7a0f486ceb2a0c"; - }; - - x86_64-darwin = rec { - archSuffix = "Darwin-x86_64"; - url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz"; - sha256 = "f2d331ef783e0bb00e193efc3d5c9438df5d284b1cbac771e5d239c3459b2b3d"; - }; - - aarch64-linux = rec { - archSuffix = "Linux-aarch64"; - url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz"; - sha256 = "8c5c6dc21fae19c5645bf8db8f441aeab7fba21fbe882b2b9db58c126d07846b"; - }; - - x86_64-linux = rec { - archSuffix = "Linux-x86_64"; - url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz"; - sha256 = "58e66114ae1e991512a86b6952ab3a1ffe0e12e08199a9a3ea13c3d2f24b307e"; - }; - }; -in -stdenvNoCC.mkDerivation { - inherit version; - pname = "lima"; - src = fetchurl { - inherit - (dist.${stdenvNoCC.hostPlatform.system} - or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}") - ) - url - sha256 - ; - }; - - sourceRoot = "."; - - nativeBuildInputs = [ - makeBinaryWrapper - installShellFiles - ] ++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ autoPatchelfHook ]; - - installPhase = - '' - runHook preInstall - mkdir -p $out - cp -r bin share $out - chmod +x $out/bin/limactl - wrapProgram $out/bin/limactl \ - --prefix PATH : ${lib.makeBinPath [ qemu ]} - '' - + lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) '' - # the shell completion only works with a patched $out/bin/limactl and so - # needs to run after the autoPatchelfHook is executed in postFixup. - doShellCompletion() { - installShellCompletion --cmd limactl \ - --bash <($out/bin/limactl completion bash) \ - --fish <($out/bin/limactl completion fish) \ - --zsh <($out/bin/limactl completion zsh) - } - postFixupHooks+=(doShellCompletion) - '' - + '' - runHook postInstall - ''; - - doInstallCheck = true; - installCheckPhase = '' - USER=nix $out/bin/limactl validate $out/share/lima/examples/default.yaml - USER=nix $out/bin/limactl validate $out/share/lima/examples/experimental/vz.yaml - ''; - - # Stripping removes entitlements of the binary on Darwin making it non-operational. - # Therefore, disable stripping on Darwin. - dontStrip = stdenvNoCC.hostPlatform.isDarwin; - - passthru.updateScript = - let - lima-bin = builtins.toString ./bin.nix; - in - writeScript "update-lima-bin.sh" '' - #!/usr/bin/env nix-shell - #!nix-shell -i bash -p common-updater-scripts curl jq gawk - - set -eou pipefail - - LATEST_VERSION=$(curl -H "Accept: application/vnd.github+json" -Ls https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name | cut -c 2-) - curl -Ls -o SHA256SUMS https://github.com/lima-vm/lima/releases/download/v$LATEST_VERSION/SHA256SUMS - AARCH64_DARWIN_SHA256=$(cat SHA256SUMS | awk '/Darwin-arm64/{print $1}') - X86_64_DARWIN_SHA256=$(cat SHA256SUMS | awk '/Darwin-x86_64/{print $1}') - AARCH64_LINUX_SHA256=$(cat SHA256SUMS | awk '/Linux-aarch64/{print $1}') - X86_64_LINUX_SHA256=$(cat SHA256SUMS | awk '/Linux-x86_64/{print $1}') - - # reset version first so that all platforms are always updated and in sync - update-source-version lima-bin $LATEST_VERSION $AARCH64_DARWIN_SHA256 --file=${lima-bin} --ignore-same-version --system=aarch64-darwin - update-source-version lima-bin $LATEST_VERSION $X86_64_DARWIN_SHA256 --file=${lima-bin} --ignore-same-version --system=x86_64-darwin - update-source-version lima-bin $LATEST_VERSION $AARCH64_LINUX_SHA256 --file=${lima-bin} --ignore-same-version --system=aarch64-linux - update-source-version lima-bin $LATEST_VERSION $X86_64_LINUX_SHA256 --file=${lima-bin} --ignore-same-version --system=x86_64-linux - rm SHA256SUMS - ''; - - meta = with lib; { - homepage = "https://github.com/lima-vm/lima"; - description = "Linux virtual machines (on macOS, in most cases)"; - license = licenses.asl20; - maintainers = with maintainers; [ tricktron ]; - platforms = platforms.linux ++ platforms.darwin; - }; -} diff --git a/pkgs/by-name/al/aldente/package.nix b/pkgs/by-name/al/aldente/package.nix index b951c444ace3..f3a63b58a25d 100644 --- a/pkgs/by-name/al/aldente/package.nix +++ b/pkgs/by-name/al/aldente/package.nix @@ -8,11 +8,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "aldente"; - version = "1.32"; + version = "1.33"; src = fetchurl { url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg"; - hash = "sha256-pUFcP7J60lLeuX9v3qhCMcsRmurfw0LnoCcbRONnxKM="; + hash = "sha256-uUklxpQEVVXp2eZLYBpmAsVo5ziV0zvHRJA4JRiJAJk="; }; dontBuild = true; diff --git a/pkgs/by-name/an/ansilove/package.nix b/pkgs/by-name/an/ansilove/package.nix new file mode 100644 index 000000000000..ea2faa9b5fd5 --- /dev/null +++ b/pkgs/by-name/an/ansilove/package.nix @@ -0,0 +1,35 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + libansilove, +}: + +stdenv.mkDerivation rec { + pname = "ansilove"; + version = "4.2.1"; + + src = fetchFromGitHub { + owner = "ansilove"; + repo = "ansilove"; + tag = version; + hash = "sha256-13v2NLVJt11muwocBiQYz/rxQkte/W6LXwB/H/E9Nvk="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ libansilove ]; + + meta = { + description = "ANSI and ASCII art to PNG converter in C"; + homepage = "https://github.com/ansilove/ansilove"; + changelog = "https://github.com/ansilove/ansilove/blob/${src.rev}/ChangeLog"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ jethair ]; + mainProgram = "ansilove"; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/by-name/at/attic-client/package.nix b/pkgs/by-name/at/attic-client/package.nix index 99b38d0e0228..3b8a97074e52 100644 --- a/pkgs/by-name/at/attic-client/package.nix +++ b/pkgs/by-name/at/attic-client/package.nix @@ -10,6 +10,11 @@ installShellFiles, crates ? [ "attic-client" ], }: +let + # Only the attic-client crate builds against the Nix C++ libs + # This derivation is also used to build the server + needNixInclude = lib.elem "attic-client" crates; +in rustPlatform.buildRustPackage { pname = "attic"; version = "0-unstable-2025-02-02"; @@ -26,8 +31,7 @@ rustPlatform.buildRustPackage { installShellFiles ]; - buildInputs = [ - nixVersions.nix_2_24 + buildInputs = lib.optional needNixInclude nixVersions.nix_2_24 ++ [ boost ]; @@ -35,8 +39,13 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-AbpWnYfBMrR6oOfy2LkQvIPYsClCWE89bJav+iHTtLM="; useFetchCargoVendor = true; - ATTIC_DISTRIBUTOR = "nixpkgs"; - NIX_INCLUDE_PATH = "${lib.getDev nixVersions.nix_2_24}/include"; + env = + { + ATTIC_DISTRIBUTOR = "nixpkgs"; + } + // lib.optionalAttrs needNixInclude { + NIX_INCLUDE_PATH = "${lib.getDev nixVersions.nix_2_24}/include"; + }; # Attic interacts with Nix directly and its tests require trusted-user access # to nix-daemon to import NARs, which is not possible in the build sandbox. diff --git a/pkgs/by-name/bd/bdf2psf/package.nix b/pkgs/by-name/bd/bdf2psf/package.nix index 4c8c369fa384..1518904c7e58 100644 --- a/pkgs/by-name/bd/bdf2psf/package.nix +++ b/pkgs/by-name/bd/bdf2psf/package.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "bdf2psf"; - version = "1.236"; + version = "1.237"; src = fetchurl { url = "mirror://debian/pool/main/c/console-setup/bdf2psf_${version}_all.deb"; - sha256 = "sha256-b4zEgpDxvllj/9EuKdgTOz1X6bB+4nk/W1WUUMBCU+s="; + sha256 = "sha256-TdEIXD4COatzgtPm8EGMxQFqqgy/5gkgnZKrze4U2sM="; }; nativeBuildInputs = [ dpkg ]; diff --git a/pkgs/by-name/bo/bootloadhid/package.nix b/pkgs/by-name/bo/bootloadhid/package.nix new file mode 100644 index 000000000000..302ee02cd917 --- /dev/null +++ b/pkgs/by-name/bo/bootloadhid/package.nix @@ -0,0 +1,43 @@ +{ + fetchurl, + lib, + libusb-compat-0_1, + stdenv, + ... +}: + +stdenv.mkDerivation { + pname = "bootloadhid"; + version = "0-unstable-2012-12-08"; + + src = fetchurl { + url = "https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz"; + hash = "sha256-FU5+OGKaOi7sLfZm7foe4vLppXAY8X2fD48GTMINh1Q="; + }; + + nativeBuildInputs = [ + libusb-compat-0_1 + ]; + + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; + + setSourceRoot = "sourceRoot=$(echo */commandline)"; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + install bootloadHID $out/bin + + runHook postInstall + ''; + + meta = { + description = "USB boot loader for AVR microcontrollers with at least 2 kB of boot load section, e.g. ATMega8"; + homepage = "https://www.obdev.at/products/vusb/bootloadhid.html"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ thetaoofsu ]; + mainProgram = "bootloadHID"; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/by-name/br/brscan5/package.nix b/pkgs/by-name/br/brscan5/package.nix index 01a36caff2ab..688d12caa454 100644 --- a/pkgs/by-name/br/brscan5/package.nix +++ b/pkgs/by-name/br/brscan5/package.nix @@ -9,6 +9,7 @@ glib, libredirect, nixosTests, + udevCheckHook, }: let myPatchElf = file: '' @@ -43,6 +44,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper patchelf + udevCheckHook ]; buildInputs = [ libusb1 @@ -114,7 +116,7 @@ stdenv.mkDerivation rec { echo "brother5" > $out/etc/sane.d/dll.d/brother5.conf mkdir -p $out/etc/udev/rules.d - cp -p $PATH_TO_BRSCAN5/udev-rules/NN-brother-mfp-brscan5-1.0.2-2.rules \ + install -m 0444 $PATH_TO_BRSCAN5/udev-rules/NN-brother-mfp-brscan5-1.0.2-2.rules \ $out/etc/udev/rules.d/49-brother-mfp-brscan5-1.0.2-2.rules ETCDIR=$out/etc/opt/brother/scanner/brscan5 @@ -124,6 +126,9 @@ stdenv.mkDerivation rec { runHook postInstall ''; + # We want to run the udevCheckHook + doInstallCheck = true; + dontPatchELF = true; passthru.tests = { inherit (nixosTests) brscan5; }; diff --git a/pkgs/by-name/ca/catcli/package.nix b/pkgs/by-name/ca/catcli/package.nix deleted file mode 100644 index 2e330b671508..000000000000 --- a/pkgs/by-name/ca/catcli/package.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - lib, - fetchFromGitHub, - python3, -}: - -python3.pkgs.buildPythonApplication rec { - pname = "catcli"; - version = "1.0"; - format = "setuptools"; - - src = fetchFromGitHub { - owner = "deadc0de6"; - repo = pname; - tag = "v${version}"; - hash = "sha256-dAt9NysH3q5YC+vO9XTnapBxFZmC4vWwJ8SxT9CzCQE="; - }; - - postPatch = "patchShebangs . "; - - propagatedBuildInputs = with python3.pkgs; [ - anytree - docopt - fusepy - pyfzf - types-docopt - cmd2 - natsort - ]; - - nativeCheckInputs = with python3.pkgs; [ - pytestCheckHook - ]; - - meta = with lib; { - description = "Command line catalog tool for your offline data"; - mainProgram = "catcli"; - homepage = "https://github.com/deadc0de6/catcli"; - changelog = "https://github.com/deadc0de6/catcli/releases/tag/v${version}"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ petersjt014 ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/by-name/co/colima/package.nix b/pkgs/by-name/co/colima/package.nix index 5337a0c85cde..52cdc4f08e5b 100644 --- a/pkgs/by-name/co/colima/package.nix +++ b/pkgs/by-name/co/colima/package.nix @@ -6,14 +6,10 @@ fetchFromGitHub, installShellFiles, lima, - lima-bin, makeWrapper, qemu, testers, colima, - # use lima-bin on darwin to support native macOS virtualization - # https://github.com/NixOS/nixpkgs/pull/209171 - lima-drv ? if stdenv.hostPlatform.isDarwin then lima-bin else lima, }: buildGoModule rec { @@ -55,7 +51,7 @@ buildGoModule rec { wrapProgram $out/bin/colima \ --prefix PATH : ${ lib.makeBinPath [ - lima-drv + lima qemu ] } diff --git a/pkgs/by-name/cu/cups-browsed/package.nix b/pkgs/by-name/cu/cups-browsed/package.nix index 169bfda6e3bc..7db6cb771a95 100644 --- a/pkgs/by-name/cu/cups-browsed/package.nix +++ b/pkgs/by-name/cu/cups-browsed/package.nix @@ -24,15 +24,17 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook - pkg-config cups + glib # Required for gdbus-codegen + pkg-config ]; buildInputs = [ avahi + cups + glib libcupsfilters libppd - glib ]; configureFlags = [ diff --git a/pkgs/by-name/da/davis/package.nix b/pkgs/by-name/da/davis/package.nix index 9c937919c864..45923d8625f2 100644 --- a/pkgs/by-name/da/davis/package.nix +++ b/pkgs/by-name/da/davis/package.nix @@ -27,8 +27,11 @@ php.buildComposerProject2 (finalAttrs: { rm -rf "$out/share" ''; - passthru.tests = { - inherit (nixosTests) davis; + passthru = { + php = php; + tests = { + inherit (nixosTests) davis; + }; }; meta = { diff --git a/pkgs/by-name/de/dependabot-cli/package.nix b/pkgs/by-name/de/dependabot-cli/package.nix index a2ec545a7e32..4d04b29dd1b2 100644 --- a/pkgs/by-name/de/dependabot-cli/package.nix +++ b/pkgs/by-name/de/dependabot-cli/package.nix @@ -106,7 +106,6 @@ buildGoModule { homepage = "https://github.com/dependabot/cli"; license = licenses.mit; maintainers = with maintainers; [ - l0b0 infinisil ]; }; diff --git a/pkgs/by-name/em/embellish/package.nix b/pkgs/by-name/em/embellish/package.nix new file mode 100644 index 000000000000..7e3ef1eea662 --- /dev/null +++ b/pkgs/by-name/em/embellish/package.nix @@ -0,0 +1,70 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + pkg-config, + glib, + gobject-introspection, + gtk4, + desktop-file-utils, + gettext, + wrapGAppsHook4, + libadwaita, + gjs, + gnome-autoar, + libsoup_3, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "embellish"; + version = "0.4.7"; + + src = fetchFromGitHub { + owner = "getnf"; + repo = "embellish"; + tag = "v${finalAttrs.version}"; + hash = "sha256-+tTuQNok2rqTcQR4CRMc4qRqw0Ah2rovIut618z9GhU="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + glib + gobject-introspection + gtk4 + gettext + desktop-file-utils + wrapGAppsHook4 + ]; + + buildInputs = [ + gtk4 + libadwaita + gjs + gnome-autoar + libsoup_3 + ]; + + meta = { + description = "User-friendly application designed for managing Nerd Fonts on your system"; + longDescription = '' + Embellish provides a seamless experience for installing, uninstalling + and updating of Nerd Fonts. It's able to: + - List all available Nerd Fonts + - Download and install a Font + - Uninstall an installed Font + - Update an installed font + - Preview fonts + - Search fonts + - Read font's licence(s) + ''; + homepage = "https://github.com/getnf/embellish"; + changelog = "https://github.com/getnf/embellish/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ normalcea ]; + mainProgram = "io.github.getnf.embellish"; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/by-name/es/esphome/dashboard.nix b/pkgs/by-name/es/esphome/dashboard.nix index 97f30042b558..cdbab8d18f13 100644 --- a/pkgs/by-name/es/esphome/dashboard.nix +++ b/pkgs/by-name/es/esphome/dashboard.nix @@ -13,19 +13,19 @@ buildPythonPackage rec { pname = "esphome-dashboard"; - version = "20250415.0"; + version = "20250514.0"; pyproject = true; src = fetchFromGitHub { owner = "esphome"; repo = "dashboard"; rev = "refs/tags/${version}"; - hash = "sha256-HpmHII1pSsSO/hEHcy/QHv7jxslpz9a6EeHcEZQ+VIA="; + hash = "sha256-t0+YlITnxgnLrK/SN0bSmMIv3djR9DKMlnFrR9Btwx8="; }; npmDeps = fetchNpmDeps { inherit src; - hash = "sha256-SiH6CqFOpDQMMtRcgxr0LSJKuziZoYVjgVTpKBoebbg="; + hash = "sha256-Uiz26kPxoz32t/GRppiYiVBVwWcQqUzPr0kScVUZak8="; }; build-system = [ setuptools ]; diff --git a/pkgs/by-name/es/esphome/package.nix b/pkgs/by-name/es/esphome/package.nix index 60de831b46f1..42ce5755059e 100644 --- a/pkgs/by-name/es/esphome/package.nix +++ b/pkgs/by-name/es/esphome/package.nix @@ -17,19 +17,30 @@ let self = python; packageOverrides = self: super: { esphome-dashboard = self.callPackage ./dashboard.nix { }; + + paho-mqtt = super.paho-mqtt.overridePythonAttrs (oldAttrs: rec { + version = "1.6.1"; + src = fetchFromGitHub { + inherit (oldAttrs.src) owner repo; + tag = "v${version}"; + hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg="; + }; + build-system = with self; [ setuptools ]; + doCheck = false; + }); }; }; in python.pkgs.buildPythonApplication rec { pname = "esphome"; - version = "2025.4.2"; + version = "2025.5.0"; pyproject = true; src = fetchFromGitHub { owner = pname; repo = pname; tag = version; - hash = "sha256-vy/wjtl/IbdSOxAUsV4bl7VNEBTetsvIDh2V1gDHSMs="; + hash = "sha256-BcPdgAvRR7zataL4KOhLAvQaQnS60z8UZ9xdIK7ydz4="; }; build-systems = with python.pkgs; [ @@ -50,10 +61,7 @@ python.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail "setuptools==" "setuptools>=" - - # ensure component dependencies are available - cat requirements_optional.txt >> requirements.txt + --replace-fail "setuptools==80.4.0" "setuptools" ''; # Remove esptool and platformio from requirements @@ -160,7 +168,6 @@ python.pkgs.buildPythonApplication rec { gpl3Only # The python codebase and all other parts of this codebase ]; maintainers = with maintainers; [ - globin hexa ]; mainProgram = "esphome"; diff --git a/pkgs/by-name/ge/gerrit/package.nix b/pkgs/by-name/ge/gerrit/package.nix index 724ac4f462e0..d26ddf70b00f 100644 --- a/pkgs/by-name/ge/gerrit/package.nix +++ b/pkgs/by-name/ge/gerrit/package.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "gerrit"; - version = "3.11.3"; + version = "3.12.0"; src = fetchurl { url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war"; - hash = "sha256-SkLfxBU4ePnrgqB9k9qoYZ1njgHVMjRX4BZYbbeUaAQ="; + hash = "sha256-/1QKWu1OF6uPkuBcnHBoVRqiiIxr7LPkrfQHpjO9sz4="; }; buildCommand = '' diff --git a/pkgs/by-name/gi/git-absorb/package.nix b/pkgs/by-name/gi/git-absorb/package.nix index 344a043c28c3..4cbe68946f74 100644 --- a/pkgs/by-name/gi/git-absorb/package.nix +++ b/pkgs/by-name/gi/git-absorb/package.nix @@ -52,7 +52,6 @@ rustPlatform.buildRustPackage rec { description = "git commit --fixup, but automatic"; license = [ licenses.bsd3 ]; maintainers = with maintainers; [ - tomfitzhenry matthiasbeyer ]; mainProgram = "git-absorb"; diff --git a/pkgs/by-name/gi/gitrs/package.nix b/pkgs/by-name/gi/gitrs/package.nix index 9e3de5731e9f..d4155f294a13 100644 --- a/pkgs/by-name/gi/gitrs/package.nix +++ b/pkgs/by-name/gi/gitrs/package.nix @@ -6,6 +6,7 @@ pkg-config, libiconv, rustPlatform, + libz, }: rustPlatform.buildRustPackage rec { @@ -30,6 +31,7 @@ rustPlatform.buildRustPackage rec { [ openssl.dev ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv + libz ]; meta = with lib; { diff --git a/pkgs/by-name/gl/glance/package.nix b/pkgs/by-name/gl/glance/package.nix index ed0a3386dfee..e6e96550ff72 100644 --- a/pkgs/by-name/gl/glance/package.nix +++ b/pkgs/by-name/gl/glance/package.nix @@ -9,16 +9,18 @@ buildGoModule (finalAttrs: { pname = "glance"; - version = "0.8.1"; + version = "0.8.3"; src = fetchFromGitHub { owner = "glanceapp"; repo = "glance"; tag = "v${finalAttrs.version}"; - hash = "sha256-syWalphoKjUYrQjKrQUMDijgILQ+AIOVTMqYCiYVWyU="; + hash = "sha256-o2Yom40HbNKe3DMMxz0Mf2gG8zresgU52Odpj2H7ZPU="; }; - vendorHash = "sha256-81FAWMe7ksmbklXGGg15v2W4nuT6AcBHLIhXF7bI78c="; + patches = [ ./update_purego.patch ]; + + vendorHash = "sha256-esPtCg63A40mX9hADOhEa+NjNk+9MI/0qZG3uE91qxg="; ldflags = [ "-s" diff --git a/pkgs/by-name/gl/glance/update_purego.patch b/pkgs/by-name/gl/glance/update_purego.patch new file mode 100644 index 000000000000..b91fa89f2de4 --- /dev/null +++ b/pkgs/by-name/gl/glance/update_purego.patch @@ -0,0 +1,26 @@ +diff --git a/go.mod b/go.mod +index ccea58ca68..118d91c650 100644 +--- a/go.mod ++++ b/go.mod +@@ -15,7 +15,7 @@ + require ( + github.com/PuerkitoBio/goquery v1.10.3 // indirect + github.com/andybalholm/cascadia v1.3.3 // indirect +- github.com/ebitengine/purego v0.8.2 // indirect ++ github.com/ebitengine/purego v0.8.3 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect +diff --git a/go.sum b/go.sum +index 80c2d6c664..6236b4de85 100644 +--- a/go.sum ++++ b/go.sum +@@ -11,6 +11,8 @@ + github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= + github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= + github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= ++github.com/ebitengine/purego v0.8.3 h1:K+0AjQp63JEZTEMZiwsI9g0+hAMNohwUOtY0RPGexmc= ++github.com/ebitengine/purego v0.8.3/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= + github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= + github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= + github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= diff --git a/pkgs/by-name/go/go-landlock/package.nix b/pkgs/by-name/go/go-landlock/package.nix index 6be26c1b0d3b..b708cce8a2d8 100644 --- a/pkgs/by-name/go/go-landlock/package.nix +++ b/pkgs/by-name/go/go-landlock/package.nix @@ -26,6 +26,6 @@ buildGoModule { description = "Go library for the Linux Landlock sandboxing feature"; homepage = "https://github.com/landlock-lsm/go-landlock"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ tomfitzhenry ]; + maintainers = [ ]; }; } diff --git a/pkgs/by-name/hp/hplip/package.nix b/pkgs/by-name/hp/hplip/package.nix index 5b75315c16e7..12ace2d35cbc 100644 --- a/pkgs/by-name/hp/hplip/package.nix +++ b/pkgs/by-name/hp/hplip/package.nix @@ -35,16 +35,16 @@ let pname = "hplip"; - version = "3.24.4"; + version = "3.25.2"; src = fetchurl { url = "mirror://sourceforge/hplip/${pname}-${version}.tar.gz"; - hash = "sha256-XXZDgxiTpeKt351C1YGl2/5arwI2Johrh2LFZF2g8fs="; + hash = "sha256-6HL/KOslF3Balfbhg576HlCnejOq6JBSeN8r2CCRllM="; }; plugin = fetchurl { url = "https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${pname}-${version}-plugin.run"; - hash = "sha256-Hzxr3SVmGoouGBU2VdbwbwKMHZwwjWnI7P13Z6LQxao="; + hash = "sha256-miz41WYehGVI27tZUjGlRIpctjcpzJPfjR9lLf0WelQ="; }; hplipState = replaceVars ./hplip.state { @@ -161,8 +161,8 @@ python3Packages.buildPythonApplication { postPatch = '' # https://github.com/NixOS/nixpkgs/issues/44230 substituteInPlace createPPD.sh \ - --replace ppdc "${cups}/bin/ppdc" \ - --replace "gzip -c" "gzip -cn" + --replace-fail ppdc "${cups}/bin/ppdc" \ + --replace-fail "gzip -c" "gzip -cn" # HPLIP hardcodes absolute paths everywhere. Nuke from orbit. find . -type f -exec sed -i \ @@ -223,6 +223,7 @@ python3Packages.buildPythonApplication { "policykit_dir=${out}/share/polkit-1/actions" "policykit_dbus_etcdir=${out}/etc/dbus-1/system.d" "policykit_dbus_sharedir=${out}/share/dbus-1/system-services" + "PYTHONEXECDIR=${out}/lib/python${lib.versions.majorMinor python3Packages.python.version}/site-packages" "hplip_confdir=${out}/etc/hp" "hplip_statedir=${out}/var/lib/hp" ]; @@ -347,15 +348,15 @@ python3Packages.buildPythonApplication { "lib/sane" ]; - meta = with lib; { + meta = { description = "Print, scan and fax HP drivers for Linux"; homepage = "https://developers.hp.com/hp-linux-imaging-and-printing"; downloadPage = "https://sourceforge.net/projects/hplip/files/hplip/"; license = if withPlugin then - licenses.unfree + lib.licenses.unfree else - with licenses; + with lib.licenses; [ mit bsd2 @@ -368,6 +369,6 @@ python3Packages.buildPythonApplication { "armv7l-linux" "aarch64-linux" ]; - maintainers = with maintainers; [ ttuegel ]; + maintainers = with lib.maintainers; [ ttuegel ]; }; } diff --git a/pkgs/by-name/ib/ibm-sw-tpm2/package.nix b/pkgs/by-name/ib/ibm-sw-tpm2/package.nix index f5f83f4736eb..bcb5024daf36 100644 --- a/pkgs/by-name/ib/ibm-sw-tpm2/package.nix +++ b/pkgs/by-name/ib/ibm-sw-tpm2/package.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { mainProgram = "tpm_server"; homepage = "https://sourceforge.net/projects/ibmswtpm2/"; platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ tomfitzhenry ]; + maintainers = [ ]; license = licenses.bsd3; }; } diff --git a/pkgs/by-name/ji/jimtcl/package.nix b/pkgs/by-name/ji/jimtcl/package.nix index 908a550d29c1..13181a2c0e5c 100644 --- a/pkgs/by-name/ji/jimtcl/package.nix +++ b/pkgs/by-name/ji/jimtcl/package.nix @@ -78,7 +78,6 @@ stdenv.mkDerivation (finalAttrs: { homepage = "http://jim.tcl.tk/"; license = lib.licenses.bsd2; platforms = lib.platforms.all; - broken = stdenv.hostPlatform.isDarwin; maintainers = with lib.maintainers; [ dbohdan fgaz diff --git a/pkgs/by-name/li/libansilove/package.nix b/pkgs/by-name/li/libansilove/package.nix new file mode 100644 index 000000000000..5343ed1b0b0c --- /dev/null +++ b/pkgs/by-name/li/libansilove/package.nix @@ -0,0 +1,35 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + gd, +}: + +stdenv.mkDerivation rec { + pname = "libansilove"; + version = "1.4.2"; + + src = fetchFromGitHub { + owner = "ansilove"; + repo = "libansilove"; + tag = version; + hash = "sha256-kbQ7tbQbJ8zYhdbfiVZY26woyR4NNzqjCJ/5nrunlWs="; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ gd ]; + + meta = { + description = "Library for converting ANSI, ASCII, and other formats to PNG"; + homepage = "https://github.com/ansilove/libansilove"; + changelog = "https://github.com/ansilove/libansilove/blob/${src.rev}/ChangeLog"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ jethair ]; + mainProgram = "libansilove"; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/by-name/mi/microcode-intel/package.nix b/pkgs/by-name/mi/microcode-intel/package.nix index f5bc90efae59..b304ed399e1b 100644 --- a/pkgs/by-name/mi/microcode-intel/package.nix +++ b/pkgs/by-name/mi/microcode-intel/package.nix @@ -4,6 +4,7 @@ fetchFromGitHub, libarchive, iucode-tool, + buildPackages, }: stdenv.mkDerivation rec { @@ -17,16 +18,13 @@ stdenv.mkDerivation rec { hash = "sha256-xasV1w6+8qnD+RLWsReMo+xm7a9nguV2st3IC4FURDU="; }; - nativeBuildInputs = [ - iucode-tool - libarchive - ]; + nativeBuildInputs = [ libarchive ]; installPhase = '' runHook preInstall mkdir -p $out kernel/x86/microcode - iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/ + ${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe iucode-tool} -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/ touch -d @$SOURCE_DATE_EPOCH kernel/x86/microcode/GenuineIntel.bin echo kernel/x86/microcode/GenuineIntel.bin | bsdtar --uid 0 --gid 0 -cnf - -T - | bsdtar --null -cf - --format=newc @- > $out/intel-ucode.img diff --git a/pkgs/by-name/mi/midori-unwrapped/package.nix b/pkgs/by-name/mi/midori-unwrapped/package.nix deleted file mode 100644 index 906354905354..000000000000 --- a/pkgs/by-name/mi/midori-unwrapped/package.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - cmake, - ninja, - pkg-config, - intltool, - vala, - wrapGAppsHook3, - gcr, - libpeas, - gtk3, - webkitgtk_4_0, - sqlite, - gsettings-desktop-schemas, - libsoup_2_4, - glib-networking, - json-glib, - libarchive, -}: - -stdenv.mkDerivation rec { - pname = "midori"; - version = "9.0"; - - src = fetchurl { - url = "https://github.com/midori-browser/core/releases/download/v${version}/midori-v${version}.tar.gz"; - sha256 = "05i04qa83dnarmgkx4xsk6fga5lw1lmslh4rb3vhyyy4ala562jy"; - }; - - nativeBuildInputs = [ - cmake - intltool - ninja - pkg-config - vala - wrapGAppsHook3 - ]; - - buildInputs = [ - (libsoup_2_4.override { gnomeSupport = true; }) - gcr - glib-networking - gsettings-desktop-schemas - gtk3 - libpeas - sqlite - webkitgtk_4_0 - json-glib - libarchive - ]; - - passthru = { - inherit gtk3; - applicationName = "Midori"; - }; - - meta = with lib; { - description = "Lightweight WebKitGTK web browser"; - mainProgram = "midori"; - homepage = "https://github.com/midori-browser/core"; - license = with licenses; [ lgpl21Plus ]; - platforms = with platforms; linux; - maintainers = with maintainers; [ - raskin - ramkromberg - ]; - # https://github.com/NixOS/nixpkgs/issues/374354 - broken = true; - }; -} diff --git a/pkgs/by-name/mi/mihomo/package.nix b/pkgs/by-name/mi/mihomo/package.nix index 04cfe3d893d1..d91d5a580d2c 100644 --- a/pkgs/by-name/mi/mihomo/package.nix +++ b/pkgs/by-name/mi/mihomo/package.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "mihomo"; - version = "1.19.6"; + version = "1.19.8"; src = fetchFromGitHub { owner = "MetaCubeX"; repo = "mihomo"; rev = "v${version}"; - hash = "sha256-eVqV7Dt6V4fAT0yGF8D7niZevMmX6WggSpA5J+LU7jY="; + hash = "sha256-C8g2KhhXY11bqGKthNgiqdZwxoPVPhflhkh+X6JU33I="; }; - vendorHash = "sha256-8LATtCrQs7rDiEWKep9xPlzKw413DpS1FGJsLiWriIQ="; + vendorHash = "sha256-j97UFlcN8SfY6nireI6NDw8UcQuxyH34gue1Ywf25Yg="; excludedPackages = [ "./test" ]; diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py index 0929cf7fe4aa..f4f3db5f13b5 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py @@ -2,6 +2,7 @@ import json import logging import os import textwrap +import uuid from concurrent.futures import ThreadPoolExecutor from datetime import datetime from importlib.resources import files @@ -9,7 +10,6 @@ from pathlib import Path from string import Template from subprocess import PIPE, CalledProcessError from typing import Final, Literal -from uuid import uuid4 from . import tmpdir from .constants import WITH_NIX_2_18 @@ -107,7 +107,7 @@ def build_remote( "--attr", build_attr.to_attr(attr), "--add-root", - tmpdir.TMPDIR_PATH / uuid4().hex, + tmpdir.TMPDIR_PATH / uuid.uuid4().hex, *dict_to_flags(instantiate_flags), ], stdout=PIPE, @@ -127,7 +127,7 @@ def build_remote( "--realise", drv, "--add-root", - remote_tmpdir / uuid4().hex, + remote_tmpdir / uuid.uuid4().hex, *dict_to_flags(realise_flags), ], remote=build_host, diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py index 0c556411331e..462c4178e8f7 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py @@ -1,4 +1,5 @@ import atexit +import getpass import logging import os import re @@ -6,7 +7,6 @@ import shlex import subprocess from collections.abc import Sequence from dataclasses import dataclass -from getpass import getpass from typing import Final, Self, TypedDict, Unpack from . import tmpdir @@ -46,7 +46,7 @@ class Remote: cls._validate_opts(opts, ask_sudo_password) sudo_password = None if ask_sudo_password: - sudo_password = getpass(f"[sudo] password for {host}: ") + sudo_password = getpass.getpass(f"[sudo] password for {host}: ") return cls(host, opts, sudo_password) @staticmethod diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/helpers.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/helpers.py index 77ddad740865..c7a2a29ee3dc 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/helpers.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/helpers.py @@ -8,4 +8,8 @@ def get_qualified_name( ) -> str: module_name = getattr(module, "__name__", method.__module__) method_name = getattr(method, "__qualname__", method.__name__) - return f"{module_name}.{method_name}" + name = f"{module_name}.{method_name}" + assert name.startswith("nixos_rebuild"), ( + f"Non-internal module '{name}' called with 'get_qualified_name'" + ) + return name diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py index db21ddd9d64a..e41bd1c6ad0f 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py @@ -1,4 +1,5 @@ import logging +import os import textwrap import uuid from pathlib import Path @@ -126,8 +127,8 @@ def test_parse_args() -> None: ] -@patch.dict(nr.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.os.execve, nr.os), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("os.execve", autospec=True) @patch(get_qualified_name(nr.nix.build), autospec=True) def test_reexec(mock_build: Mock, mock_execve: Mock, monkeypatch: MonkeyPatch) -> None: monkeypatch.setattr(nr, "EXECUTABLE", "nixos-rebuild-ng") @@ -170,8 +171,8 @@ def test_reexec(mock_build: Mock, mock_execve: Mock, monkeypatch: MonkeyPatch) - ) -@patch.dict(nr.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.os.execve, nr.os), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("os.execve", autospec=True) @patch(get_qualified_name(nr.nix.build_flake), autospec=True) def test_reexec_flake( mock_build: Mock, mock_execve: Mock, monkeypatch: MonkeyPatch @@ -212,8 +213,8 @@ def test_reexec_flake( ) -@patch.dict(nr.process.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("subprocess.run", autospec=True) def test_execute_nix_boot(mock_run: Mock, tmp_path: Path) -> None: nixpkgs_path = tmp_path / "nixpkgs" nixpkgs_path.mkdir() @@ -296,8 +297,8 @@ def test_execute_nix_boot(mock_run: Mock, tmp_path: Path) -> None: ) -@patch.dict(nr.process.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("subprocess.run", autospec=True) def test_execute_nix_build_vm(mock_run: Mock, tmp_path: Path) -> None: config_path = tmp_path / "test" config_path.touch() @@ -345,8 +346,8 @@ def test_execute_nix_build_vm(mock_run: Mock, tmp_path: Path) -> None: ) -@patch.dict(nr.process.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("subprocess.run", autospec=True) def test_execute_nix_build_image_flake(mock_run: Mock, tmp_path: Path) -> None: config_path = tmp_path / "test" config_path.touch() @@ -420,8 +421,8 @@ def test_execute_nix_build_image_flake(mock_run: Mock, tmp_path: Path) -> None: ) -@patch.dict(nr.process.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("subprocess.run", autospec=True) def test_execute_nix_switch_flake(mock_run: Mock, tmp_path: Path) -> None: config_path = tmp_path / "test" config_path.touch() @@ -503,13 +504,13 @@ def test_execute_nix_switch_flake(mock_run: Mock, tmp_path: Path) -> None: ) -@patch.dict(nr.process.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) -@patch(get_qualified_name(nr.cleanup_ssh, nr), autospec=True) -@patch(get_qualified_name(nr.nix.uuid4, nr.nix), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("subprocess.run", autospec=True) +@patch("uuid.uuid4", autospec=True) +@patch(get_qualified_name(nr.cleanup_ssh), autospec=True) def test_execute_nix_switch_build_target_host( - mock_uuid4: Mock, mock_cleanup_ssh: Mock, + mock_uuid4: Mock, mock_run: Mock, tmp_path: Path, ) -> None: @@ -713,9 +714,9 @@ def test_execute_nix_switch_build_target_host( ) -@patch.dict(nr.process.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) -@patch(get_qualified_name(nr.cleanup_ssh, nr), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("subprocess.run", autospec=True) +@patch(get_qualified_name(nr.cleanup_ssh), autospec=True) def test_execute_nix_switch_flake_target_host( mock_cleanup_ssh: Mock, mock_run: Mock, @@ -816,9 +817,9 @@ def test_execute_nix_switch_flake_target_host( ) -@patch.dict(nr.process.os.environ, {}, clear=True) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) -@patch(get_qualified_name(nr.cleanup_ssh, nr), autospec=True) +@patch.dict(os.environ, {}, clear=True) +@patch("subprocess.run", autospec=True) +@patch(get_qualified_name(nr.cleanup_ssh), autospec=True) def test_execute_nix_switch_flake_build_host( mock_cleanup_ssh: Mock, mock_run: Mock, @@ -927,7 +928,7 @@ def test_execute_nix_switch_flake_build_host( ) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) +@patch("subprocess.run", autospec=True) def test_execute_switch_rollback(mock_run: Mock, tmp_path: Path) -> None: nixpkgs_path = tmp_path / "nixpkgs" nixpkgs_path.touch() @@ -1004,7 +1005,7 @@ def test_execute_switch_rollback(mock_run: Mock, tmp_path: Path) -> None: ) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) +@patch("subprocess.run", autospec=True) def test_execute_build(mock_run: Mock, tmp_path: Path) -> None: config_path = tmp_path / "test" config_path.touch() @@ -1033,7 +1034,7 @@ def test_execute_build(mock_run: Mock, tmp_path: Path) -> None: ) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) +@patch("subprocess.run", autospec=True) def test_execute_test_flake(mock_run: Mock, tmp_path: Path) -> None: config_path = tmp_path / "test" config_path.touch() @@ -1082,9 +1083,9 @@ def test_execute_test_flake(mock_run: Mock, tmp_path: Path) -> None: ) -@patch(get_qualified_name(nr.process.subprocess.run), autospec=True) -@patch(get_qualified_name(nr.nix.Path.exists, nr.nix), autospec=True, return_value=True) -@patch(get_qualified_name(nr.nix.Path.mkdir, nr.nix), autospec=True) +@patch("subprocess.run", autospec=True) +@patch("pathlib.Path.exists", autospec=True, return_value=True) +@patch("pathlib.Path.mkdir", autospec=True) def test_execute_test_rollback( mock_path_mkdir: Mock, mock_path_exists: Mock, diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py index 6d2017392fbf..cf9c052c709b 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py @@ -1,4 +1,3 @@ -import platform import subprocess from pathlib import Path from unittest.mock import Mock, patch @@ -77,7 +76,7 @@ def test_flake_to_attr() -> None: ) -@patch(get_qualified_name(platform.node), autospec=True) +@patch("platform.node", autospec=True) def test_flake_from_arg( mock_node: Mock, monkeypatch: MonkeyPatch, tmpdir: Path ) -> None: @@ -100,7 +99,7 @@ def test_flake_from_arg( # None when we do not have /etc/nixos/flake.nix with patch( - get_qualified_name(m.Path.exists, m), + "pathlib.Path.exists", autospec=True, return_value=False, ): @@ -109,17 +108,17 @@ def test_flake_from_arg( # None when we have a file in /etc/nixos/flake.nix with ( patch( - get_qualified_name(m.Path.exists, m), + "pathlib.Path.exists", autospec=True, return_value=True, ), patch( - get_qualified_name(m.Path.is_symlink, m), + "pathlib.Path.is_symlink", autospec=True, return_value=False, ), patch( - get_qualified_name(m.discover_git, m), + get_qualified_name(m.discover_git), autospec=True, return_value="/etc/nixos", ), @@ -130,17 +129,17 @@ def test_flake_from_arg( with ( patch( - get_qualified_name(m.Path.exists, m), + "pathlib.Path.exists", autospec=True, return_value=True, ), patch( - get_qualified_name(m.Path.is_symlink, m), + "pathlib.Path.is_symlink", autospec=True, return_value=True, ), patch( - get_qualified_name(m.Path.resolve, m), + "pathlib.Path.resolve", autospec=True, return_value=Path("/path/to/flake.nix"), ), @@ -151,7 +150,7 @@ def test_flake_from_arg( with ( patch( - get_qualified_name(m.subprocess.run), + "subprocess.run", autospec=True, return_value=subprocess.CompletedProcess([], 0, "remote-hostname\n"), ), @@ -161,7 +160,7 @@ def test_flake_from_arg( ) -@patch(get_qualified_name(m.Path.mkdir, m), autospec=True) +@patch("pathlib.Path.mkdir", autospec=True) def test_profile_from_arg(mock_mkdir: Mock) -> None: assert m.Profile.from_arg("system") == m.Profile( "system", diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py index a6fac1c6de1e..2180abd55d71 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py @@ -78,7 +78,7 @@ def test_build_flake(mock_run: Mock, monkeypatch: MonkeyPatch, tmpdir: Path) -> @patch(get_qualified_name(n.run_wrapper, n), autospec=True) -@patch(get_qualified_name(n.uuid4, n), autospec=True) +@patch("uuid.uuid4", autospec=True) def test_build_remote( mock_uuid4: Mock, mock_run: Mock, monkeypatch: MonkeyPatch ) -> None: @@ -809,7 +809,7 @@ def test_switch_to_configuration_with_systemd_run( @patch( - get_qualified_name(n.Path.glob, n), + "pathlib.Path.glob", autospec=True, return_value=[ Path("/nix/var/nix/profiles/per-user/root/channels/nixos"), @@ -817,7 +817,7 @@ def test_switch_to_configuration_with_systemd_run( Path("/nix/var/nix/profiles/per-user/root/channels/home-manager"), ], ) -@patch(get_qualified_name(n.Path.is_dir, n), autospec=True, return_value=True) +@patch("pathlib.Path.is_dir", autospec=True, return_value=True) def test_upgrade_channels(mock_is_dir: Mock, mock_glob: Mock) -> None: with patch(get_qualified_name(n.run_wrapper, n), autospec=True) as mock_run: n.upgrade_channels(False) diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_process.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_process.py index 8ac92bb4848b..84eba633b21b 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_process.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_process.py @@ -6,10 +6,8 @@ from pytest import MonkeyPatch import nixos_rebuild.models as m import nixos_rebuild.process as p -from .helpers import get_qualified_name - -@patch(get_qualified_name(p.subprocess.run), autospec=True) +@patch("subprocess.run", autospec=True) def test_run(mock_run: Any) -> None: p.run_wrapper(["test", "--with", "flags"], check=True) mock_run.assert_called_with( @@ -96,7 +94,7 @@ def test_run(mock_run: Any) -> None: ) -@patch(get_qualified_name(p.subprocess.run), autospec=True) +@patch("subprocess.run", autospec=True) def test__kill_long_running_ssh_process(mock_run: Any) -> None: p._kill_long_running_ssh_process( [ @@ -135,9 +133,7 @@ def test_remote_from_name(monkeypatch: MonkeyPatch) -> None: sudo_password=None, ) - # get_qualified_name doesn't work because getpass is aliased to another - # function - with patch(f"{p.__name__}.getpass", autospec=True, return_value="password"): + with patch("getpass.getpass", autospec=True, return_value="password"): monkeypatch.setenv("NIX_SSHOPTS", "-f foo -b bar -t") assert m.Remote.from_arg("user@localhost", True, True) == m.Remote( "user@localhost", diff --git a/pkgs/by-name/op/opencloud/idp-web.nix b/pkgs/by-name/op/opencloud/idp-web.nix new file mode 100644 index 000000000000..914915399118 --- /dev/null +++ b/pkgs/by-name/op/opencloud/idp-web.nix @@ -0,0 +1,55 @@ +{ + stdenvNoCC, + lib, + opencloud, + pnpm_10, + nodejs, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "opencloud-idp-web"; + + inherit (opencloud) version src; + + pnpmRoot = "services/idp"; + + pnpmDeps = pnpm_10.fetchDeps { + inherit (finalAttrs) pname version src; + sourceRoot = "${finalAttrs.src.name}/${finalAttrs.pnpmRoot}"; + hash = "sha256-gFhWDYk3DcwUowZ9AQjCqHZL1oniK3YCNiG1cDGabYg="; + }; + + nativeBuildInputs = [ + nodejs + pnpm_10.configHook + ]; + + buildPhase = '' + runHook preBuild + cd $pnpmRoot + pnpm build + mkdir -p assets/identifier/static + cp -v src/images/favicon.svg assets/identifier/static/favicon.svg + cp -v src/images/icon-lilac.svg assets/identifier/static/icon-lilac.svg + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir $out + cp -r assets $out + runHook postInstall + ''; + + meta = { + description = "OpenCloud - IDP Web UI"; + homepage = "https://github.com/opencloud-eu/opencloud"; + changelog = "https://github.com/opencloud-eu/opencloud/blob/v${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + christoph-heiss + k900 + ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/op/opencloud/package.nix b/pkgs/by-name/op/opencloud/package.nix new file mode 100644 index 000000000000..a3736dacbf12 --- /dev/null +++ b/pkgs/by-name/op/opencloud/package.nix @@ -0,0 +1,119 @@ +{ + lib, + callPackage, + buildGoModule, + fetchFromGitHub, + ncurses, + gettext, + pigeon, + go-mockery, + protoc-go-inject-tag, + libxcrypt, + vips, + pkg-config, + nixosTests, + nix-update-script, + versionCheckHook, +}: + +let + bingoBinsMakefile = builtins.concatStringsSep "\n" ( + lib.mapAttrsToList (n: v: "${n} := ${v}\n\\$(${n}):") { + GO_XGETTEXT = "xgettext"; + MOCKERY = "mockery"; + PIGEON = "pigeon"; + PROTOC_GO_INJECT_TAG = "protoc-go-inject-tag"; + } + ); +in +buildGoModule rec { + pname = "opencloud"; + version = "2.3.0"; + + src = fetchFromGitHub { + owner = "opencloud-eu"; + repo = "opencloud"; + tag = "v${version}"; + hash = "sha256-IIasFyKF28ynYi8bAmx8LddF0OWB1/Hji6Ovp5pm9QE="; + }; + + postPatch = '' + echo "${bingoBinsMakefile}" >.bingo/Variables.mk + + # tries to build web assets, done separately + substituteInPlace services/idp/Makefile \ + --replace-fail 'node-generate-prod: assets' 'node-generate-prod:' + # tries to download something web assets .. + substituteInPlace services/web/Makefile \ + --replace-fail 'node-generate-prod: download-assets' 'node-generate-prod:' + + # tries to build some random binaries off the internet and + # no need to build protobuf bindings anyway, as they are in-repo already + sed -i -e '/\$(BINGO) get/d' -e '/\$(BUF) generate/d' .make/protobuf.mk + ''; + + vendorHash = null; + + preConfigure = '' + export HOME=$(mktemp -d) + make generate + ''; + + ldflags = [ + "-s" + "-w" + "-X" + "github.com/opencloud-eu/opencloud/pkg/version.String=nixos" + "-X" + "github.com/opencloud-eu/opencloud/pkg/version.Tag=${version}" + "-X" + "github.com/opencloud-eu/opencloud/pkg/version.Date=19700101" + ]; + + tags = [ "enable_vips" ]; + + nativeBuildInputs = [ + ncurses + gettext + pigeon + go-mockery + protoc-go-inject-tag + pkg-config + ]; + + buildInputs = [ + libxcrypt + vips + ]; + + env = { + # avoids 'make generate' calling `git`, otherwise no-op + STRING = version; + VERSION = version; + }; + + excludedPackages = [ "tests/*" ]; + + passthru = { + web = callPackage ./web.nix { }; + idp-web = callPackage ./idp-web.nix { }; + tests = { inherit (nixosTests) opencloud; }; + updateScript = nix-update-script { }; + }; + + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = [ "version" ]; + + meta = { + description = "OpenCloud gives you a secure and private way to store, access, and share your files."; + homepage = "https://github.com/opencloud-eu/opencloud"; + changelog = "https://github.com/opencloud-eu/opencloud/blob/v${version}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + christoph-heiss + k900 + ]; + mainProgram = "opencloud"; + }; +} diff --git a/pkgs/by-name/op/opencloud/web.nix b/pkgs/by-name/op/opencloud/web.nix new file mode 100644 index 000000000000..665ca2fd8586 --- /dev/null +++ b/pkgs/by-name/op/opencloud/web.nix @@ -0,0 +1,57 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + nodejs, + pnpm_10, + nix-update-script, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "opencloud-web"; + version = "2.4.0"; + + src = fetchFromGitHub { + owner = "opencloud-eu"; + repo = "web"; + tag = "v${finalAttrs.version}"; + hash = "sha256-64Dwkx5IEwlaIX1z6Roi6cSWB2ETBldQcNWxgWiUX18="; + }; + + pnpmDeps = pnpm_10.fetchDeps { + inherit (finalAttrs) pname version src; + hash = "sha256-UKgtthdRnI+iR4Qn07nabQOzWZFATjIfrQfwxhKJkx8="; + }; + + nativeBuildInputs = [ + nodejs + pnpm_10.configHook + ]; + + buildPhase = '' + runHook preBuild + pnpm build + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir $out + cp -r dist/* $out + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Web UI for OpenCloud built with Vue.js and TypeScript"; + homepage = "https://github.com/opencloud-eu/web"; + changelog = "https://github.com/opencloud-eu/web/blob/${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ + christoph-heiss + k900 + ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/op/openocd/package.nix b/pkgs/by-name/op/openocd/package.nix index f7d326599f7d..618b998eefcb 100644 --- a/pkgs/by-name/op/openocd/package.nix +++ b/pkgs/by-name/op/openocd/package.nix @@ -97,6 +97,5 @@ stdenv.mkDerivation rec { prusnak ]; platforms = platforms.unix ++ platforms.windows; - broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/by-name/pa/pam_gnupg/package.nix b/pkgs/by-name/pa/pam_gnupg/package.nix index ff5546320ec2..96b0491d3ef3 100644 --- a/pkgs/by-name/pa/pam_gnupg/package.nix +++ b/pkgs/by-name/pa/pam_gnupg/package.nix @@ -37,6 +37,6 @@ stdenv.mkDerivation rec { ''; homepage = "https://github.com/cruegge/pam-gnupg"; license = licenses.gpl3; - maintainers = with maintainers; [ mtreca ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/by-name/pa/paper-age/package.nix b/pkgs/by-name/pa/paper-age/package.nix index c1a59f48b72d..f68b73b20237 100644 --- a/pkgs/by-name/pa/paper-age/package.nix +++ b/pkgs/by-name/pa/paper-age/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/matiaskorhonen/paper-age"; changelog = "https://github.com/matiaskorhonen/paper-age/blob/${src.rev}/CHANGELOG.md"; license = licenses.mit; - maintainers = with maintainers; [ tomfitzhenry ]; + maintainers = [ ]; mainProgram = "paper-age"; }; } diff --git a/pkgs/by-name/pd/pdftk/package.nix b/pkgs/by-name/pd/pdftk/package.nix index 025652d69b87..54f55796473b 100644 --- a/pkgs/by-name/pd/pdftk/package.nix +++ b/pkgs/by-name/pd/pdftk/package.nix @@ -3,12 +3,21 @@ stdenv, fetchFromGitLab, gradle_8, - jre, + jre_headless, + jre_minimal, runtimeShell, }: let # "Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0." gradle = gradle_8; + + jre = jre_minimal.override { + modules = [ + "java.base" + "java.desktop" + ]; + jdk = jre_headless; + }; in stdenv.mkDerivation rec { pname = "pdftk"; diff --git a/pkgs/by-name/pd/pdns-recursor/package.nix b/pkgs/by-name/pd/pdns-recursor/package.nix index bba6c4f4d185..ceae53962ea0 100644 --- a/pkgs/by-name/pd/pdns-recursor/package.nix +++ b/pkgs/by-name/pd/pdns-recursor/package.nix @@ -20,17 +20,17 @@ stdenv.mkDerivation (finalAttrs: { pname = "pdns-recursor"; - version = "5.1.2"; + version = "5.2.2"; src = fetchurl { url = "https://downloads.powerdns.com/releases/pdns-recursor-${finalAttrs.version}.tar.bz2"; - hash = "sha256-s6N+uyAoWrmsu7DhNw5iO7OY7TCH8OZ48j/6OwBjmD0="; + hash = "sha256-+clSdCMe48XJQZf20FAR1Vq/BrKTdTW6jnjiTqT7vW4="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) src; sourceRoot = "pdns-recursor-${finalAttrs.version}/settings/rust"; - hash = "sha256-/fxFqs5lDzOhatc6KBc7Zwsq3A7N5AOanGOebttr1l8="; + hash = "sha256-A3NX1zj9+9qCLTkfca3v8Rr8oc/zL/Ruknjl3g1aMG4="; }; cargoRoot = "settings/rust"; @@ -38,10 +38,10 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cargo rustc - rustPlatform.cargoSetupHook pkg-config ]; + buildInputs = [ boost openssl @@ -67,14 +67,14 @@ stdenv.mkDerivation (finalAttrs: { inherit (nixosTests) pdns-recursor ncdns; }; - meta = with lib; { + meta = { description = "Recursive DNS server"; homepage = "https://www.powerdns.com/"; - platforms = platforms.linux; + platforms = lib.platforms.linux; badPlatforms = [ "i686-linux" # a 64-bit time_t is needed ]; - license = licenses.gpl2Only; - maintainers = with maintainers; [ rnhmjoj ]; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ rnhmjoj ]; }; }) diff --git a/pkgs/by-name/pi/pict-rs/package.nix b/pkgs/by-name/pi/pict-rs/package.nix index c57f590b7e6f..b75a4b8a74db 100644 --- a/pkgs/by-name/pi/pict-rs/package.nix +++ b/pkgs/by-name/pi/pict-rs/package.nix @@ -13,18 +13,18 @@ rustPlatform.buildRustPackage rec { pname = "pict-rs"; - version = "0.5.16"; + version = "0.5.19"; src = fetchFromGitea { domain = "git.asonix.dog"; owner = "asonix"; repo = pname; rev = "v${version}"; - sha256 = "sha256-q0h+H3260CSpZemVuyaiwSHDi8yKXUX8Df9ih3IzAWo="; + sha256 = "sha256-ifuN3Kb7Hhq8H/eoZcumO5yyrxOCA+nWQQvAdFk7w2Q="; }; useFetchCargoVendor = true; - cargoHash = "sha256-JJB5d9N2/tu2SYudNNguQGocQdyFAMvBea/Q3V7pYOw="; + cargoHash = "sha256-wZRWusETLl32BJy5lza4Bvix500VkpXLUpQb5aO8yJ0="; # needed for internal protobuf c wrapper library PROTOC = "${protobuf}/bin/protoc"; diff --git a/pkgs/by-name/pr/prometheus-klipper-exporter/package.nix b/pkgs/by-name/pr/prometheus-klipper-exporter/package.nix index db41ced6fd45..4015eab336fe 100644 --- a/pkgs/by-name/pr/prometheus-klipper-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-klipper-exporter/package.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "prometheus-klipper-exporter"; - version = "0.12.0"; + version = "0.13.0"; src = fetchFromGitHub { owner = "scross01"; repo = "prometheus-klipper-exporter"; rev = "v${version}"; - sha256 = "sha256-OlNUBdCizMOSb7WEtu00LaHYSXLSPlISVJD/0rHujnY="; + sha256 = "sha256-zNRjD2YO7OfcNXF5pukXChxhC5LB88C1EKfiMreMzTs="; }; vendorHash = "sha256-0nbLHZ2WMLMK0zKZuUYz355K01Xspn9svmlFCtQjed0="; diff --git a/pkgs/by-name/qq/qq/sources.nix b/pkgs/by-name/qq/qq/sources.nix index 56f4838b4faa..4db1d34cccc8 100644 --- a/pkgs/by-name/qq/qq/sources.nix +++ b/pkgs/by-name/qq/qq/sources.nix @@ -1,9 +1,9 @@ # Generated by ./update.sh - do not update manually! -# Last updated: 2025-05-03 +# Last updated: 2025-05-19 { - version = "3.2.17-2025.4.29"; - amd64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250429_amd64_01.deb"; - arm64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250429_arm64_01.deb"; - arm64_hash = "sha256-BxyJ9NNdMck3qk8wzCd07x/W9QlTMemHi3l0TIQ04ZY="; - amd64_hash = "sha256-DDqLHl8Ig7miZTheRltBq+riLXyGGnW8NtcOI0PgKtc="; + version = "3.2.17-2025.5.19"; + amd64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250519_amd64_01.deb"; + arm64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.17_250519_arm64_01.deb"; + arm64_hash = "sha256-IGwcZfxePhhu46ARCML/TgVCC2QrIqsd6sh5As30JBY="; + amd64_hash = "sha256-kCA5MmLHumCJqQ959L3wXO9bX5mzhowyrRxy5LRocfY="; } diff --git a/pkgs/by-name/ra/raycast/package.nix b/pkgs/by-name/ra/raycast/package.nix index 3425277776a4..71a0e29a62b4 100644 --- a/pkgs/by-name/ra/raycast/package.nix +++ b/pkgs/by-name/ra/raycast/package.nix @@ -12,19 +12,19 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "raycast"; - version = "1.98.0"; + version = "1.99.0"; src = { aarch64-darwin = fetchurl { name = "Raycast.dmg"; url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=arm"; - hash = "sha256-cHTGXuzi7YVAPeeMHugL7uvR9BHJ5xR7I9NE63H3vcg="; + hash = "sha256-5TMVwZ912+r0OP2NeBc53FOkanaRHJgw+P+JbtdBsKg="; }; x86_64-darwin = fetchurl { name = "Raycast.dmg"; url = "https://releases.raycast.com/releases/${finalAttrs.version}/download?build=x86_64"; - hash = "sha256-KYMjr8SA8a0B19hmdsKLLz+smBpB687e+BLRRCRM+AM="; + hash = "sha256-fhW/qQksn69ri7dLwMerRsktZ3Ykn5qmlNkWZ2piN58="; }; } .${stdenvNoCC.system} or (throw "raycast: ${stdenvNoCC.system} is unsupported."); diff --git a/pkgs/by-name/sh/shotwell/package.nix b/pkgs/by-name/sh/shotwell/package.nix index 272e607725a7..e745c4c2f318 100644 --- a/pkgs/by-name/sh/shotwell/package.nix +++ b/pkgs/by-name/sh/shotwell/package.nix @@ -35,6 +35,7 @@ libsecret, libportal-gtk3, gsettings-desktop-schemas, + libheif, }: stdenv.mkDerivation (finalAttrs: { @@ -87,6 +88,18 @@ stdenv.mkDerivation (finalAttrs: { libportal-gtk3 ]; + postInstall = '' + # Pull in HEIF support. + # In postInstall to run before gappsWrapperArgsHook. + export GDK_PIXBUF_MODULE_FILE="${ + gnome._gdkPixbufCacheBuilder_DO_NOT_USE { + extraLoaders = [ + libheif.out + ]; + } + }" + ''; + passthru = { updateScript = gnome.updateScript { packageName = "shotwell"; diff --git a/pkgs/by-name/st/stalwart-mail/package.nix b/pkgs/by-name/st/stalwart-mail/package.nix index 0a9ed8b7d733..16f984cb86c1 100644 --- a/pkgs/by-name/st/stalwart-mail/package.nix +++ b/pkgs/by-name/st/stalwart-mail/package.nix @@ -9,6 +9,7 @@ sqlite, foundationdb, zstd, + rust-jemalloc-sys, stdenv, nix-update-script, nixosTests, @@ -43,6 +44,7 @@ rustPlatform.buildRustPackage rec { openssl sqlite zstd + rust-jemalloc-sys ] ++ lib.optionals (stdenv.hostPlatform.isLinux && withFoundationdb) [ foundationdb ]; # Issue: https://github.com/stalwartlabs/mail-server/issues/1104 diff --git a/pkgs/by-name/su/sumo/package.nix b/pkgs/by-name/su/sumo/package.nix index 2faa08fec689..5f17603bd5a5 100644 --- a/pkgs/by-name/su/sumo/package.nix +++ b/pkgs/by-name/su/sumo/package.nix @@ -93,6 +93,6 @@ stdenv.mkDerivation rec { ''; homepage = "https://github.com/eclipse/sumo"; license = licenses.epl20; - maintainers = with maintainers; [ mtreca ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/by-name/sy/synapse-admin-etkecc/package.nix b/pkgs/by-name/sy/synapse-admin-etkecc/package.nix index b4356f22f81f..4937bca343f3 100644 --- a/pkgs/by-name/sy/synapse-admin-etkecc/package.nix +++ b/pkgs/by-name/sy/synapse-admin-etkecc/package.nix @@ -17,18 +17,18 @@ assert lib.asserts.assertMsg ( stdenv.mkDerivation (finalAttrs: { pname = "synapse-admin-etkecc"; - version = "0.10.4-etke41"; + version = "0.11.0-etke42"; src = fetchFromGitHub { owner = "etkecc"; repo = "synapse-admin"; tag = "v${finalAttrs.version}"; - hash = "sha256-LHZtB6139sV2HdbIKCZruwH1G5+8iTfKXwjjo4gbNcI="; + hash = "sha256-HWhyG/dVP9M84OOYH95RPLqiXDYOs+QOxwLM8pPl1vA="; }; yarnOfflineCache = fetchYarnDeps { yarnLock = finalAttrs.src + "/yarn.lock"; - hash = "sha256-wdnmsz41rIu8HvsoVHSW8PZLwtmwpz+YSeeDs1GT/vA="; + hash = "sha256-GO5m+7fcm/XO38XlsQq6fwKslzdZkE6WleP3GHNKuPU="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/ti/tinygo/package.nix b/pkgs/by-name/ti/tinygo/package.nix index f0c003ab801b..e32871b6a40d 100644 --- a/pkgs/by-name/ti/tinygo/package.nix +++ b/pkgs/by-name/ti/tinygo/package.nix @@ -146,7 +146,6 @@ buildGoModule rec { homepage = "https://tinygo.org/"; description = "Go compiler for small places"; license = licenses.bsd3; - broken = stdenv.hostPlatform.isDarwin; maintainers = with maintainers; [ Madouura muscaln diff --git a/pkgs/by-name/tp/tpm2-tools/package.nix b/pkgs/by-name/tp/tpm2-tools/package.nix index 88a20e99b1d2..363ba53c7b00 100644 --- a/pkgs/by-name/tp/tpm2-tools/package.nix +++ b/pkgs/by-name/tp/tpm2-tools/package.nix @@ -57,6 +57,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/tpm2-software/tpm2-tools"; license = licenses.bsd3; platforms = platforms.linux; - maintainers = with maintainers; [ tomfitzhenry ]; + maintainers = [ ]; }; } diff --git a/pkgs/by-name/tr/treefmt/package.nix b/pkgs/by-name/tr/treefmt/package.nix index 0c0151b4a7b7..8d26504197d5 100644 --- a/pkgs/by-name/tr/treefmt/package.nix +++ b/pkgs/by-name/tr/treefmt/package.nix @@ -6,13 +6,13 @@ }: buildGoModule rec { pname = "treefmt"; - version = "2.3.0"; + version = "2.3.1"; src = fetchFromGitHub { owner = "numtide"; repo = "treefmt"; rev = "v${version}"; - hash = "sha256-tDezwRWEfPz+u/i9Wz7MZULMmmIUwnl+5gcFU+dDj6Y="; + hash = "sha256-Z1AGLaGrRrUd75aQJc/UKwzMGb9gI/p5WxQ5XUgp98o="; }; vendorHash = "sha256-9yAvqz99YlBfFU/hGs1PB/sH0iOyWaVadqGhfXMkj5E="; diff --git a/pkgs/by-name/ud/udevCheckHook/hook.sh b/pkgs/by-name/ud/udevCheckHook/hook.sh index 507e0292b8c8..bdb8e9c1f746 100644 --- a/pkgs/by-name/ud/udevCheckHook/hook.sh +++ b/pkgs/by-name/ud/udevCheckHook/hook.sh @@ -21,7 +21,7 @@ udevCheckHook() { echo Finished udevCheckPhase } -if [[ -z "${dontUdevCheck-}" ]]; then +if [[ -z "${dontUdevCheck-}" && -n "@udevadm@" ]]; then echo "Using udevCheckHook" preInstallCheckHooks+=(udevCheckHook) fi diff --git a/pkgs/by-name/ud/udevCheckHook/package.nix b/pkgs/by-name/ud/udevCheckHook/package.nix index 61a82530cdd3..261a503595ea 100644 --- a/pkgs/by-name/ud/udevCheckHook/package.nix +++ b/pkgs/by-name/ud/udevCheckHook/package.nix @@ -2,12 +2,20 @@ lib, makeSetupHook, systemdMinimal, + udev, + stdenv, }: - +let + # udev rules can only be checked if systemd (specifically, 'udevadm') can be executed on build platform + # if udev is not available on hostPlatform, there is no point in checking rules + applyHook = + lib.meta.availableOn stdenv.hostPlatform udev + && lib.meta.availableOn stdenv.buildPlatform systemdMinimal; +in makeSetupHook { name = "udev-check-hook"; substitutions = { - udevadm = lib.getExe' systemdMinimal "udevadm"; + udevadm = if applyHook then lib.getExe' systemdMinimal "udevadm" else ""; }; meta = { description = "check validity of udev rules in outputs"; diff --git a/pkgs/by-name/vm/vmware-workstation/package.nix b/pkgs/by-name/vm/vmware-workstation/package.nix index 2f8a60403087..71ee44c92531 100644 --- a/pkgs/by-name/vm/vmware-workstation/package.nix +++ b/pkgs/by-name/vm/vmware-workstation/package.nix @@ -33,28 +33,44 @@ unzip, }: -let - # base - versions +stdenv.mkDerivation (finalAttrs: { + pname = "vmware-workstation"; version = "17.6.3"; build = "24583834"; - # macOS - versions - unlockerVersion = "3.0.5"; - - # macOS - Unlocker - unlockerSrc = fetchFromGitHub { - owner = "paolo-projects"; - repo = "unlocker"; - rev = "${unlockerVersion}"; - sha256 = "sha256-JSEW1gqQuLGRkathlwZU/TnG6dL/xWKW4//SfE+kO0A="; + src = requireFile { + name = "VMware-Workstation-Full-${finalAttrs.version}-${finalAttrs.build}.x86_64.bundle"; + url = "https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware%20Workstation%20Pro&freeDownloads=true"; + hash = "sha256-eVdZF3KN7UxtC4n0q2qBvpp3PADuto0dEqwNsSVHjuA="; }; vmware-unpack-env = buildFHSEnv { pname = "vmware-unpack-env"; - inherit version; + inherit (finalAttrs) version; targetPkgs = pkgs: [ zlib ]; }; + unpackPhase = '' + ${finalAttrs.vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${finalAttrs.src} --extract unpacked" + ''; + + macOSUnlockerSrc = fetchFromGitHub { + owner = "paolo-projects"; + repo = "unlocker"; + tag = "3.0.5"; + hash = "sha256-JSEW1gqQuLGRkathlwZU/TnG6dL/xWKW4//SfE+kO0A="; + }; + + postPatch = lib.optionalString enableMacOSGuests '' + cp -R "${finalAttrs.macOSUnlockerSrc}" unlocker/ + + substituteInPlace unlocker/unlocker.py --replace \ + "/usr/lib/vmware/bin/" "$out/lib/vmware/bin" + + substituteInPlace unlocker/unlocker.py --replace \ + "/usr/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so" "$out/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so" + ''; + readline70_compat63 = symlinkJoin { name = "readline70_compat63"; paths = [ readline70 ]; @@ -62,10 +78,20 @@ let ln -s $out/lib/libreadline.so $out/lib/libreadline.so.6 ''; }; -in -stdenv.mkDerivation rec { - pname = "vmware-workstation"; - inherit version build; + + nativeBuildInputs = + [ + python3 + finalAttrs.vmware-unpack-env + autoPatchelfHook + makeWrapper + ] + ++ lib.optionals enableInstaller [ + bzip2 + sqlite + finalAttrs.readline70_compat63 + ] + ++ lib.optionals enableMacOSGuests [ unzip ]; buildInputs = [ libxslt @@ -99,40 +125,6 @@ stdenv.mkDerivation rec { xorg.libXtst ]; - nativeBuildInputs = - [ - python3 - vmware-unpack-env - autoPatchelfHook - makeWrapper - ] - ++ lib.optionals enableInstaller [ - bzip2 - sqlite - readline70_compat63 - ] - ++ lib.optionals enableMacOSGuests [ unzip ]; - - src = requireFile { - name = "VMware-Workstation-Full-${version}-${build}.x86_64.bundle"; - url = "https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware%20Workstation%20Pro&freeDownloads=true"; - hash = "sha256-eVdZF3KN7UxtC4n0q2qBvpp3PADuto0dEqwNsSVHjuA="; - }; - - unpackPhase = '' - ${vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${src} --extract unpacked" - ''; - - postPatch = lib.optionalString enableMacOSGuests '' - cp -R "${unlockerSrc}" unlocker/ - - substituteInPlace unlocker/unlocker.py --replace \ - "/usr/lib/vmware/bin/" "$out/lib/vmware/bin" - - substituteInPlace unlocker/unlocker.py --replace \ - "/usr/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so" "$out/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so" - ''; - installPhase = '' runHook preInstall @@ -167,7 +159,7 @@ stdenv.mkDerivation rec { cp ${./vmware-installer-bootstrap} $out/etc/vmware-installer/bootstrap sed -i -e "s,@@INSTALLERDIR@@,$dest," $out/etc/vmware-installer/bootstrap sed -i -e "s,@@IVERSION@@,$vmware_installer_version," $out/etc/vmware-installer/bootstrap - sed -i -e "s,@@BUILD@@,${build}," $out/etc/vmware-installer/bootstrap + sed -i -e "s,@@BUILD@@,${finalAttrs.build}," $out/etc/vmware-installer/bootstrap # create database of vmware guest tools (avoids vmware fetching them later) mkdir -p $out/etc/vmware-installer/components @@ -181,7 +173,7 @@ stdenv.mkDerivation rec { component_version=$(cat unpacked/$component/manifest.xml | grep -oPm1 "(?<=)[^<]+") component_core_id=$([ "$component" == "vmware-installer" ] && echo "-1" || echo "1") type=$([ "$component" == "vmware-workstation" ] && echo "0" || echo "1") - sqlite3 "$database_filename" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES('$component','$component_version',${build},$component_core_id,'$component','$component',$type);" + sqlite3 "$database_filename" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES('$component','$component_version',${finalAttrs.build},$component_core_id,'$component','$component',$type);" mkdir -p $out/etc/vmware-installer/components/$component cp -r $folder/* $out/etc/vmware-installer/components/$component done @@ -195,8 +187,8 @@ stdenv.mkDerivation rec { ## VMware Config echo "Installing VMware Config" cp ${./vmware-config} $out/etc/vmware/config - sed -i -e "s,@@VERSION@@,${version}," $out/etc/vmware/config - sed -i -e "s,@@BUILD@@,${build}," $out/etc/vmware/config + sed -i -e "s,@@VERSION@@,${finalAttrs.version}," $out/etc/vmware/config + sed -i -e "s,@@BUILD@@,${finalAttrs.build}," $out/etc/vmware/config sed -i -e "s,@@PREFIXDIR@@,$out," $out/etc/vmware/config ## VMware VMX @@ -378,16 +370,17 @@ stdenv.mkDerivation rec { runHook postInstall ''; - meta = with lib; { + meta = { description = "Industry standard desktop hypervisor for x86-64 architecture"; - homepage = "https://www.vmware.com/products/workstation-pro.html"; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.unfree; + homepage = "https://www.vmware.com/products/desktop-hypervisor/workstation-and-fusion"; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + license = lib.licenses.unfree; platforms = [ "x86_64-linux" ]; - maintainers = with maintainers; [ + mainProgram = "vmware"; + maintainers = with lib.maintainers; [ cawilliamson deinferno vifino ]; }; -} +}) diff --git a/pkgs/by-name/wa/wayidle/package.nix b/pkgs/by-name/wa/wayidle/package.nix index 8a0dae1133e4..6e3b7cdae297 100644 --- a/pkgs/by-name/wa/wayidle/package.nix +++ b/pkgs/by-name/wa/wayidle/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { description = "Execute a program when a Wayland compositor reports being N seconds idle"; homepage = "https://git.sr.ht/~whynothugo/wayidle"; license = licenses.isc; - maintainers = with maintainers; [ tomfitzhenry ]; + maintainers = [ ]; mainProgram = "wayidle"; platforms = platforms.linux; }; diff --git a/pkgs/by-name/ya/yazi/plugins/mediainfo/default.nix b/pkgs/by-name/ya/yazi/plugins/mediainfo/default.nix index 452a40de6bd5..21f78d2b4d16 100644 --- a/pkgs/by-name/ya/yazi/plugins/mediainfo/default.nix +++ b/pkgs/by-name/ya/yazi/plugins/mediainfo/default.nix @@ -5,13 +5,13 @@ }: mkYaziPlugin { pname = "mediainfo.yazi"; - version = "25.2.7-unstable-2025-04-17"; + version = "25.4.8-unstable-2025-05-19"; src = fetchFromGitHub { owner = "boydaihungst"; repo = "mediainfo.yazi"; - rev = "9629b1e85c3757c834ec83fb7d931982c55f4c3f"; - hash = "sha256-EDEIiZJy/RfXVaLNsKDeklH4qY2h+js2m0y6VSAjPkk="; + rev = "70ed2287159b17bf2b9c1598252c5c33ba52b8a3"; + hash = "sha256-MMsKb9+zeOtWrpE3SalWhGIqeOwHrLdwf8xWYvWXjbo="; }; meta = { diff --git a/pkgs/data/icons/kora-icon-theme/default.nix b/pkgs/data/icons/kora-icon-theme/default.nix index 22f5ddd734d4..bb32bda29cf4 100644 --- a/pkgs/data/icons/kora-icon-theme/default.nix +++ b/pkgs/data/icons/kora-icon-theme/default.nix @@ -11,13 +11,13 @@ stdenvNoCC.mkDerivation rec { pname = "kora-icon-theme"; - version = "1.6.4"; + version = "1.6.5"; src = fetchFromGitHub { owner = "bikass"; repo = "kora"; rev = "v${version}"; - sha256 = "sha256-5bGiePD0PwTvVEdVDzr6hIVtLwwF2mPa8ywLH1u8hLk="; + sha256 = "sha256-Oralfx5MzCzkx+c+zwtFp8q83oKrNINd/PmVeugNKGo="; }; nativeBuildInputs = [ diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix index bfff7d4b9387..2a907a4ba39c 100644 --- a/pkgs/desktops/xfce/default.nix +++ b/pkgs/desktops/xfce/default.nix @@ -119,8 +119,6 @@ makeScopeWithSplicing' { xfce4-cpugraph-plugin = callPackage ./panel-plugins/xfce4-cpugraph-plugin { }; - xfce4-datetime-plugin = callPackage ./panel-plugins/xfce4-datetime-plugin { }; - xfce4-dockbarx-plugin = callPackage ./panel-plugins/xfce4-dockbarx-plugin { }; xfce4-docklike-plugin = callPackage ./panel-plugins/xfce4-docklike-plugin { }; @@ -173,6 +171,11 @@ makeScopeWithSplicing' { thunar-bare = self.thunar.override { thunarPlugins = [ ]; }; # added 2019-11-04 + xfce4-datetime-plugin = throw '' + xfce4-datetime-plugin has been removed: this plugin has been merged into the xfce4-panel's built-in clock + plugin and thus no longer maintained upstream, see https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/563. + ''; # Added 2025-05-20 + xfce4-embed-plugin = throw "xfce4-embed-plugin has been removed, as it was broken"; # Added 2024-07-15 xfce4-hardware-monitor-plugin = throw "xfce.xfce4-hardware-monitor-plugin has been removed: abandoned by upstream and does not build"; # added 2023-01-15 diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-battery-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-battery-plugin/default.nix index e80e2b58f16b..9c07356f1fc9 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-battery-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-battery-plugin/default.nix @@ -1,21 +1,40 @@ { + stdenv, lib, - mkXfceDerivation, + fetchFromGitLab, + gettext, + meson, + ninja, + pkg-config, glib, gtk3, libxfce4ui, libxfce4util, xfce4-panel, xfconf, + gitUpdater, }: -mkXfceDerivation { - category = "panel-plugins"; +stdenv.mkDerivation (finalAttrs: { pname = "xfce4-battery-plugin"; - version = "1.1.6"; - rev-prefix = "xfce4-battery-plugin-"; - odd-unstable = false; - sha256 = "sha256-tbI4zg6BFsPzREbh/tdFiEbZVXkAsblxzcZdIaQIqa0="; + version = "1.2.0"; + + src = fetchFromGitLab { + domain = "gitlab.xfce.org"; + owner = "panel-plugins"; + repo = "xfce4-battery-plugin"; + tag = "xfce4-battery-plugin-${finalAttrs.version}"; + hash = "sha256-I4x2QRYp6H5mR4J7nQ+VZ/T3r/dj4r4M9JbgN+oZHWQ="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + gettext + meson + ninja + pkg-config + ]; buildInputs = [ glib @@ -26,8 +45,13 @@ mkXfceDerivation { xfconf ]; - meta = with lib; { + passthru.updateScript = gitUpdater { rev-prefix = "xfce4-battery-plugin-"; }; + + meta = { description = "Battery plugin for Xfce panel"; - teams = [ teams.xfce ]; + homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-battery-plugin"; + license = lib.licenses.gpl2Plus; + teams = [ lib.teams.xfce ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-clipman-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-clipman-plugin/default.nix index 85c21e0b5071..91228bf7e6ba 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-clipman-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-clipman-plugin/default.nix @@ -1,7 +1,13 @@ { + stdenv, lib, - mkXfceDerivation, + fetchFromGitLab, + gettext, + meson, + ninja, + pkg-config, wayland-scanner, + wrapGAppsHook3, glib, gtk3, libX11, @@ -13,16 +19,34 @@ xfconf, wayland, wlr-protocols, + gitUpdater, }: -mkXfceDerivation { - category = "panel-plugins"; +stdenv.mkDerivation (finalAttrs: { pname = "xfce4-clipman-plugin"; - version = "1.6.7"; - sha256 = "sha256-kbcA1X5LBnk1FcrhVqpCENp5bleJga2jnCh1RltN72o="; + version = "1.7.0"; + + src = fetchFromGitLab { + domain = "gitlab.xfce.org"; + owner = "panel-plugins"; + repo = "xfce4-clipman-plugin"; + tag = "xfce4-clipman-plugin-${finalAttrs.version}"; + hash = "sha256-w9axHJJnTQrkN9s3RQyvkOcK0FOqsvWpoJ+UCDntnZk="; + }; + + strictDeps = true; + + depsBuildBuild = [ + pkg-config + ]; nativeBuildInputs = [ + gettext + meson + ninja + pkg-config wayland-scanner + wrapGAppsHook3 ]; buildInputs = [ @@ -39,8 +63,13 @@ mkXfceDerivation { wlr-protocols ]; - meta = with lib; { + passthru.updateScript = gitUpdater { rev-prefix = "xfce4-clipman-plugin-"; }; + + meta = { description = "Clipboard manager for Xfce panel"; - teams = [ teams.xfce ]; + homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-clipman-plugin"; + license = lib.licenses.gpl2Plus; + teams = [ lib.teams.xfce ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin/default.nix index ea2988edc8cf..e7d31cffa48e 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin/default.nix @@ -1,20 +1,43 @@ { + stdenv, lib, - mkXfceDerivation, + fetchFromGitLab, + gettext, + meson, + ninja, + pkg-config, + glib, gtk3, libxfce4ui, libxfce4util, xfce4-panel, xfconf, + gitUpdater, }: -mkXfceDerivation { - category = "panel-plugins"; +stdenv.mkDerivation (finalAttrs: { pname = "xfce4-cpufreq-plugin"; - version = "1.2.9"; - sha256 = "sha256-WC419ZRQAnV+yNbdWH5lMt4RGvQb7zv2dqQdTE2kIFU="; + version = "1.3.0"; + + src = fetchFromGitLab { + domain = "gitlab.xfce.org"; + owner = "panel-plugins"; + repo = "xfce4-cpufreq-plugin"; + tag = "xfce4-cpufreq-plugin-${finalAttrs.version}"; + hash = "sha256-IJ0gOzMs2JBS8KIlD5NHyUOf53PtTytm8J/j+5AEh5E="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + gettext + meson + ninja + pkg-config + ]; buildInputs = [ + glib gtk3 libxfce4ui libxfce4util @@ -22,8 +45,13 @@ mkXfceDerivation { xfconf ]; - meta = with lib; { + passthru.updateScript = gitUpdater { rev-prefix = "xfce4-cpufreq-plugin-"; }; + + meta = { description = "CPU Freq load plugin for Xfce panel"; - teams = [ teams.xfce ]; + homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-cpufreq-plugin"; + license = lib.licenses.gpl2Plus; + teams = [ lib.teams.xfce ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix index 7b808f305f91..e390d014568b 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix @@ -1,39 +1,57 @@ { + stdenv, lib, - mkXfceDerivation, - exo, + fetchFromGitLab, + gettext, + meson, + ninja, + pkg-config, glib, gtk3, - libXtst, libxfce4ui, libxfce4util, xfce4-panel, xfconf, - xorgproto, + gitUpdater, }: -mkXfceDerivation { - category = "panel-plugins"; +stdenv.mkDerivation (finalAttrs: { pname = "xfce4-cpugraph-plugin"; - version = "1.2.11"; - rev-prefix = "xfce4-cpugraph-plugin-"; - odd-unstable = false; - sha256 = "sha256-Q+H6riGF5sEcyrVFoDfudwVw4QORa2atE6NTb+xde/w="; + version = "1.3.0"; + + src = fetchFromGitLab { + domain = "gitlab.xfce.org"; + owner = "panel-plugins"; + repo = "xfce4-cpugraph-plugin"; + tag = "xfce4-cpugraph-plugin-${finalAttrs.version}"; + hash = "sha256-IXAoxMzKZhABiiZYhL4UGkzqFNGMJicGQqSIfy2DEfc="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + gettext + meson + ninja + pkg-config + ]; buildInputs = [ - exo glib gtk3 - libXtst libxfce4ui libxfce4util xfce4-panel xfconf - xorgproto ]; - meta = with lib; { + passthru.updateScript = gitUpdater { rev-prefix = "xfce4-cpugraph-plugin-"; }; + + meta = { description = "CPU graph show for Xfce panel"; - teams = [ teams.xfce ]; + homepage = "https://gitlab.xfce.org/panel-plugins/xfce4-cpugraph-plugin"; + license = lib.licenses.gpl2Plus; + teams = [ lib.teams.xfce ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-datetime-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-datetime-plugin/default.nix deleted file mode 100644 index 387f800f9832..000000000000 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-datetime-plugin/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - mkXfceDerivation, - lib, - intltool, - libxfce4ui, - xfce4-panel, - gettext, -}: - -mkXfceDerivation { - category = "panel-plugins"; - pname = "xfce4-datetime-plugin"; - version = "0.8.3"; - - rev-prefix = "xfce4-datetime-plugin-"; - sha256 = "sha256-dpN5ZN7VjgO1GQ6v8NXuBKACyIwIosaiVGtmLEb6auI="; - - nativeBuildInputs = [ - gettext - intltool - ]; - - buildInputs = [ - libxfce4ui - xfce4-panel - ]; - - meta = with lib; { - description = "Shows the date and time in the panel, and a calendar appears when you left-click on it"; - teams = [ teams.xfce ]; - }; -} diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-docklike-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-docklike-plugin/default.nix index 29a916adcce9..3253513edaa9 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-docklike-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-docklike-plugin/default.nix @@ -1,22 +1,49 @@ { + stdenv, lib, - mkXfceDerivation, + fetchFromGitLab, + gettext, + meson, + ninja, + pkg-config, cairo, glib, gtk3, gtk-layer-shell, libX11, + libXi, libxfce4ui, libxfce4util, - xfce4-panel, libxfce4windowing, + xfce4-panel, + gitUpdater, }: -mkXfceDerivation { - category = "panel-plugins"; +stdenv.mkDerivation (finalAttrs: { pname = "xfce4-docklike-plugin"; - version = "0.4.3"; - sha256 = "sha256-cQ9B/sIzp1sq3GXPMtbb8xrfFhWiBS+FDe7/qlWVPdA="; + version = "0.5.0"; + + src = fetchFromGitLab { + domain = "gitlab.xfce.org"; + owner = "panel-plugins"; + repo = "xfce4-docklike-plugin"; + tag = "xfce4-docklike-plugin-${finalAttrs.version}"; + hash = "sha256-1R9qQKqn/CIV36GYmyg54t3xiY23qUs5EMLxvAIavK8="; + }; + + strictDeps = true; + + depsBuildBuild = [ + pkg-config + ]; + + nativeBuildInputs = [ + gettext + glib # glib-compile-resources + meson + ninja + pkg-config + ]; buildInputs = [ cairo @@ -24,17 +51,20 @@ mkXfceDerivation { gtk3 gtk-layer-shell libX11 + libXi libxfce4ui libxfce4util - xfce4-panel libxfce4windowing + xfce4-panel ]; - meta = with lib; { + passthru.updateScript = gitUpdater { rev-prefix = "xfce4-docklike-plugin-"; }; + + meta = { homepage = "https://docs.xfce.org/panel-plugins/xfce4-docklike-plugin/start"; description = "Modern, minimalist taskbar for Xfce"; - license = licenses.gpl3; - platforms = platforms.linux; - teams = [ teams.xfce ]; + license = lib.licenses.gpl3Plus; + teams = [ lib.teams.xfce ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/development/interpreters/erlang/28.nix b/pkgs/development/interpreters/erlang/28.nix index 3eb0d72a42de..93e9e596b0c7 100644 --- a/pkgs/development/interpreters/erlang/28.nix +++ b/pkgs/development/interpreters/erlang/28.nix @@ -1,6 +1,6 @@ { mkDerivation }: mkDerivation { - version = "28.0-rc4"; - sha256 = "sha256-CZAs1lqzTWyNoKhEpHdYnFYOfHRX00X2CimC4VeA0MA="; + version = "28.0"; + sha256 = "sha256-ZqND4bOp0vUkBKznhojwsN3MygDf3I7OLkR05EUnSRg="; } diff --git a/pkgs/development/lua-modules/luv/default.nix b/pkgs/development/lua-modules/luv/default.nix index 61de3da4c359..e0390b47a788 100644 --- a/pkgs/development/lua-modules/luv/default.nix +++ b/pkgs/development/lua-modules/luv/default.nix @@ -1,4 +1,5 @@ { + stdenv, lib, buildLuarocksPackage, cmake, @@ -28,6 +29,18 @@ buildLuarocksPackage rec { rm -rf deps/lua deps/luajit deps/libuv ''; + patches = + [ + # Fails with "Uncaught Error: ./tests/test-dns.lua:164: assertion failed!" + # and "./tests/test-tty.lua:19: bad argument #1 to 'is_readable' (Expected + # uv_stream userdata)" + ./disable-failing-tests.patch + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Fails with "Uncaught Error: ./tests/test-udp.lua:261: EHOSTUNREACH" + ./disable-failing-darwin-tests.patch + ]; + buildInputs = [ libuv ]; nativeBuildInputs = [ cmake ]; @@ -56,10 +69,13 @@ buildLuarocksPackage rec { EOF ''; + __darwinAllowLocalNetworking = true; + doInstallCheck = true; installCheckPhase = '' - rm tests/test-{dns,thread,tty}.lua + runHook preInstallCheck luarocks test + runHook postInstallCheck ''; disabled = luaOlder "5.1"; diff --git a/pkgs/development/lua-modules/luv/disable-failing-darwin-tests.patch b/pkgs/development/lua-modules/luv/disable-failing-darwin-tests.patch new file mode 100644 index 000000000000..d87902458b41 --- /dev/null +++ b/pkgs/development/lua-modules/luv/disable-failing-darwin-tests.patch @@ -0,0 +1,19 @@ +diff --git a/tests/test-udp.lua b/tests/test-udp.lua +index bd0f46d..e4542b4 100644 +--- a/tests/test-udp.lua ++++ b/tests/test-udp.lua +@@ -280,14 +280,6 @@ return require('lib/tap')(function (test) + -- same check for skipping the ipv6 test; we just expanded it to + -- the ipv4 test as well. + local function has_external_interface(uv, family) +- local addresses = assert(uv.interface_addresses()) +- for _, vals in pairs(addresses) do +- for _, info in ipairs(vals) do +- if (not family or info.family == family) and not info.internal then +- return true +- end +- end +- end + return false + end + diff --git a/pkgs/development/lua-modules/luv/disable-failing-tests.patch b/pkgs/development/lua-modules/luv/disable-failing-tests.patch new file mode 100644 index 000000000000..14ae9fd94412 --- /dev/null +++ b/pkgs/development/lua-modules/luv/disable-failing-tests.patch @@ -0,0 +1,30 @@ +diff --git a/tests/test-dns.lua b/tests/test-dns.lua +index 894220b..0763b36 100644 +--- a/tests/test-dns.lua ++++ b/tests/test-dns.lua +@@ -161,7 +161,6 @@ return require('lib/tap')(function (test) + p{err=err,hostname=hostname,service=service} + assert(not err, err) + assert(hostname) +- assert(service == "http") + end))) + end) + +diff --git a/tests/test-tty.lua b/tests/test-tty.lua +index 165e58d..11368df 100644 +--- a/tests/test-tty.lua ++++ b/tests/test-tty.lua +@@ -13,13 +13,10 @@ end + return require('lib/tap')(function (test) + + test("tty normal", function (print, p, expect, uv) +- local stdin = uv.new_tty(0, true) + local stdout = uv.new_tty(1, false) + +- assert(uv.is_readable(stdin)) + assert(uv.is_writable(stdout)) + +- uv.close(stdin) + uv.close(stdout) + end) + diff --git a/pkgs/development/ocaml-modules/readline/default.nix b/pkgs/development/ocaml-modules/readline/default.nix index 4efafe2f4e32..b16aa5cff7f0 100644 --- a/pkgs/development/ocaml-modules/readline/default.nix +++ b/pkgs/development/ocaml-modules/readline/default.nix @@ -7,16 +7,16 @@ buildDunePackage { pname = "readline"; - version = "0.1"; + version = "0.2"; minimalOCamlVersion = "4.14"; src = fetchFromGitLab { domain = "gitlab.inria.fr"; - owner = "vtourneu"; - repo = "readline-ocaml"; - rev = "b3f84c8a006439142884d3e0df51b395d963f9fe"; - hash = "sha256-h4kGbzwM88rPGj/KkHKgGyfyvkAYHP83ZY1INZzTaIE="; + owner = "acg"; + repo = "dev/readline-ocaml"; + tag = "v0.2"; + hash = "sha256-qWxciodgINCFCxAVLdoU4z+ypWPYjrUwq8pU80saclw="; }; patches = [ ./dune.patch ]; @@ -30,8 +30,8 @@ buildDunePackage { meta = { description = "OCaml bindings for GNU Readline"; - homepage = "https://vtourneu.gitlabpages.inria.fr/readline-ocaml/readline/index.html"; + homepage = "https://acg.gitlabpages.inria.fr/dev/readline-ocaml/readline/index.html"; license = lib.licenses.cecill20; - maintainers = [ lib.maintainers.vbgl ]; + maintainers = [ lib.maintainers.tournev ]; }; } diff --git a/pkgs/development/python-modules/aiokem/default.nix b/pkgs/development/python-modules/aiokem/default.nix index c22bb8805e13..fc6aedde3eaf 100644 --- a/pkgs/development/python-modules/aiokem/default.nix +++ b/pkgs/development/python-modules/aiokem/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "aiokem"; - version = "0.5.10"; + version = "0.5.11"; pyproject = true; disabled = pythonOlder "3.12"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "kohlerlibs"; repo = "aiokem"; tag = "v${version}"; - hash = "sha256-C9px2Gooh6Ob3rGGhKtRdScuA+PCU93xDvOjk7+q3e8="; + hash = "sha256-1fBGmsp6DoDP1EUjp2tfWT3nTux0/2iiC6x/LxrCrd8="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/colcon-cargo/default.nix b/pkgs/development/python-modules/colcon-cargo/default.nix new file mode 100644 index 000000000000..81cd80d2fc1d --- /dev/null +++ b/pkgs/development/python-modules/colcon-cargo/default.nix @@ -0,0 +1,59 @@ +{ + lib, + buildPythonPackage, + colcon, + cargo, + fetchFromGitHub, + scspell, + setuptools, + pythonOlder, + pytestCheckHook, + rustfmt, + toml, + writableTmpDirAsHomeHook, +}: +buildPythonPackage rec { + pname = "colcon-cargo"; + version = "0.1.3"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "colcon"; + repo = "colcon-cargo"; + tag = version; + hash = "sha256-Do8i/Z1nn8wsj0xzCQdSaaXoDf9N34SiMb/GIe4YOs4="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + colcon + toml + ]; + + nativeCheckInputs = [ + cargo + pytestCheckHook + scspell + rustfmt + writableTmpDirAsHomeHook + ]; + + disabledTestPaths = [ + # Skip the linter tests + "test/test_flake8.py" + ]; + + pythonImportsCheck = [ + "colcon_cargo" + ]; + + meta = { + description = "An extension for colcon-core to support Rust packages built with Cargo"; + homepage = "https://github.com/colcon/colcon-cargo"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ guelakais ]; + }; +} diff --git a/pkgs/development/python-modules/colcon-ros-domain-id-coordinator/default.nix b/pkgs/development/python-modules/colcon-ros-domain-id-coordinator/default.nix new file mode 100644 index 000000000000..cf3c58ee1142 --- /dev/null +++ b/pkgs/development/python-modules/colcon-ros-domain-id-coordinator/default.nix @@ -0,0 +1,54 @@ +{ + lib, + buildPythonPackage, + colcon, + fetchFromGitHub, + pytestCheckHook, + pytest-cov, + pytest-repeat, + pytest-rerunfailures, + scspell, + setuptools, + writableTmpDirAsHomeHook, +}: +buildPythonPackage { + pname = "colcon-ros-domain-id-coordinator"; + version = "0.2.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "colcon"; + repo = "colcon-ros-domain-id-coordinator"; + tag = "0.2.1"; + hash = "sha256-8DTpixa5ZGuSOpmwoeJgxLQI+17XheLxPWcJymE0GqM="; + }; + build-system = [ setuptools ]; + + dependencies = [ + colcon + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov + pytest-repeat + pytest-rerunfailures + scspell + writableTmpDirAsHomeHook + ]; + + disabledTestPaths = [ + "test/test_flake8.py" + ]; + + pythonImportsCheck = [ + "colcon_ros_domain_id_coordinator" + ]; + + meta = { + description = "An extension for colcon-core to coordinate ROS_DOMAIN_ID values across multiple terminals"; + homepage = "https://github.com/colcon/colcon-ros-domain-id-coordinator"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ guelakais ]; + }; +} diff --git a/pkgs/development/python-modules/ctranslate2/default.nix b/pkgs/development/python-modules/ctranslate2/default.nix index 210d7aaacf02..031516b63965 100644 --- a/pkgs/development/python-modules/ctranslate2/default.nix +++ b/pkgs/development/python-modules/ctranslate2/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, # build-system @@ -15,6 +16,7 @@ pytestCheckHook, torch, transformers, + writableTmpDirAsHomeHook, wurlitzer, }: @@ -49,16 +51,20 @@ buildPythonPackage rec { pytestCheckHook torch transformers + writableTmpDirAsHomeHook wurlitzer ]; preCheck = '' # run tests against build result, not sources rm -rf ctranslate2 - - export HOME=$TMPDIR ''; + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + # Fatal Python error: Aborted + "test_invalid_model_path" + ]; + disabledTestPaths = [ # TODO: ModuleNotFoundError: No module named 'opennmt' "tests/test_opennmt_tf.py" @@ -66,11 +72,11 @@ buildPythonPackage rec { "tests/test_transformers.py" ]; - meta = with lib; { + meta = { description = "Fast inference engine for Transformer models"; homepage = "https://github.com/OpenNMT/CTranslate2"; changelog = "https://github.com/OpenNMT/CTranslate2/blob/${src.rev}/CHANGELOG.md"; - license = licenses.mit; - maintainers = with maintainers; [ hexa ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hexa ]; }; } diff --git a/pkgs/development/python-modules/flashinfer/default.nix b/pkgs/development/python-modules/flashinfer/default.nix new file mode 100644 index 000000000000..1600ab2c38a4 --- /dev/null +++ b/pkgs/development/python-modules/flashinfer/default.nix @@ -0,0 +1,103 @@ +# NOTE: At runtime, FlashInfer will fall back to PyTorch’s JIT compilation if a +# requested kernel wasn’t pre-compiled in AOT mode, and JIT compilation always +# requires the CUDA toolkit (via nvcc) to be available. +# +# This means that if you plan to use flashinfer, you will need to set the +# environment varaible `CUDA_HOME` to `cudatoolkit`. +{ + lib, + config, + buildPythonPackage, + fetchFromGitHub, + setuptools, + cudaPackages, + cmake, + ninja, + numpy, + torch, +}: + +let + pname = "flashinfer"; + version = "0.2.5"; + + src_cutlass = fetchFromGitHub { + owner = "NVIDIA"; + repo = "cutlass"; + # Using the revision obtained in submodule inside flashinfer's `3rdparty`. + rev = "df8a550d3917b0e97f416b2ed8c2d786f7f686a3"; + hash = "sha256-d4czDoEv0Focf1bJHOVGX4BDS/h5O7RPoM/RrujhgFQ="; + }; + +in +buildPythonPackage { + inherit pname version; + + src = fetchFromGitHub { + owner = "flashinfer-ai"; + repo = "flashinfer"; + tag = "v${version}"; + hash = "sha256-YrYfatkI9DQkFEEGiF8CK/bTafaNga4Ufyt+882C0bQ="; + }; + + build-system = [ setuptools ]; + + nativeBuildInputs = [ + cmake + ninja + (lib.getBin cudaPackages.cuda_nvcc) + ]; + dontUseCmakeConfigure = true; + + buildInputs = [ + cudaPackages.cuda_cudart + cudaPackages.libcublas + cudaPackages.cuda_cccl + cudaPackages.libcurand + ]; + + postPatch = '' + rmdir 3rdparty/cutlass + ln -s ${src_cutlass} 3rdparty/cutlass + ''; + + # FlashInfer offers two installation modes: + # + # JIT mode: CUDA kernels are compiled at runtime using PyTorch’s JIT, with + # compiled kernels cached for future use. JIT mode allows fast installation, + # as no CUDA kernels are pre-compiled, making it ideal for development and + # testing. JIT version is also available as a sdist in PyPI. + # + # AOT mode: Core CUDA kernels are pre-compiled and included in the library, + # reducing runtime compilation overhead. If a required kernel is not + # pre-compiled, it will be compiled at runtime using JIT. AOT mode is + # recommended for production environments. + # + # Here we use opt for the AOT version. + preConfigure = '' + export FLASHINFER_ENABLE_AOT=1 + export TORCH_NVCC_FLAGS="--maxrregcount=64" + ''; + + TORCH_CUDA_ARCH_LIST = lib.concatStringsSep ";" torch.cudaCapabilities; + + dependencies = [ + numpy + torch + ]; + + meta = with lib; { + broken = !torch.cudaSupport || !config.cudaSupport; + homepage = "https://flashinfer.ai/"; + description = "Library and kernel generator for Large Language Models"; + longDescription = '' + FlashInfer is a library and kernel generator for Large Language Models + that provides high-performance implementation of LLM GPU kernels such as + FlashAttention, PageAttention and LoRA. FlashInfer focus on LLM serving + and inference, and delivers state-of-the-art performance across diverse + scenarios. + ''; + license = licenses.asl20; + maintainers = with maintainers; [ breakds ]; + }; +} diff --git a/pkgs/development/python-modules/huggingface-hub/default.nix b/pkgs/development/python-modules/huggingface-hub/default.nix index 923405a61efc..7f0f3155bbf8 100644 --- a/pkgs/development/python-modules/huggingface-hub/default.nix +++ b/pkgs/development/python-modules/huggingface-hub/default.nix @@ -39,14 +39,14 @@ buildPythonPackage rec { pname = "huggingface-hub"; - version = "0.30.2"; + version = "0.31.4"; pyproject = true; src = fetchFromGitHub { owner = "huggingface"; repo = "huggingface_hub"; tag = "v${version}"; - hash = "sha256-6nE6iKIC6ymI+NMOw/xQT4l5nshDyPdGI0YhqK7tQRE="; + hash = "sha256-V/FbInskBHefbPkbwQyx+aWBcdrk5WaXXbR/v3fNU+Y="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/polyswarm-api/default.nix b/pkgs/development/python-modules/polyswarm-api/default.nix index 34d82cc18221..4ffa74130384 100644 --- a/pkgs/development/python-modules/polyswarm-api/default.nix +++ b/pkgs/development/python-modules/polyswarm-api/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "polyswarm-api"; - version = "3.11.0"; + version = "3.12.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "polyswarm"; repo = "polyswarm-api"; tag = version; - hash = "sha256-7hmuJr+1ghVsp8EfykhVLCHwJYrO2m6cBREUFRov5Mo="; + hash = "sha256-LM+8U7gEo16e8vuFuheonLB685zeNEm736UVXgmtPDw="; }; pythonRelaxDeps = [ "future" ]; diff --git a/pkgs/development/python-modules/tendo/default.nix b/pkgs/development/python-modules/tendo/default.nix index 89d826a9dfe2..5630c802ad43 100644 --- a/pkgs/development/python-modules/tendo/default.nix +++ b/pkgs/development/python-modules/tendo/default.nix @@ -19,6 +19,10 @@ buildPythonPackage rec { hash = "sha256-ZOozMGxAKcEtmUEzHCFSojKc+9Ha+T2MOTmMvdMqNuQ="; }; + patches = [ + ./fix-python-313-build.patch + ]; + postPatch = '' # marken broken and not required sed -i '/setuptools_scm_git_archive/d' pyproject.toml diff --git a/pkgs/development/python-modules/tendo/fix-python-313-build.patch b/pkgs/development/python-modules/tendo/fix-python-313-build.patch new file mode 100644 index 000000000000..adcc685d5ec2 --- /dev/null +++ b/pkgs/development/python-modules/tendo/fix-python-313-build.patch @@ -0,0 +1,183 @@ +From 938d220ce48859cfbb117fb8df42c94c64b88043 Mon Sep 17 00:00:00 2001 +From: Leona Maroni +Date: Mon, 11 Nov 2024 12:03:54 +0000 +Subject: [PATCH] Enable support for python 3.13 and 3.13 (#96) + +adapter from 938d220ce48859cfbb117fb8df42c94c64b88043 + +--- + .gitignore | 1 + + pyproject.toml | 18 ++++++----- + setup.cfg | 3 ++ + src/tendo/tee.py | 4 +-- + tox.ini | 67 +++++++++++++++++++-------------------- + 5 files changed, 49 insertions(+), 44 deletions(-) + +index 215dce7..a1f51a7 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -29,3 +29,4 @@ test-distribute.sh + /.pytest_cache + venv/* + src/tendo/_version.py ++coverage.lcov +diff --git a/pyproject.toml b/pyproject.toml +index ef76df7..ad86d7d 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -10,18 +10,20 @@ build-backend = "setuptools.build_meta" + [tool.black] + target-version = ["py38"] + ++[tool.coverage.report] ++exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] ++fail_under = 100 ++skip_covered = true ++show_missing = true ++ + [tool.coverage.run] +-source_pkgs = ["tendo"] +-branch = true ++source = ["src"] ++# Do not use branch until bug is fixes: ++# https://github.com/nedbat/coveragepy/issues/605 ++branch = false + parallel = true + concurrency = ["multiprocessing", "thread"] + +-[tool.coverage.paths] +-source = ["src", ".tox/*/site-packages"] +- +-[tool.coverage.report] +-exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] +- + [tool.isort] + profile = "black" + add_imports = "from __future__ import annotations" +diff --git a/setup.cfg b/setup.cfg +index 0a6d8c0..bf97071 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -23,6 +23,8 @@ classifier = + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 ++ Programming Language :: Python :: 3.12 ++ Programming Language :: Python :: 3.13 + Topic :: Software Development :: Libraries :: Python Modules + Topic :: Internet :: WWW/HTTP + +@@ -52,6 +54,7 @@ test = + coverage[toml]>=6.5.0 + coveralls~=3.3.1 + pre-commit>=3.3.3 ++ pip + pytest-cache~=1.0 + pytest-cov~=3.0.0 + pytest-html~=3.1.1 +diff --git a/src/tendo/tee.py b/src/tendo/tee.py +index 04d21cf..5b08794 100755 +--- a/src/tendo/tee.py ++++ b/src/tendo/tee.py +@@ -3,7 +3,7 @@ + import codecs + import logging + import os +-import pipes ++from shlex import quote + import subprocess + import sys + import time +@@ -57,7 +57,7 @@ def system2( + # because collections.Iterable seems to be missing on Debian Python 2.5.5 + # (but not on OS X 10.8 with Python 2.5.6) + if hasattr(cmd, "__iter__"): +- cmd = " ".join(pipes.quote(s) for s in cmd) ++ cmd = " ".join(quote(s) for s in cmd) + + t = time.process_time() + output = [] +diff --git a/tox.ini b/tox.ini +index 5faabef..7f81e8b 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -11,45 +11,44 @@ isolated_build = True + + [testenv] + sitepackages=False ++commands_pre = ++ # safety measure to assure we do not accidentally run tests with broken dependencies ++ {envpython} -m pip check ++ # cleaning needed to prevent errors between runs ++ sh -c "rm -f {envdir}/.coverage.* 2>/dev/null || true" ++commands= ++ # We add coverage options but not making them mandatory as we do not want to force ++ # pytest users to run coverage when they just want to run a single test with `pytest -k test` ++ coverage run -m pytest {posargs:} ++ # needed for upload to codecov.io ++ {py,py39,py310,py311,py312,py313}: sh -c "coverage combine -q --data-file={envdir}/.coverage {envdir}/.coverage.* && coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --ignore-errors --fail-under=0 && COVERAGE_FILE={envdir}/.coverage coverage lcov --fail-under=0 --ignore-errors -q && COVERAGE_FILE={envdir}/.coverage coverage report --fail-under=0 --ignore-errors" ++ # lcov needed for vscode integration due to https://github.com/ryanluker/vscode-coverage-gutters/issues/403 ++editable = true ++extras = test + passenv = +- CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437 +- FORCE_COLOR +- HOME +- LANG +- LC_ALL +- LC_CTYPE +- NO_COLOR +- PYENV_VERSION +- PYTEST_* # allows developer to define their own preferences +- PYTEST_REQPASS # needed for CI +- PY_* +- PY_COLORS +- REQUESTS_CA_BUNDLE # https proxies +- RTD_TOKEN +- RTOX* +- SSH_AUTH_SOCK +- SSL_CERT_FILE # https proxies ++ CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437 ++ FORCE_COLOR ++ HOME ++ NO_COLOR ++ PYTEST_* # allows developer to define their own preferences ++ PYTEST_REQPASS # needed for CI ++ PYTHON* # PYTHONPYCACHEPREFIX, PYTHONIOENCODING, PYTHONBREAKPOINT,... ++ PY_COLORS ++ RTD_TOKEN ++ REQUESTS_CA_BUNDLE # https proxies ++ SETUPTOOLS_SCM_DEBUG ++ SSL_CERT_FILE # https proxies ++ SSH_AUTH_SOCK # may be needed by git ++ LANG ++ LC_* + setenv = +- COVERAGE_FILE={env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}} +- COVERAGE_PROCESS_START={toxinidir}/pyproject.toml +-commands= +- coverage run -m pytest --color=yes --html={envlogdir}/report.html --self-contained-html +- # --pyargs tendo ++ COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}} ++ COVERAGE_PROCESS_START={toxinidir}/pyproject.toml ++ PIP_DISABLE_PIP_VERSION_CHECK = 1 + allowlist_externals = + sh +-deps = +- --editable .[test] + +-[testenv:coverage] +-description = Combines and displays coverage results +-commands = +- sh -c "coverage combine .tox/.coverage.*" +- # needed by codecov github actions: +- coverage xml +- # just for humans running it: +- coverage report --skip-covered --fail-under=43 +-deps = +- coverage[toml]>=6.5.0 ++ + + [testenv:docs] + changedir=docs + diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index 1167a01ee3bd..ebbe924c181c 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -58,14 +58,14 @@ buildPythonPackage rec { pname = "transformers"; - version = "4.51.3"; + version = "4.52.0"; pyproject = true; src = fetchFromGitHub { owner = "huggingface"; repo = "transformers"; tag = "v${version}"; - hash = "sha256-VYEkBt0fpG27MVdnABcMAMmk2Pzsc+2Fetx/GmeFBac="; + hash = "sha256-dMdXkhLClFxClBl/Nk4nnfrFZaulnhMsGFKmhkMq2Q0="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/unstructured-inference/default.nix b/pkgs/development/python-modules/unstructured-inference/default.nix index f19299fc4c96..e21dadc0743b 100644 --- a/pkgs/development/python-modules/unstructured-inference/default.nix +++ b/pkgs/development/python-modules/unstructured-inference/default.nix @@ -23,14 +23,14 @@ buildPythonPackage rec { pname = "unstructured-inference"; - version = "0.8.10"; + version = "1.0.2"; format = "setuptools"; src = fetchFromGitHub { owner = "Unstructured-IO"; repo = "unstructured-inference"; tag = version; - hash = "sha256-c5brGGY1PPuKYUb1UOvyKFZC4ph0pGRagHuTLKPXErY="; + hash = "sha256-wRFTwSvkPdvvB08qGOvn8lrbUuoXF6yPqNSk9iiB1S8="; }; propagatedBuildInputs = diff --git a/pkgs/servers/authelia/default.nix b/pkgs/servers/authelia/default.nix index beea275ace20..1d247e4899cb 100644 --- a/pkgs/servers/authelia/default.nix +++ b/pkgs/servers/authelia/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, nodejs, pnpm, fetchFromGitHub, @@ -59,15 +60,17 @@ buildGoModule rec { # several tests with networking and several that want chromium doCheck = false; - postInstall = '' - mkdir -p $out/etc/authelia - cp config.template.yml $out/etc/authelia - - installShellCompletion --cmd authelia \ - --bash <($out/bin/authelia completion bash) \ - --fish <($out/bin/authelia completion fish) \ - --zsh <($out/bin/authelia completion zsh) - ''; + postInstall = + '' + mkdir -p $out/etc/authelia + cp config.template.yml $out/etc/authelia + '' + + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd authelia \ + --bash <($out/bin/authelia completion bash) \ + --fish <($out/bin/authelia completion fish) \ + --zsh <($out/bin/authelia completion zsh) + ''; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/auto-entities/package.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/auto-entities/package.nix new file mode 100644 index 000000000000..c855d8857b47 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/auto-entities/package.nix @@ -0,0 +1,35 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: + +buildNpmPackage rec { + pname = "auto-entities"; + version = "1.15.1"; + + src = fetchFromGitHub { + owner = "thomasloven"; + repo = "lovelace-auto-entities"; + tag = "v${version}"; + hash = "sha256-dGTbF7KO59Flw470i5U+0/ROEZYKe0KH9Y2R4JVyvd8="; + }; + + npmDepsHash = "sha256-OvXlCqD9KI4D9xsTY7morOzXsB+3w12METm2uvcO9h8="; + + installPhase = '' + runHook preInstall + + install -D auto-entities.js $out/auto-entities.js + + runHook postInstall + ''; + + meta = with lib; { + description = "Automatically populate the entities-list of lovelace cards"; + homepage = "https://github.com/thomasloven/lovelace-auto-entities"; + changelog = "https://github.com/thomasloven/lovelace-auto-entities/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with maintainers; [ kranzes ]; + }; +} diff --git a/pkgs/servers/klipper/default.nix b/pkgs/servers/klipper/default.nix index 34ec693f0fa5..ffaf4ee7a957 100644 --- a/pkgs/servers/klipper/default.nix +++ b/pkgs/servers/klipper/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "klipper"; - version = "0.13.0-unstable-2025-05-02"; + version = "0.13.0-unstable-2025-05-14"; src = fetchFromGitHub { owner = "KevinOConnor"; repo = "klipper"; - rev = "1cc63980747b80516f8fc4f022eedf18ae739086"; - sha256 = "sha256-0VKlbCdfVE8XxGoKZQd5Gab5Aq3oq4EHdtCh3tEkgwI="; + rev = "82f540bb731fe4ae4575d48aefb2f837491ba4e6"; + sha256 = "sha256-eP6QQu1FHq08lkZIwaPamuIQg54bLBMDF0UBfQnKiRQ="; }; sourceRoot = "${src.name}/klippy"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index ebd3a2b31f29..ad24cf872351 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -393,6 +393,7 @@ mapAliases { callPackage_i686 = pkgsi686Linux.callPackage; cargo-asm = throw "'cargo-asm' has been removed due to lack of upstream maintenance. Consider 'cargo-show-asm' as an alternative."; cask = emacs.pkgs.cask; # Added 2022-11-12 + catcli = throw "catcli has been superseded by gocatcli"; # Added 2025-04-19 canonicalize-jars-hook = stripJavaArchivesHook; # Added 2024-03-17 cargo-deps = throw "cargo-deps has been removed as the repository is deleted"; # Added 2024-04-09 cargo-espflash = espflash; @@ -1041,6 +1042,7 @@ mapAliases { licensor = throw "'licensor' has been removed due to lack of upstream maintenance"; # Added 2025-01-25 lightdm_gtk_greeter = lightdm-gtk-greeter; # Added 2022-08-01 lightstep-tracer-cpp = throw "lightstep-tracer-cpp is deprecated since 2022-08-29; the upstream recommends migration to opentelemetry projects."; + lima-bin = lib.warnOnInstantiate "lima-bin has been replaced by lima" lima; # Added 2025-05-13 lime3ds = throw "lime3ds is deprecated, use 'azahar' instead."; # Added 2025-03-22 limesctl = throw "limesctl has been removed because it is insignificant."; # Added 2024-11-25 linenoise-ng = throw "'linenoise-ng' has been removed as the upstream project was archived. Consider using 'linenoise' instead."; # Added 2025-05-05 @@ -1221,6 +1223,8 @@ mapAliases { micropad = throw "micropad has been removed, since it was unmaintained and blocked the Electron 27 removal."; # Added 2025-02-24 microsoft-edge = throw "microsoft-edge has been removed due to lack of maintenance in nixpkgs"; # Added 2025-05-19 microsoft_gsl = microsoft-gsl; # Added 2023-05-26 + midori = throw "'midori' original project has been abandonned upstream and the package was broken for a while in nixpkgs"; # Added 2025-05-19 + midori-unwrapped = midori; # Added 2025-05-19 MIDIVisualizer = midivisualizer; # Added 2024-06-12 mikutter = throw "'mikutter' has been removed because the package was broken and had no maintainers"; # Added 2024-10-01 mime-types = mailcap; # Added 2022-01-21 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 12e622afedf0..ff8f4ec6938d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13259,8 +13259,6 @@ with pkgs; michabo = libsForQt5.callPackage ../applications/misc/michabo { }; - midori = wrapFirefox midori-unwrapped { }; - miniaudicle = qt6Packages.callPackage ../applications/audio/miniaudicle { }; minitube = libsForQt5.callPackage ../applications/video/minitube { }; @@ -16223,8 +16221,6 @@ with pkgs; inherit (darwin) sigtool; }; - lima-bin = callPackage ../applications/virtualization/lima/bin.nix { }; - image_optim = callPackage ../applications/graphics/image_optim { inherit (nodePackages) svgo; }; # using the new configuration style proposal which is unstable @@ -16939,4 +16935,8 @@ with pkgs; rustdesk-flutter = callPackage ../by-name/ru/rustdesk-flutter/package.nix { flutter = flutter324; }; + + davis = callPackage ../by-name/da/davis/package.nix { + php = php83; # https://github.com/tchapi/davis/issues/195 + }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 52952d3da035..91f1fb0c6de2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2685,6 +2685,8 @@ self: super: with self; { colcon-argcomplete = callPackage ../development/python-modules/colcon-argcomplete { }; + colcon-cargo = callPackage ../development/python-modules/colcon-cargo { }; + colcon-defaults = callPackage ../development/python-modules/colcon-defaults { }; colcon-mixin = callPackage ../development/python-modules/colcon-mixin { }; @@ -2693,6 +2695,10 @@ self: super: with self; { colcon-parallel-executor = callPackage ../development/python-modules/colcon-parallel-executor { }; + colcon-ros-domain-id-coordinator = + callPackage ../development/python-modules/colcon-ros-domain-id-coordinator + { }; + collections-extended = callPackage ../development/python-modules/collections-extended { }; collidoscope = callPackage ../development/python-modules/collidoscope { }; @@ -5023,6 +5029,8 @@ self: super: with self; { flasgger = callPackage ../development/python-modules/flasgger { }; + flashinfer = callPackage ../development/python-modules/flashinfer { }; + flashtext = callPackage ../development/python-modules/flashtext { }; flask = callPackage ../development/python-modules/flask { };