xintray/flake.nix

74 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";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
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 {
xintray = pkgs.buildGo120Module {
2022-10-28 17:51:20 -06:00
pname = "xintray";
2023-05-03 10:16:52 -06:00
version = "v0.1.12";
2022-10-28 17:51:20 -06:00
src = ./.;
2023-04-17 12:07:55 -06:00
vendorHash =
2023-05-03 10:16:52 -06:00
"sha256-+jVpoEJERT+RSNRLDKw3nu7ksQe555p9ZPaDx3lDH50=";
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
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:\@; '
2023-05-10 06:41:31 -06:00
nix run github:qbit/xin#flake-warn
echo "Go `${pkgs.go_1_20}/bin/go version`"
2022-10-28 17:51:20 -06:00
'';
buildInputs = with pkgs; [
git
go_1_20
2022-10-28 17:51:20 -06:00
gopls
go-tools
glfw
pkg-config
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
];
};
});
};
}