Use lib.makeScope for consistent package resolution

This commit is contained in:
Tad Fisher
2024-06-16 12:22:38 -07:00
committed by Tad Fisher
parent 6e37e6e3f9
commit 0160c945b8
7 changed files with 96 additions and 98 deletions

View File

@@ -17,27 +17,26 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
scope = pkgs.callPackage ./nix { };
inherit (nixpkgs) lib;
in
{
builders = {
inherit (self.packages.${system}.gradle2nix) buildGradlePackage buildMavenRepo;
inherit (scope) buildGradlePackage buildMavenRepo;
default = self.packages.${system}.buildGradlePackage;
};
packages = {
inherit (self.packages.${system}.gradle2nix) gradleSetupHook;
gradle2nix = pkgs.callPackage ./default.nix { };
inherit (scope) gradle2nix gradleSetupHook;
default = self.packages.${system}.gradle2nix;
};
apps = rec {
apps = {
gradle2nix = {
type = "app";
program = lib.getExe self.packages.${system}.default;
program = lib.getExe self.packages.${system}.gradle2nix;
};
default = gradle2nix;
default = self.apps.${system}.gradle2nix;
};
formatter = pkgs.writeShellScriptBin "gradle2nix-fmt" ''