improve overlay

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-14 16:44:16 +01:00
parent 4a0a1cbbb0
commit 067764c4a5
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
2 changed files with 17 additions and 15 deletions

View file

@ -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;
};
};
}

View file

@ -3,7 +3,7 @@
Prelude,
}:
buildDhallDirectoryPackage {
name = ".";
name = "dhall-nix-lib";
src = ./.;
file = "package.dhall";
source = false;