nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 makeWrapper,
6 git,
7}:
8buildGoModule rec {
9 pname = "plandex-server";
10 version = "1.1.1";
11
12 src = fetchFromGitHub {
13 owner = "plandex-ai";
14 repo = "plandex";
15 rev = "server/v${version}";
16 hash = "sha256-RVvgnQtb/asOjVpSZ3WndimsJ6foERMWS/YD20sghVE=";
17 };
18
19 postPatch = ''
20 substituteInPlace db/db.go \
21 --replace-fail "file://migrations" "file://$out/migrations"
22 '';
23
24 postInstall = ''
25 cp -r migrations $out/migrations
26 '';
27
28 postFixup = ''
29 wrapProgram $out/bin/plandex-server \
30 --prefix PATH : ${lib.makeBinPath [ git ]}
31 '';
32
33 nativeBuildInputs = [ makeWrapper ];
34
35 nativeCheckInputs = [ git ];
36
37 sourceRoot = "${src.name}/app/server";
38
39 vendorHash = "sha256-uarTWteOoAjzEHSnbZo+fEPELerpuL7UNA5pdGP5CMY=";
40
41 meta = {
42 mainProgram = "plandex-server";
43 description = "AI driven development in your terminal. Designed for large, real-world tasks. The server part";
44 homepage = "https://plandex.ai/";
45 license = lib.licenses.agpl3Only;
46 maintainers = with lib.maintainers; [ viraptor ];
47 };
48}