traygent/flake.nix

97 lines
2.5 KiB
Nix
Raw Normal View History

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;
2024-04-15 09:00:25 -06:00
buildGoModule rec {
2023-10-07 05:29:05 -06:00
pname = "traygent";
2024-06-19 20:40:25 -06:00
version = "v1.0.5";
2023-10-07 05:29:05 -06:00
src = ./.;
vendorHash =
2024-06-19 20:40:25 -06:00
"sha256-dIxyBHnQzPSNJqNpDFJy1G2ke1txH86mcFF5ubzyUkA=";
2023-10-07 05:29:05 -06:00
proxyVendor = true;
nativeBuildInputs = [ pkg-config copyDesktopItems ];
buildInputs = [
glfw
libGL
libGLU
openssh
pkg-config
glibc
2023-10-07 05:29:05 -06:00
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
];
desktopItems = [
(makeDesktopItem {
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:\@; '
export GOEXPERIMENT=loopvar
2023-10-07 05:29:05 -06:00
nix run github:qbit/xin#flake-warn
2024-04-15 09:00:25 -06:00
echo "Go `${pkgs.go}/bin/go version`"
2023-10-07 05:29:05 -06:00
'';
buildInputs = with pkgs; [
git
2024-04-15 09:00:25 -06:00
go
2023-10-07 05:29:05 -06:00
gopls
go-tools
2023-11-12 19:11:55 -07:00
glxinfo
2024-06-19 19:53:30 -06:00
nilaway
2023-10-07 05:29:05 -06:00
glfw
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
];
};
});
};
}