depot/third_party/nixpkgs/pkgs/by-name/do/dotenvx/package.nix

41 lines
931 B
Nix
Raw Normal View History

{
lib,
buildNpmPackage,
fetchFromGitHub,
testers,
dotenvx,
}:
buildNpmPackage rec {
pname = "dotenvx";
version = "1.14.1";
src = fetchFromGitHub {
owner = "dotenvx";
repo = "dotenvx";
rev = "refs/tags/v${version}";
hash = "sha256-PdX8picIFqeZZCMP0ABoWpySERSy0leAvp0XyjTW1Rc=";
};
npmDepsHash = "sha256-lo+R0YP50FIN+syj6VqCeEBFr7EZ6NSVXAhafG5JsI0=";
dontNpmBuild = true;
passthru.tests = {
version = testers.testVersion {
package = dotenvx;
# access to the home directory
command = "HOME=$TMPDIR dotenvx --version";
};
};
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";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "dotenvx";
};
}