tsvnstat/flake.nix

42 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2022-11-16 19:53:59 -07:00
{
description = "tsvnstat: a tailscale aware vmcstat server";
2023-09-20 09:36:27 -06:00
inputs.nixpkgs.url = "github:nixos/nixpkgs";
2022-11-16 19:53:59 -07: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 {
2024-09-04 13:27:38 -06:00
tsvnstat = pkgs.buildGoModule {
2022-11-16 19:53:59 -07:00
pname = "tsvnstat";
2024-09-04 13:27:38 -06:00
version = "v0.0.15";
2022-11-16 19:53:59 -07:00
src = ./.;
2024-09-04 13:27:38 -06:00
vendorHash = "sha256-Rgyv2KmWpEEyQTXau/lOKyeMLyboPDBFLBFY9cq4hNU=";
2022-11-16 19:53:59 -07:00
proxyVendor = true;
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.tsvnstat);
devShells = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
shellHook = ''
PS1='\u@\h:\@; '
2024-01-29 08:35:26 -07:00
nix run github:qbit/xin#flake-warn
2022-11-16 19:53:59 -07:00
echo "Go `${pkgs.go}/bin/go version`"
'';
2023-09-20 09:36:27 -06:00
nativeBuildInputs = with pkgs; [ git go_1_21 gopls go-tools ];
2022-11-16 19:53:59 -07:00
};
});
};
}