From 9971d47b1637e6a67f9ccce49cc62667949268e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B9=82=E0=B8=97=E0=B8=AA=E0=B8=95=E0=B8=B1=E0=B8=A5?= Date: Tue, 10 Dec 2024 17:06:53 +0700 Subject: [PATCH] use inputs attrset --- flake.lock | 4 ++-- flake.nix | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 47ecac5e..b452c80f 100644 --- a/flake.lock +++ b/flake.lock @@ -109,7 +109,7 @@ "nix-filter": "nix-filter", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay", - "tree-sitter-nickel-input": "tree-sitter-nickel-input" + "tree-sitter-nickel": "tree-sitter-nickel" } }, "rust-overlay": { @@ -145,7 +145,7 @@ "type": "github" } }, - "tree-sitter-nickel-input": { + "tree-sitter-nickel": { "inputs": { "flake-utils": [ "flake-utils" diff --git a/flake.nix b/flake.nix index ba3c7582..e909f0fe 100644 --- a/flake.nix +++ b/flake.nix @@ -28,16 +28,15 @@ flake-utils.url = "github:numtide/flake-utils"; nix-filter.url = "github:numtide/nix-filter"; - tree-sitter-nickel-input = { + tree-sitter-nickel = { url = "github:nickel-lang/tree-sitter-nickel"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; }; - outputs = inputs: - with inputs; - flake-utils.lib.eachDefaultSystem ( + outputs = { self, nixpkgs, ... }@inputs: + inputs.flake-utils.lib.eachDefaultSystem ( system: let wasm-bindgen-cli-overlay = final: prev: @@ -56,15 +55,16 @@ pkgs = import nixpkgs { inherit system; - overlays = [ rust-overlay.overlays.default wasm-bindgen-cli-overlay ]; + overlays = [ inputs.rust-overlay.overlays.default wasm-bindgen-cli-overlay ]; }; - craneLib = crane.mkLib pkgs; + craneLib = inputs.crane.mkLib pkgs; - tree-sitter-nickel = tree-sitter-nickel-input.packages.${system}.default; + tree-sitter-nickel = inputs.tree-sitter-nickel.packages.${system}.default; topiaryPkgs = pkgs.callPackage ./default.nix { - inherit advisory-db crane rust-overlay nix-filter craneLib tree-sitter-nickel; + inherit (inputs) advisory-db crane rust-overlay nix-filter; + inherit craneLib tree-sitter-nickel; }; binPkgs = pkgs.callPackage ./bin/default.nix { }; in