Files
depgraph/flake.nix

59 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2026-01-09 11:15:42 -03:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
...
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f:
nixpkgs.lib.genAttrs systems (system: let
pkgs = import nixpkgs {inherit system;};
in
f {
inherit (pkgs) lib stdenv;
inherit pkgs;
});
in {
devShells = forAllSystems ({pkgs, ...}: {
default = pkgs.mkShell {
CGO_ENABLED = "0";
hardeningDisable = ["all"];
buildInputs = with pkgs; [
# Go tools
go
golangci-lint
gofumpt
gotools
delve
];
};
});
packages = forAllSystems ({
pkgs,
lib,
stdenv,
...
}: {
default = self.packages.${stdenv.hostPlatform.system}.depgraph;
depgraph = pkgs.buildGo125Module {
pname = "depgraph";
version = "0.0.0";
src = lib.cleanSource ./.;
vendorHash = null;
meta = {
license = lib.licenses.mpl20;
};
};
});
};
}