dhall-nix-lib/flake.nix

50 lines
1.4 KiB
Nix

{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
dhall-haskell = {
url = "https://github.com/darkkirb/dhall-haskell";
flake = false;
type = "git";
submodules = true;
ref = "nix-hotfix";
};
};
outputs = {
self,
nixpkgs,
flake-utils,
dhall-haskell,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [self.overlays.${system}.default];
};
in {
formatter = pkgs.alejandra;
packages = rec {
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;};
});
}