various: switch resholve + rec packages to finalAttrs

These likely would have been switched long ago by various automated
PRs if not for lack of support in resholve.mkDerivation.
This commit is contained in:
Travis A. Everett 2026-05-09 16:03:26 -05:00
commit 1641b0188d
13 changed files with 43 additions and 47 deletions

View file

@ -17,14 +17,14 @@
resholve,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "aaxtomp3";
version = "1.3";
src = fetchFromGitHub {
owner = "krumpetpirate";
repo = "aaxtomp3";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-7a9ZVvobWH/gPxa3cFiPL+vlu8h1Dxtcq0trm3HzlQg=";
};
@ -76,4 +76,4 @@ resholve.mkDerivation rec {
license = lib.licenses.wtfpl;
maintainers = [ ];
};
}
})

View file

@ -22,7 +22,7 @@
chrootSetprivPath ? "/usr/bin/setpriv",
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "arch-install-scripts";
version = "31";
@ -30,7 +30,7 @@ resholve.mkDerivation rec {
domain = "gitlab.archlinux.org";
owner = "archlinux";
repo = "arch-install-scripts";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-Oh1nC/gPJDDy8cXiZPbEfpwOuO+RFRcxVCZuTtB2MV8=";
};
@ -121,4 +121,4 @@ resholve.mkDerivation rec {
maintainers = with lib.maintainers; [ samlukeyes123 ];
platforms = lib.platforms.linux;
};
}
})

View file

@ -27,14 +27,14 @@
packcc,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "bats";
version = "1.12.0";
src = fetchFromGitHub {
owner = "bats-core";
repo = "bats-core";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-5VCkOzyaUOBW+HVVHDkH9oCWDI/MJW6yrLTQG60Ralk=";
};
@ -153,7 +153,7 @@ resholve.mkDerivation rec {
--suffix BATS_LIB_PATH : "$out/share/bats"
'';
inherit meta;
meta = removeAttrs finalAttrs.meta [ "position" ];
};
passthru.tests = {
@ -281,4 +281,4 @@ resholve.mkDerivation rec {
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}
})

View file

@ -8,7 +8,7 @@
which,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "dgoss";
version = goss.version;
src = goss.src;
@ -37,8 +37,8 @@ resholve.mkDerivation rec {
};
meta = {
homepage = "https://github.com/goss-org/goss/blob/v${version}/extras/dgoss/README.md";
changelog = "https://github.com/goss-org/goss/releases/tag/v${version}";
homepage = "https://github.com/goss-org/goss/blob/v${finalAttrs.version}/extras/dgoss/README.md";
changelog = "https://github.com/goss-org/goss/releases/tag/v${finalAttrs.version}";
description = "Convenience wrapper around goss that aims to bring the simplicity of goss to docker containers";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
@ -48,4 +48,4 @@ resholve.mkDerivation rec {
];
mainProgram = "dgoss";
};
}
})

View file

@ -17,13 +17,13 @@
man,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "git-ftp";
version = "1.6.0";
src = fetchFromGitHub {
owner = "git-ftp";
repo = "git-ftp";
rev = version;
rev = finalAttrs.version;
sha256 = "1hxkqf7jbrx24q18yxpnd3dxzh4xk6asymwkylp1x7zg6mcci87d";
};
@ -101,4 +101,4 @@ resholve.mkDerivation rec {
platforms = lib.platforms.unix;
mainProgram = "git-ftp";
};
}
})

View file

@ -7,16 +7,14 @@
writeText,
}:
# resholve does not yet support `finalAttrs` call pattern hence `rec`
# https://github.com/abathur/resholve/issues/107
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "nix-direnv";
version = "3.1.1";
src = fetchFromGitHub {
owner = "nix-community";
repo = "nix-direnv";
rev = version;
rev = finalAttrs.version;
hash = "sha256-AsWnRH7LAb78iFfE+ZdYyCR5AVuPloT8ZnghDXW6arY=";
};
@ -77,4 +75,4 @@ resholve.mkDerivation rec {
bbenne10
];
};
}
})

View file

@ -30,14 +30,14 @@
stateDir ? "/etc/pihole",
}:
(resholve.mkDerivation rec {
(resholve.mkDerivation (finalAttrs: {
pname = "pihole";
version = "6.4";
src = fetchFromGitHub {
owner = "pi-hole";
repo = "pi-hole";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-aBQO+wAqeuXc9ekByVFlOZQ9SBCGsozGdoS8r1qhGuk=";
};
@ -234,7 +234,7 @@
meta = {
description = "Black hole for Internet advertisements";
homepage = "https://pi-hole.net";
changelog = "https://github.com/pi-hole/pi-hole/releases/tag/v${version}";
changelog = "https://github.com/pi-hole/pi-hole/releases/tag/v${finalAttrs.version}";
license = lib.licenses.eupl12;
maintainers = with lib.maintainers; [ averyvigolo ];
platforms = lib.platforms.linux;
@ -244,7 +244,7 @@
passthru.tests = nixosTests.pihole-ftl;
passthru = { inherit stateDir; };
}).overrideAttrs
})).overrideAttrs
(old: {
# Resholve can't fix the hardcoded absolute paths, so substitute them before resholving
preFixup = ''

View file

@ -10,14 +10,14 @@
ncurses,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "shunit2";
version = "2.1.8";
src = fetchFromGitHub {
owner = "kward";
repo = "shunit2";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-IZHkgkVqzeh+eEKCDJ87sqNhSA+DU6kBCNDdQaUEeiM=";
};
@ -102,4 +102,4 @@ resholve.mkDerivation rec {
platforms = lib.platforms.unix;
mainProgram = "shunit2";
};
}
})

View file

@ -19,14 +19,12 @@
which,
}:
# resholve does not yet support `finalAttrs` call pattern hence `rec`
# https://github.com/abathur/resholve/issues/107
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "unix-privesc-check";
version = "1.4";
src = fetchurl {
url = "https://pentestmonkey.net/tools/unix-privesc-check/unix-privesc-check-${version}.tar.gz";
url = "https://pentestmonkey.net/tools/unix-privesc-check/unix-privesc-check-${finalAttrs.version}.tar.gz";
hash = "sha256-4fhef2n6ut0jdWo9dqDj2GSyHih2O2DOLmGBKQ0cGWk=";
};
@ -85,4 +83,4 @@ resholve.mkDerivation rec {
platforms = lib.platforms.unix;
license = lib.licenses.gpl2Plus;
};
}
})

View file

@ -12,14 +12,14 @@
wireguard-tools,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "wgnord";
version = "0.2.1";
src = fetchFromGitHub {
owner = "phirecc";
repo = "wgnord";
rev = version;
rev = finalAttrs.version;
hash = "sha256-26cfYXtZVQ7kIRxY6oNGCqIjdw/hjwXhVKimVgolLgk=";
};
@ -64,4 +64,4 @@ resholve.mkDerivation rec {
mainProgram = "wgnord";
platforms = lib.platforms.linux;
};
}
})

View file

@ -28,7 +28,7 @@
yadm,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "yadm";
version = "3.5.0";
@ -37,7 +37,7 @@ resholve.mkDerivation rec {
src = fetchFromGitHub {
owner = "yadm-dev";
repo = "yadm";
rev = version;
rev = finalAttrs.version;
hash = "sha256-hDo6zs70apNhKmuvR+eD51FzuTLj3SL/wHQXqLMD9QE=";
};
@ -118,7 +118,7 @@ resholve.mkDerivation rec {
};
passthru.tests = {
minimal = runCommand "${pname}-test" { } ''
minimal = runCommand "${finalAttrs.pname}-test" { } ''
export HOME=$out
${yadm}/bin/yadm init
'';
@ -133,10 +133,10 @@ resholve.mkDerivation rec {
* Provides a way to use alternate files on a specific OS or host.
* Supplies a method of encrypting confidential data so it can safely be stored in your repository.
'';
changelog = "https://github.com/yadm-dev/yadm/blob/${version}/CHANGES";
changelog = "https://github.com/yadm-dev/yadm/blob/${finalAttrs.version}/CHANGES";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ abathur ];
platforms = lib.platforms.unix;
mainProgram = "yadm";
};
}
})

View file

@ -14,14 +14,14 @@
zfs,
}:
resholve.mkDerivation rec {
resholve.mkDerivation (finalAttrs: {
pname = "zxfer";
version = "1.1.7";
src = fetchFromGitHub {
owner = "allanjude";
repo = "zxfer";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-11SQJcD3GqPYBIgaycyKkc62/diVKPuuj2Or97j+NZY=";
};
@ -80,9 +80,9 @@ resholve.mkDerivation rec {
meta = {
description = "Popular script for managing ZFS snapshot replication";
homepage = "https://github.com/allanjude/zxfer";
changelog = "https://github.com/allanjude/zxfer/releases/tag/v${version}";
changelog = "https://github.com/allanjude/zxfer/releases/tag/v${finalAttrs.version}";
license = lib.licenses.bsd2;
maintainers = [ ];
mainProgram = "zxfer";
};
}
})

View file

@ -82,7 +82,7 @@ let
];
in
rec {
module1 = resholve.mkDerivation(finalAttrs: {
module1 = resholve.mkDerivation (finalAttrs: {
pname = "testmod1";
version = "unreleased";