From 64b9054b4e61d9611392bd5cc4f3c40956a8a802 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:12:28 +0000 Subject: [PATCH 01/13] aaphoto: drop unnecessary `rec` and inline pname in doc path - `rec` is not needed since no self-references remain in the derivation. - Use literal `aaphoto` in `$out/share/doc` instead of `${pname}` for clarity and to avoid unnecessary indirection. --- pkgs/by-name/aa/aaphoto/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/aa/aaphoto/package.nix b/pkgs/by-name/aa/aaphoto/package.nix index 1f32649b6d2a..c79507711dae 100644 --- a/pkgs/by-name/aa/aaphoto/package.nix +++ b/pkgs/by-name/aa/aaphoto/package.nix @@ -9,7 +9,7 @@ llvmPackages, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "aaphoto"; version = "0.45"; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { ]; postInstall = '' - install -Dm644 NEWS README REMARKS TODO -t $out/share/doc/${pname} + install -Dm644 NEWS README REMARKS TODO -t $out/share/doc/aaphoto ''; meta = { From e3fdcb342d0e83bf20628a7ead5b5d9fb1aec50b Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:15:32 +0000 Subject: [PATCH 02/13] acpi: use finalAttrs and modernize fetchurl - Switch from `rec` to `finalAttrs` for clearer scope hygiene. - Inline `finalAttrs.version` and literal `acpi` in the source URL. - Replace deprecated `sha256` with `hash`. --- pkgs/by-name/ac/acpi/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ac/acpi/package.nix b/pkgs/by-name/ac/acpi/package.nix index 4f4583a3d14b..d6fbf82ec640 100644 --- a/pkgs/by-name/ac/acpi/package.nix +++ b/pkgs/by-name/ac/acpi/package.nix @@ -4,13 +4,13 @@ fetchurl, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "acpi"; version = "1.8"; src = fetchurl { - url = "mirror://sourceforge/acpiclient/${version}/${pname}-${version}.tar.gz"; - sha256 = "sha256-5kxuALU815dCfqMqFgUTQlsD7U8HdzP3Hx8J/zQPIws="; + url = "mirror://sourceforge/acpiclient/${finalAttrs.version}/acpi-${finalAttrs.version}.tar.gz"; + hash = "sha256-5kxuALU815dCfqMqFgUTQlsD7U8HdzP3Hx8J/zQPIws="; }; meta = { @@ -27,4 +27,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ ]; }; -} +}) From 9c9958d0058fba00e85ddf5c77e5660390e0c374 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:23:17 +0000 Subject: [PATCH 03/13] zammad: clean up meta and rubyEnv naming - Use explicit "zammad-gems-${version}" for rubyEnv instead of relying on pname for clarity and reproducibility. - Drop `with lib;` in meta, qualify attributes explicitly: - `license = lib.licenses.agpl3Plus;` - `maintainers = with lib.maintainers; [...]` - Improves scope hygiene and consistency with Nixpkgs conventions. --- pkgs/by-name/za/zammad/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/za/zammad/package.nix b/pkgs/by-name/za/zammad/package.nix index f929e7ef5201..e50fc166d5f6 100644 --- a/pkgs/by-name/za/zammad/package.nix +++ b/pkgs/by-name/za/zammad/package.nix @@ -37,7 +37,7 @@ let }; rubyEnv = bundlerEnv { - name = "${pname}-gems-${version}"; + name = "zammad-gems-${version}"; inherit version; # Which ruby version to select: @@ -127,15 +127,15 @@ stdenvNoCC.mkDerivation { }; }; - meta = with lib; { + meta = { description = "Web-based, open source user support/ticketing solution"; homepage = "https://zammad.org"; - license = licenses.agpl3Plus; + license = lib.licenses.agpl3Plus; platforms = [ "x86_64-linux" "aarch64-linux" ]; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ taeer netali ]; From 87bc6308d377a64259903b1db6dd19c15c10c0d8 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:31:09 +0000 Subject: [PATCH 04/13] zap: refactor derivation for scope hygiene and consistency - Switch to `stdenv.mkDerivation (finalAttrs: { ... })` form for better attribute scoping. - Replace `${version}` with `${finalAttrs.version}` in `src.url`. - Use `hash` instead of deprecated `sha256`. - Inline pname in paths (`share/zap`, `bin/zap`) instead of string interpolation for clarity. - Reference `${finalAttrs.version_tag}` in wrapper script. - Qualify meta attributes explicitly: - `license = lib.licenses.asl20;` - `platforms = lib.platforms.linux;` - `maintainers = with lib.maintainers; [...]` Improves reproducibility, scope hygiene, and alignment with current Nixpkgs conventions. --- pkgs/by-name/za/zap/package.nix | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/za/zap/package.nix b/pkgs/by-name/za/zap/package.nix index 3e5e23c2c8b7..5dbf70e3a184 100644 --- a/pkgs/by-name/za/zap/package.nix +++ b/pkgs/by-name/za/zap/package.nix @@ -8,12 +8,12 @@ runtimeShell, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "zap"; version = "2.16.1"; src = fetchurl { - url = "https://github.com/zaproxy/zaproxy/releases/download/v${version}/ZAP_${version}_Linux.tar.gz"; - sha256 = "sha256-Wy64MZsIUSGm6K1Q1p1n2++MhnFm9xqTe/yIjSR6KsE="; + url = "https://github.com/zaproxy/zaproxy/releases/download/v${finalAttrs.version}/ZAP_${finalAttrs.version}_Linux.tar.gz"; + hash = "sha256-Wy64MZsIUSGm6K1Q1p1n2++MhnFm9xqTe/yIjSR6KsE="; }; desktopItems = [ @@ -44,35 +44,35 @@ stdenv.mkDerivation rec { mkdir -p $out/{bin,share} - cp -pR . "$out/share/${pname}/" + cp -pR . "$out/share/zap/" - cat >> "$out/bin/${pname}" << EOF + cat >> "$out/bin/zap" << EOF #!${runtimeShell} export PATH="${lib.makeBinPath [ jre ]}:\$PATH" export JAVA_HOME='${jre}' if ! [ -f "\$HOME/.ZAP/config.xml" ];then mkdir -p "\$HOME/.ZAP" - head -n 2 $out/share/${pname}/xml/config.xml > "\$HOME/.ZAP/config.xml" - echo "${version_tag}" >> "\$HOME/.ZAP/config.xml" - tail -n +3 $out/share/${pname}/xml/config.xml >> "\$HOME/.ZAP/config.xml" + head -n 2 $out/share/zap/xml/config.xml > "\$HOME/.ZAP/config.xml" + echo "${finalAttrs.version_tag}" >> "\$HOME/.ZAP/config.xml" + tail -n +3 $out/share/zap/xml/config.xml >> "\$HOME/.ZAP/config.xml" fi - exec "$out/share/${pname}/zap.sh" "\$@" + exec "$out/share/zap/zap.sh" "\$@" EOF - chmod u+x "$out/bin/${pname}" + chmod u+x "$out/bin/zap" runHook postInstall ''; - meta = with lib; { + meta = { homepage = "https://www.zaproxy.org/"; description = "Java application for web penetration testing"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ mog rafael ]; - platforms = platforms.linux; - license = licenses.asl20; + platforms = lib.platforms.linux; + license = lib.licenses.asl20; mainProgram = "zap"; }; -} +}) From 245d2ce76708443126d0f107632e8ca2e57d3cbb Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:33:48 +0000 Subject: [PATCH 05/13] yubikey-touch-detector: clean up source and meta attributes - Use `tag = version;` instead of `rev = version;` in `fetchFromGitHub` for clarity and correctness. - Inline pname in install paths (`share/doc/yubikey-touch-detector`, `share/licenses/yubikey-touch-detector`) instead of string interpolation. - Drop `with lib;` in `meta`, qualify attributes explicitly: - `maintainers = with lib.maintainers; [...]` - `license = lib.licenses.isc;` - `platforms = lib.platforms.linux;` Improves scope hygiene, reproducibility, and consistency with current Nixpkgs conventions. --- pkgs/by-name/yu/yubikey-touch-detector/package.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/yu/yubikey-touch-detector/package.nix b/pkgs/by-name/yu/yubikey-touch-detector/package.nix index 560de6887dad..fdd20ad21f90 100644 --- a/pkgs/by-name/yu/yubikey-touch-detector/package.nix +++ b/pkgs/by-name/yu/yubikey-touch-detector/package.nix @@ -16,7 +16,7 @@ buildGoModule rec { src = fetchFromGitHub { owner = "maximbaz"; repo = "yubikey-touch-detector"; - rev = version; + tag = version; hash = "sha256-aHR/y8rAKS+dMvRdB3oAmOiI7hTA6qlF4Z05OjwYOO4="; }; vendorHash = "sha256-oHEcpu3QvcVC/YCtGtP7nNT9++BSU8BPT5pf8NdLrOo="; @@ -33,9 +33,9 @@ buildGoModule rec { ]; postInstall = '' - install -Dm444 -t $out/share/doc/${pname} *.{md,example} + install -Dm444 -t $out/share/doc/yubikey-touch-detector *.{md,example} - install -Dm444 -t $out/share/licenses/${pname} LICENSE + install -Dm444 -t $out/share/licenses/yubikey-touch-detector LICENSE install -Dm444 -t $out/share/icons/hicolor/128x128/apps yubikey-touch-detector.png @@ -48,12 +48,12 @@ buildGoModule rec { installManPage yubikey-touch-detector.1 ''; - meta = with lib; { + meta = { description = "Tool to detect when your YubiKey is waiting for a touch"; homepage = "https://github.com/maximbaz/yubikey-touch-detector"; - maintainers = with maintainers; [ sumnerevans ]; - license = licenses.isc; - platforms = platforms.linux; + maintainers = with lib.maintainers; [ sumnerevans ]; + license = lib.licenses.isc; + platforms = lib.platforms.linux; mainProgram = "yubikey-touch-detector"; }; } From 900624bd79a9950f1151657972eceb28efac376a Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:35:32 +0000 Subject: [PATCH 06/13] yuicompressor: refactor derivation for scope hygiene - Switch to `stdenv.mkDerivation (finalAttrs: { ... })` form for explicit attribute scoping. - Replace `${version}` and `${pname}` in `src.url` with `${finalAttrs.version}` and inline name for clarity. - Drop `with lib;` in `meta`, qualify attributes explicitly: - `sourceProvenance = with lib.sourceTypes; [...]` - `license = lib.licenses.bsd3;` - `maintainers = with lib.maintainers; [...]` - `platforms = lib.platforms.all;` Improves scope hygiene, reproducibility, and consistency with current Nixpkgs conventions. --- pkgs/by-name/yu/yuicompressor/package.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/yu/yuicompressor/package.nix b/pkgs/by-name/yu/yuicompressor/package.nix index a2d32b65fd50..1d0b8d2efb8f 100644 --- a/pkgs/by-name/yu/yuicompressor/package.nix +++ b/pkgs/by-name/yu/yuicompressor/package.nix @@ -6,12 +6,12 @@ jre, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "yuicompressor"; version = "2.4.8"; src = fetchurl { - url = "https://github.com/yui/yuicompressor/releases/download/v${version}/${pname}-${version}.jar"; + url = "https://github.com/yui/yuicompressor/releases/download/v${finalAttrs.version}/yuicompressor-${finalAttrs.version}.jar"; sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh"; }; @@ -25,13 +25,13 @@ stdenv.mkDerivation rec { "-cp $out/lib/yuicompressor.jar com.yahoo.platform.yui.compressor.YUICompressor" ''; - meta = with lib; { + meta = { description = "JavaScript and CSS minifier"; mainProgram = "yuicompressor"; homepage = "http://yui.github.io/yuicompressor/"; - sourceProvenance = with sourceTypes; [ binaryBytecode ]; - license = licenses.bsd3; - maintainers = with maintainers; [ jwiegley ]; - platforms = platforms.all; + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ jwiegley ]; + platforms = lib.platforms.all; }; -} +}) From ea21ca27d0fa46f8cb837308c854987021154ebf Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:41:39 +0000 Subject: [PATCH 07/13] _1password-cli: inline mainProgram in install and checks - Replace `${pname}` reference in error message with explicit `"1password-cli"` for clarity. - Inline `op` instead of `${mainProgram}` in: - `installPhase` binary installation - shell completion installation - `versionCheckProgram` - Ensures consistency, avoids unnecessary indirection, and makes the derivation easier to read and maintain. --- pkgs/by-name/_1/_1password-cli/package.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/_1/_1password-cli/package.nix b/pkgs/by-name/_1/_1password-cli/package.nix index 819fa08e298b..4feb2ae02138 100644 --- a/pkgs/by-name/_1/_1password-cli/package.nix +++ b/pkgs/by-name/_1/_1password-cli/package.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation { if (builtins.elem system platforms) then sources.${system} else - throw "Source for ${pname} is not available for ${system}"; + throw "Source for 1password-cli is not available for ${system}"; nativeBuildInputs = [ installShellFiles @@ -63,23 +63,23 @@ stdenv.mkDerivation { installPhase = '' runHook preInstall - install -D ${mainProgram} $out/bin/${mainProgram} + install -D op $out/bin/op runHook postInstall ''; postInstall = '' HOME=$TMPDIR - installShellCompletion --cmd ${mainProgram} \ - --bash <($out/bin/${mainProgram} completion bash) \ - --fish <($out/bin/${mainProgram} completion fish) \ - --zsh <($out/bin/${mainProgram} completion zsh) + installShellCompletion --cmd op \ + --bash <($out/bin/op completion bash) \ + --fish <($out/bin/op completion fish) \ + --zsh <($out/bin/op completion zsh) ''; dontStrip = stdenv.hostPlatform.isDarwin; doInstallCheck = true; - versionCheckProgram = "${builtins.placeholder "out"}/bin/${mainProgram}"; + versionCheckProgram = "${builtins.placeholder "out"}/bin/op"; versionCheckProgramArg = "--version"; passthru = { From 9c8c32cca1ae37f727045281ceccd645302f0ea6 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 15:49:22 +0000 Subject: [PATCH 08/13] _1password-gui: inline pname in desktop file installation - Replace `${pname}` with explicit `1password` in desktop file installation and substitution. - Ensures consistency with upstream naming and avoids unnecessary indirection in paths and Exec entries. --- pkgs/by-name/_1/_1password-gui/linux.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/_1/_1password-gui/linux.nix b/pkgs/by-name/_1/_1password-gui/linux.nix index 6cd427c2aae9..57e3c76dea8b 100644 --- a/pkgs/by-name/_1/_1password-gui/linux.nix +++ b/pkgs/by-name/_1/_1password-gui/linux.nix @@ -109,9 +109,9 @@ stdenv.mkDerivation { cp -a * $out/share/1password # Desktop file - install -Dt $out/share/applications resources/${pname}.desktop - substituteInPlace $out/share/applications/${pname}.desktop \ - --replace-fail 'Exec=/opt/1Password/${pname}' 'Exec=${pname}' + install -Dt $out/share/applications resources/1password.desktop + substituteInPlace $out/share/applications/1password.desktop \ + --replace-fail 'Exec=/opt/1Password/1password' 'Exec=1password' '' + (lib.optionalString (polkitPolicyOwners != [ ]) '' From 28e237f3208ea829aa9c3822fe6151548b6e619d Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 17:41:04 +0000 Subject: [PATCH 09/13] zod: modernize package expression and fix pname scoping - switch `sha256` to `hash` with SRI-style value - replace interpolated `${pname}` in sub-derivations with explicit names: - zod-engine-engine - zod-engine-map_editor - zod-engine-launcher - zod-engine-assets - drop unnecessary `with lib;` in `meta` and fully qualify attributes (`lib.maintainers`, `lib.licenses`, `lib.platforms`) This improves attribute hygiene, avoids accidental pname shadowing, and aligns the package with current Nixpkgs conventions. --- pkgs/by-name/zo/zod/package.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/zo/zod/package.nix b/pkgs/by-name/zo/zod/package.nix index 1c8dab9f3a30..2626a6d18a34 100644 --- a/pkgs/by-name/zo/zod/package.nix +++ b/pkgs/by-name/zo/zod/package.nix @@ -21,7 +21,7 @@ let version = "2011-09-06"; src = fetchzip { url = "mirror://sourceforge/zod/linux_releases/zod_linux-${version}.tar.gz"; - sha256 = "017v96aflrv07g8j8zk9mq8f8rqxl5228rjff5blq8dxpsv1sx7h"; + hash = "sha256-8HQdtr69IUxXcU5mJEShHWfkEK5pfiTRO2Bn6pRJ+wQ="; }; postPatch = '' sed '1i#include ' -i zod_src/common.cpp # gcc12 @@ -50,7 +50,7 @@ let hardeningDisable NIX_LDFLAGS ; - pname = "${pname}-engine"; + pname = "zod-engine-engine"; enableParallelBuilding = true; preBuild = "cd zod_src"; installPhase = '' @@ -69,7 +69,7 @@ let hardeningDisable NIX_LDFLAGS ; - pname = "${pname}-map_editor"; + pname = "zod-engine-map_editor"; enableParallelBuilding = true; preBuild = "cd zod_src"; makeFlags = [ "map_editor" ]; @@ -88,7 +88,7 @@ let zod_engine zod_map_editor ; - pname = "${pname}-launcher"; + pname = "zod-engine-launcher"; # This is necessary because the zod_launcher has terrible fixed-width window # the Idea is to apply the scalingFactor to all positions and sizes and I tested 1,2,3 and 4 # 2,3,4 look acceptable on my 4k monitor and 1 is unreadable. @@ -109,7 +109,7 @@ let install -m755 zod_launcher $out/bin ''; }; - zod_assets = runCommandLocal "${pname}-assets" { } '' + zod_assets = runCommandLocal "zod-engine-assets" { } '' mkdir -p $out/usr/lib/commander-zod{,blank_maps} cp -r ${src}/assets $out/usr/lib/commander-zod/assets for i in ${src}/*.map ${src}/*.txt; do @@ -128,11 +128,11 @@ symlinkJoin { zod_map_editor zod_assets ]; - meta = with lib; { + meta = { description = "Multiplayer remake of ZED"; homepage = "https://zod.sourceforge.net/"; - maintainers = with maintainers; [ zeri ]; - license = licenses.gpl3Plus; # Says the website - platforms = platforms.linux; + maintainers = with lib.maintainers; [ zeri ]; + license = lib.licenses.gpl3Plus; # Says the website + platforms = lib.platforms.linux; }; } From 4a757396d8dc7f5cc65b581fb6f7c595898dc613 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 17:46:50 +0000 Subject: [PATCH 10/13] zookeeper: refactor to use finalAttrs - wrap derivation in `stdenv.mkDerivation (finalAttrs: { ... })` - replace `${pname}`/`${version}` with `${finalAttrs.version}` in `src` URL - update `meta.changelog` to interpolate `finalAttrs.version` This removes reliance on `rec` and ensures attribute references are scoped through `finalAttrs`, improving clarity and consistency with current Nixpkgs conventions. --- pkgs/by-name/zo/zookeeper/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/zo/zookeeper/package.nix b/pkgs/by-name/zo/zookeeper/package.nix index f2f20529a3a5..75ed804993b9 100644 --- a/pkgs/by-name/zo/zookeeper/package.nix +++ b/pkgs/by-name/zo/zookeeper/package.nix @@ -13,12 +13,12 @@ let # https://zookeeper.apache.org/doc/r3.9.2/zookeeperAdmin.html#sc_requiredSoftware jre = jdk11_headless; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "zookeeper"; version = "3.9.3"; src = fetchurl { - url = "mirror://apache/zookeeper/${pname}-${version}/apache-${pname}-${version}-bin.tar.gz"; + url = "mirror://apache/zookeeper/zookeeper-${finalAttrs.version}/apache-zookeeper-${finalAttrs.version}-bin.tar.gz"; hash = "sha512-1E2HDBaRZi778ai68YWckBuCDcX/Fjs26BvrJ7b7880xtfHwdWl+2q9tPnpMsMyS+STc/2SylO8T1TVYm9rxQw=="; }; @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://zookeeper.apache.org"; description = "Apache Zookeeper"; - changelog = "https://zookeeper.apache.org/doc/r${version}/releasenotes.html"; + changelog = "https://zookeeper.apache.org/doc/r${finalAttrs.version}/releasenotes.html"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ nathan-gs @@ -62,4 +62,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; }; -} +}) From eb2768b312aa4d1cb3c8029345f5c474391f96ad Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 18:22:27 +0000 Subject: [PATCH 11/13] znapzend: fix CPAN src URL and qualify meta attributes - hardcode `Mojo-Log-Clearable` in CPAN fetch URL instead of interpolating pname - drop `with lib;` in `meta` and fully qualify attributes: - `lib.licenses.gpl3` - `lib.maintainers` - `lib.platforms.all` This improves reproducibility of the CPAN dependency fetch and aligns the package with current Nixpkgs style for attribute qualification. --- pkgs/by-name/zn/znapzend/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/zn/znapzend/package.nix b/pkgs/by-name/zn/znapzend/package.nix index 3c8d4c8566f9..43ec11adbd5d 100644 --- a/pkgs/by-name/zn/znapzend/package.nix +++ b/pkgs/by-name/zn/znapzend/package.nix @@ -15,7 +15,7 @@ let pname = "Mojo-Log-Clearable"; version = "1.001"; src = fetchurl { - url = "mirror://cpan/authors/id/D/DB/DBOOK/${pname}-${version}.tar.gz"; + url = "mirror://cpan/authors/id/D/DB/DBOOK/Mojo-Log-Clearable-${version}.tar.gz"; hash = "sha256-guBqKdWemc4mC/xp77Wd7qeV2iRqY4wrQ5NRsHtsCnI="; }; buildInputs = with perl.pkgs; [ ModuleBuildTiny ]; @@ -70,14 +70,14 @@ stdenv.mkDerivation (finalAttrs: { $out/bin/znapzend --version ''; - meta = with lib; { + meta = { description = "High performance open source ZFS backup with mbuffer and ssh support"; homepage = "https://www.znapzend.org"; - license = licenses.gpl3; - maintainers = with maintainers; [ + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ otwieracz ma27 ]; - platforms = platforms.all; + platforms = lib.platforms.all; }; }) From 72750a8f4688e40f02ba29dcf6e0796dcba6b208 Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 18:46:08 +0000 Subject: [PATCH 12/13] zile: refactor to use finalAttrs - wrap derivation in `stdenv.mkDerivation (finalAttrs: { ... })` - replace `${pname}`/`${version}` with `${finalAttrs.version}` in `src` URL - update `meta.changelog` to interpolate `finalAttrs.version` - hardcode pname value in `src` URL This removes reliance on `rec` and ensures attribute references are scoped through `finalAttrs`, aligning with current Nixpkgs conventions. --- pkgs/by-name/zi/zile/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/zi/zile/package.nix b/pkgs/by-name/zi/zile/package.nix index 8278d2871aff..96162b13aca7 100644 --- a/pkgs/by-name/zi/zile/package.nix +++ b/pkgs/by-name/zi/zile/package.nix @@ -12,12 +12,12 @@ vala, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "zile"; version = "2.6.4"; src = fetchurl { - url = "mirror://gnu/zile/${pname}-${version}.tar.gz"; + url = "mirror://gnu/zile/zile-${finalAttrs.version}.tar.gz"; hash = "sha256-1dRLhctJBkPQcH4aIYbzoymYwvbquqlIFHm2XK7uV8A="; }; @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { meta = { homepage = "https://www.gnu.org/software/zile/"; - changelog = "https://git.savannah.gnu.org/cgit/zile.git/plain/NEWS?h=v${version}"; + changelog = "https://git.savannah.gnu.org/cgit/zile.git/plain/NEWS?h=v${finalAttrs.version}"; description = "Implements Lua Editors"; longDescription = '' GNU Zile is a text editor development kit, so that you can (relatively) @@ -82,4 +82,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; mainProgram = "zile"; }; -} +}) From 99fcccafc184e9db3c385c51836c56edb949598b Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Tue, 16 Sep 2025 19:05:46 +0000 Subject: [PATCH 13/13] zita-ajbridge: refactor to use finalAttrs and modernize style - wrap derivation in `stdenv.mkDerivation (finalAttrs: { ... })` - replace `${pname}-${version}` in `src` URL with explicit `zita-ajbridge-${finalAttrs.version}` - switch from `sha256` to `hash` with SRI-style value - drop `with lib;` in `meta` and fully qualify attributes: - `lib.licenses.gpl3Plus` - `lib.maintainers` - `lib.platforms.linux` This aligns the package with current Nixpkgs conventions, improves attribute hygiene, and ensures reproducibility. --- pkgs/by-name/zi/zita-ajbridge/package.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/zi/zita-ajbridge/package.nix b/pkgs/by-name/zi/zita-ajbridge/package.nix index f3b78a8204fd..bc69c540bbdb 100644 --- a/pkgs/by-name/zi/zita-ajbridge/package.nix +++ b/pkgs/by-name/zi/zita-ajbridge/package.nix @@ -8,13 +8,13 @@ zita-resampler, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "zita-ajbridge"; version = "0.8.4"; src = fetchurl { - url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2"; - sha256 = "0g5v0l0zmqh049mhv62n8s5bpm0yrlby7mkxxhs5qwadp8v4w9mw"; + url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-ajbridge-${finalAttrs.version}.tar.bz2"; + hash = "sha256-vCZONrpNcVw07H3W4xfNHtS7ikZWmA1rIgDi+gEFuzw="; }; buildInputs = [ @@ -35,11 +35,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { + meta = { description = "Connect additional ALSA devices to JACK"; homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/index.html"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ orivej ]; - platforms = platforms.linux; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ orivej ]; + platforms = lib.platforms.linux; }; -} +})