From a2f170cf9458863c7d9edfbedff1f24daab9b06b Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Tue, 24 Dec 2024 16:53:24 +0100 Subject: [PATCH] chore: add export of language.json for nix builtins --- flake.nix | 9 ++++++--- salt/flake-module.nix | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index d1a8f05..274926d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,14 @@ { description = "Noogle.dev | Discover the nix api surface"; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; + # --- sources of documentation --- + # Updated automatically nixpkgs-master.url = "nixpkgs/master"; - nix-master.url = "github:NixOS/nix/?ref=master"; - # A custom nix version, to introspect lambda values. + + # --- Other flake inputs --- + nixpkgs.url = "nixpkgs/nixos-unstable"; + # A custom nix version, to introspect lambda values. nix.url = "github:hsjobeki/nix/?ref=feat/positions"; pre-commit-hooks = { diff --git a/salt/flake-module.nix b/salt/flake-module.nix index b63ea5a..ac5b3b3 100644 --- a/salt/flake-module.nix +++ b/salt/flake-module.nix @@ -2,6 +2,8 @@ perSystem = { self', inputs', pkgs, ... }: let nix-manual = "${inputs.nix-master}/doc/manual/src/language/derivations.md"; + inherit (inputs'.nix-master.packages) nix; + # https://github.com/NixOS/nix/blob/master/doc/manual/src/language/derivations.md salt = pkgs.stdenv.mkDerivation { pname = "salt-data"; @@ -11,6 +13,8 @@ mkdir $out cp -rf . $out cp ${nix-manual} $out + + ${nix}/bin/nix __dump-language > $out/language.json ''; }; in