about summary refs log tree commit diff
path: root/lib/flake.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2023-10-20 12:12:48 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2023-12-09 11:45:45 +0100
commitbb7921d1d6a0df8ebdc36b8ee745fe704b93b846 (patch)
treeae30b577d6654f1bde59788a5159ac3d24ffc5fb /lib/flake.nix
parent039f73f134546e59ec6f1b56b4aff5b81d889f64 (diff)
flake: also provide proper version info for lib's flake
This effectively means that

    nixpkgs$ nix eval ./lib#lib.trivial.version
    "23.11.20231020.ee0d6b5"

now gives meaningful results as well.

See https://github.com/NixOS/nixpkgs/pull/257100#discussion_r1352075369
for the discussion around this.
Diffstat (limited to 'lib/flake.nix')
-rw-r--r--lib/flake.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/flake.nix b/lib/flake.nix
index 0b5e54d547c50..475aa13edafb8 100644
--- a/lib/flake.nix
+++ b/lib/flake.nix
@@ -1,5 +1,10 @@
 {
   description = "Library of low-level helper functions for nix expressions.";
 
-  outputs = { self }: { lib = import ./.; };
+  outputs = { self }:
+    let
+      lib' = import ./.;
+    in {
+      lib = lib'.extend (import ./__flake-version-info.nix self);
+    };
 }