Added nix flake with frontend & backend packages
This commit is contained in:
parent
3658a105b2
commit
1831ebfabf
2 changed files with 98 additions and 0 deletions
37
flake.nix
Normal file
37
flake.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
description = "Robossembler Development Environments on Nix";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=master";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; overlays = []; };
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
frontend = pkgs.writeShellApplication {
|
||||
name = "frontend";
|
||||
runtimeInputs = [ pkgs.nodejs ];
|
||||
text = ''
|
||||
cd ui && npm i && npm run dev
|
||||
'';
|
||||
};
|
||||
backend = pkgs.writeShellApplication {
|
||||
name = "frontend";
|
||||
runtimeInputs = [ pkgs.nodejs ];
|
||||
text = ''
|
||||
cd server && npm i && npm run dev
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
devShells = {
|
||||
default = pkgs.mkShell { packages = with pkgs; [ nodejs ]; };
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue