gflakestat/flake.nix
2024-07-08 02:40:48 +02:00

42 lines
922 B
Nix

{
description = "Print git stats for flake inputs";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
allSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
overlays.default = final: prev: {
gflakestat = self.packages.${prev.system}.default;
};
packages = forAllSystems ({ pkgs }: {
default = pkgs.buildGoModule {
name = "gflakestat";
src = ./.;
vendorHash = pkgs.lib.fakeHash;
};
});
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
go
];
};
});
};
}