-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (54 loc) · 1.57 KB
/
Copy pathflake.nix
File metadata and controls
63 lines (54 loc) · 1.57 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
description = "Flake for packaging and developing the FSR Protocol Editors Next.js app";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {inherit system;};
nodejs = pkgs.nodejs_22;
nodePackages = pkgs.nodePackages_latest;
in {
packages.default = nodePackages.buildNodePackage rec {
pname = "fsr-protocol-editor";
version = "0.1.0";
src = ./.;
buildInputs = [pkgs.openssl];
nativeBuildInputs = [pkgs.yarn];
buildPhase = ''
npm ci --legacy-peer-deps
npm run build
'';
installPhase = ''
mkdir -p $out
cp -r . $out/
'';
meta = with pkgs.lib; {
description = "Editor for FSR Protocols build wiht Next.js";
license = licenses.mit;
platforms = platforms.unix;
};
};
devShells.default = pkgs.mkShell {
packages = [
nodejs
pkgs.yarn
pkgs.openssl
pkgs.chromium
];
shellHook = ''
export CHROMIUM_PATH=$(command -v chromium)
echo "------------------------------------------------"
echo "FSR Protocl Editor Dev Shell"
echo "------------------------------------------------"
'';
};
}
);
}