remove flake-utils
2 files changed, 34 insertions(+), 22 deletions(-)
changed files
M flake.lock → flake.lock
@@ -20,9 +20,7 @@ } }, "gomod2nix": { "inputs": { - "flake-utils": [ - "flake-utils" - ], + "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ]@@ -59,7 +57,6 @@ } }, "root": { "inputs": { - "flake-utils": "flake-utils", "gomod2nix": "gomod2nix", "nixpkgs": "nixpkgs" }
M flake.nix → flake.nix
@@ -2,33 +2,48 @@ { description = "A basic gomod2nix flake"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.gomod2nix.url = "github:nix-community/gomod2nix"; inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs"; - inputs.gomod2nix.inputs.flake-utils.follows = "flake-utils"; outputs = { self, nixpkgs, - flake-utils, gomod2nix, }: - (flake-utils.lib.eachDefaultSystem ( - system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - packages.default = pkgs.callPackage ./nix/pkg.nix { - inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; - }; - devShells.default = pkgs.callPackage ./nix/shell.nix { - inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; - }; - } - )) - // { + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "aarch64-darwin" + ]; + + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + in + { + packages = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + default = pkgs.callPackage ./nix/pkg.nix { + inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; + }; + } + ); + devShells = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + default = pkgs.callPackage ./nix/shell.nix { + inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; + }; + } + ); + overlays = { default = final: prev: { elgit = self.packages.${final.system}.default;