-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
49 lines (42 loc) · 1.45 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
47
48
49
{
description = "Rescript bindings for ReactBootstrap";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
yarnBuild = pkgs.mkYarnPackage {
name = "rescript-react-bootstrap";
version = "0.0.1";
src = ./.;
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
nativeBuildInputs = with pkgs; [ nodejs-16_x python39 ];
# TODO: we need to build this package any way haha
meta = with pkgs.lib; {
license = licenses.mit;
maintainers = with maintainers; [ matdsoupe ];
};
};
in {
devShell = pkgs.mkShell {
name = "rescript-react-bootstrap";
buildInputs = with pkgs; with pkgs.nodePackages; [
# pacotes pro ambiente de desenvolvimento
# dev packages
nodejs-16_x
yarn
# necessário para compilar o rescript/bs-platform (temporário)
# to build rescript/bs-platform (temporary)
python39
# pacotes da aplicação (veja package.json)
# app packages (See package.json)
yarnBuild
];
shellHook = ''export PATH="./node_modules/.bin:$PATH"'';
};
});
}