-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* switch lib to an overlay * update README.md * cleanup README * format
- Loading branch information
1 parent
51ac2f2
commit 17aab44
Showing
3 changed files
with
46 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,35 @@ | ||
# Provides an overlay for other flakes to consume and get all the cosmos packages in their pkgs | ||
# https://flake.parts/overlays.html?highlight=overlay#defining-an-overlay | ||
{withSystem, ...}: { | ||
flake.overlays.default = final: prev: | ||
{ | ||
withSystem, | ||
inputs, | ||
self, | ||
... | ||
}: { | ||
# Overlay with everything | ||
flake.overlays.default = with self.overlays; | ||
inputs.nixpkgs.lib.fixedPoints.composeExtensions | ||
cosmosNix | ||
cosmosNixLib; | ||
|
||
# Overlay with all the cosmos.nix cosmos packages | ||
flake.overlays.cosmosNixPackages = final: prev: | ||
withSystem prev.stdenv.hostPlatform.system ({self', ...}: self'.packages); | ||
|
||
# Overlay with the cosmos.nix nix lib (comes with a bunch of utility functions for packaging cosmos packages) | ||
flake.overlays.cosmosNixLib = final: prev: | ||
withSystem prev.stdenv.hostPlatform.system ({ | ||
self', | ||
pkgs, | ||
... | ||
}: { | ||
cosmosLib = let | ||
lib = import ../lib; | ||
std = inputs.nix-std; | ||
in | ||
lib std { | ||
inherit pkgs; | ||
inherit (self'.packages) cosmwasm-check; | ||
}; | ||
}); | ||
} |