projet-fin-etude-rapport/flake.nix

52 lines
1.2 KiB
Nix
Raw Normal View History

2023-06-06 18:47:56 +00:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2024-10-11 16:52:26 +00:00
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
2023-06-06 18:47:56 +00:00
};
2024-10-11 16:52:26 +00:00
outputs = {flake-parts, ...} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = import inputs.systems;
perSystem = {
pkgs,
system,
...
}: rec {
devShells.default = pkgs.mkShell {
packages = packages.slides.nativeBuildInputs;
};
packages.slides = pkgs.stdenvNoCC.mkDerivation rec {
name = "slides";
src = ./.; # because slides/assets is a symlink
npmRoot = "slides";
npmDeps = pkgs.fetchNpmDeps {
src = "${src}/slides";
hash = "sha256-GJ10or/LERFOsBG6CqnRFXnXSEZB7+0C5CV6t8X/Um8=";
};
nativeBuildInputs = [
pkgs.npmHooks.npmConfigHook
pkgs.nodejs
];
buildPhase = ''
cd slides
npm run build
'';
installPhase = ''
mv dist $out
'';
2023-06-06 18:47:56 +00:00
};
2024-10-11 16:52:26 +00:00
};
};
2023-06-06 18:47:56 +00:00
}