blob: 07a42c4030c57741041f45f9b35a5524e4f72837 [file] [log] [blame]
Samuel Shuert1abb2ff2024-09-04 17:03:38 -04001{ lib
2, buildGoModule
3, fetchFromGitHub
4, pkg-config
5, systemd
6}:
7let
Samuel Shuert76633542024-11-17 14:51:07 -05008 version = "0.3.2";
Samuel Shuert1abb2ff2024-09-04 17:03:38 -04009 OpenLinkHub = fetchFromGitHub {
10 owner = "jurkovic-nikola";
11 repo = "OpenLinkHub";
12 rev = version;
Samuel Shuert76633542024-11-17 14:51:07 -050013 hash = "sha256-ecsteDXnQl2QJ0sKNGSJqKZJF5JbM9Y3ht/H9Uu1CcA=";
Samuel Shuert1abb2ff2024-09-04 17:03:38 -040014 };
15in
16buildGoModule {
17 pname = "OpenLinkHub";
18 inherit version;
19
20 src = OpenLinkHub;
21
22 nativeBuildInputs = [ pkg-config ];
23 buildInputs = [ systemd.dev ];
24
25 postInstall = ''
26 mkdir -p $out/var/lib/OpenLinkHub
27 cp -r ${OpenLinkHub}/{static,web} $out/var/lib/OpenLinkHub
28 cp ${OpenLinkHub}/config.json $out/var/lib/OpenLinkHub
29 cp ${OpenLinkHub}/database/rgb.json $out/var/lib/OpenLinkHub
Samuel Shuert76633542024-11-17 14:51:07 -050030 mkdir -p $out/var/lib/OpenLinkHub/database/keyboard
31 cp -r ${OpenLinkHub}/database/keyboard $out/var/lib/OpenLinkHub/database/keyboard
Samuel Shuert1abb2ff2024-09-04 17:03:38 -040032 '';
33
Samuel Shuert76633542024-11-17 14:51:07 -050034 vendorHash = "sha256-57ms+wmwXIKBupsYkwuNqeWVwx8nTnu9NX3/VZ0in68=";
Samuel Shuert1abb2ff2024-09-04 17:03:38 -040035}