From 2c9796c6e6bff07ef1ea14ba28bb2a0253a914d2 Mon Sep 17 00:00:00 2001 From: Leona Maroni Date: Tue, 11 Nov 2025 13:05:48 +0100 Subject: [PATCH] knot-resolver_5: modernize --- pkgs/by-name/kn/knot-resolver_5/package.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/kn/knot-resolver_5/package.nix b/pkgs/by-name/kn/knot-resolver_5/package.nix index 0a592341ac3b..20d8e1c5494f 100644 --- a/pkgs/by-name/kn/knot-resolver_5/package.nix +++ b/pkgs/by-name/kn/knot-resolver_5/package.nix @@ -33,12 +33,12 @@ let inherit (lib) optional optionals optionalString; lua = luajitPackages; - unwrapped = stdenv.mkDerivation rec { + unwrapped = stdenv.mkDerivation (finalAttrs: { pname = "knot-resolver_5"; version = "5.7.6"; src = fetchurl { - url = "https://secure.nic.cz/files/knot-resolver/${pname}-${version}.tar.xz"; + url = "https://secure.nic.cz/files/knot-resolver/knot-resolver-${finalAttrs.version}.tar.xz"; sha256 = "500ccd3a560300e547b8dc5aaff322f7c8e2e7d6f0d7ef5f36e59cb60504d674"; }; @@ -69,7 +69,7 @@ let done '' # some tests have issues with network sandboxing, apparently - + optionalString doInstallCheck '' + + optionalString finalAttrs.doInstallCheck '' echo 'os.exit(77)' > daemon/lua/trust_anchors.test/bootstrap.test.lua sed -E '/^[[:blank:]]*test_(dstaddr|headers),?$/d' -i \ tests/config/doh2.test.lua modules/http/http_doh.test.lua @@ -116,8 +116,8 @@ let "-Dmalloc=jemalloc" "--default-library=static" # not used by anyone ] - ++ optional doInstallCheck "-Dunit_tests=enabled" - ++ optional doInstallCheck "-Dconfig_tests=enabled" + ++ optional finalAttrs.doInstallCheck "-Dunit_tests=enabled" + ++ optional finalAttrs.doInstallCheck "-Dconfig_tests=enabled" ++ optional stdenv.hostPlatform.isLinux "-Dsystemd_files=enabled" # used by NixOS service #"-Dextra_tests=enabled" # not suitable as in-distro tests; many deps, too. ; @@ -153,7 +153,7 @@ let ]; mainProgram = "kresd"; }; - }; + }); wrapped-full = runCommand unwrapped.name