diff --git a/default.nix b/default.nix index 5cf1b788..2cccff28 100644 --- a/default.nix +++ b/default.nix @@ -1,13 +1,10 @@ -( - import +(import ( - builtins.fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; - sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; + 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 = ./.; - } -) -.defaultNix + { src = ./.; } +).defaultNix diff --git a/flake.lock b/flake.lock index 7920067b..b10c9bf7 100644 --- a/flake.lock +++ b/flake.lock @@ -19,6 +19,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1642700792, @@ -84,6 +100,7 @@ "root": { "inputs": { "devshell": "devshell", + "flake-compat": "flake-compat", "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" } diff --git a/flake.nix b/flake.nix index ca27d597..97f4ed57 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,13 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; devshell.url = "github:numtide/devshell"; flake-utils.url = "github:numtide/flake-utils"; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; - outputs = { self, flake-utils, devshell, nixpkgs }: + outputs = { self, flake-utils, devshell, nixpkgs, flake-compat }: let inherit (nixpkgs) lib; genSystems = lib.genAttrs [