From b42f7b514d3710c2f4e2b89844f4d1a3d1cfa843 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 14 Feb 2021 22:08:24 -0700 Subject: [PATCH] flake: manage flake-compate as input --- compat/default.nix | 7 +++++-- flake.lock | 11 +++++++---- flake.nix | 4 ++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/compat/default.nix b/compat/default.nix index 91d7ff9..2ee185c 100644 --- a/compat/default.nix +++ b/compat/default.nix @@ -1,9 +1,12 @@ let + inherit (lock.nodes.flake-compat.locked) rev narHash; + + lock = builtins.fromJSON (builtins.readFile ../flake.lock); flake = (import ( fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; - sha256 = "sha256:0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; + url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz"; + sha256 = narHash; } ) { diff --git a/flake.lock b/flake.lock index f025cf5..ab54707 100644 --- a/flake.lock +++ b/flake.lock @@ -2,7 +2,9 @@ "nodes": { "ci-agent": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": [ + "flake-compat" + ], "nixos-20_09": [ "nixos" ], @@ -43,11 +45,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1603796912, - "narHash": "sha256-6ayqpH/4XiEXylNdWI3AghubqS6XuiPg3Y60jY8RTo4=", + "lastModified": 1606424373, + "narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=", "owner": "edolstra", "repo": "flake-compat", - "rev": "19576c2aea7f074ff0da818b21a8b0950ff6ec86", + "rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf", "type": "github" }, "original": { @@ -172,6 +174,7 @@ "ci-agent": "ci-agent", "devshell": "devshell", "flake-utils": "flake-utils", + "flake-compat": "flake-compat", "home": "home", "nixos": "nixos", "nixos-hardware": "nixos-hardware", diff --git a/flake.nix b/flake.nix index 2d2c3bf..a9d0bf5 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,9 @@ ci-agent.url = "github:hercules-ci/hercules-ci-agent"; ci-agent.inputs.nixos-20_09.follows = "nixos"; ci-agent.inputs.nixos-unstable.follows = "override"; + ci-agent.inputs.flake-compat.follows = "flake-compat"; + flake-compat.url = "github:edolstra/flake-compat"; + flake-compat.flake = false; }; outputs = @@ -25,6 +28,7 @@ , nur , devshell , nixos-hardware + , ... }: let inherit (flake-utils.lib) eachDefaultSystem flattenTreeSystem;