Skip to content

Commit

Permalink
switch to flakehub
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Oct 3, 2023
1 parent 749fc5b commit a04e627
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 40 deletions.
34 changes: 14 additions & 20 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions flake.nix
Expand Up @@ -2,12 +2,9 @@
description = "Magic Nix Cache";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz";

flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
};

outputs = { self, nixpkgs, ... }:
Expand Down
25 changes: 10 additions & 15 deletions shell.nix
@@ -1,15 +1,10 @@
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);

flake-compat = builtins.fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
};

flake = import flake-compat {
src = ./.;
};

shell = flake.shellNix.default;
in
shell
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; }
).shellNix

0 comments on commit a04e627

Please sign in to comment.