diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cdd92f530988..7d9214dfe014 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -75,8 +75,8 @@ # @raitobezarius is not "code owner", but is listed here to be notified of changes # pertaining to the Nix package manager. # i.e. no authority over those files. -pkgs/tools/package-management/nix/ @raitobezarius -nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius +pkgs/tools/package-management/nix/ @NixOS/nix-team @raitobezarius +nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobezarius # Nixpkgs documentation /maintainers/scripts/db-to-md.sh @jtojnar @ryantm diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b1fdacf95428..07ca0ab81436 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -834,6 +834,12 @@ githubId = 20405311; name = "Aksh Gupta"; }; + aksiksi = { + email = "assil@ksiksi.net"; + github = "aksiksi"; + githubId = 916621; + name = "Assil Ksiksi"; + }; akssri = { email = "akssri@vakra.xyz"; github = "akssri"; @@ -15207,6 +15213,12 @@ githubId = 61095988; name = "Brian Shu"; }; + oberth-effect = { + email = "stepan.venclik@gmail.com"; + github = "oberth-effect"; + githubId = 88210794; + name = "Štěpán Venclík"; + }; obfusk = { email = "flx@obfusk.net"; matrix = "@obfusk:matrix.org"; diff --git a/nixos/modules/services/desktop-managers/lomiri.nix b/nixos/modules/services/desktop-managers/lomiri.nix index bd43b4c1cfda..2d3cecfe9e43 100644 --- a/nixos/modules/services/desktop-managers/lomiri.nix +++ b/nixos/modules/services/desktop-managers/lomiri.nix @@ -26,6 +26,7 @@ in { lomiri-clock-app lomiri-download-manager lomiri-filemanager-app + lomiri-gallery-app lomiri-polkit-agent lomiri-schemas # exposes some required dbus interfaces lomiri-session # wrappers to properly launch the session diff --git a/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix b/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix index fe4999bfbdbb..5c0fed35c4c9 100644 --- a/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix +++ b/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix @@ -32,7 +32,7 @@ default = false; type = lib.types.bool; description = '' - Enable dynamic CDI configuration for NVidia devices by running + Enable dynamic CDI configuration for Nvidia devices by running nvidia-container-toolkit on boot. ''; }; diff --git a/nixos/modules/services/matrix/mautrix-whatsapp.nix b/nixos/modules/services/matrix/mautrix-whatsapp.nix index d124edc216dd..89bf7f9e9fac 100644 --- a/nixos/modules/services/matrix/mautrix-whatsapp.nix +++ b/nixos/modules/services/matrix/mautrix-whatsapp.nix @@ -108,6 +108,16 @@ in { List of Systemd services to require and wait for when starting the application service. ''; }; + + registerToSynapse = lib.mkOption { + type = lib.types.bool; + default = config.services.matrix-synapse.enable; + defaultText = lib.literalExpression "config.services.matrix-synapse.enable"; + description = '' + Whether to add the bridge's app service registration file to + `services.matrix-synapse.settings.app_service_config_files`. + ''; + }; }; config = lib.mkIf cfg.enable { @@ -121,6 +131,13 @@ in { users.groups.mautrix-whatsapp = {}; + services.matrix-synapse = lib.mkIf cfg.registerToSynapse { + settings.app_service_config_files = [ registrationFile ]; + }; + systemd.services.matrix-synapse = lib.mkIf cfg.registerToSynapse { + serviceConfig.SupplementaryGroups = [ "mautrix-whatsapp" ]; + }; + services.mautrix-whatsapp.settings = lib.mkMerge (map mkDefaults [ defaultConfig # Note: this is defined here to avoid the docs depending on `config` @@ -155,10 +172,15 @@ in { chmod 640 ${registrationFile} umask 0177 + # 1. Overwrite registration tokens in config + # 2. If environment variable MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET + # is set, set it as the login shared secret value for the configured + # homeserver domain. ${pkgs.yq}/bin/yq -s '.[0].appservice.as_token = .[1].as_token | .[0].appservice.hs_token = .[1].hs_token - | .[0]' '${settingsFile}' '${registrationFile}' \ - > '${settingsFile}.tmp' + | .[0] + | if env.MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET then .bridge.login_shared_secret_map.[.homeserver.domain] = env.MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET else . end' \ + '${settingsFile}' '${registrationFile}' > '${settingsFile}.tmp' mv '${settingsFile}.tmp' '${settingsFile}' umask $old_umask ''; diff --git a/nixos/modules/services/web-apps/pict-rs.nix b/nixos/modules/services/web-apps/pict-rs.nix index 07f84578a59b..360dc4fe6418 100644 --- a/nixos/modules/services/web-apps/pict-rs.nix +++ b/nixos/modules/services/web-apps/pict-rs.nix @@ -3,9 +3,6 @@ let cfg = config.services.pict-rs; inherit (lib) maintainers mkOption types; - - is03 = lib.versionOlder cfg.package.version "0.4.0"; - in { meta.maintainers = with maintainers; [ happysalada ]; @@ -61,38 +58,62 @@ in config = lib.mkIf cfg.enable { services.pict-rs.package = lib.mkDefault ( - # An incompatible db change happened in the transition from 0.3 to 0.4. if lib.versionAtLeast config.system.stateVersion "23.11" then pkgs.pict-rs - else pkgs.pict-rs_0_3 + else throw '' + pict-rs made changes to the database schema between 0.3 and 0.4. It + will apply these automatically on the first run of 0.4, but the old + version will no longer work after that. + + Your configuration is currently using the old default of pict-rs + 0.3. Unfortunately, 0.3 no longer builds due to the Rust 1.80 update, + and has been removed. pict-rs has already been updated to 0.5 in + Nixpkgs, which has another schema change but removes the migration + logic for 0.3. + + You will need to migrate to 0.4 first, and then to 0.5. As 0.4 is + no longer present in Nixpkgs, the recommended migration path is: + + * Import a separate Nixpkgs old enough to contain 0.4, temporarily + set `services.pict-rs.package` to its pict-rs, set the + `PICTRS__OLD_DB__PATH` environment variable for the migration, and + activate your configuration to start it. The following configuration + snippet should work: + + services.pict-rs.package = + (import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/9b19f5e77dd906cb52dade0b7bd280339d2a1f3d.tar.gz"; + sha256 = "sha256:0939vbhln9d33xkqw63nsk908k03fxihj85zaf70i3il9z42q8mc"; + }) pkgs.config).pict-rs; + + systemd.services.pict-rs.environment.PICTRS__OLD_DB__PATH = config.services.pict-rs.dataDir; + + * After the migration to 0.4 completes, remove the package and + environment variable overrides, set `services.pict-rs.package` to + the current `pkgs.pict-rs` instead, and activate your configuration + to begin the migration to 0.5. + + For more information, see: + + * + * + + The NixOS module will handle the configuration changes for you, + at least. + '' ); - # Account for config differences between 0.3 and 0.4 - assertions = [ - { - assertion = !is03 || (cfg.repoPath == null && cfg.storePath == null); - message = '' - Using `services.pict-rs.repoPath` or `services.pict-rs.storePath` with pict-rs 0.3 or older has no effect. - ''; - } - ]; - systemd.services.pict-rs = { - # Pict-rs split it's database and image storage paths in 0.4.0. - environment = - if is03 then { - PICTRS__PATH = cfg.dataDir; - PICTRS__ADDR = "${cfg.address}:${toString cfg.port}"; - } else { - PICTRS__REPO__PATH = if cfg.repoPath != null then cfg.repoPath else "${cfg.dataDir}/sled-repo"; - PICTRS__STORE__PATH = if cfg.storePath != null then cfg.storePath else "${cfg.dataDir}/files"; - PICTRS__SERVER__ADDR = "${cfg.address}:${toString cfg.port}"; - }; + environment = { + PICTRS__REPO__PATH = if cfg.repoPath != null then cfg.repoPath else "${cfg.dataDir}/sled-repo"; + PICTRS__STORE__PATH = if cfg.storePath != null then cfg.storePath else "${cfg.dataDir}/files"; + PICTRS__SERVER__ADDRESS = "${cfg.address}:${toString cfg.port}"; + }; wantedBy = [ "multi-user.target" ]; serviceConfig = { DynamicUser = true; StateDirectory = "pict-rs"; - ExecStart = if is03 then "${lib.getBin cfg.package}/bin/pict-rs" else "${lib.getBin cfg.package}/bin/pict-rs run"; + ExecStart = "${lib.getBin cfg.package}/bin/pict-rs run"; }; }; }; diff --git a/nixos/modules/services/web-apps/wordpress.nix b/nixos/modules/services/web-apps/wordpress.nix index 37c39608edae..ea771c358814 100644 --- a/nixos/modules/services/web-apps/wordpress.nix +++ b/nixos/modules/services/web-apps/wordpress.nix @@ -426,6 +426,7 @@ in # standard wordpress .htaccess contents RewriteEngine On + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index 5ffec126d8f0..d6d775998119 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -256,7 +256,11 @@ in live-restore = mkDefault cfg.liveRestore; runtimes = mkIf cfg.enableNvidia { nvidia = { - path = "${pkgs.nvidia-docker}/bin/nvidia-container-runtime"; + # Use the legacy nvidia-container-runtime wrapper to allow + # the `--runtime=nvidia` approach to expose + # GPU's. Starting with Docker > 25, CDI can be used + # instead, removing the need for runtime wrappers. + path = lib.getExe' pkgs.nvidia-docker "nvidia-container-runtime.legacy"; }; }; }; diff --git a/nixos/modules/virtualisation/podman/default.nix b/nixos/modules/virtualisation/podman/default.nix index d0f4ac7f66da..bc77292ffee9 100644 --- a/nixos/modules/virtualisation/podman/default.nix +++ b/nixos/modules/virtualisation/podman/default.nix @@ -84,7 +84,7 @@ in description = '' **Deprecated**, please use hardware.nvidia-container-toolkit.enable instead. - Enable use of NVidia GPUs from within podman containers. + Enable use of Nvidia GPUs from within podman containers. ''; }; @@ -170,7 +170,7 @@ in lib.mkIf cfg.enable { warnings = lib.optionals cfg.enableNvidia [ '' - You have set virtualisation.podman.enableNvidia. This option is deprecated, please set virtualisation.containers.cdi.dynamic.nvidia.enable instead. + You have set virtualisation.podman.enableNvidia. This option is deprecated, please set hardware.nvidia-container-toolkit.enable instead. '' ]; @@ -189,11 +189,6 @@ in enable = true; # Enable common /etc/containers configuration containersConf.settings = { network.network_backend = "netavark"; - } // lib.optionalAttrs cfg.enableNvidia { - engine = { - conmon_env_vars = [ "PATH=${lib.makeBinPath [ pkgs.nvidia-podman ]}" ]; - runtimes.nvidia = [ "${pkgs.nvidia-podman}/bin/nvidia-container-runtime" ]; - }; }; }; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index dfedc0ef552f..8a1512d7a266 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -546,6 +546,7 @@ in { lomiri-camera-app = runTest ./lomiri-camera-app.nix; lomiri-clock-app = runTest ./lomiri-clock-app.nix; lomiri-filemanager-app = runTest ./lomiri-filemanager-app.nix; + lomiri-gallery-app = runTest ./lomiri-gallery-app.nix; lomiri-system-settings = handleTest ./lomiri-system-settings.nix {}; lorri = handleTest ./lorri/default.nix {}; ly = handleTest ./ly.nix {}; diff --git a/nixos/tests/kanidm-provisioning.nix b/nixos/tests/kanidm-provisioning.nix index c96e9647b411..3bfdce6c912c 100644 --- a/nixos/tests/kanidm-provisioning.nix +++ b/nixos/tests/kanidm-provisioning.nix @@ -4,6 +4,13 @@ import ./make-test-python.nix ( certs = import ./common/acme/server/snakeoil-certs.nix; serverDomain = certs.domain; + # copy certs to store to work around mount namespacing + certsPath = pkgs.runCommandNoCC "snakeoil-certs" { } '' + mkdir $out + cp ${certs."${serverDomain}".cert} $out/snakeoil.crt + cp ${certs."${serverDomain}".key} $out/snakeoil.key + ''; + provisionAdminPassword = "very-strong-password-for-admin"; provisionIdmAdminPassword = "very-strong-password-for-idm-admin"; provisionIdmAdminPassword2 = "very-strong-alternative-password-for-idm-admin"; @@ -23,8 +30,8 @@ import ./make-test-python.nix ( domain = serverDomain; bindaddress = "[::]:443"; ldapbindaddress = "[::1]:636"; - tls_chain = certs."${serverDomain}".cert; - tls_key = certs."${serverDomain}".key; + tls_chain = "${certsPath}/snakeoil.crt"; + tls_key = "${certsPath}/snakeoil.key"; }; # So we can check whether provisioning did what we wanted enableClient = true; diff --git a/nixos/tests/kanidm.nix b/nixos/tests/kanidm.nix index a2f4b98a728c..7e2fce20857a 100644 --- a/nixos/tests/kanidm.nix +++ b/nixos/tests/kanidm.nix @@ -6,6 +6,13 @@ import ./make-test-python.nix ({ pkgs, ... }: testCredentials = { password = "Password1_cZPEwpCWvrReripJmAZdmVIZd8HHoHcl"; }; + + # copy certs to store to work around mount namespacing + certsPath = pkgs.runCommandNoCC "snakeoil-certs" { } '' + mkdir $out + cp ${certs."${serverDomain}".cert} $out/snakeoil.crt + cp ${certs."${serverDomain}".key} $out/snakeoil.key + ''; in { name = "kanidm"; @@ -19,8 +26,8 @@ import ./make-test-python.nix ({ pkgs, ... }: domain = serverDomain; bindaddress = "[::]:443"; ldapbindaddress = "[::1]:636"; - tls_chain = certs."${serverDomain}".cert; - tls_key = certs."${serverDomain}".key; + tls_chain = "${certsPath}/snakeoil.crt"; + tls_key = "${certsPath}/snakeoil.key"; }; }; diff --git a/nixos/tests/lomiri-gallery-app.nix b/nixos/tests/lomiri-gallery-app.nix new file mode 100644 index 000000000000..d8cf7466656a --- /dev/null +++ b/nixos/tests/lomiri-gallery-app.nix @@ -0,0 +1,156 @@ +{ lib, ... }: +{ + name = "lomiri-gallery-app-standalone"; + meta.maintainers = lib.teams.lomiri.members; + + nodes.machine = + { config, pkgs, ... }: + { + imports = [ ./common/x11.nix ]; + + services.xserver.enable = true; + + environment = { + systemPackages = + with pkgs; + [ + ffmpeg # make a video from the image + (imagemagick.override { ghostscriptSupport = true; }) # example image creation + mpv # URI dispatching for video support + xdotool # mouse movement + ] + ++ (with pkgs.lomiri; [ + suru-icon-theme + lomiri-gallery-app + lomiri-thumbnailer # finds new images & generates thumbnails + ]); + variables = { + UITK_ICON_THEME = "suru"; + }; + }; + + i18n.supportedLocales = [ "all" ]; + + fonts = { + packages = with pkgs; [ + # Intended font & helps with OCR + ubuntu-classic + ]; + }; + }; + + enableOCR = true; + + testScript = + let + imageLabel = "Image"; + in + '' + machine.wait_for_x() + + with subtest("lomiri gallery launches"): + machine.succeed("lomiri-gallery-app >&2 &") + machine.sleep(2) + machine.wait_for_text(r"(Albums|Events|Photos)") + machine.screenshot("lomiri-gallery_open") + + machine.succeed("pkill -f lomiri-gallery-app") + + machine.succeed("mkdir /root/Pictures /root/Videos") + # Setup example data, OCR-friendly: + # - White square, black text + # - uppercase extension + machine.succeed("magick -size 500x500 -background white -fill black canvas:white -pointsize 70 -annotate +100+300 '${imageLabel}' /root/Pictures/output.PNG") + + # Different image formats + machine.succeed("magick /root/Pictures/output.PNG /root/Pictures/output.JPG") + machine.succeed("magick /root/Pictures/output.PNG /root/Pictures/output.BMP") + machine.succeed("magick /root/Pictures/output.PNG /root/Pictures/output.GIF") + + # Video for dispatching + machine.succeed("ffmpeg -loop 1 -r 1 -i /root/Pictures/output.PNG -t 100 -pix_fmt yuv420p /root/Videos/output.MP4") + + with subtest("lomiri gallery handles files"): + machine.succeed("lomiri-gallery-app >&2 &") + machine.sleep(2) + machine.wait_for_text(r"(Albums|Events|Photos|${imageLabel})") + + machine.succeed("xdotool mousemove 30 40 click 1") # burger menu for categories + machine.sleep(2) + machine.succeed("xdotool mousemove 30 180 click 1") # photos + machine.sleep(2) + machine.wait_for_text("${imageLabel}") # should see thumbnail of at least one of them + machine.screenshot("lomiri-gallery_photos") + + machine.succeed("xdotool mousemove 80 140 click 1") # select newest one + machine.sleep(2) + machine.succeed("xdotool mousemove 80 140 click 1") # enable top-bar + machine.sleep(2) + + with subtest("lomiri gallery handles mp4"): + machine.succeed("xdotool mousemove 870 50 click 1") # open media information + machine.sleep(2) + machine.wait_for_text("MP4") # make sure we're looking at the right file + machine.screenshot("lomiri-gallery_mp4_info") + machine.send_key("esc") + + machine.wait_for_text("${imageLabel}") # make sure thumbnail rendering worked + + machine.succeed("xdotool mousemove 450 350 click 1") # dispatch to system's video handler + machine.wait_until_succeeds("pgrep -u root -f mpv") # wait for video to start + machine.sleep(10) + machine.succeed("pgrep -u root -f mpv") # should still be playing + machine.screenshot("lomiri-gallery_mp4_dispatch") + + machine.send_key("q") + machine.wait_until_fails("pgrep mpv") # wait for video to stop + + machine.send_key("right") + + with subtest("lomiri gallery handles gif"): + machine.succeed("xdotool mousemove 870 50 click 1") # open media information + machine.sleep(2) + machine.wait_for_text("GIF") # make sure we're looking at the right file + machine.screenshot("lomiri-gallery_gif_info") + machine.send_key("esc") + + machine.wait_for_text("${imageLabel}") # make sure media shows fine + machine.send_key("right") + + with subtest("lomiri gallery handles bmp"): + machine.succeed("xdotool mousemove 840 50 click 1") # open media information (extra icon, different location) + machine.sleep(2) + machine.wait_for_text("BMP") # make sure we're looking at the right file + machine.screenshot("lomiri-gallery_bmp_info") + machine.send_key("esc") + + machine.wait_for_text("${imageLabel}") # make sure media shows fine + machine.send_key("right") + + with subtest("lomiri gallery handles jpg"): + machine.succeed("xdotool mousemove 840 50 click 1") # open media information (extra icon, different location) + machine.sleep(2) + machine.wait_for_text("JPG") # make sure we're looking at the right file + machine.screenshot("lomiri-gallery_jpg_info") + machine.send_key("esc") + + machine.wait_for_text("${imageLabel}") # make sure media shows fine + machine.send_key("right") + + with subtest("lomiri gallery handles png"): + machine.succeed("xdotool mousemove 840 50 click 1") # open media information (extra icon, different location) + machine.sleep(2) + machine.wait_for_text("PNG") # make sure we're looking at the right file + machine.screenshot("lomiri-gallery_png_info") + machine.send_key("esc") + + machine.wait_for_text("${imageLabel}") # make sure media shows fine + + machine.succeed("pkill -f lomiri-gallery-app") + + with subtest("lomiri gallery localisation works"): + machine.succeed("env LANG=de_DE.UTF-8 lomiri-gallery-app >&2 &") + machine.wait_for_text(r"(Alben|Ereignisse|Fotos)") + machine.screenshot("lomiri-gallery_localised") + ''; +} diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 117130acee45..089aefcea4e8 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -13658,6 +13658,18 @@ final: prev: meta.homepage = "https://github.com/ludovicchabant/vim-gutentags/"; }; + vim-habamax = buildVimPlugin { + pname = "vim-habamax"; + version = "2024-01-22"; + src = fetchFromGitHub { + owner = "habamax"; + repo = "vim-habamax"; + rev = "8b4e045b711c7e90235a601ba2a923cdfacb2f46"; + sha256 = "02973qssq450d4411zjscsjvwz4fc2lpqvimah06k87skp8inp47"; + }; + meta.homepage = "https://github.com/habamax/vim-habamax/"; + }; + vim-hardtime = buildVimPlugin { pname = "vim-hardtime"; version = "2022-05-06"; diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index 5874f08f2f24..6862fb28c563 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -1151,6 +1151,7 @@ https://github.com/mhinz/vim-grepper/,, https://github.com/lifepillar/vim-gruvbox8/,, https://github.com/brennanfee/vim-gui-position/,, https://github.com/ludovicchabant/vim-gutentags/,, +https://github.com/habamax/vim-habamax/,HEAD, https://github.com/takac/vim-hardtime/,, https://github.com/chkno/vim-haskell-module-name/,, https://github.com/enomsg/vim-haskellConcealPlus/,, diff --git a/pkgs/applications/misc/chatblade/default.nix b/pkgs/applications/misc/chatblade/default.nix index a8d252adfb7d..5105abd271c6 100644 --- a/pkgs/applications/misc/chatblade/default.nix +++ b/pkgs/applications/misc/chatblade/default.nix @@ -2,12 +2,12 @@ python3Packages.buildPythonApplication rec { pname = "chatblade"; - version = "0.4.0"; + version = "0.6.2"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-AjE+1MkSkZOtEUPKEPBKQ3n+aOB8cwsorBpL5skNskU="; + hash = "sha256-N4YzXOlD1ULhiHrqA6CLOwBStQSEbz8yqtOt5mCRWLQ="; }; doCheck = false; # there are no tests @@ -28,6 +28,7 @@ python3Packages.buildPythonApplication rec { openai platformdirs pygments + pylatexenc pyyaml regex requests diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix index a574520a5af6..cded819dbb5b 100644 --- a/pkgs/applications/misc/nut/default.nix +++ b/pkgs/applications/misc/nut/default.nix @@ -7,6 +7,7 @@ , freeipmi , gd , i2c-tools +, libgpiod_1 , libmodbus , libtool , libusb1 @@ -23,11 +24,11 @@ stdenv.mkDerivation rec { pname = "nut"; - version = "2.8.0"; + version = "2.8.2"; src = fetchurl { url = "https://networkupstools.org/source/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz"; - sha256 = "sha256-w+WnCNp5e3xwtlPTexIGoAD8tQO4VRn+TN9jU/eSv+U="; + sha256 = "sha256-5LSwy+fdObqQl75/fXh7sv/74132Tf9Ttf45PWWcWX0="; }; patches = [ @@ -42,6 +43,7 @@ stdenv.mkDerivation rec { src = ./hardcode-paths.patch; avahi = "${avahi}/lib"; freeipmi = "${freeipmi}/lib"; + libgpiod = "${libgpiod_1}/lib"; libusb = "${libusb1}/lib"; neon = "${neon}/lib"; libmodbus = "${libmodbus}/lib"; @@ -49,7 +51,7 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ neon libusb1 openssl udev avahi freeipmi libmodbus libtool i2c-tools net-snmp gd ]; + buildInputs = [ neon libusb1 openssl udev avahi freeipmi libgpiod_1 libmodbus libtool i2c-tools net-snmp gd ]; nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ]; @@ -83,9 +85,6 @@ stdenv.mkDerivation rec { substituteInPlace $out/lib/systemd/system/nut-driver-enumerator.path \ --replace "$out/etc/ups.conf" "/etc/nut/ups.conf" - # we don't need init.d scripts - rm -r $out/share/solaris-init - # Suspicious/overly broad rule, remove it until we know better rm $out/etc/udev/rules.d/52-nut-ipmipsu.rules ''; diff --git a/pkgs/applications/misc/nut/hardcode-paths.patch b/pkgs/applications/misc/nut/hardcode-paths.patch index a58d402a2058..2a85644358c9 100644 --- a/pkgs/applications/misc/nut/hardcode-paths.patch +++ b/pkgs/applications/misc/nut/hardcode-paths.patch @@ -1,15 +1,16 @@ --- a/common/common.c +++ b/common/common.c -@@ -991,6 +991,12 @@ ssize_t select_write(const int fd, const void *buf, const size_t buflen, const t +@@ -1990,6 +1990,13 @@ ssize_t select_write(serial_handler_t *fd, const void *buf, const size_t buflen, * communications media and/or vendor protocol. */ - static const char * search_paths[] = { + static const char * search_paths_builtin[] = { + "@avahi@", + "@freeipmi@", ++ "@libgpiod@", + "@libusb@", + "@neon@", + "@libmodbus@", + "@netsnmp@", /* Use the library path (and bitness) provided during ./configure first */ LIBDIR, - "/usr"LIBDIR, + "/usr"LIBDIR, /* Note: this can lead to bogus strings like */ diff --git a/pkgs/applications/networking/browsers/floorp/default.nix b/pkgs/applications/networking/browsers/floorp/default.nix index b64ce1fdf72c..56f7efb46a61 100644 --- a/pkgs/applications/networking/browsers/floorp/default.nix +++ b/pkgs/applications/networking/browsers/floorp/default.nix @@ -8,7 +8,7 @@ ((buildMozillaMach rec { pname = "floorp"; - packageVersion = "11.16.0"; + packageVersion = "11.17.5"; applicationName = "Floorp"; binaryName = "floorp"; branding = "browser/branding/official"; @@ -16,20 +16,21 @@ allowAddonSideload = true; # Must match the contents of `browser/config/version.txt` in the source tree - version = "115.15.0"; + version = "128.1.0"; src = fetchFromGitHub { owner = "Floorp-Projects"; repo = "Floorp"; fetchSubmodules = true; rev = "v${packageVersion}"; - hash = "sha256-bmB88EIc5S/EYZXiQ5Dc+LjcGB4dlwKRBBV0T0ln88E="; + hash = "sha256-8uONEMQI801c9txDa1ZmHQE8xQCViAJbTkxtgYRmUDE="; }; extraConfigureFlags = [ "--with-app-name=${pname}" "--with-app-basename=${applicationName}" "--with-unsigned-addon-scopes=app,system" + "--enable-proxy-bypass-protection" ]; extraPostPatch = '' @@ -64,7 +65,6 @@ enableOfficialBranding = false; googleAPISupport = true; mlsAPISupport = true; - python3 = python311; }).overrideAttrs (prev: { MOZ_DATA_REPORTING = ""; MOZ_TELEMETRY_REPORTING = ""; diff --git a/pkgs/applications/science/misc/sasview/xhtml2pdf.nix b/pkgs/applications/science/misc/sasview/xhtml2pdf.nix deleted file mode 100644 index b7ace57d74af..000000000000 --- a/pkgs/applications/science/misc/sasview/xhtml2pdf.nix +++ /dev/null @@ -1,33 +0,0 @@ -{lib, fetchPypi, buildPythonPackage, html5lib, httplib2, nose, pillow, pypdf2, reportlab}: - -let - #xhtml2pdf specifically requires version "1.0b10" of html5lib - html5 = html5lib.overrideAttrs( oldAttrs: rec { - name = "${oldAttrs.pname}-${version}"; - version = "1.0b10"; - src = oldAttrs.src.override { - inherit version; - sha256 = "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"; - }; - }); -in - -buildPythonPackage rec { - pname = "xhtml2pdf"; - version = "0.2.1"; - - buildInputs = [html5]; - propagatedBuildInputs = [httplib2 nose pillow pypdf2 reportlab html5]; - - src = fetchPypi { - inherit pname version; - sha256 = "1n9r8zdk9gc2x539fq60bhszmd421ipj8g78zmsn3njvma1az9k1"; - }; - - meta = { - description = "Pdf converter for the ReportLab Toolkit"; - homepage = "https://github.com/xhtml2pdf/xhtml2pdf"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ rprospero ]; - }; -} diff --git a/pkgs/applications/version-management/stgit/default.nix b/pkgs/applications/version-management/stgit/default.nix index c572c2652f23..0a498c597353 100644 --- a/pkgs/applications/version-management/stgit/default.nix +++ b/pkgs/applications/version-management/stgit/default.nix @@ -18,15 +18,15 @@ rustPlatform.buildRustPackage rec { pname = "stgit"; - version = "2.4.9"; + version = "2.4.10"; src = fetchFromGitHub { owner = "stacked-git"; repo = "stgit"; rev = "v${version}"; - hash = "sha256-b8uzekKnNAJGeDYI2puHUaxY6K0s5tWxAWGpufJi/jk="; + hash = "sha256-3z0MwqE7+jEuWK1/OUGDolUWzi9soKWvVtlhyA9zJEA="; }; - cargoHash = "sha256-0bbOAo48xRiCyivO3fuThXAIEFgFbxh6ZtFOPikZi88="; + cargoHash = "sha256-9cfgKOIxnh1YLeUVLFnRQz6PqeLrz/6Sc2QybCXo6/w="; nativeBuildInputs = [ pkg-config installShellFiles makeWrapper asciidoc xmlto docbook_xsl diff --git a/pkgs/applications/video/simplescreenrecorder/default.nix b/pkgs/applications/video/simplescreenrecorder/default.nix index 4e78ef877492..9b503abab6a1 100644 --- a/pkgs/applications/video/simplescreenrecorder/default.nix +++ b/pkgs/applications/video/simplescreenrecorder/default.nix @@ -1,16 +1,16 @@ -{ lib, stdenv, mkDerivation, fetchFromGitHub, alsa-lib, ffmpeg_4, libjack2, libX11, libXext, libXinerama, qtx11extras +{ lib, stdenv, mkDerivation, fetchFromGitHub, alsa-lib, ffmpeg_7, libjack2, libX11, libXext, libXinerama, qtx11extras , libXfixes, libGLU, libGL, pkg-config, libpulseaudio, libv4l, qtbase, qttools, cmake, ninja, nix-update-script }: mkDerivation rec { pname = "simplescreenrecorder"; - version = "0.4.4"; + version = "0.4.4-unstable-2024-08-13"; src = fetchFromGitHub { owner = "MaartenBaert"; repo = "ssr"; - rev = version; - sha256 = "sha256-cVjQmyk+rCqmDJzdnDk7bQ8kpyD3HtTw3wLVx2thHok="; + rev = "4e3ba13dd212fc4213fe0911f371bc7d34033b8d"; + hash = "sha256-jBZkyrZOrUljWgO8U4SZOTCu3sOm83unQ7vyv+KkAuE="; }; cmakeFlags = [ @@ -29,7 +29,7 @@ mkDerivation rec { nativeBuildInputs = [ pkg-config cmake ninja ]; buildInputs = [ - alsa-lib ffmpeg_4 libjack2 libX11 libXext libXfixes libXinerama libGLU libGL + alsa-lib ffmpeg_7 libjack2 libX11 libXext libXfixes libXinerama libGLU libGL libpulseaudio libv4l qtbase qttools qtx11extras ]; diff --git a/pkgs/by-name/co/compose2nix/package.nix b/pkgs/by-name/co/compose2nix/package.nix new file mode 100644 index 000000000000..3b39daed89be --- /dev/null +++ b/pkgs/by-name/co/compose2nix/package.nix @@ -0,0 +1,37 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + testers, + compose2nix, +}: + +buildGoModule rec { + pname = "compose2nix"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "aksiksi"; + repo = "compose2nix"; + rev = "v${version}"; + hash = "sha256-+rvjQzfh8lYdJEYwODaRS7fA7Tm/G2ONFvDa1kVG++8"; + }; + + vendorHash = "sha256-5DTPG4FiSWguTmcVmys64Y1fXJHlSI/1qj1VEBJomNk="; + + passthru.tests = { + version = testers.testVersion { + package = compose2nix; + version = "compose2nix v${version}"; + }; + }; + + meta = { + homepage = "https://github.com/aksiksi/compose2nix"; + changelog = "https://github.com/aksiksi/compose2nix/releases/tag/${src.rev}"; + description = "Generate a NixOS config from a Docker Compose project"; + license = lib.licenses.mit; + mainProgram = "compose2nix"; + maintainers = with lib.maintainers; [ aksiksi ]; + }; +} diff --git a/pkgs/by-name/cu/cups-idprt-barcode/package.nix b/pkgs/by-name/cu/cups-idprt-barcode/package.nix new file mode 100644 index 000000000000..1f9bb0b168f9 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-barcode/package.nix @@ -0,0 +1,52 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-barcode"; + version = "1.2.1"; + + src = fetchurl { + name = "idprt_label_printer_linux_driver.zip"; # This is not the original name, but there was debate about whether rec or finalAttrs should be used, so I just renamed it + url = "https://www.idprt.com/prt_v2/files/down_file/id/265/fid/600.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-jp8DDaTmCgNrHCJSSz1K3xDcSB8dQm6i1pICaMrBFaQ="; + }; + + buildInputs = [ cups ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS drivers for iDPRT barcode printers (iD2P, iD2X, iD4P, iD4S, iE2P, iE2X, iE4P, iE4S, iT4B, iT4E, iT4P, iT4S, iT4X, iX4E, iX4L, iX4P, iX4E, iX6P)"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +} diff --git a/pkgs/by-name/cu/cups-idprt-mt888/package.nix b/pkgs/by-name/cu/cups-idprt-mt888/package.nix new file mode 100644 index 000000000000..27441a467b30 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-mt888/package.nix @@ -0,0 +1,52 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-mt888"; + version = "1.2.0"; + + src = fetchurl { + name = "idprt_mt888_printer_linux_driver.zip"; + url = "https://www.idprt.com/prt_v2/files/down_file/id/324/fid/780.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-fmKDRa6NOXMM6IuxRK8sjToGhdPiHO6ZdfUVvR1KKb0="; + }; + + buildInputs = [ cups ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS driver for the iDPRT MT888"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +} diff --git a/pkgs/by-name/cu/cups-idprt-mt890/package.nix b/pkgs/by-name/cu/cups-idprt-mt890/package.nix new file mode 100644 index 000000000000..ca3baacbcfe4 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-mt890/package.nix @@ -0,0 +1,53 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-mt890"; + version = "1.2.0"; + + src = fetchurl { + name = "idprt_mt890_printer_linux_driver.zip"; + url = "https://www.idprt.com/prt_v2/files/down_file/id/320/fid/778.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-8yH+DSPRp4mjKOXw90TiGA4OzxJKHpBUMSLh3L2njw8="; + }; + + buildInputs = [ cups ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + rm $out/share/cups/model/*.ppd~ + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS driver for the iDPRT MT890"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +} diff --git a/pkgs/by-name/cu/cups-idprt-sp900/package.nix b/pkgs/by-name/cu/cups-idprt-sp900/package.nix new file mode 100644 index 000000000000..ed07c4fc36be --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-sp900/package.nix @@ -0,0 +1,61 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + e2fsprogs, + krb5, + libxcrypt-legacy, + unzip, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "cups-idprt-sp900"; + version = "1.4.0"; + + src = fetchurl { + name = "idprt_sp900_printer_linux_driver.zip"; + url = "https://www.idprt.com/prt_v2/files/down_file/id/176/fid/498.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-+YVQTrqpi16xX+d/ulMtffpA9X7hwtWRiS/mIAw13n8="; + }; + sourceRoot = "idprt_sp900_printer_linux_driver_v${finalAttrs.version}/idprt_sp900_printer_linux_driver_v${finalAttrs.version}"; # >:| + + buildInputs = [ + cups + e2fsprogs + krb5 + libxcrypt-legacy + ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS driver for the iDPRT SP900"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +}) diff --git a/pkgs/by-name/cu/cups-idprt-tspl/package.nix b/pkgs/by-name/cu/cups-idprt-tspl/package.nix new file mode 100644 index 000000000000..60aa4c8c80d8 --- /dev/null +++ b/pkgs/by-name/cu/cups-idprt-tspl/package.nix @@ -0,0 +1,61 @@ +{ + stdenvNoCC, + lib, + fetchurl, + autoPatchelfHook, + cups, + e2fsprogs, + krb5, + libxcrypt-legacy, + unzip, +}: + +stdenvNoCC.mkDerivation { + pname = "cups-idprt-tspl"; + version = "1.4.7"; + + src = fetchurl { + name = "idprt_tspl_printer_linux_driver.zip"; # This is not the original name, but there was debate about whether rec or finalAttrs should be used, so I just renamed it + url = "https://www.idprt.com/prt_v2/files/down_file/id/283/fid/668.html"; # NOTE: This is NOT an HTML page, but a ZIP file + hash = "sha256-P3AKSqCh5onOv0itJayEJ6P5pmlkOwOh1OtUjg40BRw="; + }; + + buildInputs = [ + cups + e2fsprogs + krb5 + libxcrypt-legacy + ]; + nativeBuildInputs = [ + autoPatchelfHook + unzip + ]; + + installPhase = + let + arch = builtins.getAttr stdenvNoCC.hostPlatform.system { + x86_64-linux = "x64"; + x86-linux = "x86"; + }; + in + '' + runHook preInstall + mkdir -p $out/share/cups/model $out/lib/cups/filter + cp -r filter/${arch}/. $out/lib/cups/filter + cp -r ppd/. $out/share/cups/model + rm $out/share/cups/model/*.ppd~ + chmod +x $out/lib/cups/filter/* + runHook postInstall + ''; + + meta = { + description = "CUPS drivers for TSPL-based iDPRT thermal label printers (SP210, SP310, SP320, SP320E, SP410, SP410BT, SP420, SP450, SP460BT)"; + platforms = [ + "x86_64-linux" + "x86-linux" + ]; + license = lib.licenses.unfree; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ pandapip1 ]; + }; +} diff --git a/pkgs/by-name/de/dezoomify-rs/package.nix b/pkgs/by-name/de/dezoomify-rs/package.nix new file mode 100644 index 000000000000..d2660fff82ab --- /dev/null +++ b/pkgs/by-name/de/dezoomify-rs/package.nix @@ -0,0 +1,33 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, +}: + +rustPlatform.buildRustPackage rec { + pname = "dezoomify-rs"; + version = "2.12.4"; + + src = fetchFromGitHub { + owner = "lovasoa"; + repo = "dezoomify-rs"; + rev = "refs/tags/v${version}"; + hash = "sha256-7CRwlnIItJ89qqemkJbx5QjcLrwYrvpcjVYX5ZWP0W4="; + }; + + cargoHash = "sha256-v48eM43+/dt2M1J9yfjfTpBetv6AA2Hhzu8rrL3gojg="; + + checkFlags = [ + # Tests failing due to networking errors in Nix build environment + "--skip=local_generic_tiles" + "--skip=custom_size_local_zoomify_tiles" + ]; + + meta = { + description = "Zoomable image downloader for Google Arts & Culture, Zoomify, IIIF, and others"; + homepage = "https://github.com/lovasoa/dezoomify-rs/"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ fsagbuya ]; + mainProgram = "dezoomify-rs"; + }; +} diff --git a/pkgs/by-name/ka/kanidm/package.nix b/pkgs/by-name/ka/kanidm/package.nix index dc032583ae07..840b21b04d35 100644 --- a/pkgs/by-name/ka/kanidm/package.nix +++ b/pkgs/by-name/ka/kanidm/package.nix @@ -28,16 +28,16 @@ let in rustPlatform.buildRustPackage rec { pname = "kanidm"; - version = "1.3.2"; + version = "1.3.3"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-YFmWZlDcsSk+7EGkoK0SkAhNsrIQa55IRIVqisX3zqE="; + hash = "sha256-W5G7osV4du6w/BfyY9YrDzorcLNizRsoz70RMfO2AbY="; }; - cargoHash = "sha256-8ZENe576gqm+FkQPCgz6mScqdacHilARFWmfe+kDL2A="; + cargoHash = "sha256-gJrzOK6vPPBgsQFkKrbMql00XSfKGjgpZhYJLTURxoI="; KANIDM_BUILD_PROFILE = "release_nixos_${arch}"; @@ -110,7 +110,14 @@ rustPlatform.buildRustPackage rec { inherit (nixosTests) kanidm kanidm-provisioning; }; - updateScript = nix-update-script { }; + updateScript = nix-update-script { + # avoid spurious releases and tags such as "debs" + extraArgs = [ + "-vr" + "v(.*)" + ]; + }; + inherit enableSecretProvisioning; withSecretProvisioning = kanidm.override { enableSecretProvisioning = true; }; }; diff --git a/pkgs/by-name/me/metacubexd/package.nix b/pkgs/by-name/me/metacubexd/package.nix index 19ca8a9dd33e..0911b800ee2a 100644 --- a/pkgs/by-name/me/metacubexd/package.nix +++ b/pkgs/by-name/me/metacubexd/package.nix @@ -8,13 +8,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "metacubexd"; - version = "1.143.0"; + version = "1.146.1"; src = fetchFromGitHub { owner = "MetaCubeX"; repo = "metacubexd"; rev = "v${finalAttrs.version}"; - hash = "sha256-GHyA7VO1kfmFk0tTysrEk11bToSfbuTDvf9krO9zEqQ="; + hash = "sha256-Vm2DPdfHx0WtB8RFq0wfCvBVdGVaX6PXrN/nAtNKv1E="; }; nativeBuildInputs = [ @@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { pnpmDeps = pnpm.fetchDeps { inherit (finalAttrs) pname version src; - hash = "sha256-PZnsmpVWZpd5albzMiEvsvQb2tWlt4HB40Mwz+ZCKVU="; + hash = "sha256-G95Iu268vnYwFsbD/kTy8n/Fu5Da9qXdy3LadbrsUHc="; }; buildPhase = '' diff --git a/pkgs/by-name/nv/nvidia-container-toolkit/package.nix b/pkgs/by-name/nv/nvidia-container-toolkit/package.nix index bffa785c7c20..4fa5177d2542 100644 --- a/pkgs/by-name/nv/nvidia-container-toolkit/package.nix +++ b/pkgs/by-name/nv/nvidia-container-toolkit/package.nix @@ -3,10 +3,7 @@ , fetchFromGitLab , makeWrapper , buildGoModule -, linkFarm -, writeShellScript , formats -, containerRuntimePath ? null , configTemplate ? null , configTemplatePath ? null , libnvidia-container @@ -17,20 +14,6 @@ assert configTemplate != null -> (lib.isAttrs configTemplate && configTemplatePa assert configTemplatePath != null -> (lib.isStringLike configTemplatePath && configTemplate == null); let - isolatedContainerRuntimePath = linkFarm "isolated_container_runtime_path" [ - { - name = "runc"; - path = containerRuntimePath; - } - ]; - warnIfXdgConfigHomeIsSet = writeShellScript "warn_if_xdg_config_home_is_set" '' - set -eo pipefail - - if [ -n "$XDG_CONFIG_HOME" ]; then - echo >&2 "$(tput setaf 3)warning: \$XDG_CONFIG_HOME=$XDG_CONFIG_HOME$(tput sgr 0)" - fi - ''; - configToml = if configTemplatePath != null then configTemplatePath else (formats.toml { }).generate "config.toml" configTemplate; # From https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/03cbf9c6cd26c75afef8a2dd68e0306aace80401/Makefile#L54 @@ -48,6 +31,8 @@ buildGoModule rec { }; + outputs = [ "out" "tools" ]; + vendorHash = null; patches = [ @@ -91,14 +76,6 @@ buildGoModule rec { makeWrapper ]; - preConfigure = lib.optionalString (containerRuntimePath != null) '' - # Ensure the runc symlink isn't broken: - if ! readlink --quiet --canonicalize-existing "${isolatedContainerRuntimePath}/runc" ; then - echo "${isolatedContainerRuntimePath}/runc: broken symlink" >&2 - exit 1 - fi - ''; - checkFlags = let skippedTests = [ @@ -109,33 +86,19 @@ buildGoModule rec { in [ "-skip" "${builtins.concatStringsSep "|" skippedTests}" ]; - postInstall = lib.optionalString (containerRuntimePath != null) '' - mkdir -p $out/etc/nvidia-container-runtime + postInstall = '' + wrapProgram $out/bin/nvidia-container-runtime-hook \ + --prefix PATH : ${libnvidia-container}/bin - # nvidia-container-runtime invokes docker-runc or runc if that isn't - # available on PATH. - # - # Also set XDG_CONFIG_HOME if it isn't already to allow overriding - # configuration. This in turn allows users to have the nvidia container - # runtime enabled for any number of higher level runtimes like docker and - # podman, i.e., there's no need to have mutually exclusivity on what high - # level runtime can enable the nvidia runtime because each high level - # runtime has its own config.toml file. - wrapProgram $out/bin/nvidia-container-runtime \ - --run "${warnIfXdgConfigHomeIsSet}" \ - --prefix PATH : ${isolatedContainerRuntimePath}:${libnvidia-container}/bin \ - --set-default XDG_CONFIG_HOME $out/etc + mkdir -p $tools/bin + mv $out/bin/{containerd,crio,docker,nvidia-toolkit,toolkit} $tools/bin + '' + lib.optionalString (configTemplate != null || configTemplatePath != null) '' + mkdir -p $out/etc/nvidia-container-runtime cp ${configToml} $out/etc/nvidia-container-runtime/config.toml substituteInPlace $out/etc/nvidia-container-runtime/config.toml \ --subst-var-by glibcbin ${lib.getBin glibc} - - # See: https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/03cbf9c6cd26c75afef8a2dd68e0306aace80401/packaging/debian/nvidia-container-toolkit.postinst#L12 - ln -s $out/bin/nvidia-container-runtime-hook $out/bin/nvidia-container-toolkit - - wrapProgram $out/bin/nvidia-container-toolkit \ - --add-flags "-config ${placeholder "out"}/etc/nvidia-container-runtime/config.toml" ''; meta = with lib; { diff --git a/pkgs/by-name/nv/nvidia-container-toolkit/packages.nix b/pkgs/by-name/nv/nvidia-container-toolkit/packages.nix index c78b6b1c2834..83b62a68f241 100644 --- a/pkgs/by-name/nv/nvidia-container-toolkit/packages.nix +++ b/pkgs/by-name/nv/nvidia-container-toolkit/packages.nix @@ -1,9 +1,6 @@ { lib, newScope, - docker, - libnvidia-container, - runc, symlinkJoin, }: @@ -30,36 +27,12 @@ lib.makeScope newScope ( }; }; nvidia-container-toolkit-docker = self.callPackage ./package.nix { - containerRuntimePath = "${docker}/libexec/docker/docker"; configTemplate = self.dockerConfig; }; - podmanConfig = { - disable-require = true; - #swarm-resource = "DOCKER_RESOURCE_GPU"; - - nvidia-container-cli = { - #root = "/run/nvidia/driver"; - #path = "/usr/bin/nvidia-container-cli"; - environment = [ ]; - #debug = "/var/log/nvidia-container-runtime-hook.log"; - ldcache = "/tmp/ld.so.cache"; - load-kmods = true; - no-cgroups = true; - #user = "root:video"; - ldconfig = "@@glibcbin@/bin/ldconfig"; - }; - }; - nvidia-container-toolkit-podman = self.nvidia-container-toolkit-docker.override { - containerRuntimePath = lib.getExe runc; - - configTemplate = self.podmanConfig; - }; - nvidia-docker = symlinkJoin { name = "nvidia-docker"; paths = [ - libnvidia-container self.nvidia-docker-unwrapped self.nvidia-container-toolkit-docker ]; @@ -67,14 +40,5 @@ lib.makeScope newScope ( }; nvidia-docker-unwrapped = self.callPackage ./nvidia-docker.nix { }; - - nvidia-podman = symlinkJoin { - name = "nvidia-podman"; - paths = [ - libnvidia-container - self.nvidia-container-toolkit-podman - ]; - inherit (self.nvidia-container-toolkit-podman) meta; - }; } ) diff --git a/pkgs/by-name/qc/qcm/package.nix b/pkgs/by-name/qc/qcm/package.nix index c1aaa0e3311e..88ecd5770402 100644 --- a/pkgs/by-name/qc/qcm/package.nix +++ b/pkgs/by-name/qc/qcm/package.nix @@ -9,16 +9,16 @@ , cubeb }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "qcm"; - version = "1.0.3"; + version = "1.0.4"; src = fetchFromGitHub { owner = "hypengw"; repo = "Qcm"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; fetchSubmodules = true; - hash = "sha256-9xbAw5U4BtpupelsOzfZGosdLx06TKPTG8hhc/no3R0="; + hash = "sha256-dwzstlmGuY8oRxxO2BPXmSCSnE7Fbp+dyYVs17HUopA="; }; patches = [ ./remove_cubeb_vendor.patch ]; @@ -42,16 +42,12 @@ stdenv.mkDerivation rec { "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath cubeb.passthru.backendLibs}" ]; - postInstall = '' - rm -r $out/{include,lib/cmake} - ''; - - meta = with lib; { + meta = { description = "Unofficial Qt client for netease cloud music"; homepage = "https://github.com/hypengw/Qcm"; - license = licenses.gpl2Plus; + license = lib.licenses.gpl2Plus; mainProgram = "Qcm"; - maintainers = with maintainers; [ aleksana ]; - platforms = platforms.linux; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/by-name/re/recyclarr/001-Git-Version.patch b/pkgs/by-name/re/recyclarr/001-Git-Version.patch new file mode 100644 index 000000000000..2d43e0124a52 --- /dev/null +++ b/pkgs/by-name/re/recyclarr/001-Git-Version.patch @@ -0,0 +1,14 @@ +diff --git a/Directory.Build.props b/Directory.Build.props +index af8e3b12..07dd1898 100644 +--- a/Directory.Build.props ++++ b/Directory.Build.props +@@ -9,7 +9,7 @@ + $(MSBuildThisFileDirectory) + $(RepositoryRoot)tests\ + $(RepositoryRoot) +- ++ true + + +