-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
46 lines (40 loc) · 1.07 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
{
description = "Flake ";
inputs = {
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
mkNodePackage = { url = "github:winston0410/mkNodePackage/develop"; };
#mkNodePackage = { url = "path:/home/hugosum/mkNodePackage"; };
};
outputs = { nixpkgs, mkNodePackage, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
defaultPackage = (mkNodePackage.lib.${system}.mkNpmPackage{
pname = "polarpool";
version = "0.2.1";
src = ./.;
buildInputs = with pkgs; [ ];
buildPhase = ''
npm run build
'';
installPhase = ''
mkdir -p "$out"
cp -r public "$out"
'';
});
in {
defaultPackage.${system} = defaultPackage;
packages.${system} = {
default = defaultPackage;
};
devShell.${system} = (({ pkgs, ... }:
pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-16_x
];
}) { inherit pkgs; });
};
}