fix: formatting
This commit is contained in:
parent
00f4574cda
commit
d887f4b265
15
flake.nix
15
flake.nix
@ -14,6 +14,9 @@
|
|||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
pname = "trevstack";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
@ -32,10 +35,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
client = pkgs.buildNpmPackage {
|
client = pkgs.buildNpmPackage {
|
||||||
name = "client";
|
pname = "${pname}-client";
|
||||||
|
inherit version;
|
||||||
src = gitignore.lib.gitignoreSource ./client;
|
src = gitignore.lib.gitignoreSource ./client;
|
||||||
npmDepsHash = "sha256-hOmZZrCSuHyRQhG6M7Yu5uRLTdCYOL/giT4zUm9iTRE=";
|
npmDepsHash = "sha256-hOmZZrCSuHyRQhG6M7Yu5uRLTdCYOL/giT4zUm9iTRE=";
|
||||||
nodejs = pkgs.nodejs_22;
|
nodejs = pkgs.nodejs_22;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cp -r build "$out"
|
cp -r build "$out"
|
||||||
chmod -R u+w "$out"
|
chmod -R u+w "$out"
|
||||||
@ -76,7 +81,7 @@
|
|||||||
(cd "''${gitroot}/client" && npm run dev) &
|
(cd "''${gitroot}/client" && npm run dev) &
|
||||||
P2=$!
|
P2=$!
|
||||||
|
|
||||||
protobufwatch &
|
(cd "''${gitroot}" && protobufwatch) &
|
||||||
P3=$!
|
P3=$!
|
||||||
|
|
||||||
trap 'kill $P1 $P2 $P3' SIGINT SIGTERM
|
trap 'kill $P1 $P2 $P3' SIGINT SIGTERM
|
||||||
@ -109,9 +114,6 @@
|
|||||||
name = "protobufwatch";
|
name = "protobufwatch";
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
gitroot=$(git rev-parse --show-toplevel)
|
|
||||||
|
|
||||||
cd "''${gitroot}"
|
|
||||||
inotifywait -mre close_write,moved_to,create proto | while read -r _ _ basename;
|
inotifywait -mre close_write,moved_to,create proto | while read -r _ _ basename;
|
||||||
do
|
do
|
||||||
echo "file changed: $basename"
|
echo "file changed: $basename"
|
||||||
@ -125,8 +127,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
packages.default = pkgs.buildGoModule {
|
packages.default = pkgs.buildGoModule {
|
||||||
pname = "trevstack";
|
inherit pname version;
|
||||||
version = "1.0";
|
|
||||||
src = gitignore.lib.gitignoreSource ./server;
|
src = gitignore.lib.gitignoreSource ./server;
|
||||||
vendorHash = "sha256-PE9ns1W+7/ZBBxb7+96aXqBTzpDo5tGcfnCXAV8vp8E=";
|
vendorHash = "sha256-PE9ns1W+7/ZBBxb7+96aXqBTzpDo5tGcfnCXAV8vp8E=";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user