notenrechner/flake.nix

44 lines
914 B
Nix
Raw Permalink Normal View History

2025-01-28 17:56:14 +01:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
buildInputs = with pkgs; [
just
toml2json
2025-01-30 14:54:21 +01:00
nodePackages.npm
nodePackages.webpack
nodePackages.webpack-cli
entr
typescript
typescript-language-server
];
2025-01-28 17:56:14 +01:00
in
{
packages.default = pkgs.stdenv.mkDerivation {
name = "notenrechner";
src = ./.;
inherit buildInputs;
2025-01-28 17:56:14 +01:00
2025-01-30 14:54:21 +01:00
PATH = pkgs.lib.makeBinPath buildInputs;
buildPhase = ''
just build
'';
installPhase = ''
mkdir -p $out
cp dist/* $out/
'';
};
devShell = pkgs.mkShell {
inherit buildInputs;
2025-01-28 17:56:14 +01:00
};
}
);
}