2024-04-29 19:37:31 +02:00
|
|
|
{ lib, config, pkgs, ... }:
|
|
|
|
let
|
|
|
|
libs = with pkgs; [
|
|
|
|
libGL pkg-config xorg.libX11.dev xorg.libXcursor xorg.libXi xorg.libXinerama xorg.libXrandr xorg.libXxf86vm
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
2024-04-29 18:47:38 +02:00
|
|
|
{
|
2024-04-29 19:37:31 +02:00
|
|
|
environment.systemPackages = with pkgs; [(buildGoModule rec {
|
2024-04-29 18:47:38 +02:00
|
|
|
pname = "adam-gui";
|
2024-04-29 19:37:31 +02:00
|
|
|
version = "0.0.1";
|
|
|
|
|
|
|
|
buildInputs = [ gcc go ] ++ libs;
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [ pkg-config addOpenGLRunpath makeWrapper ];
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
2024-04-29 18:47:38 +02:00
|
|
|
|
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "git.ontake.dev";
|
2024-04-29 19:37:31 +02:00
|
|
|
owner = "go";
|
2024-04-29 18:47:38 +02:00
|
|
|
repo = "adam-gui";
|
2024-04-29 19:37:31 +02:00
|
|
|
rev = "a64eabcfd4a85d2a3fe3e88c8f668af2c4db741d";
|
|
|
|
hash = "sha256-igJie5yYj7LndBGd5XA7GU0qWalrK5j+YM0hCFunXVY=";
|
2024-04-29 18:47:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorHash = null;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple GUI for ADAM branded scales";
|
|
|
|
homepage = "https://git.ontake.dev/go/adam-gui";
|
|
|
|
license = licenses.gpl3;
|
2024-04-29 19:55:24 +02:00
|
|
|
maintainers = [ ];
|
|
|
|
platforms = platforms.linux;
|
2024-04-29 18:47:38 +02:00
|
|
|
};
|
|
|
|
|
2024-04-29 19:37:31 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/adam-gui" \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs}
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
addOpenGLRunpath $out/bin/adam-gui
|
|
|
|
'';
|
2024-04-29 20:44:39 +02:00
|
|
|
}) (makeDesktopItem {
|
|
|
|
name = "ADAM GUI";
|
|
|
|
desktopName = "ADAM GUI";
|
2024-04-29 18:47:38 +02:00
|
|
|
exec = "adam-gui";
|
2024-04-29 19:48:16 +02:00
|
|
|
icon = "adam-gui";
|
2024-04-29 19:55:24 +02:00
|
|
|
comment = "A simple GUI for ADAM branded scales.";
|
2024-04-29 19:37:31 +02:00
|
|
|
categories = ["Science" "Utility"];
|
2024-04-29 20:44:39 +02:00
|
|
|
})];
|
2024-04-29 18:47:38 +02:00
|
|
|
}
|