Skip to content

Commit edcff38

Browse files
Merge pull request #283049 from onemoresuza/bonsai
bonsai: refactor derivation and move to pkgs/by-name
2 parents e02ee26 + aa385c9 commit edcff38

File tree

3 files changed

+54
-68
lines changed

3 files changed

+54
-68
lines changed

pkgs/by-name/bo/bonsai/package.nix

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{ stdenv
2+
, lib
3+
, fetchFromSourcehut
4+
, gitUpdater
5+
, hare
6+
, hareThirdParty
7+
}:
8+
9+
stdenv.mkDerivation (finalAttrs: {
10+
pname = "bonsai";
11+
version = "1.0.2";
12+
13+
src = fetchFromSourcehut {
14+
owner = "~stacyharper";
15+
repo = "bonsai";
16+
rev = "v${finalAttrs.version}";
17+
hash = "sha256-Yosf07KUOQv4O5111tLGgI270g0KVGwzdTPtPOsTcP8=";
18+
};
19+
20+
nativeBuildInputs = [
21+
hare
22+
hareThirdParty.hare-ev
23+
hareThirdParty.hare-json
24+
];
25+
26+
makeFlags = [
27+
"PREFIX=${builtins.placeholder "out"}"
28+
"HARECACHE=.harecache"
29+
"HAREFLAGS=-qa${stdenv.hostPlatform.uname.processor}"
30+
];
31+
32+
enableParallelBuilding = true;
33+
34+
doCheck = true;
35+
36+
postPatch = ''
37+
substituteInPlace Makefile \
38+
--replace 'hare build' 'hare build $(HAREFLAGS)' \
39+
--replace 'hare test' 'hare test $(HAREFLAGS)'
40+
'';
41+
42+
passthru.updateScript = gitUpdater {
43+
rev-prefix = "v";
44+
};
45+
46+
meta = with lib; {
47+
description = "Finite State Machine structured as a tree";
48+
homepage = "https://git.sr.ht/~stacyharper/bonsai";
49+
license = licenses.agpl3Plus;
50+
maintainers = with maintainers; [ colinsane ];
51+
platforms = platforms.linux;
52+
mainProgram = "bonsaictl";
53+
};
54+
})

pkgs/tools/misc/bonsai/default.nix

Lines changed: 0 additions & 66 deletions
This file was deleted.

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,8 +1751,6 @@ with pkgs;
17511751

17521752
bikeshed = python3Packages.callPackage ../applications/misc/bikeshed { };
17531753

1754-
bonsai = callPackage ../tools/misc/bonsai { };
1755-
17561754
cie-middleware-linux = callPackage ../tools/security/cie-middleware-linux { };
17571755

17581756
cidrgrep = callPackage ../tools/text/cidrgrep { };

0 commit comments

Comments
 (0)