projet-probleme-inverse-3D/flake.nix

52 lines
1.1 KiB
Nix
Raw Normal View History

2023-01-19 19:15:07 +00:00
{
description = "Proj BE PI3D";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2024-10-13 17:10:31 +00:00
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
2023-01-19 19:15:07 +00:00
};
2024-10-13 17:10:31 +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 = ./docs;
npmDeps = pkgs.fetchNpmDeps {
inherit src;
hash = "sha256-3vE+KdetU4KmXJTJqpP09afvGNQhgzCobKkWwLazHKg=";
};
nativeBuildInputs = [
pkgs.npmHooks.npmConfigHook
pkgs.nodejs
2023-01-19 19:15:07 +00:00
];
2024-10-13 17:10:31 +00:00
buildPhase = ''
npm run build
'';
installPhase = ''
mv dist $out
'';
2023-01-19 19:15:07 +00:00
};
2024-10-13 17:10:31 +00:00
};
};
2023-01-19 19:15:07 +00:00
}