forked from input-output-hk/haskell.nix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flakify all inputs (input-output-hk#1180)
* Include dependencies of haskell.nix that were tracked in `nix/sources.json` as flake inputs (`flake.lock` replaces `nix/sources.json`). * Use `flake-compat` to continue to provide a compatible interface for non flake projects. Co-authored-by: Alexander Bantyev <[email protected]> Co-authored-by: Shea Levy <[email protected]>
- Loading branch information
1 parent
07eeda1
commit d5d304d
Showing
23 changed files
with
464 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
{ checkMaterialization ? false # Allows us to easily switch on materialization checking | ||
, system ? builtins.currentSystem | ||
, sourcesOverride ? {} | ||
, ... }@args: rec { | ||
sources = (import ./nix/sources.nix { inherit pkgs; }) // sourcesOverride; | ||
config = import ./config.nix; | ||
overlays = [ allOverlays.combined ] ++ ( | ||
if checkMaterialization == true | ||
then [( | ||
final: prev: { | ||
haskell-nix = prev.haskell-nix // { | ||
checkMaterialization = true; | ||
}; | ||
} | ||
)] | ||
else [] | ||
); | ||
allOverlays = import ./overlays args; | ||
nixpkgsArgs = { inherit config overlays system; }; | ||
pkgs = import sources.nixpkgs nixpkgsArgs; | ||
pkgs-unstable = import sources.nixpkgs-unstable nixpkgsArgs; | ||
hix = import ./hix/default.nix; | ||
} | ||
{...}@args: | ||
|
||
let | ||
nixpkgsSrc = | ||
builtins.fetchTarball { | ||
url = "https://github.com/NixOS/nixpkgs/archive/3c6f3f84af60a8ed5b8a79cf3026b7630fcdefb8.tar.gz"; | ||
sha256 = "sha256:0jf9l6j60sa8cms7r4a02kr9j9884pwv1prf79b2ysnxmnhimnch"; | ||
}; | ||
pkgs = args.pkgs or import nixpkgsSrc {}; | ||
flake-compat = | ||
pkgs.fetchzip { | ||
url = "https://github.com/hamishmack/flake-compat/archive/ce16b21b8a5588aa8b532353d3ceea89a38b8e77.tar.gz"; | ||
sha256 = "sha256:054nsfqh3wy6v6bjamw0k91xl8v1rc5x2laic8mphrkrhzvyz5hi"; | ||
}; | ||
self = import flake-compat { src = ./.; inherit pkgs; }; | ||
in self.defaultNix.internal.compat | ||
({ system = args.pkgs.system or builtins.currentSystem; } // args) // self.defaultNix |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.