init: first commit

This commit is contained in:
Louis Dalibard 2024-04-29 19:37:31 +02:00
parent a7e5ba1ab1
commit 719e9a5796

View File

@ -1,15 +1,27 @@
{ config, pkgs, ... }:
{ lib, config, pkgs, ... }:
let
libs = with pkgs; [
libGL pkg-config xorg.libX11.dev xorg.libXcursor xorg.libXi xorg.libXinerama xorg.libXrandr xorg.libXxf86vm
];
in
{
environment.systemPackages = [(adam-gui = buildGoModule rec {
environment.systemPackages = with pkgs; [(buildGoModule rec {
pname = "adam-gui";
version = "0.3.4";
version = "0.0.1";
buildInputs = [ gcc go ] ++ libs;
nativeBuildInputs = with pkgs; [ pkg-config addOpenGLRunpath makeWrapper ];
subPackages = [ "." ];
src = fetchFromGitea {
domain = "git.ontake.dev";
owner = "go"
owner = "go";
repo = "adam-gui";
rev = "75b0ea38aeaec47babcbad9d7f5b5dc99bcb1b9c";
hash = "sha256-8hwP0pfQifMgmAWpU5GuZn7ar4AbM6cYqTphKpVmReI=";
rev = "a64eabcfd4a85d2a3fe3e88c8f668af2c4db741d";
hash = "sha256-igJie5yYj7LndBGd5XA7GU0qWalrK5j+YM0hCFunXVY=";
};
vendorHash = null;
@ -20,6 +32,15 @@
license = licenses.gpl3;
};
postInstall = ''
wrapProgram "$out/bin/adam-gui" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs}
'';
postFixup = ''
addOpenGLRunpath $out/bin/adam-gui
'';
desktopItem = makeDesktopItem {
name = "adam-gui";
exec = "adam-gui";
@ -27,8 +48,7 @@
comment = "";
desktopName = "ADAM GUI";
genericName = "ADAM GUI";
categories = "Science;Utility;";
mimeType = "";
categories = ["Science" "Utility"];
};
})];
}