-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
85 lines (80 loc) · 2.2 KB
/
Copy pathflake.nix
File metadata and controls
85 lines (80 loc) · 2.2 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
description = "DeepAgent Code development flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forEachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
rev = self.shortRev or self.dirtyShortRev or "dirty";
in
{
devShells = forEachSystem (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
bun
nodejs_20
pkg-config
openssl
git
];
};
});
apps = forEachSystem (pkgs: {
update-hashes = {
type = "app";
program = let
script = pkgs.writeShellScriptBin "update-hashes" ''
exec ${pkgs.python3}/bin/python3 ${./nix/scripts/update-hashes.py} "$@"
'';
in "${script}/bin/update-hashes";
};
});
overlays = {
default =
final: _prev:
let
node_modules = final.callPackage ./nix/node_modules.nix {
inherit rev;
};
in
rec {
deepagent-code = final.callPackage ./nix/deepagent-code.nix {
inherit node_modules;
};
deepagent-code-desktop = final.callPackage ./nix/desktop.nix {
inherit deepagent-code;
};
};
};
packages = forEachSystem (
pkgs:
let
node_modules = pkgs.callPackage ./nix/node_modules.nix {
inherit rev;
};
in
rec {
default = deepagent-code;
deepagent-code = pkgs.callPackage ./nix/deepagent-code.nix {
inherit node_modules;
};
deepagent-code-desktop = pkgs.callPackage ./nix/desktop.nix {
inherit deepagent-code;
};
# Build with fakeHash to reveal the correct hash.
# Used by: nix run .#update-hashes
node_modules_updater = node_modules.override {
hash = pkgs.lib.fakeHash;
};
}
);
};
}