mirror of
https://github.com/NotAShelf/nix-evaluator-stats.git
synced 2026-04-13 14:53:47 +00:00
nix: initial tooling
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I5e9bfbc614604329d54240c02f620e156a6a6964
This commit is contained in:
parent
caeb4a86d4
commit
7fe980d27b
5 changed files with 102 additions and 0 deletions
43
nix/package.nix
Normal file
43
nix/package.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchPnpmDeps,
|
||||
nodejs-slim,
|
||||
pnpm,
|
||||
pnpmConfigHook,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "nix-evaluator-stats";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ../.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs-slim
|
||||
pnpm
|
||||
pnpmConfigHook # dependency resolution
|
||||
];
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs) pname src;
|
||||
hash = "sha256-CpfaUvQbvOXljCqNwyMUJNDisnlrWCHBwhmdIzjmv+c=";
|
||||
fetcherVersion = 3; # https://nixos.org/manual/nixpkgs/stable/#javascript-pnpm-fetcherVersion
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
mkdir -p $out/share/dist
|
||||
pnpm run build --outDir $out/share/dist
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Pretty visualiser for Nix evaluator stats";
|
||||
homepage = "https://github.com/notashelf/nix-evaluator-stats";
|
||||
platforms = ["x86_64-linux" "aarch64-linux"];
|
||||
license = lib.licenses.mpl20;
|
||||
maintainers = [lib.maintainers.NotAShelf];
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue