mirror of
https://github.com/hsjobeki/noogle.git
synced 2024-11-24 06:35:05 +03:00
Feature/better highlight (#18)
* improved formatting & highlighting of code samples * remove generated files and move them to prepare script
This commit is contained in:
parent
a7ded1215c
commit
358048027d
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,6 +7,8 @@
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
/models/data/*
|
||||
# !/models/data/index.ts
|
||||
|
||||
# nix
|
||||
.direnv/
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Box } from "@mui/material";
|
||||
import { ThemeOptions } from "@mui/system";
|
||||
import { useEffect } from "react";
|
||||
import Highlight, { HighlightProps } from "react-highlight";
|
||||
import styles from "./codeHighlight.module.css";
|
||||
@ -6,10 +7,12 @@ import styles from "./codeHighlight.module.css";
|
||||
interface CodeHighlightProps {
|
||||
theme: "light" | "dark";
|
||||
code: HighlightProps["children"];
|
||||
lang?: string;
|
||||
background?: ThemeOptions["palette"] | string;
|
||||
}
|
||||
|
||||
export const CodeHighlight = (props: CodeHighlightProps) => {
|
||||
const { theme, code } = props;
|
||||
const { theme, code, lang, background } = props;
|
||||
useEffect(() => {
|
||||
if (theme === "dark") {
|
||||
// @ts-ignore - dont check type of css module
|
||||
@ -23,13 +26,21 @@ export const CodeHighlight = (props: CodeHighlightProps) => {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
"&.MuiBox-root>pre": {
|
||||
"&.MuiBox-root": {
|
||||
width: "100%",
|
||||
marginTop: 0,
|
||||
},
|
||||
"&.MuiBox-root>pre": {
|
||||
marginTop: 0,
|
||||
},
|
||||
"&.MuiBox-root>pre code.hljs": {
|
||||
bgcolor: background || undefined,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Highlight className={`nix ${styles.hljs}`}>{code}</Highlight>
|
||||
<Highlight className={`${lang || "nix"} ${styles.hljs}`}>
|
||||
{code}
|
||||
</Highlight>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
@ -75,9 +75,11 @@ export const Preview = (props: PreviewProps) => {
|
||||
</Tooltip>
|
||||
)}
|
||||
</Box>
|
||||
{prefix !== "builtins" && (
|
||||
{prefix !== "builtins" && id.includes("lib.") && (
|
||||
<Box sx={{ my: 1 }}>
|
||||
<Typography variant="subtitle1">{`short form: lib.${name}`}</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
{`short form: lib.${name}`}
|
||||
</Typography>
|
||||
</Box>
|
||||
)}
|
||||
<List sx={{ width: "100%" }} disablePadding>
|
||||
@ -172,13 +174,24 @@ export const Preview = (props: PreviewProps) => {
|
||||
}}
|
||||
primaryTypographyProps={{
|
||||
color: "text.secondary",
|
||||
gutterBottom: true,
|
||||
fontSize: 14,
|
||||
}}
|
||||
secondaryTypographyProps={{
|
||||
color: "text.primary",
|
||||
color: fn_type ? "text.primary" : "text.secondary",
|
||||
fontSize: "1rem",
|
||||
}}
|
||||
secondary={fn_type || "no type provided yet."}
|
||||
secondary={
|
||||
fn_type ? (
|
||||
<CodeHighlight
|
||||
code={fn_type}
|
||||
theme={theme.palette.mode}
|
||||
lang={"Haskell"}
|
||||
/>
|
||||
) : (
|
||||
"no type provided yet."
|
||||
)
|
||||
}
|
||||
primary="function signature "
|
||||
/>
|
||||
</ListItem>
|
||||
@ -209,7 +222,13 @@ export const Preview = (props: PreviewProps) => {
|
||||
</Typography>
|
||||
}
|
||||
secondary={
|
||||
<CodeHighlight code={example} theme={theme.palette.mode} />
|
||||
<CodeHighlight
|
||||
code={example}
|
||||
theme={theme.palette.mode}
|
||||
background={
|
||||
theme.palette.mode === "light" ? "action.hover" : undefined
|
||||
}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
|
@ -315,11 +315,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673195125,
|
||||
"narHash": "sha256-tXasChqzT2L2r3m3wRUIOLpiuxJRRONeknxchPUYiCA=",
|
||||
"lastModified": 1675069119,
|
||||
"narHash": "sha256-iEIPjUIZ3NYcESF5AWj/BPCuO5//r7NvyTzYSZlCaTk=",
|
||||
"owner": "hsjobeki",
|
||||
"repo": "nixdoc",
|
||||
"rev": "70481a4b453be9e5e24cb357d85036d32150330c",
|
||||
"rev": "c3e3dde0af8f7e2a61db7e3f51768e764b7643e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
10
flake.nix
10
flake.nix
@ -12,6 +12,11 @@
|
||||
system = "x86_64-linux";
|
||||
pkgs = inp.nixpkgs.legacyPackages.${system};
|
||||
inherit (builtins.fromJSON (builtins.readFile ./package.json)) name;
|
||||
prepareData = ''
|
||||
cp ${inp.nixdoc-fork.packages.${system}.data.lib} ./models/data/lib.json
|
||||
cp ${inp.nixdoc-fork.packages.${system}.data.build_support} ./models/data/trivial-builders.json
|
||||
node ./scripts/make-builtins.js
|
||||
'';
|
||||
in
|
||||
(inp.dream2nix.lib.makeFlakeOutputs {
|
||||
systemsFromFile = ./nix_systems;
|
||||
@ -24,9 +29,7 @@
|
||||
];
|
||||
packageOverrides = {
|
||||
${name}.staticPage = {
|
||||
preBuild = ''
|
||||
cp ${inp.nixdoc-fork.packages.${system}.data} ./models/lib.json
|
||||
'';
|
||||
preBuild = prepareData;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@ -43,6 +46,7 @@
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ nodejs-18_x ];
|
||||
shellHook = ''
|
||||
${prepareData}
|
||||
${self.checks.${system}.pre-commit-check.shellHook}
|
||||
'';
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,238 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": "trivial-builders.runCommand",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "runCommand",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Run the shell command `buildCommand' to produce a store path named\n`name'. The attributes in `env' are added to the environment\nprior to running the command. By default `runCommand` runs in a\nstdenv with no compiler environment. `runCommandCC` uses the default\nstdenv, `pkgs.stdenv`."
|
||||
],
|
||||
"example": "\nrunCommand \"name\" {envVariable = true;} ''echo hello > $out''\nrunCommandCC \"name\" {} ''gcc -o myfile myfile.c; cp myfile $out'';\nThe `*Local` variants force a derivation to be built locally,\nit is not substituted.\nThis is intended for very cheap commands (<1s execution time).\nIt saves on the network roundrip and can speed up a build.\nIt is the same as adding the special fields\n`preferLocalBuild = true;`\n`allowSubstitutes = false;`\nto a derivation’s attributes.\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.runCommandWith",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "runCommandWith",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Generalized version of the `runCommand`-variants\nwhich does customized behavior via a single\nattribute set passed as the first argument\ninstead of having a lot of variants like\n`runCommand*`. Additionally it allows changing\nthe used `stdenv` freely and has a more explicit\napproach to changing the arguments passed to\n`stdenv.mkDerivation`."
|
||||
],
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeTextFile",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeTextFile",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Writes a text file to the nix store.\nThe contents of text is added to the file in the store."
|
||||
],
|
||||
"example": "\n# Writes my-file to /nix/store/<store path>\nwriteTextFile {\nname = \"my-file\";\ntext = ''\nContents of File\n'';\n}\nSee also the `writeText` helper function below.\n# Writes executable my-file to /nix/store/<store path>/bin/my-file\nwriteTextFile {\nname = \"my-file\";\ntext = ''\nContents of File\n'';\nexecutable = true;\ndestination = \"/bin/my-file\";\n}\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeText",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeText",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Writes a text file to nix store with no optional parameters available."
|
||||
],
|
||||
"example": "\n# Writes contents of file to /nix/store/<store path>\nwriteText \"my-file\"\n''\nContents of File\n'';\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeTextDir",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeTextDir",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Writes a text file to nix store in a specific directory with no\noptional parameters available."
|
||||
],
|
||||
"example": "\n# Writes contents of file to /nix/store/<store path>/share/my-file\nwriteTextDir \"share/my-file\"\n''\nContents of File\n'';\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeScript",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeScript",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Writes a text file to /nix/store/<store path> and marks the file as\nexecutable.",
|
||||
"If passed as a build input, will be used as a setup hook. This makes setup\nhooks more efficient to create: you don't need a derivation that copies\nthem to $out/nix-support/setup-hook, instead you can use the file as is."
|
||||
],
|
||||
"example": "\n# Writes my-file to /nix/store/<store path> and makes executable\nwriteScript \"my-file\"\n''\nContents of File\n'';\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeScriptBin",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeScriptBin",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Writes a text file to /nix/store/<store path>/bin/<name> and\nmarks the file as executable."
|
||||
],
|
||||
"example": "\n# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.\nwriteScriptBin \"my-file\"\n''\nContents of File\n'';\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeShellScript",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeShellScript",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Similar to writeScript. Writes a Shell script and checks its syntax.\nAutomatically includes interpreter above the contents passed."
|
||||
],
|
||||
"example": "\n# Writes my-file to /nix/store/<store path> and makes executable.\nwriteShellScript \"my-file\"\n''\nContents of File\n'';\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeShellScriptBin",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeShellScriptBin",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Similar to writeShellScript and writeScriptBin.\nWrites an executable Shell script to /nix/store/<store path>/bin/<name> and checks its syntax.\nAutomatically includes interpreter above the contents passed."
|
||||
],
|
||||
"example": "\n# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.\nwriteShellScriptBin \"my-file\"\n''\nContents of File\n'';\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeShellApplication",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeShellApplication",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Similar to writeShellScriptBin and writeScriptBin.\nWrites an executable Shell script to /nix/store/<store path>/bin/<name> and\nchecks its syntax with shellcheck and the shell's -n option.\nAutomatically includes sane set of shellopts (errexit, nounset, pipefail)\nand handles creation of PATH based on runtimeInputs",
|
||||
"Note that the checkPhase uses stdenv.shell for the test run of the script,\nwhile the generated shebang uses runtimeShell. If, for whatever reason,\nthose were to mismatch you might lose fidelity in the default checks."
|
||||
],
|
||||
"example": "\nWrites my-file to /nix/store/<store path>/bin/my-file and makes executable.\nwriteShellApplication {\nname = \"my-file\";\nruntimeInputs = [ curl w3m ];\ntext = ''\ncurl -s 'https://nixos.org' | w3m -dump -T text/html\n'';\n}\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.concatTextFile",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "concatTextFile",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"concat a list of files to the nix store.\nThe contents of files are added to the file in the store."
|
||||
],
|
||||
"example": "\n# Writes my-file to /nix/store/<store path>\nconcatTextFile {\n name = \"my-file\";\nfiles = [ drv1 \"${drv2}/path/to/file\" ];\n}\nSee also the `concatText` helper function below.\n# Writes executable my-file to /nix/store/<store path>/bin/my-file\nconcatTextFile {\nname = \"my-file\";\nfiles = [ drv1 \"${drv2}/path/to/file\" ];\nexecutable = true;\ndestination = \"/bin/my-file\";\n}\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.concatText",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "concatText",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Writes a text file to nix store with no optional parameters available."
|
||||
],
|
||||
"example": "\n# Writes contents of files to /nix/store/<store path>\nconcatText \"my-file\" [ file1 file2 ]\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.concatScript",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "concatScript",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Writes a text file to nix store with and mark it as executable."
|
||||
],
|
||||
"example": "\n# Writes contents of files to /nix/store/<store path>\nconcatScript \"my-file\" [ file1 file2 ]\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.symlinkJoin",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "symlinkJoin",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Create a forest of symlinks to the files in `paths'.",
|
||||
"This creates a single derivation that replicates the directory structure\nof all the input paths.",
|
||||
"BEWARE: it may not \"work right\" when the passed paths contain symlinks to directories."
|
||||
],
|
||||
"example": "\n# adds symlinks of hello to current build.\nsymlinkJoin { name = \"myhello\"; paths = [ pkgs.hello ]; }\n# adds symlinks of hello and stack to current build and prints \"links added\"\nsymlinkJoin { name = \"myexample\"; paths = [ pkgs.hello pkgs.stack ]; postBuild = \"echo links added\"; }\nThis creates a derivation with a directory structure like the following:\n/nix/store/sglsr5g079a5235hy29da3mq3hv8sjmm-myexample\n|-- bin\n| |-- hello -> /nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10/bin/hello\n| `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/bin/stack\n`-- share\n|-- bash-completion\n| `-- completions\n| `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/bash-completion/completions/stack\n|-- fish\n| `-- vendor_completions.d\n| `-- stack.fish -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/fish/vendor_completions.d/stack.fish\n...\nsymlinkJoin and linkFarm are similar functions, but they output\nderivations with different structure.\nsymlinkJoin is used to create a derivation with a familiar directory\nstructure (top-level bin/, share/, etc), but with all actual files being symlinks to\nthe files in the input derivations.\nsymlinkJoin is used many places in nixpkgs to create a single derivation\nthat appears to contain binaries, libraries, documentation, etc from\nmultiple input derivations.\nlinkFarm is instead used to create a simple derivation with symlinks to\nother derivations. A derivation created with linkFarm is often used in CI\nas a easy way to build multiple derivations at once.\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.linkFarm",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "linkFarm",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Quickly create a set of symlinks to derivations.",
|
||||
"This creates a simple derivation with symlinks to all inputs.",
|
||||
"entries can be a list of attribute sets like",
|
||||
"\n[ { name = \"name\" ; path = \"/nix/store/...\"; } ]",
|
||||
"\nor an attribute set name -> path like",
|
||||
"\n{ name = \"/nix/store/...\"; other = \"/nix/store/...\"; }"
|
||||
],
|
||||
"example": "\n# Symlinks hello and stack paths in store to current $out/hello-test and\n# $out/foobar.\nlinkFarm \"myexample\" [ { name = \"hello-test\"; path = pkgs.hello; } { name = \"foobar\"; path = pkgs.stack; } ]\nThis creates a derivation with a directory structure like the following:\n/nix/store/qc5728m4sa344mbks99r3q05mymwm4rw-myexample\n|-- foobar -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1\n`-- hello-test -> /nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10\nSee the note on symlinkJoin for the difference between linkFarm and symlinkJoin.\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.linkFarmFromDrvs",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "linkFarmFromDrvs",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Easily create a linkFarm from a set of derivations.",
|
||||
"This calls linkFarm with a list of entries created from the list of input\nderivations. It turns each input derivation into an attribute set\nlike { name = drv.name ; path = drv }, and passes this to linkFarm."
|
||||
],
|
||||
"example": "\n# Symlinks the hello, gcc, and ghc derivations in $out\nlinkFarmFromDrvs \"myexample\" [ pkgs.hello pkgs.gcc pkgs.ghc ]\nThis creates a derivation with a directory structure like the following:\n/nix/store/m3s6wkjy9c3wy830201bqsb91nk2yj8c-myexample\n|-- gcc-wrapper-9.2.0 -> /nix/store/fqhjxf9ii4w4gqcsx59fyw2vvj91486a-gcc-wrapper-9.2.0\n|-- ghc-8.6.5 -> /nix/store/gnf3s07bglhbbk4y6m76sbh42siym0s6-ghc-8.6.5\n`-- hello-2.10 -> /nix/store/k0ll91c4npk4lg8lqhx00glg2m735g74-hello-2.10\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.makeSetupHook",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "makeSetupHook",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Make a package that just contains a setup hook with the given contents.\nThis setup hook will be invoked by any package that includes this package\nas a buildInput. Optionally takes a list of substitutions that should be\napplied to the resulting script."
|
||||
],
|
||||
"example": "\n# setup hook that depends on the hello package and runs ./myscript.sh\nmyhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;\n# writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the\n# bash interpreter.\nmyhellohookSub = makeSetupHook {\ndeps = [ hello ];\nsubstitutions = { bash = \"${pkgs.bash}/bin/bash\"; };\nmeta.platforms = lib.platforms.linux;\n} ./myscript.sh;\n# setup hook with a package test\nmyhellohookTested = makeSetupHook {\ndeps = [ hello ];\nsubstitutions = { bash = \"${pkgs.bash}/bin/bash\"; };\nmeta.platforms = lib.platforms.linux;\npassthru.tests.greeting = callPackage ./test { };\n} ./myscript.sh;\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeDirectReferencesToFile",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeDirectReferencesToFile",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Write the set of references to a file, that is, their immediate dependencies.",
|
||||
"This produces the equivalent of `nix-store -q --references`."
|
||||
],
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.writeStringReferencesToFile",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "writeStringReferencesToFile",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Extract a string's references to derivations and paths (its\ncontext) and write them to a text file, removing the input string\nitself from the dependency graph. This is useful when you want to\nmake a derivation depend on the string's references, but not its\ncontents (to avoid unnecessary rebuilds, for example).",
|
||||
"Note that this only works as intended on Nix >= 2.3."
|
||||
],
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.requireFile",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "requireFile",
|
||||
"fn_type": null,
|
||||
"description": [
|
||||
"Print an error message if the file with the specified name and\nhash doesn't exist in the Nix store. This function should only\nbe used by non-redistributable software with an unfree license\nthat we need to require the user to download manually. It produces\npackages that cannot be built automatically."
|
||||
],
|
||||
"example": "\nrequireFile {\nname = \"my-file\";\nurl = \"http://example.com/download/\";\nsha256 = \"ffffffffffffffffffffffffffffffffffffffffffffffffffff\";\n}\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.applyPatches",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "applyPatches",
|
||||
"fn_type": null,
|
||||
"description": ["Applies a list of patches to a source directory."],
|
||||
"example": "\nPatching nixpkgs\napplyPatches {\n\tsrc = pkgs.path;\n\tpatches = [\n\t(pkgs.fetchpatch {\n\turl = \"https://github.com/NixOS/nixpkgs/commit/1f770d20550a413e508e081ddc08464e9d08ba3d.patch\";\n\tsha256 = \"1nlzx171y3r3jbk0qhvnl711kmdk57jlq4na8f8bs8wz2pbffymr\";\n\t})\n\t];\n}\n"
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.emptyFile",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "emptyFile",
|
||||
"fn_type": null,
|
||||
"description": ["An immutable file in the store with a length of 0 bytes."],
|
||||
"example": null
|
||||
},
|
||||
{
|
||||
"id": "trivial-builders.emptyDirectory",
|
||||
"category": "./pkgs/build-support/trivial-builders.nix",
|
||||
"name": "emptyDirectory",
|
||||
"fn_type": null,
|
||||
"description": ["An immutable empty directory in the store."],
|
||||
"example": null
|
||||
}
|
||||
]
|
@ -15,9 +15,8 @@ const info = Object.entries(builtins).map(([name, meta]) => {
|
||||
],
|
||||
};
|
||||
});
|
||||
fs.writeFile("./models/builtins.json", JSON.stringify(info), (err) => {
|
||||
fs.writeFile("./models/data/builtins.json", JSON.stringify(info), (err) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
}
|
||||
// file written successfully
|
||||
});
|
@ -9,6 +9,9 @@ const lightThemeOptions: ThemeOptions = {
|
||||
},
|
||||
secondary: {
|
||||
main: "#6ad541"
|
||||
},
|
||||
background: {
|
||||
default: "#fafaff"
|
||||
}
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user