Compare commits

..

No commits in common. "f6c1659fc12119c61ba85b3b34cb50082e385b1b" and "2421243d4f6136ab8184dfc81b7524a7a143f88b" have entirely different histories.

2 changed files with 53 additions and 123 deletions

53
adam-gui/default.nix Normal file
View File

@ -0,0 +1,53 @@
{ 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 = with pkgs; [(buildGoModule rec {
pname = "adam-gui";
version = "0.0.1";
buildInputs = [ gcc go ] ++ libs;
nativeBuildInputs = with pkgs; [ pkg-config addOpenGLRunpath makeWrapper ];
subPackages = [ "." ];
src = fetchFromGitea {
domain = "git.ontake.dev";
owner = "go";
repo = "adam-gui";
rev = "a64eabcfd4a85d2a3fe3e88c8f668af2c4db741d";
hash = "sha256-igJie5yYj7LndBGd5XA7GU0qWalrK5j+YM0hCFunXVY=";
};
vendorHash = null;
meta = with lib; {
description = "A simple GUI for ADAM branded scales";
homepage = "https://git.ontake.dev/go/adam-gui";
license = licenses.gpl3;
maintainers = [ ];
platforms = platforms.linux;
};
postInstall = ''
wrapProgram "$out/bin/adam-gui" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs}
'';
postFixup = ''
addOpenGLRunpath $out/bin/adam-gui
'';
}) (makeDesktopItem {
name = "ADAM GUI";
desktopName = "ADAM GUI";
exec = "adam-gui";
icon = "adam-gui";
comment = "A simple GUI for ADAM branded scales.";
categories = ["Science" "Utility"];
})];
}

123
flake.nix
View File

@ -1,123 +0,0 @@
{
description = "ontake's custom packages!";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs =
inputs@{ self, nixpkgs, ... }:
utils.lib.eachSystem
[
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
]
(
system:
let
in
{
packages.system.kon = with pkgs; [
(buildGoModule rec {
pname = "kon";
version = "0.0.1";
buildInputs = [
gcc
go
] ++ libs;
nativeBuildInputs = with pkgs; [
pkg-config
makeWrapper
];
subPackages = [ "." ];
src = fetchFromGitea {
domain = "git.ontake.dev";
owner = "go";
repo = "kon";
rev = "c94a27dc86c0dbe21f952d247d51b119e66bc6dc";
hash = "sha256-Fi8DkF8lBEdBcOKRKA0Zr9s4NDy1eSrIs9nQS5YA02Q=";
};
vendorHash = null;
meta = with lib; {
description = "A sysadmin tool for monitoring and system updates";
homepage = "https://git.ontake.dev/go/kon";
license = licenses.gpl3;
maintainers = [ ];
platforms = platforms.linux;
};
postInstall = ''
wrapProgram "$out/bin/kon" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs}
'';
})
];
packages.system.adam-gui = with pkgs; [
(buildGoModule rec {
pname = "adam-gui";
version = "0.0.1";
buildInputs = [
gcc
go
] ++ libs;
nativeBuildInputs = with pkgs; [
pkg-config
addOpenGLRunpath
makeWrapper
];
subPackages = [ "." ];
src = fetchFromGitea {
domain = "git.ontake.dev";
owner = "go";
repo = "adam-gui";
rev = "a64eabcfd4a85d2a3fe3e88c8f668af2c4db741d";
hash = "sha256-igJie5yYj7LndBGd5XA7GU0qWalrK5j+YM0hCFunXVY=";
};
vendorHash = null;
meta = with lib; {
description = "A simple GUI for ADAM branded scales";
homepage = "https://git.ontake.dev/go/adam-gui";
license = licenses.gpl3;
maintainers = [ ];
platforms = platforms.linux;
};
postInstall = ''
wrapProgram "$out/bin/adam-gui" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs}
'';
postFixup = ''
addOpenGLRunpath $out/bin/adam-gui
'';
})
(makeDesktopItem {
name = "ADAM GUI";
desktopName = "ADAM GUI";
exec = "adam-gui";
icon = "adam-gui";
comment = "A simple GUI for ADAM branded scales.";
categories = [
"Science"
"Utility"
];
})
];
}
);
}