improve overlay
This commit is contained in:
parent
4a0a1cbbb0
commit
067764c4a5
2 changed files with 17 additions and 15 deletions
30
flake.nix
30
flake.nix
|
@ -22,7 +22,7 @@
|
|||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [self.overlays.${system}.default];
|
||||
overlays = [self.overlays.default];
|
||||
};
|
||||
in {
|
||||
formatter = pkgs.alejandra;
|
||||
|
@ -30,21 +30,23 @@
|
|||
inherit (import "${dhall-haskell}/nix/shared.nix" {inherit system;}) dhall dhall-nix dhall-nixpkgs;
|
||||
dhall-nix-lib = pkgs.dhallPackages.callPackage ./package.nix {};
|
||||
};
|
||||
overlays.default = _: prev:
|
||||
self.packages.${system}
|
||||
// {
|
||||
dhallPackages = prev.dhallPackages.override (self: {
|
||||
overrides = self: super: {
|
||||
Prelude = super.Prelude.overridePackage {
|
||||
rev = "v22.0.0";
|
||||
sha256 = "157x95yw9hibpifa8figawgclnc1d1bapmbp1zw60l2viy936b83";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = [self.packages.${system}.dhall self.packages.${system}.dhall-nix];
|
||||
};
|
||||
lib.dhallToNix = import ./dhallToNix.nix {inherit pkgs;};
|
||||
});
|
||||
})
|
||||
// {
|
||||
overlays.default = final: prev: {
|
||||
dhallPackages = prev.dhallPackages.override (self: {
|
||||
overrides = self: super: {
|
||||
Prelude = super.Prelude.overridePackage {
|
||||
rev = "v22.0.0";
|
||||
sha256 = "157x95yw9hibpifa8figawgclnc1d1bapmbp1zw60l2viy936b83";
|
||||
};
|
||||
inherit (self.packages.${prev.emptyDirectory.system}) dhall-nix-lib;
|
||||
};
|
||||
});
|
||||
inherit (self.packages.${prev.system}) dhall dhall-nix dhall-nixpkgs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Prelude,
|
||||
}:
|
||||
buildDhallDirectoryPackage {
|
||||
name = ".";
|
||||
name = "dhall-nix-lib";
|
||||
src = ./.;
|
||||
file = "package.dhall";
|
||||
source = false;
|
||||
|
|
Loading…
Reference in a new issue