dotenvx: migrate to finalAttrs

This commit is contained in:
Harinn
2026-04-23 17:25:22 +07:00
parent 7ff0f2c076
commit 5f009043f6
+5 -6
View File
@@ -3,17 +3,16 @@
buildNpmPackage,
fetchFromGitHub,
testers,
dotenvx,
}:
buildNpmPackage rec {
buildNpmPackage (finalAttrs: {
pname = "dotenvx";
version = "1.61.5";
src = fetchFromGitHub {
owner = "dotenvx";
repo = "dotenvx";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-yyAlEgIbPQocPnZvDbmK2MIYpglESkQGMYE7PmJDdEM=";
};
@@ -23,7 +22,7 @@ buildNpmPackage rec {
passthru.tests = {
version = testers.testVersion {
package = dotenvx;
package = finalAttrs.finalPackage;
# access to the home directory
command = "HOME=$TMPDIR dotenvx --version";
};
@@ -32,7 +31,7 @@ buildNpmPackage rec {
meta = {
description = "Better dotenvfrom the creator of `dotenv`";
homepage = "https://github.com/dotenvx/dotenvx";
changelog = "https://github.com/dotenvx/dotenvx/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/dotenvx/dotenvx/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
natsukium
@@ -40,4 +39,4 @@ buildNpmPackage rec {
];
mainProgram = "dotenvx";
};
}
})