2023-10-07 05:29:05 -06:00
|
|
|
{
|
|
|
|
description = "traygent: a graphical ssh-agent";
|
|
|
|
|
|
|
|
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
supportedSystems =
|
|
|
|
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
|
|
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
|
|
|
in {
|
|
|
|
packages = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgsFor.${system};
|
|
|
|
|
|
|
|
in {
|
|
|
|
traygent = with pkgs;
|
|
|
|
buildGo121Module rec {
|
|
|
|
pname = "traygent";
|
|
|
|
version = "v0.0.0";
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
vendorHash =
|
2023-11-09 15:43:14 -07:00
|
|
|
"sha256-WZlT8qd96u9NVrB98ukTi4ESPw/yXHA6UEtzKvafepU=";
|
2023-10-07 05:29:05 -06:00
|
|
|
proxyVendor = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config copyDesktopItems ];
|
|
|
|
buildInputs = [
|
|
|
|
glfw
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
openssh
|
|
|
|
pkg-config
|
2023-11-09 15:43:14 -07:00
|
|
|
glibc
|
2023-10-07 05:29:05 -06:00
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXinerama
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXxf86vm
|
|
|
|
xorg.xinput
|
|
|
|
];
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
2023-11-09 15:43:14 -07:00
|
|
|
name = "traygent";
|
2023-10-07 05:29:05 -06:00
|
|
|
exec = pname;
|
|
|
|
icon = pname;
|
|
|
|
desktopName = pname;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
#postInstall = ''
|
|
|
|
# mkdir -p $out/share/
|
|
|
|
# cp -r icons $out/share/
|
|
|
|
#'';
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
defaultPackage = forAllSystems (system: self.packages.${system}.traygent);
|
|
|
|
devShells = forAllSystems (system:
|
|
|
|
let pkgs = nixpkgsFor.${system};
|
|
|
|
in {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
shellHook = ''
|
|
|
|
PS1='\u@\h:\@; '
|
2023-11-09 15:43:14 -07:00
|
|
|
export GOEXPERIMENT=loopvar
|
2023-10-07 05:29:05 -06:00
|
|
|
nix run github:qbit/xin#flake-warn
|
|
|
|
echo "Go `${pkgs.go_1_21}/bin/go version`"
|
|
|
|
'';
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
git
|
|
|
|
go_1_21
|
|
|
|
gopls
|
|
|
|
go-tools
|
2023-11-12 19:11:55 -07:00
|
|
|
glxinfo
|
2023-10-07 05:29:05 -06:00
|
|
|
|
|
|
|
glfw
|
2023-11-09 15:43:14 -07:00
|
|
|
glibc
|
2023-10-07 05:29:05 -06:00
|
|
|
pkg-config
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXinerama
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXxf86vm
|
|
|
|
xorg.xinput
|
|
|
|
graphviz
|
|
|
|
|
|
|
|
go-font
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|