xintray/flake.nix

96 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-07-14 20:25:56 -06:00
version = "v0.2.1";
2023-06-29 08:06:51 -06:00
src = ./.;
2022-10-28 17:51:20 -06:00
2024-07-14 20:25:56 -06:00
vendorHash = "sha256-5hb6nLx+5o65ziAXhuJpkSmseZNiCf16zduPRqiLLZ4=";
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 = [
2024-08-19 19:37:41 -06:00
fyne
2023-06-29 08:06:51 -06:00
git
glfw
libGL
libGLU
openssh
pkg-config
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
2024-07-17 18:09:34 -06:00
wayland
libxkbcommon
2023-06-29 08:06:51 -06:00
];
2024-08-19 19:37:41 -06:00
buildPhase = ''
${fyne}/bin/fyne package
2024-08-19 19:37:41 -06:00
'';
2023-06-29 08:06:51 -06:00
2024-08-19 19:37:41 -06:00
installPhase = ''
mkdir -p $out
pkg="$PWD/xintray.tar.xz"
cd $out
tar --strip-components=1 -xvf $pkg
2023-06-29 08:06:51 -06:00
'';
};
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; [
2024-08-19 19:37:41 -06:00
fyne
2022-10-28 17:51:20 -06:00
git
2024-03-21 10:24:29 -06:00
go
2022-10-28 17:51:20 -06:00
gopls
go-tools
2024-04-22 10:23:09 -06:00
nilaway
2022-10-28 17:51:20 -06:00
glfw
pkg-config
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
xorg.xinput
2024-07-17 18:09:34 -06:00
libxkbcommon
wayland
go-font
2022-10-28 17:51:20 -06:00
];
};
});
};
}