gflakestat/flake.nix

42 lines
922 B
Nix
Raw Permalink Normal View History

2024-07-08 00:40:48 +00:00
{
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
];
};
});
};
}