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 |
Samuel Shuert | 7663354 | 2024-11-17 14:51:07 -0500 | [diff] [blame^] | 8 | version = "0.3.2"; |
Samuel Shuert | 1abb2ff | 2024-09-04 17:03:38 -0400 | [diff] [blame] | 9 | OpenLinkHub = fetchFromGitHub { |
| 10 | owner = "jurkovic-nikola"; |
| 11 | repo = "OpenLinkHub"; |
| 12 | rev = version; |
Samuel Shuert | 7663354 | 2024-11-17 14:51:07 -0500 | [diff] [blame^] | 13 | hash = "sha256-ecsteDXnQl2QJ0sKNGSJqKZJF5JbM9Y3ht/H9Uu1CcA="; |
Samuel Shuert | 1abb2ff | 2024-09-04 17:03:38 -0400 | [diff] [blame] | 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 |
Samuel Shuert | 7663354 | 2024-11-17 14:51:07 -0500 | [diff] [blame^] | 30 | mkdir -p $out/var/lib/OpenLinkHub/database/keyboard |
| 31 | cp -r ${OpenLinkHub}/database/keyboard $out/var/lib/OpenLinkHub/database/keyboard |
Samuel Shuert | 1abb2ff | 2024-09-04 17:03:38 -0400 | [diff] [blame] | 32 | ''; |
| 33 | |
Samuel Shuert | 7663354 | 2024-11-17 14:51:07 -0500 | [diff] [blame^] | 34 | vendorHash = "sha256-57ms+wmwXIKBupsYkwuNqeWVwx8nTnu9NX3/VZ0in68="; |
Samuel Shuert | 1abb2ff | 2024-09-04 17:03:38 -0400 | [diff] [blame] | 35 | } |