Samuel Shuert | 1abb2ff | 2024-09-04 17:03:38 -0400 | [diff] [blame] | 1 | { lib |
| 2 | , buildGoModule |
| 3 | , fetchFromGitHub |
| 4 | , pkg-config |
| 5 | , systemd |
| 6 | }: |
| 7 | let |
| 8 | version = "0.2.1"; |
| 9 | OpenLinkHub = fetchFromGitHub { |
| 10 | owner = "jurkovic-nikola"; |
| 11 | repo = "OpenLinkHub"; |
| 12 | rev = version; |
| 13 | hash = "sha256-2naNOGRPKy8H9I4e6X+uX3muT20M9YX2BGrPmY7RVAo="; |
| 14 | }; |
| 15 | in |
| 16 | buildGoModule { |
| 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 | } |