Something went wrong. Try again.
background code checker for golang
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556{ description = "background code checker for golang projects";
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; gitignore = { url = "github:hercules-ci/gitignore.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { self, nixpkgs, gitignore, }: let supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [self.overlays.default]; }); inherit (gitignore.lib) gitignoreSource; in { overlays.default = final: prev: let in { gust = final.buildGoModule { pname = "gust"; version = "0.1.0"; src = gitignoreSource ./.; subPackages = ["cmd/gust"]; vendorHash = "sha256-XKydHm/KX6sGU5ndQTNsIqaF0BpHew9NB+Q7gcAKBh4="; }; }; packages = forAllSystems (system: {inherit (nixpkgsFor."${system}") gust;}); defaultPackage = forAllSystems (system: nixpkgsFor.${system}.gust); formatter = forAllSystems (system: nixpkgsFor."${system}".alejandra); devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; staticShell = pkgs.mkShell.override { stdenv = pkgs.pkgsStatic.stdenv; }; in { default = staticShell { nativeBuildInputs = [ pkgs.go pkgs.gopls pkgs.gust ]; CGO_ENABLED = 0; }; }); };}