xintray/flake.nix

75 lines
1.9 KiB
Nix
Raw Normal View History

2022-10-28 17:51:20 -06:00
{
description = "xintray: a status indicator that lives in the tray";
2022-12-25 06:18:36 -07:00
inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
2022-10-28 17:51:20 -06:00
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 {
2022-12-25 06:18:36 -07:00
xintray = pkgs.buildGoModule {
2022-10-28 17:51:20 -06:00
pname = "xintray";
2022-12-25 06:24:05 -07:00
version = "v0.1.3";
2022-10-28 17:51:20 -06:00
src = ./.;
vendorSha256 =
2022-12-25 06:23:37 -07:00
"sha256-CQx15HqHqDLxbw66wv05efDZwJ4Xi8F6U866oUk3DvQ=";
2022-10-28 17:51:20 -06:00
proxyVendor = true;
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [
2022-11-13 11:57:07 -07:00
git
2022-10-28 17:51:20 -06:00
glfw
libGL
libGLU
2022-11-13 11:57:07 -07:00
openssh
2022-10-28 17:51:20 -06:00
pkg-config
xlibsWrapper
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
];
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.xintray);
devShells = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
shellHook = ''
PS1='\u@\h:\@; '
echo "Go `${pkgs.go}/bin/go version`"
'';
buildInputs = with pkgs; [
git
go
gopls
go-tools
glfw
pkg-config
xlibsWrapper
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
];
};
});
};
}