Skip to content

Commit

Permalink
Don't use overlay internally with nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Feb 4, 2023
1 parent 89cd067 commit 605dca1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
17 changes: 7 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,19 @@
description = "Gomod2nix packaged application";
};
};
defaultTemplate = self.templates.app;
templates.default = self.templates.app;

} //
(utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlays.default
];
};
pkgs = nixpkgs.legacyPackages.${system};
callPackage = pkgs.darwin.apple_sdk_11_0.callPackage or pkgs.callPackage;
in
{
packages.default = pkgs.callPackage ./. { };
devShells.default = import ./shell.nix { inherit pkgs; };
rec {
packages.default = pkgs.callPackage ./. { inherit (lib) buildGoApplication mkGoEnv; };
devShells.default = import ./shell.nix { inherit pkgs; gomod2nix = packages.default; inherit (lib) mkGoEnv; };
lib = { inherit (callPackage ./builder { gomod2nix = packages.default; }) buildGoApplication mkGoEnv; };
})
);
}
8 changes: 5 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
(import ./overlay.nix)
];
}
)
),
gomod2nix ? pkgs.gomod2nix,
mkGoEnv ? pkgs.mkGoEnv
}:

pkgs.mkShell {
NIX_PATH = "nixpkgs=${builtins.toString pkgs.path}";
nativeBuildInputs = [
pkgs.nixpkgs-fmt
pkgs.golangci-lint
pkgs.gomod2nix
(pkgs.mkGoEnv { pwd = ./.; })
gomod2nix
(mkGoEnv { pwd = ./.; })
];
}

0 comments on commit 605dca1

Please sign in to comment.