chore: add export of language.json for nix builtins

This commit is contained in:
Johannes Kirschbauer 2024-12-24 16:53:24 +01:00 committed by mergify[bot]
parent d384822c98
commit a2f170cf94
2 changed files with 10 additions and 3 deletions

View File

@ -1,10 +1,13 @@
{
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";
# --- Other flake inputs ---
nixpkgs.url = "nixpkgs/nixos-unstable";
# A custom nix version, to introspect lambda values.
nix.url = "github:hsjobeki/nix/?ref=feat/positions";

View File

@ -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