diff --git a/.github/workflows/periodic-merge-24h.yml b/.github/workflows/periodic-merge-24h.yml index 270283bff478..bd7aadfbade1 100644 --- a/.github/workflows/periodic-merge-24h.yml +++ b/.github/workflows/periodic-merge-24h.yml @@ -35,10 +35,6 @@ jobs: pairs: - from: master into: haskell-updates - - from: release-23.05 - into: staging-next-23.05 - - from: staging-next-23.05 - into: staging-23.05 - from: release-23.11 into: staging-next-23.11 - from: staging-next-23.11 diff --git a/doc/doc-support/lib-function-docs.nix b/doc/doc-support/lib-function-docs.nix index 8592fafbbd15..5faa99b3e89e 100644 --- a/doc/doc-support/lib-function-docs.nix +++ b/doc/doc-support/lib-function-docs.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { mkdir -p "$out" cat > "$out/index.md" << 'EOF' - ```{=include=} sections + ```{=include=} sections auto-id-prefix=auto-generated EOF ${lib.concatMapStrings ({ name, baseName ? name, description }: '' diff --git a/lib/trivial.nix b/lib/trivial.nix index b2796096e8bc..f27cfb04f074 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -189,7 +189,7 @@ in { they take effect as soon as the oldest release reaches end of life. */ oldestSupportedRelease = # Update on master only. Do not backport. - 2305; + 2311; /* Whether a feature is supported in all supported releases (at the time of release branch-off, if applicable). See `oldestSupportedRelease`. */ diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 97c1c4d50ae5..49efd60b382b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1904,6 +1904,12 @@ githubId = 1217745; name = "Aldwin Vlasblom"; }; + averagebit = { + email = "averagebit@pm.me"; + github = "averagebit"; + githubId = 97070581; + name = "averagebit"; + }; averelld = { email = "averell+nixos@rxd4.com"; github = "averelld"; diff --git a/nixos/modules/programs/nautilus-open-any-terminal.nix b/nixos/modules/programs/nautilus-open-any-terminal.nix new file mode 100644 index 000000000000..d205fb3ec916 --- /dev/null +++ b/nixos/modules/programs/nautilus-open-any-terminal.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.nautilus-open-any-terminal; +in +{ + options.programs.nautilus-open-any-terminal = { + enable = lib.mkEnableOption (lib.mdDoc "nautilus-open-any-terminal"); + + terminal = lib.mkOption { + type = with lib.types; nullOr str; + default = null; + description = lib.mdDoc '' + The terminal emulator to add to context-entry of nautilus. Supported terminal + emulators are listed in https://github.com/Stunkymonkey/nautilus-open-any-terminal#supported-terminal-emulators. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + gnome.nautilus-python + nautilus-open-any-terminal + ]; + programs.dconf = lib.optionalAttrs (cfg.terminal != null) { + enable = true; + profiles.user.databases = [{ + settings."com/github/stunkymonkey/nautilus-open-any-terminal".terminal = cfg.terminal; + lockAll = true; + }]; + }; + }; + meta = { + maintainers = with lib.maintainers; [ stunkymonkey linsui ]; + }; +} diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index 8d298de6945b..71baa2bb1852 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -1,8 +1,8 @@ -{ options, config, lib, pkgs, ... }: +{ config, lib, pkgs, ... }: let - inherit (lib) any attrValues concatMapStringsSep concatStrings - concatStringsSep flatten imap1 isList literalExpression mapAttrsToList + inherit (lib) attrValues concatMapStringsSep concatStrings + concatStringsSep flatten imap1 literalExpression mapAttrsToList mkEnableOption mkIf mkOption mkRemovedOptionModule optional optionalAttrs optionalString singleton types mkRenamedOptionModule nameValuePair mapAttrs' listToAttrs filter; @@ -14,7 +14,7 @@ let baseDir = "/run/dovecot2"; stateDir = "/var/lib/dovecot"; - sieveScriptSettings = mapAttrs' (to: from: nameValuePair "sieve_${to}" "${stateDir}/sieve/${from}") cfg.sieve.scripts; + sieveScriptSettings = mapAttrs' (to: _: nameValuePair "sieve_${to}" "${stateDir}/sieve/${to}") cfg.sieve.scripts; imapSieveMailboxSettings = listToAttrs (flatten (imap1 (idx: el: singleton { name = "imapsieve_mailbox${toString idx}_name"; diff --git a/nixos/modules/services/misc/moonraker.nix b/nixos/modules/services/misc/moonraker.nix index 4e419aafa990..f043cc83bf05 100644 --- a/nixos/modules/services/misc/moonraker.nix +++ b/nixos/modules/services/misc/moonraker.nix @@ -103,17 +103,18 @@ in { config = mkIf cfg.enable { warnings = [] - ++ optional (cfg.settings.update_manager.enable_system_updates or false) - ''Enabling update_manager is not supported on NixOS and will lead to non-removable warnings in some clients.'' - ++ optional (cfg.configDir != null) - '' - services.moonraker.configDir has been deprecated upstream and will be removed. + ++ (optional (head (cfg.settings.update_manager.enable_system_updates or [false])) '' + Enabling system updates is not supported on NixOS and will lead to non-removable warnings in some clients. + '') + ++ (optional (cfg.configDir != null) '' + services.moonraker.configDir has been deprecated upstream and will be removed. - Action: ${ - if cfg.configDir == unifiedConfigDir then "Simply remove services.moonraker.configDir from your config." - else "Move files from `${cfg.configDir}` to `${unifiedConfigDir}` then remove services.moonraker.configDir from your config." - } - ''; + Action: ${ + if cfg.configDir == unifiedConfigDir + then "Simply remove services.moonraker.configDir from your config." + else "Move files from `${cfg.configDir}` to `${unifiedConfigDir}` then remove services.moonraker.configDir from your config." + } + ''); assertions = [ { diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix index 0c7363e564dc..307414abf170 100644 --- a/nixos/modules/services/networking/kresd.nix +++ b/nixos/modules/services/networking/kresd.nix @@ -11,7 +11,7 @@ let mkListen = kind: addr: let al_v4 = builtins.match "([0-9.]+):([0-9]+)($)" addr; al_v6 = builtins.match "\\[(.+)]:([0-9]+)(%.*|$)" addr; - al_portOnly = builtins.match "([0-9]+)" addr; + al_portOnly = builtins.match "(^)([0-9]+)" addr; al = findFirst (a: a != null) (throw "services.kresd.*: incorrect address specification '${addr}'") [ al_v4 al_v6 al_portOnly ]; diff --git a/pkgs/applications/editors/aseprite/skia.nix b/pkgs/applications/editors/aseprite/skia.nix index 71fa62157d8a..03487aa8941e 100644 --- a/pkgs/applications/editors/aseprite/skia.nix +++ b/pkgs/applications/editors/aseprite/skia.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, fetchgit, python3, gn, ninja -, fontconfig, expat, icu58, libglvnd, libjpeg, libpng, libwebp, zlib +, fontconfig, expat, icu, libglvnd, libjpeg, libpng, libwebp, zlib , mesa, libX11, harfbuzzFull }: @@ -22,7 +22,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ python3 gn ninja ]; buildInputs = [ - fontconfig expat icu58 libglvnd libjpeg libpng libwebp zlib + fontconfig expat icu libglvnd libjpeg libpng libwebp zlib mesa libX11 harfbuzzFull ]; diff --git a/pkgs/applications/graphics/tev/default.nix b/pkgs/applications/graphics/tev/default.nix index 88afa4a5fbca..ff97eb65f17c 100644 --- a/pkgs/applications/graphics/tev/default.nix +++ b/pkgs/applications/graphics/tev/default.nix @@ -31,6 +31,8 @@ stdenv.mkDerivation rec { --prefix PATH ":" "${gnome.zenity}/bin" ''; + env.CXXFLAGS = "-include cstdint"; + meta = with lib; { description = "A high dynamic range (HDR) image comparison tool"; longDescription = '' diff --git a/pkgs/applications/misc/stretchly/default.nix b/pkgs/applications/misc/stretchly/default.nix index 8584dbbf1ee2..67ffdee86c98 100644 --- a/pkgs/applications/misc/stretchly/default.nix +++ b/pkgs/applications/misc/stretchly/default.nix @@ -8,19 +8,18 @@ , makeDesktopItem }: -stdenv.mkDerivation rec { - +stdenv.mkDerivation (finalAttrs: { pname = "stretchly"; - version = "1.8.1"; + version = "1.15.1"; src = fetchurl { - url = "https://github.com/hovancik/stretchly/releases/download/v${version}/stretchly-${version}.tar.xz"; - sha256 = "sha256-/v74vDGxD5iiOPeBXPAaV42JpyBjeJSO/Lk88pCkDng="; + url = "https://github.com/hovancik/stretchly/releases/download/v${finalAttrs.version}/stretchly-${finalAttrs.version}.tar.xz"; + hash = "sha256-suTH6o7vtUr2DidPXAwqrya5/WukQOFmS/34LaiWDBs="; }; icon = fetchurl { - url = "https://raw.githubusercontent.com/hovancik/stretchly/v${version}/stretchly_128x128.png"; - sha256 = "0whfg1fy2hjyk1lzpryikc1aj8agsjhfrb0bf7ggl6r9m8s1rvdl"; + url = "https://raw.githubusercontent.com/hovancik/stretchly/v${finalAttrs.version}/stretchly_128x128.png"; + hash = "sha256-tO0cNKopG/recQus7KDUTyGpApvR5/tpmF5C4V14DnI="; }; nativeBuildInputs = [ makeWrapper ]; @@ -28,14 +27,14 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - mkdir -p $out/bin $out/share/${pname}/ - mv resources/app.asar* $out/share/${pname}/ + mkdir -p $out/bin $out/share/${finalAttrs.pname}/ + mv resources/app.asar* $out/share/${finalAttrs.pname}/ mkdir -p $out/share/applications - ln -s ${desktopItem}/share/applications/* $out/share/applications/ + ln -s ${finalAttrs.desktopItem}/share/applications/* $out/share/applications/ - makeWrapper ${electron}/bin/electron $out/bin/${pname} \ - --add-flags $out/share/${pname}/app.asar + makeWrapper ${electron}/bin/electron $out/bin/${finalAttrs.pname} \ + --add-flags $out/share/${finalAttrs.pname}/app.asar runHook postInstall ''; @@ -54,9 +53,9 @@ stdenv.mkDerivation rec { }; desktopItem = makeDesktopItem { - name = pname; - exec = pname; - icon = icon; + name = finalAttrs.pname; + exec = finalAttrs.pname; + icon = finalAttrs.icon; desktopName = "Stretchly"; genericName = "Stretchly"; categories = [ "Utility" ]; @@ -77,4 +76,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ _1000101 ]; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/applications/virtualization/distrobox/always-mount-nix.patch b/pkgs/applications/virtualization/distrobox/always-mount-nix.patch new file mode 100644 index 000000000000..c5df13294e92 --- /dev/null +++ b/pkgs/applications/virtualization/distrobox/always-mount-nix.patch @@ -0,0 +1,137 @@ +diff --git a/distrobox-create b/distrobox-create +index 64e9911..136659d 100755 +--- a/distrobox-create ++++ b/distrobox-create +@@ -74,6 +74,10 @@ unshare_ipc=0 + unshare_netns=0 + unshare_process=0 + unshare_devsys=0 ++ ++self_dir="$(dirname "$(realpath "$0")")" ++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")" ++ + # Use cd + dirname + pwd so that we do not have relative paths in mount points + # We're not using "realpath" here so that symlinks are not resolved this way + # "realpath" would break situations like Nix or similar symlink based package +@@ -98,6 +102,7 @@ version="1.6.0.1" + # priority over system defaults + # leave priority to environment variables. + config_files=" ++ $nix_config_file + /usr/share/distrobox/distrobox.conf + /usr/share/defaults/distrobox/distrobox.conf + /usr/etc/distrobox/distrobox.conf +diff --git a/distrobox-enter b/distrobox-enter +index 6d8998a..bb05437 100755 +--- a/distrobox-enter ++++ b/distrobox-enter +@@ -75,10 +75,14 @@ skip_workdir=0 + verbose=0 + version="1.6.0.1" + ++self_dir="$(dirname "$(realpath "$0")")" ++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")" ++ + # Source configuration files, this is done in an hierarchy so local files have + # priority over system defaults + # leave priority to environment variables. + config_files=" ++ $nix_config_file + /usr/share/distrobox/distrobox.conf + /usr/share/defaults/distrobox/distrobox.conf + /usr/etc/distrobox/distrobox.conf +diff --git a/distrobox-generate-entry b/distrobox-generate-entry +index 3243691..6a7910a 100755 +--- a/distrobox-generate-entry ++++ b/distrobox-generate-entry +@@ -45,10 +45,14 @@ icon_default="${HOME}/.local/share/icons/terminal-distrobox-icon.svg" + verbose=0 + version="1.6.0.1" + ++self_dir="$(dirname "$(realpath "$0")")" ++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")" ++ + # Source configuration files, this is done in an hierarchy so local files have + # priority over system defaults + # leave priority to environment variables. + config_files=" ++ $nix_config_file + /usr/share/distrobox/distrobox.conf + /usr/share/defaults/distrobox/distrobox.conf + /usr/etc/distrobox/distrobox.conf +diff --git a/distrobox-list b/distrobox-list +index aaec85e..235e529 100755 +--- a/distrobox-list ++++ b/distrobox-list +@@ -44,10 +44,14 @@ verbose=0 + version="1.6.0.1" + container_manager="autodetect" + ++self_dir="$(dirname "$(realpath "$0")")" ++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")" ++ + # Source configuration files, this is done in an hierarchy so local files have + # priority over system defaults + # leave priority to environment variables. + config_files=" ++ $nix_config_file + /usr/share/distrobox/distrobox.conf + /usr/share/defaults/distrobox/distrobox.conf + /usr/etc/distrobox/distrobox.conf +diff --git a/distrobox-rm b/distrobox-rm +index 702c1dd..2e37538 100755 +--- a/distrobox-rm ++++ b/distrobox-rm +@@ -54,10 +54,14 @@ rm_home=0 + response_rm_home="N" + version="1.6.0.1" + ++self_dir="$(dirname "$(realpath "$0")")" ++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")" ++ + # Source configuration files, this is done in an hierarchy so local files have + # priority over system defaults + # leave priority to environment variables. + config_files=" ++ $nix_config_file + /usr/share/distrobox/distrobox.conf + /usr/share/defaults/distrobox/distrobox.conf + /usr/etc/distrobox/distrobox.conf +diff --git a/distrobox-stop b/distrobox-stop +index fd17cc1..e0dbc8f 100755 +--- a/distrobox-stop ++++ b/distrobox-stop +@@ -52,10 +52,14 @@ non_interactive=0 + verbose=0 + version="1.6.0.1" + ++self_dir="$(dirname "$(realpath "$0")")" ++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")" ++ + # Source configuration files, this is done in an hierarchy so local files have + # priority over system defaults + # leave priority to environment variables. + config_files=" ++ $nix_config_file + /usr/share/distrobox/distrobox.conf + /usr/share/defaults/distrobox/distrobox.conf + /usr/etc/distrobox/distrobox.conf +diff --git a/distrobox-upgrade b/distrobox-upgrade +index ab5e96f..dc8d295 100755 +--- a/distrobox-upgrade ++++ b/distrobox-upgrade +@@ -39,10 +39,14 @@ rootful=0 + verbose=0 + version="1.6.0.1" + ++self_dir="$(dirname "$(realpath "$0")")" ++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")" ++ + # Source configuration files, this is done in an hierarchy so local files have + # priority over system defaults + # leave priority to environment variables. + config_files=" ++ $nix_config_file + /usr/share/distrobox/distrobox.conf + /usr/share/defaults/distrobox/distrobox.conf + /usr/etc/distrobox/distrobox.conf diff --git a/pkgs/applications/virtualization/distrobox/default.nix b/pkgs/applications/virtualization/distrobox/default.nix index 163910237a37..912117a016ed 100644 --- a/pkgs/applications/virtualization/distrobox/default.nix +++ b/pkgs/applications/virtualization/distrobox/default.nix @@ -2,19 +2,23 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "distrobox"; - version = "1.5.0.2"; + version = "1.6.0.1"; src = fetchFromGitHub { owner = "89luca89"; - repo = finalAttrs.pname; + repo = "distrobox"; rev = finalAttrs.version; - hash = "sha256-ss8049D6n1V/gDzEMjywDnoke5s2we9j3mO8yta72UA="; + hash = "sha256-UWrXpb20IHcwadPpwbhSjvOP1MBXic5ay+nP+OEVQE4="; }; dontConfigure = true; dontBuild = true; nativeBuildInputs = [ makeWrapper ]; + + # https://github.com/89luca89/distrobox/pull/1080 + patches = [ ./always-mount-nix.patch ]; + installPhase = '' runHook preInstall @@ -30,6 +34,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { postFixup = '' wrapProgram "$out/bin/distrobox-generate-entry" \ --prefix PATH ":" ${lib.makeBinPath [ wget ]} + + mkdir -p $out/share/distrobox + echo 'container_additional_volumes="/nix:/nix"' > $out/share/distrobox/distrobox.conf ''; meta = with lib; { @@ -39,7 +46,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { forward compatibility with software and freedom to use whatever distribution you’re more comfortable with ''; - homepage = "https://distrobox.privatedns.org/"; + homepage = "https://distrobox.it/"; license = licenses.gpl3Only; platforms = platforms.linux; maintainers = with maintainers; [ atila ]; diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index f0bb04b8304f..3e0c24877fdf 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -23,6 +23,11 @@ python3.pkgs.buildPythonApplication rec { url = "https://github.com/virt-manager/virt-manager/commit/6e5c1db6b4a0af96afeb09a09fb2fc2b73308f01.patch"; hash = "sha256-zivVo6nHvfB7aHadOouQZCBXn5rY12nxFjQ4FFwjgZI="; }) + # fix test with libvirt 10 + (fetchpatch { + url = "https://github.com/virt-manager/virt-manager/commit/83fcc5b2e8f2cede84564387756fe8971de72188.patch"; + hash = "sha256-yEk+md5EkwYpP27u3E+oTJ8thgtH2Uy1x3JIWPBhqeE="; + }) ]; nativeBuildInputs = [ diff --git a/pkgs/by-name/ea/easyeasm/package.nix b/pkgs/by-name/ea/easyeasm/package.nix new file mode 100644 index 000000000000..fc15fe0ab840 --- /dev/null +++ b/pkgs/by-name/ea/easyeasm/package.nix @@ -0,0 +1,51 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, makeWrapper +, amass +, alterx +, oam-tools +, subfinder +}: + +buildGoModule rec { + pname = "easyeasm"; + version = "1.0.6"; + + src = fetchFromGitHub { + owner = "g0ldencybersec"; + repo = "EasyEASM"; + rev = "refs/tags/v${version}"; + hash = "sha256-/PhoH+5k63rJL1N3V3IL1TP1oacsBfGfVw/OueN9j8M="; + }; + + vendorHash = "sha256-g+yaVIx4jxpAQ/+WrGKxhVeliYx7nLQe/zsGpxV4Fn4="; + + nativeBuildInputs = [ + makeWrapper + ]; + + ldflags = [ + "-s" + "-w" + ]; + + postFixup = '' + wrapProgram $out/bin/easyeasm \ + --prefix PATH : "${lib.makeBinPath [ + amass + alterx + oam-tools + subfinder + ]}" + ''; + + meta = with lib; { + description = "Attack surface management tool"; + homepage = "https://github.com/g0ldencybersec/EasyEASM"; + changelog = "https://github.com/g0ldencybersec/EasyEASM/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + mainProgram = "easyeasm"; + }; +} diff --git a/pkgs/by-name/oa/oam-tools/package.nix b/pkgs/by-name/oa/oam-tools/package.nix new file mode 100644 index 000000000000..7c5d4d982749 --- /dev/null +++ b/pkgs/by-name/oa/oam-tools/package.nix @@ -0,0 +1,30 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "oam-tools"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "owasp-amass"; + repo = "oam-tools"; + rev = "refs/tags/v${version}"; + hash = "sha256-vt4V8em8Iaz3BVKIqlcAv+VIpJtD58xb3QrkIr4tYuU="; + }; + + vendorHash = "sha256-yFKYZlA06yE48Wiz0cKgD57JEREwYyYkLM1NZPV8+Xc="; + + ldflags = [ + "-s" + "-w" + ]; + + meta = with lib; { + description = "Analysis and management tools for an Open Asset Model database"; + homepage = "https://github.com/owasp-amass/oam-tools"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/by-name/qs/qsreplace/package.nix b/pkgs/by-name/qs/qsreplace/package.nix new file mode 100644 index 000000000000..a12c27e26ec5 --- /dev/null +++ b/pkgs/by-name/qs/qsreplace/package.nix @@ -0,0 +1,28 @@ +{ lib +, fetchFromGitHub +, buildGoPackage +}: + +buildGoPackage rec { + pname = "qsreplace"; + version = "0.0.3"; + + goPackagePath = "github.com/tomnomnom/qsreplace"; + + src = fetchFromGitHub { + owner = "tomnomnom"; + repo = "qsreplace"; + rev = "v${version}"; + hash = "sha256-j9bqO2gp4RUxZHGBCIxI5nA3nD1dG4nCpJ1i4TM/fbo="; + }; + + meta = with lib; { + homepage = "https://github.com/tomnomnom/qsreplace"; + description = "Accept URLs on stdin, replace all query string values with a user-supplied value"; + mainProgram = "qsreplace"; + maintainers = with maintainers; [ averagebit ]; + platforms = platforms.unix; + sourceProvenance = with sourceTypes; [ fromSource ]; + license = licenses.mit; + }; +} diff --git a/pkgs/applications/audio/qtractor/default.nix b/pkgs/by-name/qt/qtractor/package.nix similarity index 73% rename from pkgs/applications/audio/qtractor/default.nix rename to pkgs/by-name/qt/qtractor/package.nix index 71d628d322e4..a19e84467f8d 100644 --- a/pkgs/applications/audio/qtractor/default.nix +++ b/pkgs/by-name/qt/qtractor/package.nix @@ -1,4 +1,5 @@ -{ alsa-lib +{ lib +, alsa-lib , aubio , cmake , dssi @@ -15,33 +16,32 @@ , libvorbis , lilv , lv2 -, mkDerivation , opusfile , pkg-config -, qttools -, qtbase +, qt6 , rubberband , serd +, stdenv , sord , sratom -, lib , suil }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "qtractor"; - version = "0.9.25"; + version = "0.9.38"; src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; - sha256 = "sha256-cKXHH7rugTJ5D7MDJmr/fX6p209wyGMQvSLbv5T0KXU="; + url = "mirror://sourceforge/qtractor/qtractor-${version}.tar.gz"; + hash = "sha256-aAUOz9gztk9ynQYRq+mniUk++rM6Rdne9U1QM7jKPcU="; }; nativeBuildInputs = [ cmake libtool pkg-config - qttools + qt6.qttools + qt6.wrapQtAppsHook ]; buildInputs = [ @@ -61,7 +61,8 @@ mkDerivation rec { lilv lv2 opusfile - qtbase + qt6.qtbase + qt6.qtsvg rubberband serd sord @@ -73,6 +74,7 @@ mkDerivation rec { description = "Audio/MIDI multi-track sequencer"; homepage = "https://qtractor.sourceforge.io"; license = licenses.gpl2Plus; + mainProgram = "qtractor"; maintainers = with maintainers; [ goibhniu ]; platforms = platforms.linux; }; diff --git a/pkgs/by-name/yg/yggdrasil/package.nix b/pkgs/by-name/yg/yggdrasil/package.nix index 9ba083e0fb34..70e352e73092 100644 --- a/pkgs/by-name/yg/yggdrasil/package.nix +++ b/pkgs/by-name/yg/yggdrasil/package.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "yggdrasil"; - version = "0.5.4"; + version = "0.5.5"; src = fetchFromGitHub { owner = "yggdrasil-network"; repo = "yggdrasil-go"; rev = "v${version}"; - sha256 = "sha256-or+XTt8V/1BuLSJ53w1aKqJfx3Pka6VmC4TpvpP83+0="; + sha256 = "sha256-ZInSgHjur2C+G6h/VcYtlCt0YLWwMIrz84UkDBbR73s="; }; - vendorHash = "sha256-K7VJ+1x7+DgdwTjEgZ7sJ7SaCssBg+ukQupJ/1FN4F0="; + vendorHash = "sha256-Ar0mWVFgLP1eYeKalaazZLKaLMXoe2bOGYkruzaKW88="; subPackages = [ "cmd/genkeys" "cmd/yggdrasil" "cmd/yggdrasilctl" ]; diff --git a/pkgs/development/libraries/cmark/default.nix b/pkgs/development/libraries/cmark/default.nix index 830791f6fb31..23d00769ee1b 100644 --- a/pkgs/development/libraries/cmark/default.nix +++ b/pkgs/development/libraries/cmark/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "cmark"; - version = "0.30.3"; + version = "0.31.0"; src = fetchFromGitHub { owner = "commonmark"; repo = pname; rev = version; - sha256 = "sha256-/7TzaZYP8lndkfRPgCpBbazUBytVLXxqWHYktIsGox0="; + sha256 = "sha256-GBesKTp9DqoFAmCc0RB+XePvzV9g+w+oyrD1nCgyklI="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index ff40c3693fff..17875c415b14 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -114,13 +114,13 @@ stdenv.mkDerivation rec { # NOTE: You must also bump: # # SysVirt in - version = "9.10.0"; + version = "10.0.0"; src = fetchFromGitLab { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-SYk3aseaVD31rnGKj/7eoLldGbOdJfKMw4tVDjtjcwY="; + hash = "sha256-xFl8AHcbeuydWzhJNnwZ3Bd7TQiTU8hjBxaALXvcLgE="; fetchSubmodules = true; }; diff --git a/pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix b/pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix index f8daf10c3c1f..65973321f95b 100644 --- a/pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix +++ b/pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix @@ -1,29 +1,34 @@ { lib , aio-geojson-client , aiohttp -, aresponses +, aioresponses , buildPythonPackage , fetchFromGitHub , pytest-asyncio , pytestCheckHook , pytz , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "aio-geojson-geonetnz-quakes"; - version = "0.15"; - format = "setuptools"; + version = "0.16"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "exxamalte"; repo = "python-aio-geojson-geonetnz-quakes"; rev = "refs/tags/v${version}"; - hash = "sha256-/EPPEGLtiZBorZMnVg0NqwnHCbCXyZzz4449MzAYQx8="; + hash = "sha256-8OpmA3yHjUY+N5Obri4RWeuJiW916xGSWUYUgdpmjkw="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ aio-geojson-client aiohttp @@ -33,7 +38,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; nativeCheckInputs = [ - aresponses + aioresponses pytest-asyncio pytestCheckHook ]; diff --git a/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix b/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix index 89a1fd75b8f2..339481624a35 100644 --- a/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix +++ b/pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix @@ -1,29 +1,34 @@ { lib , aio-geojson-client , aiohttp -, aresponses +, aioresponses , buildPythonPackage , fetchFromGitHub , pytest-asyncio , pytestCheckHook , pytz , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "aio-geojson-usgs-earthquakes"; - version = "0.2"; - format = "setuptools"; + version = "0.3"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "exxamalte"; repo = "python-aio-geojson-usgs-earthquakes"; rev = "refs/tags/v${version}"; - hash = "sha256-ET8wcOep4tSZJXyL+XvfW2j9eKp6LrBk/g18ZlgLIzc="; + hash = "sha256-Q9vBy5R5N5ihJdSMALo88qVYcFVs2/33lYRPdLej4S8="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ aio-geojson-client aiohttp @@ -37,7 +42,7 @@ buildPythonPackage rec { ]; checkInputs = [ - aresponses + aioresponses pytest-asyncio ]; diff --git a/pkgs/development/python-modules/autopep8/default.nix b/pkgs/development/python-modules/autopep8/default.nix index 9a177d7b4936..4bfffd8a780b 100644 --- a/pkgs/development/python-modules/autopep8/default.nix +++ b/pkgs/development/python-modules/autopep8/default.nix @@ -40,6 +40,7 @@ buildPythonPackage rec { description = "A tool that automatically formats Python code to conform to the PEP 8 style guide"; homepage = "https://github.com/hhatto/autopep8"; license = licenses.mit; + mainProgram = "autopep8"; maintainers = with maintainers; [ bjornfor ]; }; } diff --git a/pkgs/development/python-modules/keyring-pass/default.nix b/pkgs/development/python-modules/keyring-pass/default.nix new file mode 100644 index 000000000000..c9ac11c9313a --- /dev/null +++ b/pkgs/development/python-modules/keyring-pass/default.nix @@ -0,0 +1,78 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, gnupg +, keyring +, pass +, poetry-core +, pythonOlder +}: +buildPythonPackage rec { + pname = "keyring-pass"; + version = "0.9.2"; + disabled = pythonOlder "3.6"; + + pyproject = true; + + src = fetchFromGitHub { + owner = "nazarewk"; + repo = "keyring_pass"; + rev = "refs/tags/v${version}"; + hash = "sha256-Sf7eDOB3prH2s6BzdBtxewSweC0ibLXVxNHBJRRaJe4="; + }; + + postPatch = '' + substituteInPlace keyring_pass/__init__.py \ + --replace 'pass_binary = "pass"' 'pass_binary = "${lib.getExe pass}"' + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + nativeCheckInputs = [ + keyring + gnupg + ]; + + checkPhase = '' + export HOME="$TMPDIR" + + # generate temporary GPG identity + cat < None: pass - def _parse(self, src: str) -> list[Token]: + def _handle_headings(self, tokens: list[Token], *, on_heading: Callable[[Token,str],None]) -> None: + # Headings in a globally numbered order + # h1 to h6 + curr_heading_pos: list[int] = [] + for token in tokens: + if token.type == "heading_open": + if token.tag not in ["h1", "h2", "h3", "h4", "h5", "h6"]: + raise RuntimeError(f"Got invalid heading tag {token.tag} in line {token.map[0] + 1 if token.map else 'NOT FOUND'}. Only h1 to h6 headings are allowed.") + + idx = int(token.tag[1:]) - 1 + + if idx >= len(curr_heading_pos): + # extend the list if necessary + curr_heading_pos.extend([0 for _i in range(idx+1 - len(curr_heading_pos))]) + + curr_heading_pos = curr_heading_pos[:idx+1] + curr_heading_pos[-1] += 1 + + + ident = ".".join(f"{a}" for a in curr_heading_pos) + on_heading(token,ident) + + + + def _parse(self, src: str, *, auto_id_prefix: None | str = None) -> list[Token]: tokens = super()._parse(src) + if auto_id_prefix: + def set_token_ident(token: Token, ident: str) -> None: + if "id" not in token.attrs: + token.attrs["id"] = f"{auto_id_prefix}-{ident}" + + self._handle_headings(tokens, on_heading=set_token_ident) + + check_structure(self._current_type[-1], tokens) for token in tokens: if not is_include(token): @@ -89,7 +121,12 @@ class BaseConverter(Converter[md.TR], Generic[md.TR]): try: self._base_paths.append(path) with open(path, 'r') as f: - tokens = self._parse(f.read()) + prefix = None + if "auto-id-prefix" in block_args: + # include the current file number to prevent duplicate ids within include blocks + prefix = f"{block_args.get('auto-id-prefix')}-{lnum}" + + tokens = self._parse(f.read(), auto_id_prefix=prefix) included.append((tokens, path)) self._base_paths.pop() except Exception as e: @@ -554,8 +591,8 @@ class HTMLConverter(BaseConverter[ManualHTMLRenderer]): infile.parent, outfile.parent) super().convert(infile, outfile) - def _parse(self, src: str) -> list[Token]: - tokens = super()._parse(src) + def _parse(self, src: str, *, auto_id_prefix: None | str = None) -> list[Token]: + tokens = super()._parse(src,auto_id_prefix=auto_id_prefix) for token in tokens: if not token.type.startswith('included_') \ or not (into := token.meta['include-args'].get('into-file')): diff --git a/pkgs/tools/nix/nixos-render-docs/src/tests/test_auto_id_prefix.py b/pkgs/tools/nix/nixos-render-docs/src/tests/test_auto_id_prefix.py new file mode 100644 index 000000000000..ab917a106443 --- /dev/null +++ b/pkgs/tools/nix/nixos-render-docs/src/tests/test_auto_id_prefix.py @@ -0,0 +1,92 @@ +from pathlib import Path + +from markdown_it.token import Token +from nixos_render_docs.manual import HTMLConverter, HTMLParameters +from nixos_render_docs.md import Converter + +auto_id_prefix="TEST_PREFIX" +def set_prefix(token: Token, ident: str) -> None: + token.attrs["id"] = f"{auto_id_prefix}-{ident}" + + +def test_auto_id_prefix_simple() -> None: + md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {}) + + src = f""" +# title + +## subtitle + """ + tokens = Converter()._parse(src) + md._handle_headings(tokens, on_heading=set_prefix) + + assert [ + {**token.attrs, "tag": token.tag} + for token in tokens + if token.type == "heading_open" + ] == [ + {"id": "TEST_PREFIX-1", "tag": "h1"}, + {"id": "TEST_PREFIX-1.1", "tag": "h2"} + ] + + +def test_auto_id_prefix_repeated() -> None: + md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {}) + + src = f""" +# title + +## subtitle + +# title2 + +## subtitle2 + """ + tokens = Converter()._parse(src) + md._handle_headings(tokens, on_heading=set_prefix) + + assert [ + {**token.attrs, "tag": token.tag} + for token in tokens + if token.type == "heading_open" + ] == [ + {"id": "TEST_PREFIX-1", "tag": "h1"}, + {"id": "TEST_PREFIX-1.1", "tag": "h2"}, + {"id": "TEST_PREFIX-2", "tag": "h1"}, + {"id": "TEST_PREFIX-2.1", "tag": "h2"}, + ] + +def test_auto_id_prefix_maximum_nested() -> None: + md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {}) + + src = f""" +# h1 + +## h2 + +### h3 + +#### h4 + +##### h5 + +###### h6 + +## h2.2 + """ + tokens = Converter()._parse(src) + md._handle_headings(tokens, on_heading=set_prefix) + + assert [ + {**token.attrs, "tag": token.tag} + for token in tokens + if token.type == "heading_open" + ] == [ + {"id": "TEST_PREFIX-1", "tag": "h1"}, + {"id": "TEST_PREFIX-1.1", "tag": "h2"}, + {"id": "TEST_PREFIX-1.1.1", "tag": "h3"}, + {"id": "TEST_PREFIX-1.1.1.1", "tag": "h4"}, + {"id": "TEST_PREFIX-1.1.1.1.1", "tag": "h5"}, + {"id": "TEST_PREFIX-1.1.1.1.1.1", "tag": "h6"}, + {"id": "TEST_PREFIX-1.2", "tag": "h2"}, + ] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 57ec68a4d442..d5de6fde68c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32390,9 +32390,7 @@ with pkgs; ht = callPackage ../applications/editors/ht { }; - xh = callPackage ../tools/networking/xh { - inherit (darwin.apple_sdk.frameworks) Security; - }; + xh = callPackage ../tools/networking/xh { }; hubstaff = callPackage ../applications/misc/hubstaff { }; @@ -34867,8 +34865,6 @@ with pkgs; qtpass = libsForQt5.callPackage ../applications/misc/qtpass { }; - qtractor = libsForQt5.callPackage ../applications/audio/qtractor { }; - quantomatic = callPackage ../applications/science/physics/quantomatic { }; quassel = libsForQt5.callPackage ../applications/networking/irc/quassel { diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 924afc1577c4..0b4118717108 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -23927,12 +23927,12 @@ with self; { SysVirt = buildPerlModule rec { pname = "Sys-Virt"; - version = "9.8.0"; + version = "10.0.0"; src = fetchFromGitLab { owner = "libvirt"; repo = "libvirt-perl"; rev = "v${version}"; - hash = "sha256-xLrqD1fFbDYS4HH85vYCeaKZeNwXQpjPXfGpJCFumg8="; + hash = "sha256-FK2SaerA/GB0ZAg/QXG9Ig1Cvpg6v9lh1sKPjYU52M8="; }; nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = [ pkgs.libvirt CPANChanges TestPod TestPodCoverage XMLXPath ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 420ce4738bf6..53f637fb4e73 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6119,6 +6119,8 @@ self: super: with self; { keyring = callPackage ../development/python-modules/keyring { }; + keyring-pass = callPackage ../development/python-modules/keyring-pass { }; + keyrings-cryptfile = callPackage ../development/python-modules/keyrings-cryptfile { }; keyrings-google-artifactregistry-auth = callPackage ../development/python-modules/keyrings-google-artifactregistry-auth { };