diff --git a/pkgs/by-name/np/nph/lock.json b/pkgs/by-name/np/nph/lock.json new file mode 100644 index 000000000000..28a56c2087d8 --- /dev/null +++ b/pkgs/by-name/np/nph/lock.json @@ -0,0 +1,3 @@ +{ + "depends": [] +} diff --git a/pkgs/by-name/np/nph/package.nix b/pkgs/by-name/np/nph/package.nix new file mode 100644 index 000000000000..897b84d7980a --- /dev/null +++ b/pkgs/by-name/np/nph/package.nix @@ -0,0 +1,36 @@ +{ + lib, + buildNimPackage, + fetchFromGitHub, +}: + +buildNimPackage (finalAttrs: { + pname = "nph"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "arnetheduck"; + repo = "nph"; + rev = "v${finalAttrs.version}"; + hash = "sha256-9t5VeGsxyytGdu7+Uv/J+x6bmeB5+eQapbyp30iPxqs="; + }; + + lockFile = ./lock.json; + + checkPhase = '' + runHook preCheck + + $out/bin/nph tests/before + diff tests/before tests/after -x "*.yaml" + + runHook postCheck + ''; + + meta = { + description = "Opinionated code formatter for Nim"; + homepage = "https://github.com/arnetheduck/nph"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ sigmanificient ]; + mainProgram = "nph"; + }; +})