xintray/flake.nix

91 lines
2.4 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 {
2023-06-29 08:06:51 -06:00
xintray = with pkgs;
2024-03-21 10:24:29 -06:00
buildGoModule rec {
2023-06-29 08:06:51 -06:00
pname = "xintray";
2024-02-06 08:40:09 -07:00
version = "v0.1.18";
2023-06-29 08:06:51 -06:00
src = ./.;
2022-10-28 17:51:20 -06:00
2023-06-29 08:06:51 -06:00
vendorHash =
2024-01-29 06:02:52 -07:00
"sha256-9D6X1H+F4CUuD7dQFHCmnPKulRIljwCvXrIXgcq4Zws=";
2023-06-29 08:06:51 -06:00
proxyVendor = true;
2022-10-28 17:51:20 -06:00
2023-06-29 08:06:51 -06:00
nativeBuildInputs = [ pkg-config copyDesktopItems ];
buildInputs = [
git
glfw
libGL
libGLU
openssh
pkg-config
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
];
desktopItems = [
(makeDesktopItem {
name = "Xin Tray";
exec = pname;
icon = pname;
desktopName = pname;
})
];
postInstall = ''
mkdir -p $out/share/
cp -r icons $out/share/
'';
};
2022-10-28 17:51:20 -06:00
});
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
2024-03-21 10:24:29 -06:00
echo "Go `${pkgs.go}/bin/go version`"
2022-10-28 17:51:20 -06:00
'';
buildInputs = with pkgs; [
git
2024-03-21 10:24:29 -06:00
go
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
go-font
2022-10-28 17:51:20 -06:00
];
};
});
};
}