-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
34 lines (30 loc) · 989 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
description = "pf2e-cards";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in rec {
packages = rec {
cards = import ./. pkgs;
website = import ./website pkgs cards;
latex-check = import ./latex-check pkgs;
default = cards;
};
apps = {
default =
let websitePath = pkgs.runCommand "pf2e-website" {} ''
mkdir $out
ln -s ${packages.website} $out/pf2e-cards
''; in {
type = "app";
program = "${pkgs.writeScript "card-website" ''
#! ${pkgs.stdenv.shell}
${pkgs.nodePackages.http-server}/bin/http-server ${websitePath} "$@"
''}";
};
};
});
}