xintray/flake.nix
Aaron Bieber f6ac3dc05b
Change systray color if there are reboots
- switch to unstable
- build with go 1.20
2023-03-03 06:14:05 -07:00

73 lines
1.9 KiB
Nix

{
description = "xintray: a status indicator that lives in the tray";
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 {
xintray = pkgs.buildGo120Module {
pname = "xintray";
version = "v0.1.9";
src = ./.;
vendorSha256 =
"sha256-YZVOWzhz7gJka3XxXyp1sRcQhGSJ0ut0unTcJ1p8uy0=";
proxyVendor = true;
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [
git
glfw
libGL
libGLU
openssh
pkg-config
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_1_20}/bin/go version`"
'';
buildInputs = with pkgs; [
git
go_1_20
gopls
go-tools
glfw
pkg-config
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
];
};
});
};
}