Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

doc: adopt new buildIdris changes in docs

+4 -4
+4 -4
doc/languages-frameworks/idris2.section.md
··· 19 }; 20 idrisLibraries = [ ]; 21 }; 22 - in lspLibPkg.library 23 ``` 24 25 The above results in a derivation with the installed library results (with sourcecode). ··· 30 31 # Assuming the previous example lives in `lsp-lib.nix`: 32 let lspLib = callPackage ./lsp-lib.nix { }; 33 lspPkg = idris2Packages.buildIdris { 34 ipkgName = "idris2-lsp"; 35 src = fetchFromGitHub { ··· 38 rev = "main"; 39 hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk="; 40 }; 41 - idrisLibraries = [(idris2Packages.idris2Api { }) (lspLib { })]; 42 }; 43 in lspPkg.executable 44 ``` 45 46 - The above uses the default value of `withSource = false` for both of the two required Idris libraries that the `idris2-lsp` executable depends on. `idris2Api` in the above derivation comes built in with `idris2Packages`. This library exposes many of the otherwise internal APIs of the Idris2 compiler. 47 -
··· 19 }; 20 idrisLibraries = [ ]; 21 }; 22 + in lspLibPkg.library { withSource = true; } 23 ``` 24 25 The above results in a derivation with the installed library results (with sourcecode). ··· 30 31 # Assuming the previous example lives in `lsp-lib.nix`: 32 let lspLib = callPackage ./lsp-lib.nix { }; 33 + inherit (idris2Packages) idris2Api; 34 lspPkg = idris2Packages.buildIdris { 35 ipkgName = "idris2-lsp"; 36 src = fetchFromGitHub { ··· 39 rev = "main"; 40 hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk="; 41 }; 42 + idrisLibraries = [idris2Api lspLib]; 43 }; 44 in lspPkg.executable 45 ``` 46 47 + The above uses the default value of `withSource = false` for the `idris2Api` but could be modified to include that library's source by passing `(idris2Api { withSource = true; })` to `idrisLibraries` instead. `idris2Api` in the above derivation comes built in with `idris2Packages`. This library exposes many of the otherwise internal APIs of the Idris2 compiler.