-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (58 loc) · 1.72 KB
/
Copy pathflake.nix
File metadata and controls
63 lines (58 loc) · 1.72 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
{
inputs = { };
outputs =
{ ... }:
let
forAllSystems = f: { x86_64-linux = f "x86_64-linux"; };
in
{
devShells = forAllSystems (
system:
let
pkgs = import <nixpkgs> { inherit system; };
bunScripts = pkgs.symlinkJoin {
name = "bun-scripts";
paths = map (cmd: pkgs.writeShellScriptBin cmd "bun run ${cmd} -- \"$@\"") [
"serve"
"build"
"prepare-dev"
"sync-files"
"watch"
"update-pages"
"update-scripts"
"fetch-google-reviews"
"clean"
"test"
];
};
in
{
default = pkgs.mkShell {
packages = with pkgs; [
bun
vips
stdenv.cc.cc.lib
bunScripts
];
shellHook = ''
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH"
cat <<EOF
Available commands:
serve - Start development server
build - Build the project
prepare-dev - Prepare development environment
sync-files - Synchronize files
watch - Watch for changes
update-pages - Update pages
update-scripts - Update chobble-client scripts
fetch-google-reviews - Fetch Google Maps reviews
clean - Clean build directory
test - Run tests
EOF
git pull
'';
};
}
);
};
}