Skip to content

Commit

Permalink
Workaround flake-compat bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dpc committed Jun 28, 2022
1 parent 0bfd8e3 commit 26824e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
7 changes: 4 additions & 3 deletions infra/flake.nix
Expand Up @@ -14,9 +14,10 @@
outputs = { self, nixpkgs, flake-utils, flake-compat}:
flake-utils.lib.eachDefaultSystem (system:
let
imp = (import ./utils/aws-bootstrap/default.nix);
overlay = self: super: {
aws-bootstrap = builtins.trace ''${imp}'' imp.default;
overlay = self: super: let
imp = (import ./utils/aws-bootstrap/default-system.nix) system;
in {
aws-bootstrap = builtins.trace imp imp.default;
};
pkgs = import nixpkgs {
inherit system;
Expand Down
16 changes: 16 additions & 0 deletions infra/utils/aws-bootstrap/default-system.nix
@@ -0,0 +1,16 @@
# See https://github.com/edolstra/flake-compat/issues/32#issuecomment-1169370930
system:
(import
(
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{
src = ./.;
system = system;
}).defaultNix

0 comments on commit 26824e3

Please sign in to comment.