-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathpackage.nix
More file actions
75 lines (62 loc) · 1.77 KB
/
package.nix
File metadata and controls
75 lines (62 loc) · 1.77 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
{
lib,
stdenv,
fetchurl,
makeWrapper,
wrapBuddy,
gcc-unwrapped,
versionCheckHook,
}:
let
versionData = builtins.fromJSON (builtins.readFile ./hashes.json);
inherit (versionData) version hashes;
platformMap = {
x86_64-linux = "x86_64-unknown-linux-gnu";
aarch64-linux = "aarch64-unknown-linux-gnu";
x86_64-darwin = "x86_64-apple-darwin";
aarch64-darwin = "aarch64-apple-darwin";
};
platform = stdenv.hostPlatform.system;
platformTriple = platformMap.${platform} or (throw "Unsupported system: ${platform}");
in
stdenv.mkDerivation rec {
pname = "forge";
inherit version;
src = fetchurl {
url = "https://github.com/antinomyhq/forge/releases/download/v${version}/forge-${platformTriple}";
hash = hashes.${platform};
};
nativeBuildInputs = [
makeWrapper
]
++ lib.optionals stdenv.isLinux [
wrapBuddy
];
buildInputs = lib.optionals stdenv.isLinux [
gcc-unwrapped.lib
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
dontUnpack = true;
installPhase = ''
runHook preInstall
install -Dm755 $src $out/bin/forge
runHook postInstall
'';
passthru.category = "AI Coding Agents";
meta = with lib; {
description = "AI-Enhanced Terminal Development Environment - A comprehensive coding agent that integrates AI capabilities with your development environment";
homepage = "https://github.com/antinomyhq/forge";
changelog = "https://github.com/antinomyhq/forge/releases/tag/v${version}";
license = licenses.mit;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ ];
mainProgram = "forge";
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
}