From 497f8b965dad115f3a317e03e162671544a61ab4 Mon Sep 17 00:00:00 2001 From: Lin Yinfeng Date: Tue, 17 Dec 2024 15:28:44 +0800 Subject: [PATCH] Revert "flake/flake-lib: remove" This reverts commit 790f8cefa7ef6c8b69bc3077f9cac2e4203e136d. --- devshell/prepare/default.nix | 4 ++-- flake/flake-lib.nix | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 flake/flake-lib.nix diff --git a/devshell/prepare/default.nix b/devshell/prepare/default.nix index be4dad0d6..86a91e9d3 100644 --- a/devshell/prepare/default.nix +++ b/devshell/prepare/default.nix @@ -1,4 +1,4 @@ -{ self, pkgs, ... }: +{ pkgs, flake-lib, ... }: let common = builtins.readFile ../common.sh; @@ -22,7 +22,7 @@ let # stateVersion { - system.stateVersion = "${self.lib.flakeStateVersion}"; + system.stateVersion = "${flake-lib.flakeStateVersion}"; } ]; } diff --git a/flake/flake-lib.nix b/flake/flake-lib.nix new file mode 100644 index 000000000..a0044c7bb --- /dev/null +++ b/flake/flake-lib.nix @@ -0,0 +1,8 @@ +{ self, ... }: +{ + perSystem = + { ... }: + { + _module.args.flake-lib = self.lib; + }; +}