blob: f9119f23d903d657932b660a3d218da7fd591e6d [file] [log] [blame]
Samuel Shuert1abb2ff2024-09-04 17:03:38 -04001{ lib
2, buildGoModule
3, fetchFromGitHub
4, pkg-config
5, systemd
6}:
7let
8 version = "0.2.1";
9 OpenLinkHub = fetchFromGitHub {
10 owner = "jurkovic-nikola";
11 repo = "OpenLinkHub";
12 rev = version;
13 hash = "sha256-2naNOGRPKy8H9I4e6X+uX3muT20M9YX2BGrPmY7RVAo=";
14 };
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
30 '';
31
32 vendorHash = "sha256-Sv2gGnI3mJvOl866idKC1q+6jh4ysEot0eLLBKPb0T0=";
33}