From 724b32e8cd3b69a105dc0ec8d5eca3aacabdd88d Mon Sep 17 00:00:00 2001 From: Brian Botha Date: Tue, 3 Sep 2024 09:39:29 +1000 Subject: [PATCH] feat: Nix indirect flake input --- flake.lock | 116 +++++------------------------------------------------ flake.nix | 14 +++---- 2 files changed, 17 insertions(+), 113 deletions(-) diff --git a/flake.lock b/flake.lock index a9491cb97..14f31d578 100644 --- a/flake.lock +++ b/flake.lock @@ -18,106 +18,42 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1716357214, - "narHash": "sha256-gQh7A8QOJLUhO7bdtQ8ZW9/KM70ciKskxSYgC1Lzm6g=", + "lastModified": 1724223767, + "narHash": "sha256-Ifph01gDo4i4B50rpeqmhta/BYX2LQwXby4+BjlLqLM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e69e710edfed397959507bcee120ec8a9c7ff03e", + "rev": "3f33387a5c85d94b305062a4f97d5b2899094efa", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", + "rev": "3f33387a5c85d94b305062a4f97d5b2899094efa", "type": "github" } }, "nixpkgs-matrix": { "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs", - "polykey-cli": "polykey-cli" - }, - "locked": { - "lastModified": 1718671111, - "narHash": "sha256-7mgQvoUeAUeLkCh+wub8JNTT6x7onmIFyT90FT4uw88=", - "owner": "matrixai", - "repo": "nixpkgs-matrix", - "rev": "f00e00b892026a8588c9c01edde195585303ee84", - "type": "github" - }, - "original": { - "owner": "matrixai", - "repo": "nixpkgs-matrix", - "type": "github" - } - }, - "polykey-cli": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "nixpkgs-matrix", - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1718605364, - "narHash": "sha256-1JVAPfZ3s47ehaAaDY22UIAeYcxlB/5CSY4VYHPKf34=", + "lastModified": 1724748625, + "narHash": "sha256-aJn/QBY200UOvRCtsBbWdlixHoYxSp+UHlxSZ25HTpE=", "owner": "MatrixAI", - "repo": "Polykey-CLI", - "rev": "5973090c8fab456d048bac93b378af712dc5590f", + "repo": "nixpkgs-matrix", + "rev": "850aaa543b8913ee2ef69f145265211f344ca9b2", "type": "github" }, "original": { - "owner": "MatrixAI", - "repo": "Polykey-CLI", - "type": "github" + "id": "nixpkgs-matrix", + "type": "indirect" } }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs-matrix", - "nixpkgs" - ], "nixpkgs-matrix": "nixpkgs-matrix" } }, @@ -135,36 +71,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 898892f91..3ad493eee 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,13 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; - - nixpkgs-matrix.url = "github:matrixai/nixpkgs-matrix"; - nixpkgs.follows = "nixpkgs-matrix/nixpkgs"; + nixpkgs-matrix = { + type = "indirect"; + id = "nixpkgs-matrix"; + }; }; - outputs = { nixpkgs, flake-utils, ... }: + outputs = { nixpkgs-matrix, flake-utils, ... }: flake-utils.lib.eachSystem ([ "x86_64-linux" "x86_64-windows" @@ -15,9 +15,7 @@ "aarch64-darwin" ]) (system: let - pkgs = import nixpkgs { - system = system; - }; + pkgs = nixpkgs-matrix.legacyPackages.${system}; shell = { ci ? false }: with pkgs; pkgs.mkShell { nativeBuildInputs = [