-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
96 lines (84 loc) · 2.36 KB
/
flake.nix
File metadata and controls
96 lines (84 loc) · 2.36 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
86
87
88
89
90
91
92
93
94
95
96
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
intiface-engine = {
url = "github:intiface/intiface-engine";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
flake-parts,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
perSystem =
{
self',
pkgs,
lib,
...
}:
{
devShells.default = pkgs.mkShell {
packages =
with pkgs;
with self'.packages;
[
intiface-central
intiface-engine
# development tools
go_latest
gopls
just
jq
moreutils # for sponge
python3.pkgs.exrex # for schema generation
];
GOEXPERIMENT = lib.concatStringsSep "," [
# go-buttplug makes extensive use of encoding/json/v2 for
# efficiency. As of Go 1.25, this is feature-gated.
# See https://go.dev/doc/go1.25#json_v2.
"jsonv2"
];
};
packages = {
intiface-central = pkgs.writeShellScriptBin "intiface-central" ''
exec ${lib.getExe pkgs.intiface-central} "$@"
'';
intiface-engine = pkgs.rustPlatform.buildRustPackage rec {
pname = "intiface-engine";
version = src.rev or "unknown";
src = inputs.intiface-engine;
cargoHash = "sha256-MJARQnGbRsjntiBW+3Mhh5TQVAs3tADlUBUb1/UTtec=";
nativeBuildInputs = with pkgs; [
# cmake
pkg-config
];
buildInputs = with pkgs; [
udev
dbus
libusb1
];
meta = {
description = "Intiface CLI, except now also a library";
homepage = "https://github.com/intiface/intiface-engine";
mainProgram = "intiface-engine";
};
};
};
};
flake = {
};
};
}