blog-vue/flake.nix

32 lines
831 B
Nix
Raw Normal View History

2024-07-13 22:37:36 +02:00
{
description = "My blog, now on vuejs";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (sys:
let pkgs = import nixpkgs { system = sys; };
deps = [ pkgs.nodejs ];
package = pkgs.buildNpmPackage {
name = "rachel-blog-vue";
src = ./.;
npmBuildScript = "build-only";
2024-07-13 23:36:47 +02:00
npmDepsHash = "sha256-XqMz76XxV2f/XEjP2Eh3WTHHe4VnJnC24tk1QhIvV6Q=";
2024-07-13 22:37:36 +02:00
installPhase = ''
mv ./dist $out
'';
};
in {
packages.default = package;
devShells.default = pkgs.mkShell {
2024-07-13 23:36:47 +02:00
shellHook = ''
PATH="node_modules/.bin:$PATH"
'';
2024-07-13 22:37:36 +02:00
packages = deps;
};
}
);
}