Merge master into staging-next
This commit is contained in:
commit
1c50878b7b
|
@ -75,7 +75,7 @@ in pkgs.runCommand "doc-support" {}
|
||||||
ln -s ${epub-xsl} ./epub.xsl
|
ln -s ${epub-xsl} ./epub.xsl
|
||||||
ln -s ${xhtml-xsl} ./xhtml.xsl
|
ln -s ${xhtml-xsl} ./xhtml.xsl
|
||||||
|
|
||||||
ln -s ${../../nixos/doc/xmlformat.conf} ./xmlformat.conf
|
ln -s ${./xmlformat.conf} ./xmlformat.conf
|
||||||
ln -s ${pkgs.documentation-highlighter} ./highlightjs
|
ln -s ${pkgs.documentation-highlighter} ./highlightjs
|
||||||
|
|
||||||
echo -n "${version}" > ./version
|
echo -n "${version}" > ./version
|
||||||
|
|
|
@ -3762,12 +3762,6 @@
|
||||||
githubId = 14034137;
|
githubId = 14034137;
|
||||||
name = "Mostly Void";
|
name = "Mostly Void";
|
||||||
};
|
};
|
||||||
dizfer = {
|
|
||||||
email = "david@izquierdofernandez.com";
|
|
||||||
github = "DIzFer";
|
|
||||||
githubId = 8852888;
|
|
||||||
name = "David Izquierdo";
|
|
||||||
};
|
|
||||||
djacu = {
|
djacu = {
|
||||||
email = "daniel.n.baker@gmail.com";
|
email = "daniel.n.baker@gmail.com";
|
||||||
github = "djacu";
|
github = "djacu";
|
||||||
|
|
2
nixos/doc/manual/.gitignore
vendored
2
nixos/doc/manual/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
generated
|
|
||||||
manual-combined.xml
|
|
|
@ -1,30 +0,0 @@
|
||||||
.PHONY: all
|
|
||||||
all: manual-combined.xml
|
|
||||||
|
|
||||||
.PHONY: debug
|
|
||||||
debug: generated manual-combined.xml
|
|
||||||
|
|
||||||
manual-combined.xml: generated *.xml **/*.xml
|
|
||||||
rm -f ./manual-combined.xml
|
|
||||||
nix-shell --pure -Q --packages xmloscopy \
|
|
||||||
--run "xmloscopy --docbook5 ./manual.xml ./manual-combined.xml"
|
|
||||||
|
|
||||||
.PHONY: format
|
|
||||||
format:
|
|
||||||
nix-shell --pure -Q --packages xmlformat \
|
|
||||||
--run "find ../../ -iname '*.xml' -type f -print0 | xargs -0 -I{} -n1 \
|
|
||||||
xmlformat --config-file '../xmlformat.conf' -i {}"
|
|
||||||
|
|
||||||
.PHONY: fix-misc-xml
|
|
||||||
fix-misc-xml:
|
|
||||||
find . -iname '*.xml' -type f \
|
|
||||||
-exec ../varlistentry-fixer.rb {} ';'
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
rm -f manual-combined.xml generated
|
|
||||||
|
|
||||||
generated:
|
|
||||||
nix-build ../../release.nix \
|
|
||||||
--attr manualGeneratedSources.x86_64-linux \
|
|
||||||
--out-link ./generated
|
|
|
@ -21,8 +21,8 @@ which is often not what you want. By contrast, in the imperative
|
||||||
approach, containers are configured and updated independently from the
|
approach, containers are configured and updated independently from the
|
||||||
host system.
|
host system.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="imperative-containers.section.xml" />
|
imperative-containers.section.md
|
||||||
<xi:include href="declarative-containers.section.xml" />
|
declarative-containers.section.md
|
||||||
<xi:include href="container-networking.section.xml" />
|
container-networking.section.md
|
||||||
```
|
```
|
||||||
|
|
14
nixos/doc/manual/administration/running.md
Normal file
14
nixos/doc/manual/administration/running.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Administration {#ch-running}
|
||||||
|
|
||||||
|
This chapter describes various aspects of managing a running NixOS system, such as how to use the {command}`systemd` service manager.
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
service-mgmt.chapter.md
|
||||||
|
rebooting.chapter.md
|
||||||
|
user-sessions.chapter.md
|
||||||
|
control-groups.chapter.md
|
||||||
|
logging.chapter.md
|
||||||
|
cleaning-store.chapter.md
|
||||||
|
containers.chapter.md
|
||||||
|
troubleshooting.chapter.md
|
||||||
|
```
|
|
@ -1,21 +0,0 @@
|
||||||
<part xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
||||||
version="5.0"
|
|
||||||
xml:id="ch-running">
|
|
||||||
<title>Administration</title>
|
|
||||||
<partintro xml:id="ch-running-intro">
|
|
||||||
<para>
|
|
||||||
This chapter describes various aspects of managing a running NixOS system,
|
|
||||||
such as how to use the <command>systemd</command> service manager.
|
|
||||||
</para>
|
|
||||||
</partintro>
|
|
||||||
<xi:include href="../from_md/administration/service-mgmt.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/administration/rebooting.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/administration/user-sessions.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/administration/control-groups.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/administration/logging.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/administration/cleaning-store.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/administration/containers.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/administration/troubleshooting.chapter.xml" />
|
|
||||||
</part>
|
|
|
@ -3,10 +3,10 @@
|
||||||
This chapter describes solutions to common problems you might encounter
|
This chapter describes solutions to common problems you might encounter
|
||||||
when you manage your NixOS system.
|
when you manage your NixOS system.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="boot-problems.section.xml" />
|
boot-problems.section.md
|
||||||
<xi:include href="maintenance-mode.section.xml" />
|
maintenance-mode.section.md
|
||||||
<xi:include href="rollback.section.xml" />
|
rollback.section.md
|
||||||
<xi:include href="store-corruption.section.xml" />
|
store-corruption.section.md
|
||||||
<xi:include href="network-problems.section.xml" />
|
network-problems.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -11,8 +11,8 @@ manual](https://nixos.org/nix/manual/#chap-writing-nix-expressions), but
|
||||||
here we give a short overview of the most important constructs useful in
|
here we give a short overview of the most important constructs useful in
|
||||||
NixOS configuration files.
|
NixOS configuration files.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="config-file.section.xml" />
|
config-file.section.md
|
||||||
<xi:include href="abstractions.section.xml" />
|
abstractions.section.md
|
||||||
<xi:include href="modularity.section.xml" />
|
modularity.section.md
|
||||||
```
|
```
|
||||||
|
|
27
nixos/doc/manual/configuration/configuration.md
Normal file
27
nixos/doc/manual/configuration/configuration.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Configuration {#ch-configuration}
|
||||||
|
|
||||||
|
This chapter describes how to configure various aspects of a NixOS machine through the configuration file {file}`/etc/nixos/configuration.nix`. As described in [](#sec-changing-config), changes to this file only take effect after you run {command}`nixos-rebuild`.
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
config-syntax.chapter.md
|
||||||
|
package-mgmt.chapter.md
|
||||||
|
user-mgmt.chapter.md
|
||||||
|
file-systems.chapter.md
|
||||||
|
x-windows.chapter.md
|
||||||
|
wayland.chapter.md
|
||||||
|
gpu-accel.chapter.md
|
||||||
|
xfce.chapter.md
|
||||||
|
networking.chapter.md
|
||||||
|
linux-kernel.chapter.md
|
||||||
|
subversion.chapter.md
|
||||||
|
```
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
@MODULE_CHAPTERS@
|
||||||
|
```
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
profiles.chapter.md
|
||||||
|
kubernetes.chapter.md
|
||||||
|
```
|
||||||
|
<!-- Apache; libvirtd virtualisation -->
|
|
@ -1,31 +0,0 @@
|
||||||
<part xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
||||||
version="5.0"
|
|
||||||
xml:id="ch-configuration">
|
|
||||||
<title>Configuration</title>
|
|
||||||
<partintro xml:id="ch-configuration-intro">
|
|
||||||
<para>
|
|
||||||
This chapter describes how to configure various aspects of a NixOS machine
|
|
||||||
through the configuration file
|
|
||||||
<filename>/etc/nixos/configuration.nix</filename>. As described in
|
|
||||||
<xref linkend="sec-changing-config" />, changes to this file only take
|
|
||||||
effect after you run <command>nixos-rebuild</command>.
|
|
||||||
</para>
|
|
||||||
</partintro>
|
|
||||||
<xi:include href="../from_md/configuration/config-syntax.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/package-mgmt.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/user-mgmt.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/file-systems.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/x-windows.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/wayland.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/gpu-accel.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/xfce.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/networking.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/linux-kernel.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/subversion.chapter.xml" />
|
|
||||||
<xi:include href="../generated/modules.xml" xpointer="xpointer(//section[@id='modules']/*)" />
|
|
||||||
<xi:include href="../from_md/configuration/profiles.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/configuration/kubernetes.chapter.xml" />
|
|
||||||
<!-- Apache; libvirtd virtualisation -->
|
|
||||||
</part>
|
|
|
@ -40,7 +40,7 @@ configuration use `pkgs` prefix (variable).
|
||||||
To "uninstall" a package, simply remove it from
|
To "uninstall" a package, simply remove it from
|
||||||
[](#opt-environment.systemPackages) and run `nixos-rebuild switch`.
|
[](#opt-environment.systemPackages) and run `nixos-rebuild switch`.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="customizing-packages.section.xml" />
|
customizing-packages.section.md
|
||||||
<xi:include href="adding-custom-packages.section.xml" />
|
adding-custom-packages.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -36,7 +36,7 @@ dropping you to the emergency shell. You can make a mount asynchronous
|
||||||
and non-critical by adding `options = [ "nofail" ];`.
|
and non-critical by adding `options = [ "nofail" ];`.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="luks-file-systems.section.xml" />
|
luks-file-systems.section.md
|
||||||
<xi:include href="sshfs-file-systems.section.xml" />
|
sshfs-file-systems.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
This section describes how to configure networking components
|
This section describes how to configure networking components
|
||||||
on your NixOS machine.
|
on your NixOS machine.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="network-manager.section.xml" />
|
network-manager.section.md
|
||||||
<xi:include href="ssh.section.xml" />
|
ssh.section.md
|
||||||
<xi:include href="ipv4-config.section.xml" />
|
ipv4-config.section.md
|
||||||
<xi:include href="ipv6-config.section.xml" />
|
ipv6-config.section.md
|
||||||
<xi:include href="firewall.section.xml" />
|
firewall.section.md
|
||||||
<xi:include href="wireless.section.xml" />
|
wireless.section.md
|
||||||
<xi:include href="ad-hoc-network-config.section.xml" />
|
ad-hoc-network-config.section.md
|
||||||
<xi:include href="renaming-interfaces.section.xml" />
|
renaming-interfaces.section.md
|
||||||
```
|
```
|
||||||
<!-- TODO: OpenVPN, NAT -->
|
<!-- TODO: OpenVPN, NAT -->
|
||||||
|
|
|
@ -12,7 +12,7 @@ NixOS has two distinct styles of package management:
|
||||||
`nix-env` command. This style allows mixing packages from different
|
`nix-env` command. This style allows mixing packages from different
|
||||||
Nixpkgs versions. It's the only choice for non-root users.
|
Nixpkgs versions. It's the only choice for non-root users.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="declarative-packages.section.xml" />
|
declarative-packages.section.md
|
||||||
<xi:include href="ad-hoc-packages.section.xml" />
|
ad-hoc-packages.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -19,16 +19,16 @@ install media, many are actually intended to be used in real installs.
|
||||||
What follows is a brief explanation on the purpose and use-case for each
|
What follows is a brief explanation on the purpose and use-case for each
|
||||||
profile. Detailing each option configured by each one is out of scope.
|
profile. Detailing each option configured by each one is out of scope.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="profiles/all-hardware.section.xml" />
|
profiles/all-hardware.section.md
|
||||||
<xi:include href="profiles/base.section.xml" />
|
profiles/base.section.md
|
||||||
<xi:include href="profiles/clone-config.section.xml" />
|
profiles/clone-config.section.md
|
||||||
<xi:include href="profiles/demo.section.xml" />
|
profiles/demo.section.md
|
||||||
<xi:include href="profiles/docker-container.section.xml" />
|
profiles/docker-container.section.md
|
||||||
<xi:include href="profiles/graphical.section.xml" />
|
profiles/graphical.section.md
|
||||||
<xi:include href="profiles/hardened.section.xml" />
|
profiles/hardened.section.md
|
||||||
<xi:include href="profiles/headless.section.xml" />
|
profiles/headless.section.md
|
||||||
<xi:include href="profiles/installation-device.section.xml" />
|
profiles/installation-device.section.md
|
||||||
<xi:include href="profiles/minimal.section.xml" />
|
profiles/minimal.section.md
|
||||||
<xi:include href="profiles/qemu-guest.section.xml" />
|
profiles/qemu-guest.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -68,56 +68,6 @@ let
|
||||||
optionIdPrefix = "test-opt-";
|
optionIdPrefix = "test-opt-";
|
||||||
};
|
};
|
||||||
|
|
||||||
sources = runCommand "manual-sources" {
|
|
||||||
inputs = lib.sourceFilesBySuffices ./. [ ".xml" ".md" ];
|
|
||||||
nativeBuildInputs = [ pkgs.nixos-render-docs ];
|
|
||||||
} ''
|
|
||||||
mkdir $out
|
|
||||||
cd $out
|
|
||||||
cp -r --no-preserve=all $inputs/* .
|
|
||||||
|
|
||||||
declare -a convert_args
|
|
||||||
while read -r mf; do
|
|
||||||
if [[ "$mf" = *.chapter.md ]]; then
|
|
||||||
convert_args+=("--chapter")
|
|
||||||
else
|
|
||||||
convert_args+=("--section")
|
|
||||||
fi
|
|
||||||
|
|
||||||
convert_args+=("from_md/''${mf%.md}.xml" "$mf")
|
|
||||||
done < <(find . -type f -name '*.md')
|
|
||||||
|
|
||||||
nixos-render-docs manual docbook-fragment \
|
|
||||||
--manpage-urls ${manpageUrls} \
|
|
||||||
"''${convert_args[@]}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
modulesDoc = runCommand "modules.xml" {
|
|
||||||
nativeBuildInputs = [ pkgs.nixos-render-docs ];
|
|
||||||
} ''
|
|
||||||
nixos-render-docs manual docbook-section \
|
|
||||||
--manpage-urls ${manpageUrls} \
|
|
||||||
"$out" \
|
|
||||||
--section \
|
|
||||||
--section-id modules \
|
|
||||||
--chapters ${lib.concatMapStrings (p: "${p.value} ") config.meta.doc}
|
|
||||||
'';
|
|
||||||
|
|
||||||
generatedSources = runCommand "generated-docbook" {} ''
|
|
||||||
mkdir $out
|
|
||||||
ln -s ${modulesDoc} $out/modules.xml
|
|
||||||
ln -s ${optionsDoc.optionsDocBook} $out/options-db.xml
|
|
||||||
ln -s ${testOptionsDoc.optionsDocBook} $out/test-options-db.xml
|
|
||||||
printf "%s" "${version}" > $out/version
|
|
||||||
'';
|
|
||||||
|
|
||||||
copySources =
|
|
||||||
''
|
|
||||||
cp -prd $sources/* . # */
|
|
||||||
ln -s ${generatedSources} ./generated
|
|
||||||
chmod -R u+w .
|
|
||||||
'';
|
|
||||||
|
|
||||||
toc = builtins.toFile "toc.xml"
|
toc = builtins.toFile "toc.xml"
|
||||||
''
|
''
|
||||||
<toc role="chunk-toc">
|
<toc role="chunk-toc">
|
||||||
|
@ -148,18 +98,7 @@ let
|
||||||
"--stringparam chunk.toc ${toc}"
|
"--stringparam chunk.toc ${toc}"
|
||||||
];
|
];
|
||||||
|
|
||||||
manual-combined = runCommand "nixos-manual-combined"
|
linterFunctions = ''
|
||||||
{ inherit sources;
|
|
||||||
nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
|
||||||
meta.description = "The NixOS manual as plain docbook XML";
|
|
||||||
}
|
|
||||||
''
|
|
||||||
${copySources}
|
|
||||||
|
|
||||||
xmllint --xinclude --output ./manual-combined.xml ./manual.xml
|
|
||||||
xmllint --xinclude --noxincludenode \
|
|
||||||
--output ./man-pages-combined.xml ./man-pages.xml
|
|
||||||
|
|
||||||
# outputs the context of an xmllint error output
|
# outputs the context of an xmllint error output
|
||||||
# LEN lines around the failing line are printed
|
# LEN lines around the failing line are printed
|
||||||
function context {
|
function context {
|
||||||
|
@ -194,24 +133,67 @@ let
|
||||||
2>&1 | context 1>&2
|
2>&1 | context 1>&2
|
||||||
# ^ redirect assumes xmllint doesn’t print to stdout
|
# ^ redirect assumes xmllint doesn’t print to stdout
|
||||||
}
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
manual-combined = runCommand "nixos-manual-combined"
|
||||||
|
{ inputs = lib.sourceFilesBySuffices ./. [ ".xml" ".md" ];
|
||||||
|
nativeBuildInputs = [ pkgs.nixos-render-docs pkgs.libxml2.bin pkgs.libxslt.bin ];
|
||||||
|
meta.description = "The NixOS manual as plain docbook XML";
|
||||||
|
}
|
||||||
|
''
|
||||||
|
cp -r --no-preserve=all $inputs/* .
|
||||||
|
|
||||||
|
substituteInPlace ./manual.md \
|
||||||
|
--replace '@NIXOS_VERSION@' "${version}"
|
||||||
|
substituteInPlace ./configuration/configuration.md \
|
||||||
|
--replace \
|
||||||
|
'@MODULE_CHAPTERS@' \
|
||||||
|
${lib.escapeShellArg (lib.concatMapStringsSep "\n" (p: "${p.value}") config.meta.doc)}
|
||||||
|
substituteInPlace ./nixos-options.md \
|
||||||
|
--replace \
|
||||||
|
'@NIXOS_OPTIONS_JSON@' \
|
||||||
|
${optionsDoc.optionsJSON}/share/doc/nixos/options.json
|
||||||
|
substituteInPlace ./development/writing-nixos-tests.section.md \
|
||||||
|
--replace \
|
||||||
|
'@NIXOS_TEST_OPTIONS_JSON@' \
|
||||||
|
${testOptionsDoc.optionsJSON}/share/doc/nixos/options.json
|
||||||
|
|
||||||
|
nixos-render-docs manual docbook \
|
||||||
|
--manpage-urls ${manpageUrls} \
|
||||||
|
--revision ${lib.escapeShellArg revision} \
|
||||||
|
./manual.md \
|
||||||
|
./manual-combined.xml
|
||||||
|
|
||||||
|
${linterFunctions}
|
||||||
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp manual-combined.xml $out/
|
cp manual-combined.xml $out/
|
||||||
cp man-pages-combined.xml $out/
|
|
||||||
|
|
||||||
lintrng $out/manual-combined.xml
|
lintrng $out/manual-combined.xml
|
||||||
lintrng $out/man-pages-combined.xml
|
'';
|
||||||
|
|
||||||
|
manpages-combined = runCommand "nixos-manpages-combined.xml"
|
||||||
|
{ nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
||||||
|
meta.description = "The NixOS manpages as plain docbook XML";
|
||||||
|
}
|
||||||
|
''
|
||||||
|
mkdir generated
|
||||||
|
cp -prd ${./man-pages.xml} man-pages.xml
|
||||||
|
ln -s ${optionsDoc.optionsDocBook} generated/options-db.xml
|
||||||
|
|
||||||
|
xmllint --xinclude --noxincludenode --output $out ./man-pages.xml
|
||||||
|
|
||||||
|
${linterFunctions}
|
||||||
|
|
||||||
|
lintrng $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
inherit generatedSources;
|
|
||||||
|
|
||||||
inherit (optionsDoc) optionsJSON optionsNix optionsDocBook optionsUsedDocbook;
|
inherit (optionsDoc) optionsJSON optionsNix optionsDocBook optionsUsedDocbook;
|
||||||
|
|
||||||
# Generate the NixOS manual.
|
# Generate the NixOS manual.
|
||||||
manualHTML = runCommand "nixos-manual-html"
|
manualHTML = runCommand "nixos-manual-html"
|
||||||
{ inherit sources;
|
{ nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
||||||
nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
|
||||||
meta.description = "The NixOS manual in HTML format";
|
meta.description = "The NixOS manual in HTML format";
|
||||||
allowedReferences = ["out"];
|
allowedReferences = ["out"];
|
||||||
}
|
}
|
||||||
|
@ -248,8 +230,7 @@ in rec {
|
||||||
manualHTMLIndex = "${manualHTML}/share/doc/nixos/index.html";
|
manualHTMLIndex = "${manualHTML}/share/doc/nixos/index.html";
|
||||||
|
|
||||||
manualEpub = runCommand "nixos-manual-epub"
|
manualEpub = runCommand "nixos-manual-epub"
|
||||||
{ inherit sources;
|
{ nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin buildPackages.zip ];
|
||||||
nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin buildPackages.zip ];
|
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
# Generate the epub manual.
|
# Generate the epub manual.
|
||||||
|
@ -300,7 +281,7 @@ in rec {
|
||||||
--param man.endnotes.are.numbered 0 \
|
--param man.endnotes.are.numbered 0 \
|
||||||
--param man.break.after.slash 1 \
|
--param man.break.after.slash 1 \
|
||||||
${docbook_xsl_ns}/xml/xsl/docbook/manpages/docbook.xsl \
|
${docbook_xsl_ns}/xml/xsl/docbook/manpages/docbook.xsl \
|
||||||
${manual-combined}/man-pages-combined.xml
|
${manpages-combined}
|
||||||
''
|
''
|
||||||
else ''
|
else ''
|
||||||
mkdir -p $out/share/man/man5
|
mkdir -p $out/share/man/man5
|
||||||
|
|
14
nixos/doc/manual/development/development.md
Normal file
14
nixos/doc/manual/development/development.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Development {#ch-development}
|
||||||
|
|
||||||
|
This chapter describes how you can modify and extend NixOS.
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
sources.chapter.md
|
||||||
|
writing-modules.chapter.md
|
||||||
|
building-parts.chapter.md
|
||||||
|
bootspec.chapter.md
|
||||||
|
what-happens-during-a-system-switch.chapter.md
|
||||||
|
writing-documentation.chapter.md
|
||||||
|
nixos-tests.chapter.md
|
||||||
|
testing-installer.chapter.md
|
||||||
|
```
|
|
@ -1,20 +0,0 @@
|
||||||
<part xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
||||||
version="5.0"
|
|
||||||
xml:id="ch-development">
|
|
||||||
<title>Development</title>
|
|
||||||
<partintro xml:id="ch-development-intro">
|
|
||||||
<para>
|
|
||||||
This chapter describes how you can modify and extend NixOS.
|
|
||||||
</para>
|
|
||||||
</partintro>
|
|
||||||
<xi:include href="../from_md/development/sources.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/development/writing-modules.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/development/building-parts.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/development/bootspec.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/development/what-happens-during-a-system-switch.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/development/writing-documentation.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/development/nixos-tests.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/development/testing-installer.chapter.xml" />
|
|
||||||
</part>
|
|
|
@ -5,9 +5,9 @@ NixOS tests are kept in the directory `nixos/tests`, and are executed
|
||||||
(using Nix) by a testing framework that automatically starts one or more
|
(using Nix) by a testing framework that automatically starts one or more
|
||||||
virtual machines containing the NixOS system(s) required for the test.
|
virtual machines containing the NixOS system(s) required for the test.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="writing-nixos-tests.section.xml" />
|
writing-nixos-tests.section.md
|
||||||
<xi:include href="running-nixos-tests.section.xml" />
|
running-nixos-tests.section.md
|
||||||
<xi:include href="running-nixos-tests-interactively.section.xml" />
|
running-nixos-tests-interactively.section.md
|
||||||
<xi:include href="linking-nixos-tests-to-packages.section.xml" />
|
linking-nixos-tests-to-packages.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -47,7 +47,7 @@ Most of these actions are either self-explaining but some of them have to do
|
||||||
with our units or the activation script. For this reason, these topics are
|
with our units or the activation script. For this reason, these topics are
|
||||||
explained in the next sections.
|
explained in the next sections.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="unit-handling.section.xml" />
|
unit-handling.section.md
|
||||||
<xi:include href="activation-script.section.xml" />
|
activation-script.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -83,7 +83,7 @@ Keep the following guidelines in mind when you create and add a topic:
|
||||||
|
|
||||||
## Adding a Topic to the Book {#sec-writing-docs-adding-a-topic}
|
## Adding a Topic to the Book {#sec-writing-docs-adding-a-topic}
|
||||||
|
|
||||||
Open the parent XML file and add an `xi:include` element to the list of
|
Open the parent CommonMark file and add a line to the list of
|
||||||
chapters with the file name of the topic that you created. If you
|
chapters with the file name of the topic that you created. If you
|
||||||
created a `section`, you add the file to the `chapter` file. If you created
|
created a `section`, you add the file to the `chapter` file. If you created
|
||||||
a `chapter`, you add the file to the `part` file.
|
a `chapter`, you add the file to the `part` file.
|
||||||
|
|
|
@ -189,14 +189,14 @@ in {
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="option-declarations.section.xml" />
|
option-declarations.section.md
|
||||||
<xi:include href="option-types.section.xml" />
|
option-types.section.md
|
||||||
<xi:include href="option-def.section.xml" />
|
option-def.section.md
|
||||||
<xi:include href="assertions.section.xml" />
|
assertions.section.md
|
||||||
<xi:include href="meta-attributes.section.xml" />
|
meta-attributes.section.md
|
||||||
<xi:include href="importing-modules.section.xml" />
|
importing-modules.section.md
|
||||||
<xi:include href="replace-modules.section.xml" />
|
replace-modules.section.md
|
||||||
<xi:include href="freeform-modules.section.xml" />
|
freeform-modules.section.md
|
||||||
<xi:include href="settings-options.section.xml" />
|
settings-options.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -470,6 +470,8 @@ In that case, `numpy` is chosen from the generic `python3Packages`.
|
||||||
|
|
||||||
The following options can be used when writing tests.
|
The following options can be used when writing tests.
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} options
|
||||||
<xi:include href="../../generated/test-options-db.xml" xpointer="test-options-list"/>
|
id-prefix: test-opt-
|
||||||
|
list-id: test-options-list
|
||||||
|
source: @NIXOS_TEST_OPTIONS_JSON@
|
||||||
```
|
```
|
||||||
|
|
11
nixos/doc/manual/installation/installation.md
Normal file
11
nixos/doc/manual/installation/installation.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Installation {#ch-installation}
|
||||||
|
|
||||||
|
This section describes how to obtain, install, and configure NixOS for first-time use.
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
obtaining.chapter.md
|
||||||
|
installing.chapter.md
|
||||||
|
changing-config.chapter.md
|
||||||
|
upgrading.chapter.md
|
||||||
|
building-nixos.chapter.md
|
||||||
|
```
|
|
@ -1,18 +0,0 @@
|
||||||
<part xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
||||||
version="5.0"
|
|
||||||
xml:id="ch-installation">
|
|
||||||
<title>Installation</title>
|
|
||||||
<partintro xml:id="ch-installation-intro">
|
|
||||||
<para>
|
|
||||||
This section describes how to obtain, install, and configure NixOS for
|
|
||||||
first-time use.
|
|
||||||
</para>
|
|
||||||
</partintro>
|
|
||||||
<xi:include href="../from_md/installation/obtaining.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/installation/installing.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/installation/changing-config.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/installation/upgrading.chapter.xml" />
|
|
||||||
<xi:include href="../from_md/installation/building-nixos.chapter.xml" />
|
|
||||||
</part>
|
|
|
@ -602,11 +602,11 @@ With a partitioned disk.
|
||||||
|
|
||||||
## Additional installation notes {#sec-installation-additional-notes}
|
## Additional installation notes {#sec-installation-additional-notes}
|
||||||
|
|
||||||
```{=docbook}
|
```{=include=} sections
|
||||||
<xi:include href="installing-usb.section.xml" />
|
installing-usb.section.md
|
||||||
<xi:include href="installing-pxe.section.xml" />
|
installing-pxe.section.md
|
||||||
<xi:include href="installing-kexec.section.xml" />
|
installing-kexec.section.md
|
||||||
<xi:include href="installing-virtualbox-guest.section.xml" />
|
installing-virtualbox-guest.section.md
|
||||||
<xi:include href="installing-from-other-distro.section.xml" />
|
installing-from-other-distro.section.md
|
||||||
<xi:include href="installing-behind-a-proxy.section.xml" />
|
installing-behind-a-proxy.section.md
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
<refentry xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
||||||
<refmeta>
|
|
||||||
<refentrytitle><filename>configuration.nix</filename>
|
|
||||||
</refentrytitle><manvolnum>5</manvolnum>
|
|
||||||
<refmiscinfo class="source">NixOS</refmiscinfo>
|
|
||||||
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
|
|
||||||
</refmeta>
|
|
||||||
<refnamediv>
|
|
||||||
<refname><filename>configuration.nix</filename></refname>
|
|
||||||
<refpurpose>NixOS system configuration specification</refpurpose>
|
|
||||||
</refnamediv>
|
|
||||||
<refsection>
|
|
||||||
<title>Description</title>
|
|
||||||
<para>
|
|
||||||
The file <filename>/etc/nixos/configuration.nix</filename> contains the
|
|
||||||
declarative specification of your NixOS system configuration. The command
|
|
||||||
<command>nixos-rebuild</command> takes this file and realises the system
|
|
||||||
configuration specified therein.
|
|
||||||
</para>
|
|
||||||
</refsection>
|
|
||||||
<refsection>
|
|
||||||
<title>Options</title>
|
|
||||||
<para>
|
|
||||||
You can use the following options in <filename>configuration.nix</filename>.
|
|
||||||
</para>
|
|
||||||
<xi:include href="./generated/options-db.xml"
|
|
||||||
xpointer="configuration-variable-list" />
|
|
||||||
</refsection>
|
|
||||||
</refentry>
|
|
|
@ -14,5 +14,33 @@
|
||||||
<copyright><year>2007-2022</year><holder>Eelco Dolstra and the Nixpkgs/NixOS contributors</holder>
|
<copyright><year>2007-2022</year><holder>Eelco Dolstra and the Nixpkgs/NixOS contributors</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</info>
|
</info>
|
||||||
<xi:include href="man-configuration.xml" />
|
<refentry>
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle><filename>configuration.nix</filename>
|
||||||
|
</refentrytitle><manvolnum>5</manvolnum>
|
||||||
|
<refmiscinfo class="source">NixOS</refmiscinfo>
|
||||||
|
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
|
||||||
|
</refmeta>
|
||||||
|
<refnamediv>
|
||||||
|
<refname><filename>configuration.nix</filename></refname>
|
||||||
|
<refpurpose>NixOS system configuration specification</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
<refsection>
|
||||||
|
<title>Description</title>
|
||||||
|
<para>
|
||||||
|
The file <filename>/etc/nixos/configuration.nix</filename> contains the
|
||||||
|
declarative specification of your NixOS system configuration. The command
|
||||||
|
<command>nixos-rebuild</command> takes this file and realises the system
|
||||||
|
configuration specified therein.
|
||||||
|
</para>
|
||||||
|
</refsection>
|
||||||
|
<refsection>
|
||||||
|
<title>Options</title>
|
||||||
|
<para>
|
||||||
|
You can use the following options in <filename>configuration.nix</filename>.
|
||||||
|
</para>
|
||||||
|
<xi:include href="./generated/options-db.xml"
|
||||||
|
xpointer="configuration-variable-list" />
|
||||||
|
</refsection>
|
||||||
|
</refentry>
|
||||||
</reference>
|
</reference>
|
||||||
|
|
53
nixos/doc/manual/manual.md
Normal file
53
nixos/doc/manual/manual.md
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# NixOS Manual {#book-nixos-manual}
|
||||||
|
## Version @NIXOS_VERSION@
|
||||||
|
|
||||||
|
<!--
|
||||||
|
this is the top-level structure file for the nixos manual.
|
||||||
|
|
||||||
|
the manual structure extends the nixpkgs commonmark further with include
|
||||||
|
blocks to allow better organization of input text. there are six types of
|
||||||
|
include blocks: preface, parts, chapters, sections, appendix, and options.
|
||||||
|
each type except `options`` corresponds to the docbook elements of (roughly)
|
||||||
|
the same name, and can itself can further include blocks to denote its
|
||||||
|
substructure.
|
||||||
|
|
||||||
|
non-`options`` include blocks are fenced code blocks that list a number of
|
||||||
|
files to include, in the form
|
||||||
|
|
||||||
|
```{=include=} <type>
|
||||||
|
<file-name-1>
|
||||||
|
<file-name-2>
|
||||||
|
<...>
|
||||||
|
```
|
||||||
|
|
||||||
|
`options` include blocks do not list file names but contain a list of key-value
|
||||||
|
pairs that describe the options to be included and how to convert them into
|
||||||
|
elements of the manual output type:
|
||||||
|
|
||||||
|
```{=include=} options
|
||||||
|
id-prefix: <options id prefix>
|
||||||
|
list-id: <variable list element id>
|
||||||
|
source: <path to options.json>
|
||||||
|
```
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
```{=include=} preface
|
||||||
|
preface.md
|
||||||
|
```
|
||||||
|
|
||||||
|
```{=include=} parts
|
||||||
|
installation/installation.md
|
||||||
|
configuration/configuration.md
|
||||||
|
administration/running.md
|
||||||
|
development/development.md
|
||||||
|
```
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
contributing-to-this-manual.chapter.md
|
||||||
|
```
|
||||||
|
|
||||||
|
```{=include=} appendix
|
||||||
|
nixos-options.md
|
||||||
|
release-notes/release-notes.md
|
||||||
|
```
|
|
@ -1,23 +0,0 @@
|
||||||
<book xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
||||||
version="5.0"
|
|
||||||
xml:id="book-nixos-manual">
|
|
||||||
<info>
|
|
||||||
<title>NixOS Manual</title>
|
|
||||||
<subtitle>Version <xi:include href="./generated/version" parse="text" />
|
|
||||||
</subtitle>
|
|
||||||
</info>
|
|
||||||
<xi:include href="preface.xml" />
|
|
||||||
<xi:include href="installation/installation.xml" />
|
|
||||||
<xi:include href="configuration/configuration.xml" />
|
|
||||||
<xi:include href="administration/running.xml" />
|
|
||||||
<xi:include href="development/development.xml" />
|
|
||||||
<xi:include href="./from_md/contributing-to-this-manual.chapter.xml" />
|
|
||||||
<appendix xml:id="ch-options">
|
|
||||||
<title>Configuration Options</title>
|
|
||||||
<xi:include href="./generated/options-db.xml"
|
|
||||||
xpointer="configuration-variable-list" />
|
|
||||||
</appendix>
|
|
||||||
<xi:include href="release-notes/release-notes.xml" />
|
|
||||||
</book>
|
|
7
nixos/doc/manual/nixos-options.md
Normal file
7
nixos/doc/manual/nixos-options.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Configuration Options {#ch-options}
|
||||||
|
|
||||||
|
```{=include=} options
|
||||||
|
id-prefix: opt-
|
||||||
|
list-id: configuration-variable-list
|
||||||
|
source: @NIXOS_OPTIONS_JSON@
|
||||||
|
```
|
11
nixos/doc/manual/preface.md
Normal file
11
nixos/doc/manual/preface.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Preface {#preface}
|
||||||
|
|
||||||
|
This manual describes how to install, use and extend NixOS, a Linux distribution based on the purely functional package management system [Nix](https://nixos.org/nix), that is composed using modules and packages defined in the [Nixpkgs](https://nixos.org/nixpkgs) project.
|
||||||
|
|
||||||
|
Additional information regarding the Nix package manager and the Nixpkgs project can be found in respectively the [Nix manual](https://nixos.org/nix/manual) and the [Nixpkgs manual](https://nixos.org/nixpkgs/manual).
|
||||||
|
|
||||||
|
If you encounter problems, please report them on the [`Discourse`](https://discourse.nixos.org), the [Matrix room](https://matrix.to/#nix:nixos.org), or on the [`#nixos` channel on Libera.Chat](irc://irc.libera.chat/#nixos). Alternatively, consider [contributing to this manual](#chap-contributing). Bugs should be reported in [NixOS’ GitHub issue tracker](https://github.com/NixOS/nixpkgs/issues).
|
||||||
|
|
||||||
|
::: {.note}
|
||||||
|
Commands prefixed with `#` have to be run as root, either requiring to login as root user or temporarily switching to it using `sudo` for example.
|
||||||
|
:::
|
|
@ -1,42 +0,0 @@
|
||||||
<preface xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xml:id="preface">
|
|
||||||
<title>Preface</title>
|
|
||||||
<para>
|
|
||||||
This manual describes how to install, use and extend NixOS, a Linux
|
|
||||||
distribution based on the purely functional package management system
|
|
||||||
<link xlink:href="https://nixos.org/nix">Nix</link>, that is composed
|
|
||||||
using modules and packages defined in the
|
|
||||||
<link xlink:href="https://nixos.org/nixpkgs">Nixpkgs</link> project.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Additional information regarding the Nix package manager and the Nixpkgs
|
|
||||||
project can be found in respectively the
|
|
||||||
<link xlink:href="https://nixos.org/nix/manual">Nix manual</link> and the
|
|
||||||
<link xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs manual</link>.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
If you encounter problems, please report them on the
|
|
||||||
<literal
|
|
||||||
xlink:href="https://discourse.nixos.org">Discourse</literal>,
|
|
||||||
the <link
|
|
||||||
xlink:href="https://matrix.to/#nix:nixos.org">Matrix room</link>,
|
|
||||||
or on the <link
|
|
||||||
xlink:href="irc://irc.libera.chat/#nixos">
|
|
||||||
<literal>#nixos</literal> channel on Libera.Chat</link>.
|
|
||||||
Alternatively, consider <link
|
|
||||||
xlink:href="#chap-contributing">
|
|
||||||
contributing to this manual</link>. Bugs should be
|
|
||||||
reported in
|
|
||||||
<link
|
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’
|
|
||||||
GitHub issue tracker</link>.
|
|
||||||
</para>
|
|
||||||
<note>
|
|
||||||
<para>
|
|
||||||
Commands prefixed with <literal>#</literal> have to be run as root, either
|
|
||||||
requiring to login as root user or temporarily switching to it using
|
|
||||||
<literal>sudo</literal> for example.
|
|
||||||
</para>
|
|
||||||
</note>
|
|
||||||
</preface>
|
|
25
nixos/doc/manual/release-notes/release-notes.md
Normal file
25
nixos/doc/manual/release-notes/release-notes.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# Release Notes {#ch-release-notes}
|
||||||
|
|
||||||
|
This section lists the release notes for each stable version of NixOS and current unstable revision.
|
||||||
|
|
||||||
|
```{=include=} sections
|
||||||
|
rl-2305.section.md
|
||||||
|
rl-2211.section.md
|
||||||
|
rl-2205.section.md
|
||||||
|
rl-2111.section.md
|
||||||
|
rl-2105.section.md
|
||||||
|
rl-2009.section.md
|
||||||
|
rl-2003.section.md
|
||||||
|
rl-1909.section.md
|
||||||
|
rl-1903.section.md
|
||||||
|
rl-1809.section.md
|
||||||
|
rl-1803.section.md
|
||||||
|
rl-1709.section.md
|
||||||
|
rl-1703.section.md
|
||||||
|
rl-1609.section.md
|
||||||
|
rl-1603.section.md
|
||||||
|
rl-1509.section.md
|
||||||
|
rl-1412.section.md
|
||||||
|
rl-1404.section.md
|
||||||
|
rl-1310.section.md
|
||||||
|
```
|
|
@ -1,30 +0,0 @@
|
||||||
<appendix xmlns="http://docbook.org/ns/docbook"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
||||||
version="5.0"
|
|
||||||
xml:id="ch-release-notes">
|
|
||||||
<title>Release Notes</title>
|
|
||||||
<para>
|
|
||||||
This section lists the release notes for each stable version of NixOS and
|
|
||||||
current unstable revision.
|
|
||||||
</para>
|
|
||||||
<xi:include href="../from_md/release-notes/rl-2305.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-2211.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-2205.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-2111.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-2105.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-2009.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-2003.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1909.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1903.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1809.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1803.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1709.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1703.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1609.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1603.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1509.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1412.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1404.section.xml" />
|
|
||||||
<xi:include href="../from_md/release-notes/rl-1310.section.xml" />
|
|
||||||
</appendix>
|
|
|
@ -1,8 +0,0 @@
|
||||||
let
|
|
||||||
pkgs = import ../../.. { };
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
name = "nixos-manual";
|
|
||||||
|
|
||||||
packages = with pkgs; [ xmlformat jing xmloscopy ruby ];
|
|
||||||
}
|
|
|
@ -1,124 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
# This script is written intended as a living, evolving tooling
|
|
||||||
# to fix oopsies within the docbook documentation.
|
|
||||||
#
|
|
||||||
# This is *not* a formatter. It, instead, handles some known cases
|
|
||||||
# where something bad happened, and fixing it manually is tedious.
|
|
||||||
#
|
|
||||||
# Read the code to see the different cases it handles.
|
|
||||||
#
|
|
||||||
# ALWAYS `make format` after fixing with this!
|
|
||||||
# ALWAYS read the changes, this tool isn't yet proven to be always right.
|
|
||||||
|
|
||||||
require "rexml/document"
|
|
||||||
include REXML
|
|
||||||
|
|
||||||
if ARGV.length < 1 then
|
|
||||||
$stderr.puts "Needs a filename."
|
|
||||||
exit 1
|
|
||||||
end
|
|
||||||
|
|
||||||
filename = ARGV.shift
|
|
||||||
doc = Document.new(File.open(filename))
|
|
||||||
|
|
||||||
$touched = false
|
|
||||||
|
|
||||||
# Fixing varnames having a sibling element without spacing.
|
|
||||||
# This is to fix an initial `xmlformat` issue where `term`
|
|
||||||
# would mangle as spaces.
|
|
||||||
#
|
|
||||||
# <varlistentry>
|
|
||||||
# <term><varname>types.separatedString</varname><replaceable>sep</replaceable> <----
|
|
||||||
# </term>
|
|
||||||
# ...
|
|
||||||
#
|
|
||||||
# Generates: types.separatedStringsep
|
|
||||||
# ^^^^
|
|
||||||
#
|
|
||||||
# <varlistentry xml:id='fun-makeWrapper'>
|
|
||||||
# <term>
|
|
||||||
# <function>makeWrapper</function><replaceable>executable</replaceable><replaceable>wrapperfile</replaceable><replaceable>args</replaceable> <----
|
|
||||||
# </term>
|
|
||||||
#
|
|
||||||
# Generates: makeWrapperexecutablewrapperfileargs
|
|
||||||
# ^^^^ ^^^^ ^^ ^^
|
|
||||||
#
|
|
||||||
# <term>
|
|
||||||
# <option>--option</option><replaceable>name</replaceable><replaceable>value</replaceable> <-----
|
|
||||||
# </term>
|
|
||||||
#
|
|
||||||
# Generates: --optionnamevalue
|
|
||||||
# ^^ ^^
|
|
||||||
doc.elements.each("//varlistentry/term") do |term|
|
|
||||||
["varname", "function", "option", "replaceable"].each do |prev_name|
|
|
||||||
term.elements.each(prev_name) do |el|
|
|
||||||
if el.next_element and
|
|
||||||
el.next_element.name == "replaceable" and
|
|
||||||
el.next_sibling_node.class == Element
|
|
||||||
then
|
|
||||||
$touched = true
|
|
||||||
term.insert_after(el, Text.new(" "))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# <cmdsynopsis>
|
|
||||||
# <command>nixos-option</command>
|
|
||||||
# <arg>
|
|
||||||
# <option>-I</option><replaceable>path</replaceable> <------
|
|
||||||
# </arg>
|
|
||||||
#
|
|
||||||
# Generates: -Ipath
|
|
||||||
# ^^
|
|
||||||
doc.elements.each("//cmdsynopsis/arg") do |term|
|
|
||||||
["option", "replaceable"].each do |prev_name|
|
|
||||||
term.elements.each(prev_name) do |el|
|
|
||||||
if el.next_element and
|
|
||||||
el.next_element.name == "replaceable" and
|
|
||||||
el.next_sibling_node.class == Element
|
|
||||||
then
|
|
||||||
$touched = true
|
|
||||||
term.insert_after(el, Text.new(" "))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# <cmdsynopsis>
|
|
||||||
# <arg>
|
|
||||||
# <group choice='req'>
|
|
||||||
# <arg choice='plain'>
|
|
||||||
# <option>--profile-name</option>
|
|
||||||
# </arg>
|
|
||||||
#
|
|
||||||
# <arg choice='plain'>
|
|
||||||
# <option>-p</option>
|
|
||||||
# </arg>
|
|
||||||
# </group><replaceable>name</replaceable> <----
|
|
||||||
# </arg>
|
|
||||||
#
|
|
||||||
# Generates: [{--profile-name | -p }name]
|
|
||||||
# ^^^^
|
|
||||||
doc.elements.each("//cmdsynopsis/arg") do |term|
|
|
||||||
["group"].each do |prev_name|
|
|
||||||
term.elements.each(prev_name) do |el|
|
|
||||||
if el.next_element and
|
|
||||||
el.next_element.name == "replaceable" and
|
|
||||||
el.next_sibling_node.class == Element
|
|
||||||
then
|
|
||||||
$touched = true
|
|
||||||
term.insert_after(el, Text.new(" "))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if $touched then
|
|
||||||
doc.context[:attribute_quote] = :quote
|
|
||||||
doc.write(output: File.open(filename, "w"))
|
|
||||||
end
|
|
|
@ -270,7 +270,7 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package.fhs}/bin/onlyoffice-wrapper DocService/docservice /run/onlyoffice/config";
|
ExecStart = "${cfg.package.fhs}/bin/onlyoffice-wrapper DocService/docservice /run/onlyoffice/config";
|
||||||
ExecStartPre = onlyoffice-prestart;
|
ExecStartPre = [ onlyoffice-prestart ];
|
||||||
Group = "onlyoffice";
|
Group = "onlyoffice";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RuntimeDirectory = "onlyoffice";
|
RuntimeDirectory = "onlyoffice";
|
||||||
|
|
|
@ -144,7 +144,6 @@ in rec {
|
||||||
manual = manualHTML; # TODO(@oxij): remove eventually
|
manual = manualHTML; # TODO(@oxij): remove eventually
|
||||||
manualEpub = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualEpub));
|
manualEpub = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualEpub));
|
||||||
manpages = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manpages);
|
manpages = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manpages);
|
||||||
manualGeneratedSources = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.generatedSources);
|
|
||||||
options = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;
|
options = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;
|
||||||
|
|
||||||
|
|
||||||
|
|
33
pkgs/applications/misc/protonup-qt/default.nix
Normal file
33
pkgs/applications/misc/protonup-qt/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ appimageTools, fetchurl, lib }:
|
||||||
|
let
|
||||||
|
pname = "protonup-qt";
|
||||||
|
version = "2.7.4";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/DavidoTek/ProtonUp-Qt/releases/download/v${version}/ProtonUp-Qt-${version}-x86_64.AppImage";
|
||||||
|
sha256 = "yKc+KOQfqciqULnChVLf6y9npoSYM6Fmu7mYGEKmpkA=";
|
||||||
|
};
|
||||||
|
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
||||||
|
in
|
||||||
|
appimageTools.wrapType2 rec {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
mv $out/bin/{${pname}-${version},${pname}}
|
||||||
|
mkdir -p $out/share/{applications,pixmaps}
|
||||||
|
cp ${appimageContents}/net.davidotek.pupgui2.desktop $out/share/applications/${pname}.desktop
|
||||||
|
cp ${appimageContents}/net.davidotek.pupgui2.png $out/share/pixmaps/${pname}.png
|
||||||
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
|
--replace 'Exec=net.davidotek.pupgui2' 'Exec=${pname}' \
|
||||||
|
--replace 'Icon=net.davidotek.pupgui2' 'Icon=${pname}'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://davidotek.github.io/protonup-qt/";
|
||||||
|
description = "Install and manage Proton-GE and Luxtorpeda for Steam and Wine-GE for Lutris with this graphical user interface.";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
|
mainProgram = "protonup-qt";
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,16 +2,18 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "helm-diff";
|
pname = "helm-diff";
|
||||||
version = "3.5.0";
|
version = "3.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "databus23";
|
owner = "databus23";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-evFdMM2AilKQPdSCUzKo6RuC4OC4zfjj+JzFvtkSrdk=";
|
sha256 = "sha256-JeQP2KXoLxkyRZVFcd6Rrz5xyJd+F3plzznAVP3Um8g=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-9i4ryBpaK7mMbsOpIaaZWBRjewD1MtTpf4zJ0yU0KMg=";
|
vendorSha256 = "sha256-d5NSqCJrk9QhV5gVOKUG/uJxuvt8X8hiQd8yJEoXPL0=";
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" "-X github.com/databus23/helm-diff/v3/cmd.Version=${version}" ];
|
||||||
|
|
||||||
# NOTE: Remove the install and upgrade hooks.
|
# NOTE: Remove the install and upgrade hooks.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "helm-secrets";
|
pname = "helm-secrets";
|
||||||
version = "3.8.3";
|
version = "4.2.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jkroepke";
|
owner = "jkroepke";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-FpF/d+e5T6nb0OENaYLY+3ATZ+qcAeih5/yKI+AtfKA=";
|
hash = "sha256-aqRgny1vU+dxpZpzwL4aSbYfTGrZbRffQy81mMBvnJk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
@ -17,9 +17,9 @@ stdenv.mkDerivation rec {
|
||||||
# NOTE: helm-secrets is comprised of shell scripts.
|
# NOTE: helm-secrets is comprised of shell scripts.
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
|
|
||||||
# NOTE: Remove the install and upgrade hooks.
|
# NOTE: Fix version string
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i '/^hooks:/,+2 d' plugin.yaml
|
sed -i 's/^version:.*/version: "${version}"/' plugin.yaml
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cppcheck, libmrss, libiconv }:
|
{ lib, stdenv, fetchFromGitHub, libmrss, libiconv }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "rsstail";
|
pname = "rsstail";
|
||||||
version = "2.1";
|
version = "2.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
sha256 = "12p69i3g1fwlw0bds9jqsdmzkid3k5a41w31d227i7vm12wcvjf6";
|
|
||||||
rev = "6f2436185372b3f945a4989406c4b6a934fe8a95";
|
|
||||||
repo = "rsstail";
|
|
||||||
owner = "folkertvanheusden";
|
owner = "folkertvanheusden";
|
||||||
|
repo = "rsstail";
|
||||||
|
rev = "6f2436185372b3f945a4989406c4b6a934fe8a95";
|
||||||
|
sha256 = "12p69i3g1fwlw0bds9jqsdmzkid3k5a41w31d227i7vm12wcvjf6";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libmrss ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
buildInputs = [ libmrss ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||||
nativeCheckInputs = [ cppcheck ];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace Makefile --replace -liconv_hook ""
|
substituteInPlace Makefile --replace -liconv_hook ""
|
||||||
|
@ -21,7 +20,8 @@ stdenv.mkDerivation {
|
||||||
makeFlags = [ "prefix=$(out)" ];
|
makeFlags = [ "prefix=$(out)" ];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
doCheck = true;
|
# just runs cppcheck linter
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Monitor RSS feeds for new entries";
|
description = "Monitor RSS feeds for new entries";
|
||||||
|
@ -29,7 +29,7 @@ stdenv.mkDerivation {
|
||||||
RSSTail is more or less an RSS reader: it monitors an RSS feed and if it
|
RSSTail is more or less an RSS reader: it monitors an RSS feed and if it
|
||||||
detects a new entry it'll emit only that new entry.
|
detects a new entry it'll emit only that new entry.
|
||||||
'';
|
'';
|
||||||
homepage = "http://www.vanheusden.com/rsstail/";
|
homepage = "https://www.vanheusden.com/rsstail/";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.Necior ];
|
maintainers = [ maintainers.Necior ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "flexget";
|
pname = "flexget";
|
||||||
version = "3.5.23";
|
version = "3.5.24";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
# Fetch from GitHub in order to use `requirements.in`
|
# Fetch from GitHub in order to use `requirements.in`
|
||||||
|
@ -13,7 +13,7 @@ python3Packages.buildPythonApplication rec {
|
||||||
owner = "flexget";
|
owner = "flexget";
|
||||||
repo = "flexget";
|
repo = "flexget";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-VWpcXwiQHpQ3X/rmm6fWfPfuUoUmWQMfOq5A87nED3A=";
|
hash = "sha256-4RQBaqC3nmyEq9Kqg0n9KIN9Gw4Z+uCl6hQeqo/NTls=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -55,11 +55,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "webex";
|
pname = "webex";
|
||||||
version = "42.10.0.24000";
|
version = "42.12.0.24485";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://binaries.webex.com/WebexDesktop-Ubuntu-Gold/20221019145240/Webex_ubuntu.7z";
|
url = "https://binaries.webex.com/WebexDesktop-Ubuntu-Gold/20221206141837/Webex_ubuntu.7z";
|
||||||
sha256 = "03b77a3fcce76f04cf684bcdecb3bcce97c5a8b6cc36b40967cc14fa9a46c102";
|
sha256 = "4c09c13b760abbdcc8bc1a74d137f8bc23386da4425cbefd8ea75bd0a877fdbf";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
70
pkgs/applications/science/biology/nest/default.nix
Normal file
70
pkgs/applications/science/biology/nest/default.nix
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, testers
|
||||||
|
, cmake
|
||||||
|
, gsl
|
||||||
|
, libtool
|
||||||
|
, mpi
|
||||||
|
, nest
|
||||||
|
, pkg-config
|
||||||
|
, python3
|
||||||
|
, readline
|
||||||
|
, autoPatchelfHook
|
||||||
|
, withPython ? false
|
||||||
|
, withMpi ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "nest";
|
||||||
|
version = "3.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "nest";
|
||||||
|
repo = "nest-simulator";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-wmn5LOOHlSuyPdV6O6v7j10dxdcvqpym6MfveZdL+dU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs cmake/CheckFiles/check_return_val.sh
|
||||||
|
# fix PyNEST installation path
|
||||||
|
# it expects CMAKE_INSTALL_LIBDIR to be relative
|
||||||
|
substituteInPlace cmake/ProcessOptions.cmake \
|
||||||
|
--replace "\''${CMAKE_INSTALL_LIBDIR}/python" "lib/python"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
autoPatchelfHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gsl
|
||||||
|
readline
|
||||||
|
libtool # libltdl
|
||||||
|
] ++ lib.optionals withPython [
|
||||||
|
python3
|
||||||
|
python3.pkgs.cython
|
||||||
|
] ++ lib.optional withMpi mpi;
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-Dwith-python=${if withPython then "ON" else "OFF"}"
|
||||||
|
"-Dwith-mpi=${if withMpi then "ON" else "OFF"}"
|
||||||
|
"-Dwith-openmp=${if stdenv.isDarwin then "OFF" else "ON"}"
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.tests.version = testers.testVersion {
|
||||||
|
package = nest;
|
||||||
|
command = "nest --version";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "NEST is a command line tool for simulating neural networks";
|
||||||
|
homepage = "https://www.nest-simulator.org/";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
maintainers = with maintainers; [ jiegec ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ];
|
makeFlags = [ "PREFIX=$(out)" ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
|
||||||
# Needed with GCC 12
|
# Needed with GCC 12
|
||||||
"-Wno-error=maybe-uninitialized"
|
"-Wno-error=maybe-uninitialized"
|
||||||
];
|
];
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
, wayland-scanner
|
, wayland-scanner
|
||||||
, obs-studio
|
, obs-studio
|
||||||
, libX11
|
, libX11
|
||||||
|
, libxcb
|
||||||
, vulkan-headers
|
, vulkan-headers
|
||||||
, vulkan-loader
|
, vulkan-loader
|
||||||
, libGL
|
, libGL
|
||||||
|
@ -35,6 +36,7 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libGL
|
libGL
|
||||||
libX11
|
libX11
|
||||||
|
libxcb
|
||||||
vulkan-headers
|
vulkan-headers
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
wayland
|
wayland
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* hunspell dictionaries */
|
/* hunspell dictionaries */
|
||||||
|
|
||||||
{ lib, stdenv, fetchurl, fetchFromGitHub, unzip, coreutils, bash, which, zip, ispell, perl, hunspell }:
|
{ lib, stdenv, fetchurl, fetchzip, fetchFromGitHub, unzip, coreutils, bash, which, zip, ispell, perl, hunspell }:
|
||||||
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -878,4 +878,28 @@ rec {
|
||||||
shortDescription = "Norwegian Nynorsk (Norway)";
|
shortDescription = "Norwegian Nynorsk (Norway)";
|
||||||
license = with lib.licenses; [ gpl2Only ];
|
license = with lib.licenses; [ gpl2Only ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* TOKI PONA */
|
||||||
|
|
||||||
|
tok = mkDict rec {
|
||||||
|
pname = "hunspell-dict-tok";
|
||||||
|
version = "20220829";
|
||||||
|
dictFileName = "tok";
|
||||||
|
readmeFile = "README.en.adoc";
|
||||||
|
|
||||||
|
src = fetchzip {
|
||||||
|
url = "https://github.com/somasis/hunspell-tok/releases/download/${version}/hunspell-tok-${version}.tar.gz";
|
||||||
|
sha256 = "sha256-RiAODKXPUeIcf8IFcU6Tacehq5S8GYuPTuxEiN2CXD0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Hunspell dictionary for Toki Pona";
|
||||||
|
homepage = "https://github.com/somasis/hunspell-tok";
|
||||||
|
license = with lib.licenses; [ cc0 publicDomain cc-by-sa-30 cc-by-sa-40 ];
|
||||||
|
maintainers = with maintainers; [ somasis ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
, rocm-cmake
|
, rocm-cmake
|
||||||
, hip
|
, hip
|
||||||
, clang-tools-extra
|
, clang-tools-extra
|
||||||
, cppcheck
|
|
||||||
, openmp
|
, openmp
|
||||||
, rocblas
|
, rocblas
|
||||||
, rocmlir
|
, rocmlir
|
||||||
|
@ -70,7 +69,6 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
rocm-cmake
|
rocm-cmake
|
||||||
hip
|
hip
|
||||||
clang-tools-extra
|
clang-tools-extra
|
||||||
cppcheck
|
|
||||||
python3Packages.python
|
python3Packages.python
|
||||||
] ++ lib.optionals buildDocs [
|
] ++ lib.optionals buildDocs [
|
||||||
latex
|
latex
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, sqlite, cppcheck, gtest }:
|
{ lib, stdenv, fetchFromGitHub, cmake, sqlite, gtest }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "sqlitecpp";
|
pname = "sqlitecpp";
|
||||||
|
@ -12,7 +12,6 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
nativeCheckInputs = [ cppcheck ];
|
|
||||||
buildInputs = [ sqlite gtest ];
|
buildInputs = [ sqlite gtest ];
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,6 @@ stdenv.mkDerivation rec {
|
||||||
details and threading mechanisms for scalability and performance.
|
details and threading mechanisms for scalability and performance.
|
||||||
'';
|
'';
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ thoughtpolice dizfer ];
|
maintainers = with maintainers; [ thoughtpolice ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "webkitgtk";
|
pname = "webkitgtk";
|
||||||
version = "2.38.4";
|
version = "2.38.5";
|
||||||
name = "${finalAttrs.pname}-${finalAttrs.version}+abi=${if lib.versionAtLeast gtk3.version "4.0" then "5.0" else "4.${if lib.versions.major libsoup.version == "2" then "0" else "1"}"}";
|
name = "${finalAttrs.pname}-${finalAttrs.version}+abi=${if lib.versionAtLeast gtk3.version "4.0" then "5.0" else "4.${if lib.versions.major libsoup.version == "2" then "0" else "1"}"}";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
outputs = [ "out" "dev" "devdoc" ];
|
||||||
|
@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz";
|
url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz";
|
||||||
hash = "sha256-T0fqKaLU1fFe7z3J4tbG8Gfo3oY6P2RFXhzPlpPMHTY=";
|
hash = "sha256-QMIMQwIidN9Yk/IrEFT6iUw+6gVzibsIruCMWwuwwac=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optionals stdenv.isLinux [
|
patches = lib.optionals stdenv.isLinux [
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible-doctor";
|
pname = "ansible-doctor";
|
||||||
version = "2.0.0";
|
version = "2.0.1";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||||
owner = "thegeeklab";
|
owner = "thegeeklab";
|
||||||
repo = "ansible-doctor";
|
repo = "ansible-doctor";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-P2PC90coR+FpQkO+SUon72bDLTYJhZ5qbcOdCKuFFwE=";
|
hash = "sha256-xUg7+7oWxIVdKLOGIE1uxh7SSjkz/w0//OyMF1HhEJk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonRelaxDeps = true;
|
pythonRelaxDeps = true;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "arcam-fmj";
|
pname = "arcam-fmj";
|
||||||
version = "1.2.0";
|
version = "1.2.1";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
|
@ -21,7 +21,7 @@ buildPythonPackage rec {
|
||||||
owner = "elupus";
|
owner = "elupus";
|
||||||
repo = "arcam_fmj";
|
repo = "arcam_fmj";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-stoxDb25K/h55rwR0faWO0AOjSJmjZNbMbOAuUE2iSM=";
|
hash = "sha256-nRInKju3Q4En+SiSl6DOeeTRK56TzKPweoVXsvzs45I=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
53
pkgs/development/python-modules/brian2/default.nix
Normal file
53
pkgs/development/python-modules/brian2/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, cython
|
||||||
|
, jinja2
|
||||||
|
, numpy
|
||||||
|
, pyparsing
|
||||||
|
, setuptools
|
||||||
|
, sympy
|
||||||
|
, pytest
|
||||||
|
, pytest-xdist
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "brian2";
|
||||||
|
version = "2.5.1";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
pname = "Brian2";
|
||||||
|
inherit version;
|
||||||
|
sha256 = "sha256-x1EcS7PFCsjPYsq3Lt87SJRW4J5DE/OfdFs3NuyHiLw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
cython
|
||||||
|
jinja2
|
||||||
|
numpy
|
||||||
|
pyparsing
|
||||||
|
setuptools
|
||||||
|
sympy
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytest
|
||||||
|
pytest-xdist
|
||||||
|
];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
# Cython cache lies in home directory
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
cd $HOME && ${python.interpreter} -c "import brian2;assert brian2.test()"
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A clock-driven simulator for spiking neural networks";
|
||||||
|
homepage = "https://briansimulator.org/";
|
||||||
|
license = licenses.cecill21;
|
||||||
|
maintainers = with maintainers; [ jiegec ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib
|
{ lib
|
||||||
, asynctest
|
|
||||||
, aiohttp
|
, aiohttp
|
||||||
, blinker
|
, blinker
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
@ -30,7 +29,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "elastic-apm";
|
pname = "elastic-apm";
|
||||||
version = "6.14.0";
|
version = "6.15.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
|
@ -39,7 +38,7 @@ buildPythonPackage rec {
|
||||||
owner = "elastic";
|
owner = "elastic";
|
||||||
repo = "apm-agent-python";
|
repo = "apm-agent-python";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-T1TWILlJZffTISVt8YSi8ZYSXOHieh6SV55j8W333LQ=";
|
hash = "sha256-Uoybe6Mx7ZLs2GaOnl278Xj6KlTEgrOuNxMRmPpSq8k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -54,22 +53,18 @@ buildPythonPackage rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
checkInputs = [
|
|
||||||
asynctest
|
|
||||||
ecs-logging
|
ecs-logging
|
||||||
|
httpx
|
||||||
jinja2
|
jinja2
|
||||||
jsonschema
|
jsonschema
|
||||||
Logbook
|
Logbook
|
||||||
mock
|
mock
|
||||||
httpx
|
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytest-bdd
|
pytest-bdd
|
||||||
pytest-mock
|
|
||||||
pytest-localserver
|
pytest-localserver
|
||||||
|
pytest-mock
|
||||||
pytest-random-order
|
pytest-random-order
|
||||||
|
pytestCheckHook
|
||||||
sanic-testing
|
sanic-testing
|
||||||
structlog
|
structlog
|
||||||
webob
|
webob
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "oslo-serialization";
|
pname = "oslo-serialization";
|
||||||
version = "5.0.0";
|
version = "5.1.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
pname = "oslo.serialization";
|
pname = "oslo.serialization";
|
||||||
inherit version;
|
inherit version;
|
||||||
sha256 = "sha256-KEUyjQ9H3Ioj/tKoIlPpCs/wqnMdvSTzec+OUObMZro=";
|
sha256 = "sha256-pIR98yaBwahL0TotunpuydW0SITeYyUhGS9tx1DOCYQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pynvml";
|
pname = "pynvml";
|
||||||
version = "11.4.1";
|
version = "11.5.0";
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "b2e4a33b80569d093b513f5804db0c7f40cfc86f15a013ae7a8e99c5e175d5dd";
|
sha256 = "sha256-0CeyG5WxCIufwngRf59ht8Z/jjOnh+n4P3NfD3GsMtA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "selenium";
|
pname = "selenium";
|
||||||
version = "4.7.0";
|
version = "4.8.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||||
repo = "selenium";
|
repo = "selenium";
|
||||||
# check if there is a newer tag with or without -python suffix
|
# check if there is a newer tag with or without -python suffix
|
||||||
rev = "refs/tags/selenium-${version}";
|
rev = "refs/tags/selenium-${version}";
|
||||||
hash = "sha256-7inmi8dHi6So+8AbLq85Go/GEaiV1XK/7+wt9UkTdo8=";
|
hash = "sha256-YTi6SNtTWuEPlQ3PTeis9osvtnWmZ7SRQbne9fefdco=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "simpleeval";
|
pname = "simpleeval";
|
||||||
version = "0.9.12";
|
version = "0.9.13";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "danthedeckie";
|
owner = "danthedeckie";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "0khgl729q5133fgc00d550f4r77707rkkn7r56az4v8bvx0q8xp4";
|
hash = "sha256-I1GILYPE6OyotgRe0Ek/iHHv6q9/b/MlcTxMAtfZD80=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -36,6 +36,7 @@ buildPythonPackage rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Simple, safe single expression evaluator library";
|
description = "Simple, safe single expression evaluator library";
|
||||||
homepage = "https://github.com/danthedeckie/simpleeval";
|
homepage = "https://github.com/danthedeckie/simpleeval";
|
||||||
|
changelog = "https://github.com/danthedeckie/simpleeval/releases/tag/${version}";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ johbo ];
|
maintainers = with maintainers; [ johbo ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,16 +8,16 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "cargo-valgrind";
|
pname = "cargo-valgrind";
|
||||||
version = "2.1.0";
|
version = "2.1.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jfrimmel";
|
owner = "jfrimmel";
|
||||||
repo = "cargo-valgrind";
|
repo = "cargo-valgrind";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-FCz15kMSKckifYWSTMGqJbRpZ8X/AM5dSw46dg8ERcY=";
|
sha256 = "sha256-l/1paghG/ARD0JfzNh0xj2UD5kW6FddM8Xrd/FCygYc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "sha256-csSUe2qUIN2xKOMHWyM56FZyCwKPdfAI0NrFiDOtRiE=";
|
cargoSha256 = "sha256-9/kIIZDIsOhUvRT3TyXN5PGFUB+a8m2yXmzBbsPUK28=";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = nix-update-script { };
|
updateScript = nix-update-script { };
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
in
|
in
|
||||||
buildNodejs {
|
buildNodejs {
|
||||||
inherit enableNpm;
|
inherit enableNpm;
|
||||||
version = "14.21.2";
|
version = "14.21.3";
|
||||||
sha256 = "00zzl43iis8mr8x48hww5ncj8mj5dmpn05rq7ihpffkp2q7rmw6q";
|
sha256 = "sha256-RY7AkuYK1wDdzwectj1DXBXaTHuz0/mbmo5YqZ5UB14=";
|
||||||
patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
|
patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@ let
|
||||||
in
|
in
|
||||||
buildNodejs {
|
buildNodejs {
|
||||||
inherit enableNpm;
|
inherit enableNpm;
|
||||||
version = "16.19.0";
|
version = "16.19.1";
|
||||||
sha256 = "01k72p0hp4lhlpz1syd9cbkm2gpfww0hn10xdpmzd4i3x8dfq7sg";
|
sha256 = "sha256-F/txZAYZgSWzDJTdPRdWIHspdwViav4W2NxHmmWh2LU=";
|
||||||
patches = [
|
patches = [
|
||||||
./disable-darwin-v8-system-instrumentation.patch
|
./disable-darwin-v8-system-instrumentation.patch
|
||||||
./bypass-darwin-xcrun-node16.patch
|
./bypass-darwin-xcrun-node16.patch
|
||||||
|
|
|
@ -9,8 +9,8 @@ let
|
||||||
in
|
in
|
||||||
buildNodejs {
|
buildNodejs {
|
||||||
inherit enableNpm;
|
inherit enableNpm;
|
||||||
version = "18.14.0";
|
version = "18.14.1";
|
||||||
sha256 = "sha256-Qu+d0xmT1cjoKwqwlpE1CT5qKW76J7G+mvwErADwJno=";
|
sha256 = "sha256-7sNTQ4Jm/QrvU6lEa+ELMu5udNCOMt1UVLOC/2eT2gQ=";
|
||||||
patches = [
|
patches = [
|
||||||
./disable-darwin-v8-system-instrumentation.patch
|
./disable-darwin-v8-system-instrumentation.patch
|
||||||
./bypass-darwin-xcrun-node16.patch
|
./bypass-darwin-xcrun-node16.patch
|
||||||
|
|
|
@ -9,8 +9,8 @@ let
|
||||||
in
|
in
|
||||||
buildNodejs {
|
buildNodejs {
|
||||||
inherit enableNpm;
|
inherit enableNpm;
|
||||||
version = "19.6.0";
|
version = "19.6.1";
|
||||||
sha256 = "sha256-UZxtVCqfmW8AwaPTsuXPUrfbmY2V9s7VqJPRagPeM+o=";
|
sha256 = "sha256-dxDmwoUclWvkkm/CVAZ48/3fjm04Juo6qbjCjW6omps=";
|
||||||
patches = [
|
patches = [
|
||||||
./revert-arm64-pointer-auth.patch
|
./revert-arm64-pointer-auth.patch
|
||||||
./disable-darwin-v8-system-instrumentation-node19.patch
|
./disable-darwin-v8-system-instrumentation-node19.patch
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
, doxygen
|
, doxygen
|
||||||
, graphviz
|
, graphviz
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, cppcheck
|
, boost17x
|
||||||
, boost16x
|
|
||||||
, SDL2
|
, SDL2
|
||||||
, python3
|
, python3
|
||||||
, freetype
|
, freetype
|
||||||
|
@ -24,8 +23,8 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.4.10.2";
|
|
||||||
pname = "freeorion";
|
pname = "freeorion";
|
||||||
|
version = "0.4.10.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "freeorion";
|
owner = "freeorion";
|
||||||
|
@ -35,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(boost16x.override { enablePython = true; python = python3; })
|
(boost17x.override { enablePython = true; python = python3; })
|
||||||
(python3.withPackages (p: with p; [ pycodestyle ]))
|
(python3.withPackages (p: with p; [ pycodestyle ]))
|
||||||
SDL2
|
SDL2
|
||||||
freetype
|
freetype
|
||||||
|
@ -53,7 +52,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
cppcheck
|
|
||||||
doxygen
|
doxygen
|
||||||
graphviz
|
graphviz
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
@ -81,7 +79,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A free, open source, turn-based space empire and galactic conquest (4X) computer game";
|
description = "A free, open source, turn-based space empire and galactic conquest (4X) computer game";
|
||||||
homepage = "http://www.freeorion.org";
|
homepage = "https://www.freeorion.org/";
|
||||||
license = with licenses; [ gpl2 cc-by-sa-30 ];
|
license = with licenses; [ gpl2 cc-by-sa-30 ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ tex ];
|
maintainers = with maintainers; [ tex ];
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "wiki-tui";
|
pname = "wiki-tui";
|
||||||
version = "0.6.1";
|
version = "0.6.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Builditluc";
|
owner = "Builditluc";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-WiyRBF3rWLpOZ8mxT89ImRL++Oq9+b88oSKjr4tzCGs=";
|
hash = "sha256-vBfD5SQnVx/UqRoyGJc4PINW/wKuHjpiUEz3WiRCR9A=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
Security
|
Security
|
||||||
];
|
];
|
||||||
|
|
||||||
cargoHash = "sha256-R9xxIDqkU7FeulpD7PUM6aHgA67PVgqxHKYtdrjdaUo=";
|
cargoHash = "sha256-xbjUdQs2t+cjplAlNVRN1Zw5CeAYv4+ir4Pvrt+/n9k=";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A simple and easy to use Wikipedia Text User Interface";
|
description = "A simple and easy to use Wikipedia Text User Interface";
|
||||||
|
|
37
pkgs/servers/sql/rqlite/default.nix
Normal file
37
pkgs/servers/sql/rqlite/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ lib
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "rqlite";
|
||||||
|
version = "7.6.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "rqlite";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-WvEnMAz3dKG8xMlQzm7E0TmAgvsrRED50bb4Ved1+4U=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorSha256 = "sha256-qirt5g7dcjAnceejrBnfhDpA4LSEj7eOuznSlfUBUgo=";
|
||||||
|
|
||||||
|
subPackages = [ "cmd/rqlite" "cmd/rqlited" "cmd/rqbench" ];
|
||||||
|
|
||||||
|
# Leaving other flags from https://github.com/rqlite/rqlite/blob/master/package.sh
|
||||||
|
# since automatically retriving those is nontrivial and inessential
|
||||||
|
ldflags = [
|
||||||
|
"-s" "-w"
|
||||||
|
"-X github.com/rqlite/rqlite/cmd.Version=${src.rev}"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Tests are in a different subPackage which fails trying to access the network
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "The lightweight, distributed relational database built on SQLite";
|
||||||
|
homepage = "https://github.com/rqlite/rqlite";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ dit7ya ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "traefik";
|
pname = "traefik";
|
||||||
version = "2.9.6";
|
version = "2.9.8";
|
||||||
|
|
||||||
# Archive with static assets for webui
|
# Archive with static assets for webui
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
|
url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
|
||||||
sha256 = "sha256-T1yJT45bCjGizS6bqkzc6EF9uhJ3dhXsSc5X3di6SJ4=";
|
sha256 = "sha256-3vrMh0zrJQhIG9VAlG/iHlOVlUFlE4qd0EkOB0ckAtY=";
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-g/UL+cUenWW94afWIGFU2fBSpo48YcUIUaX/1M5vhNk=";
|
vendorSha256 = "sha256-NyI+3wYRZ3L98qwrkDfrbJK4S+Wdx/UJ8FlLAMhaL7A=";
|
||||||
|
|
||||||
subPackages = [ "cmd/traefik" ];
|
subPackages = [ "cmd/traefik" ];
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ buildPythonPackage rec {
|
||||||
# The websites yt-dlp deals with are a very moving target. That means that
|
# The websites yt-dlp deals with are a very moving target. That means that
|
||||||
# downloads break constantly. Because of that, updates should always be backported
|
# downloads break constantly. Because of that, updates should always be backported
|
||||||
# to the latest stable release.
|
# to the latest stable release.
|
||||||
version = "2023.1.6";
|
version = "2023.2.17";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-Ong6NnUc7RY2j0CzuoZas5swaJ7YBW8e4jRqo4OaCw8=";
|
sha256 = "sha256-mvkt5e/8GTvbUSFtnr8oh02WGA0gL651Kw2fKmM4Dzo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ brotli certifi mutagen pycryptodomex websockets ];
|
propagatedBuildInputs = [ brotli certifi mutagen pycryptodomex websockets ];
|
||||||
|
|
|
@ -29,9 +29,9 @@ def pretty_print_exc(e: BaseException, *, _desc_text: str = "error") -> None:
|
||||||
print(textwrap.indent(extra_info, "\t"), file=sys.stderr, end="")
|
print(textwrap.indent(extra_info, "\t"), file=sys.stderr, end="")
|
||||||
else:
|
else:
|
||||||
print(e)
|
print(e)
|
||||||
if e.__context__ is not None:
|
if e.__cause__ is not None:
|
||||||
print("", file=sys.stderr)
|
print("", file=sys.stderr)
|
||||||
pretty_print_exc(e.__context__, _desc_text="caused by")
|
pretty_print_exc(e.__cause__, _desc_text="caused by")
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
parser = argparse.ArgumentParser(description='render nixos manual bits')
|
parser = argparse.ArgumentParser(description='render nixos manual bits')
|
||||||
|
|
|
@ -28,6 +28,9 @@ class Deflist:
|
||||||
class Heading(NamedTuple):
|
class Heading(NamedTuple):
|
||||||
container_tag: str
|
container_tag: str
|
||||||
level: int
|
level: int
|
||||||
|
# special handling for <part> titles: whether partinfo was already closed from elsewhere
|
||||||
|
# or still needs closing.
|
||||||
|
partintro_closed: bool = False
|
||||||
|
|
||||||
class DocBookRenderer(Renderer):
|
class DocBookRenderer(Renderer):
|
||||||
__output__ = "docbook"
|
__output__ = "docbook"
|
||||||
|
@ -251,7 +254,17 @@ class DocBookRenderer(Renderer):
|
||||||
return result + f'<{tag}{attrs_str}>\n<title>'
|
return result + f'<{tag}{attrs_str}>\n<title>'
|
||||||
def heading_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
def heading_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
||||||
env: MutableMapping[str, Any]) -> str:
|
env: MutableMapping[str, Any]) -> str:
|
||||||
return '</title>'
|
heading = self._headings[-1]
|
||||||
|
result = '</title>'
|
||||||
|
if heading.container_tag == 'part':
|
||||||
|
# generate the same ids as were previously assigned manually. if this collides we
|
||||||
|
# rely on outside schema validation to catch it!
|
||||||
|
maybe_id = ""
|
||||||
|
assert tokens[i - 2].type == 'heading_open'
|
||||||
|
if id := cast(str, tokens[i - 2].attrs.get('id', "")):
|
||||||
|
maybe_id = " xml:id=" + quoteattr(id + "-intro")
|
||||||
|
result += f"<partintro{maybe_id}>"
|
||||||
|
return result
|
||||||
def example_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
def example_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
||||||
env: MutableMapping[str, Any]) -> str:
|
env: MutableMapping[str, Any]) -> str:
|
||||||
if id := token.attrs.get('id'):
|
if id := token.attrs.get('id'):
|
||||||
|
@ -266,8 +279,10 @@ class DocBookRenderer(Renderer):
|
||||||
result = []
|
result = []
|
||||||
while len(self._headings):
|
while len(self._headings):
|
||||||
if level is None or self._headings[-1].level >= level:
|
if level is None or self._headings[-1].level >= level:
|
||||||
result.append(f"</{self._headings[-1].container_tag}>")
|
heading = self._headings.pop()
|
||||||
self._headings.pop()
|
if heading.container_tag == 'part' and not heading.partintro_closed:
|
||||||
|
result.append("</partintro>")
|
||||||
|
result.append(f"</{heading.container_tag}>")
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
return "\n".join(result)
|
return "\n".join(result)
|
||||||
|
|
|
@ -2,68 +2,107 @@ import argparse
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from collections.abc import MutableMapping, Sequence
|
from collections.abc import Mapping, MutableMapping, Sequence
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, cast, NamedTuple, Optional, Union
|
from typing import Any, cast, NamedTuple, Optional, Union
|
||||||
from xml.sax.saxutils import escape, quoteattr
|
from xml.sax.saxutils import escape, quoteattr
|
||||||
|
|
||||||
|
import markdown_it
|
||||||
from markdown_it.token import Token
|
from markdown_it.token import Token
|
||||||
from markdown_it.utils import OptionsDict
|
from markdown_it.utils import OptionsDict
|
||||||
|
|
||||||
from .docbook import DocBookRenderer
|
from . import options
|
||||||
|
from .docbook import DocBookRenderer, Heading
|
||||||
from .md import Converter
|
from .md import Converter
|
||||||
|
|
||||||
class RenderedSection:
|
|
||||||
id: Optional[str]
|
|
||||||
chapters: list[str]
|
|
||||||
|
|
||||||
def __init__(self, id: Optional[str]) -> None:
|
|
||||||
self.id = id
|
|
||||||
self.chapters = []
|
|
||||||
|
|
||||||
class BaseConverter(Converter):
|
|
||||||
_sections: list[RenderedSection]
|
|
||||||
|
|
||||||
def __init__(self, manpage_urls: dict[str, str]):
|
|
||||||
super().__init__(manpage_urls)
|
|
||||||
self._sections = []
|
|
||||||
|
|
||||||
def add_section(self, id: Optional[str], chapters: list[Path]) -> None:
|
|
||||||
self._sections.append(RenderedSection(id))
|
|
||||||
for chpath in chapters:
|
|
||||||
try:
|
|
||||||
with open(chpath, 'r') as f:
|
|
||||||
self._md.renderer._title_seen = False # type: ignore[attr-defined]
|
|
||||||
self._sections[-1].chapters.append(self._render(f.read()))
|
|
||||||
except Exception as e:
|
|
||||||
raise RuntimeError(f"failed to render manual chapter {chpath}") from e
|
|
||||||
|
|
||||||
@abstractmethod
|
|
||||||
def finalize(self) -> str: raise NotImplementedError()
|
|
||||||
|
|
||||||
class ManualDocBookRenderer(DocBookRenderer):
|
class ManualDocBookRenderer(DocBookRenderer):
|
||||||
# needed to check correctness of chapters.
|
_toplevel_tag: str
|
||||||
# we may want to use front matter instead of this kind of heuristic.
|
|
||||||
_title_seen = False
|
def __init__(self, toplevel_tag: str, manpage_urls: Mapping[str, str],
|
||||||
|
parser: Optional[markdown_it.MarkdownIt] = None):
|
||||||
|
super().__init__(manpage_urls, parser)
|
||||||
|
self._toplevel_tag = toplevel_tag
|
||||||
|
self.rules |= {
|
||||||
|
'included_sections': lambda *args: self._included_thing("section", *args),
|
||||||
|
'included_chapters': lambda *args: self._included_thing("chapter", *args),
|
||||||
|
'included_preface': lambda *args: self._included_thing("preface", *args),
|
||||||
|
'included_parts': lambda *args: self._included_thing("part", *args),
|
||||||
|
'included_appendix': lambda *args: self._included_thing("appendix", *args),
|
||||||
|
'included_options': self.included_options,
|
||||||
|
}
|
||||||
|
|
||||||
|
def render(self, tokens: Sequence[Token], options: OptionsDict,
|
||||||
|
env: MutableMapping[str, Any]) -> str:
|
||||||
|
wanted = { 'h1': 'title' }
|
||||||
|
wanted |= { 'h2': 'subtitle' } if self._toplevel_tag == 'book' else {}
|
||||||
|
for (i, (tag, kind)) in enumerate(wanted.items()):
|
||||||
|
if len(tokens) < 3 * (i + 1):
|
||||||
|
raise RuntimeError(f"missing {kind} ({tag}) heading")
|
||||||
|
token = tokens[3 * i]
|
||||||
|
if token.type != 'heading_open' or token.tag != tag:
|
||||||
|
assert token.map
|
||||||
|
raise RuntimeError(f"expected {kind} ({tag}) heading in line {token.map[0] + 1}", token)
|
||||||
|
for t in tokens[3 * len(wanted):]:
|
||||||
|
if t.type != 'heading_open' or (info := wanted.get(t.tag)) is None:
|
||||||
|
continue
|
||||||
|
assert t.map
|
||||||
|
raise RuntimeError(
|
||||||
|
f"only one {info[0]} heading ({t.markup} [text...]) allowed per "
|
||||||
|
f"{self._toplevel_tag}, but found a second in lines [{t.map[0] + 1}..{t.map[1]}]. "
|
||||||
|
"please remove all such headings except the first or demote the subsequent headings.",
|
||||||
|
t)
|
||||||
|
|
||||||
|
# books get special handling because they have *two* title tags. doing this with
|
||||||
|
# generic code is more complicated than it's worth. the checks above have verified
|
||||||
|
# that both titles actually exist.
|
||||||
|
if self._toplevel_tag == 'book':
|
||||||
|
assert tokens[1].children
|
||||||
|
assert tokens[4].children
|
||||||
|
if (maybe_id := cast(str, tokens[0].attrs.get('id', ""))):
|
||||||
|
maybe_id = "xml:id=" + quoteattr(maybe_id)
|
||||||
|
return (f'<book xmlns="http://docbook.org/ns/docbook"'
|
||||||
|
f' xmlns:xlink="http://www.w3.org/1999/xlink"'
|
||||||
|
f' {maybe_id} version="5.0">'
|
||||||
|
f' <title>{self.renderInline(tokens[1].children, options, env)}</title>'
|
||||||
|
f' <subtitle>{self.renderInline(tokens[4].children, options, env)}</subtitle>'
|
||||||
|
f' {super().render(tokens[6:], options, env)}'
|
||||||
|
f'</book>')
|
||||||
|
|
||||||
|
return super().render(tokens, options, env)
|
||||||
|
|
||||||
def _heading_tag(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
def _heading_tag(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
||||||
env: MutableMapping[str, Any]) -> tuple[str, dict[str, str]]:
|
env: MutableMapping[str, Any]) -> tuple[str, dict[str, str]]:
|
||||||
(tag, attrs) = super()._heading_tag(token, tokens, i, options, env)
|
(tag, attrs) = super()._heading_tag(token, tokens, i, options, env)
|
||||||
if self._title_seen:
|
# render() has already verified that we don't have supernumerary headings and since the
|
||||||
if token.tag == 'h1':
|
# book tag is handled specially we can leave the check this simple
|
||||||
assert token.map is not None
|
if token.tag != 'h1':
|
||||||
raise RuntimeError(
|
|
||||||
"only one title heading (# [text...]) allowed per manual chapter "
|
|
||||||
f"but found a second in lines [{token.map[0]}..{token.map[1]}]. "
|
|
||||||
"please remove all such headings except the first, split your "
|
|
||||||
"chapters, or demote the subsequent headings to (##) or lower.",
|
|
||||||
token)
|
|
||||||
return (tag, attrs)
|
return (tag, attrs)
|
||||||
self._title_seen = True
|
return (self._toplevel_tag, attrs | {
|
||||||
return ("chapter", attrs | {
|
|
||||||
'xmlns': "http://docbook.org/ns/docbook",
|
'xmlns': "http://docbook.org/ns/docbook",
|
||||||
'xmlns:xlink': "http://www.w3.org/1999/xlink",
|
'xmlns:xlink': "http://www.w3.org/1999/xlink",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def _included_thing(self, tag: str, token: Token, tokens: Sequence[Token], i: int,
|
||||||
|
options: OptionsDict, env: MutableMapping[str, Any]) -> str:
|
||||||
|
result = []
|
||||||
|
# close existing partintro. the generic render doesn't really need this because
|
||||||
|
# it doesn't have a concept of structure in the way the manual does.
|
||||||
|
if self._headings and self._headings[-1] == Heading('part', 1):
|
||||||
|
result.append("</partintro>")
|
||||||
|
self._headings[-1] = self._headings[-1]._replace(partintro_closed=True)
|
||||||
|
# must nest properly for structural includes. this requires saving at least
|
||||||
|
# the headings stack, but creating new renderers is cheap and much easier.
|
||||||
|
r = ManualDocBookRenderer(tag, self._manpage_urls, None)
|
||||||
|
for (included, path) in token.meta['included']:
|
||||||
|
try:
|
||||||
|
result.append(r.render(included, options, env))
|
||||||
|
except Exception as e:
|
||||||
|
raise RuntimeError(f"rendering {path}") from e
|
||||||
|
return "".join(result)
|
||||||
|
def included_options(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
||||||
|
env: MutableMapping[str, Any]) -> str:
|
||||||
|
return cast(str, token.meta['rendered-options'])
|
||||||
|
|
||||||
# TODO minimize docbook diffs with existing conversions. remove soon.
|
# TODO minimize docbook diffs with existing conversions. remove soon.
|
||||||
def paragraph_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
def paragraph_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
||||||
env: MutableMapping[str, Any]) -> str:
|
env: MutableMapping[str, Any]) -> str:
|
||||||
|
@ -76,127 +115,113 @@ class ManualDocBookRenderer(DocBookRenderer):
|
||||||
return f"<programlisting>\n{escape(token.content)}</programlisting>"
|
return f"<programlisting>\n{escape(token.content)}</programlisting>"
|
||||||
def fence(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
def fence(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
||||||
env: MutableMapping[str, Any]) -> str:
|
env: MutableMapping[str, Any]) -> str:
|
||||||
# HACK for temporarily being able to replace md-to-db.sh. pandoc used this syntax to
|
|
||||||
# allow md files to inject arbitrary docbook, and manual chapters use it.
|
|
||||||
if token.info == '{=docbook}':
|
|
||||||
return token.content
|
|
||||||
info = f" language={quoteattr(token.info)}" if token.info != "" else ""
|
info = f" language={quoteattr(token.info)}" if token.info != "" else ""
|
||||||
return f"<programlisting{info}>\n{escape(token.content)}</programlisting>"
|
return f"<programlisting{info}>\n{escape(token.content)}</programlisting>"
|
||||||
|
|
||||||
class DocBookSectionConverter(BaseConverter):
|
class DocBookConverter(Converter):
|
||||||
__renderer__ = ManualDocBookRenderer
|
def __renderer__(self, manpage_urls: Mapping[str, str],
|
||||||
|
parser: Optional[markdown_it.MarkdownIt]) -> ManualDocBookRenderer:
|
||||||
|
return ManualDocBookRenderer('book', manpage_urls, parser)
|
||||||
|
|
||||||
def finalize(self) -> str:
|
_base_paths: list[Path]
|
||||||
result = []
|
_revision: str
|
||||||
|
|
||||||
for section in self._sections:
|
def __init__(self, manpage_urls: Mapping[str, str], revision: str):
|
||||||
id = "id=" + quoteattr(section.id) if section.id is not None else ""
|
super().__init__(manpage_urls)
|
||||||
result.append(f'<section {id}>')
|
self._revision = revision
|
||||||
result += section.chapters
|
|
||||||
result.append(f'</section>')
|
|
||||||
|
|
||||||
return "\n".join(result)
|
def convert(self, file: Path) -> str:
|
||||||
|
self._base_paths = [ file ]
|
||||||
class ManualFragmentDocBookRenderer(ManualDocBookRenderer):
|
|
||||||
_tag: str = "chapter"
|
|
||||||
|
|
||||||
def _heading_tag(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
|
|
||||||
env: MutableMapping[str, Any]) -> tuple[str, dict[str, str]]:
|
|
||||||
(tag, attrs) = super()._heading_tag(token, tokens, i, options, env)
|
|
||||||
if token.tag == 'h1':
|
|
||||||
return (self._tag, attrs | { 'xmlns:xi': "http://www.w3.org/2001/XInclude" })
|
|
||||||
return (tag, attrs)
|
|
||||||
|
|
||||||
class DocBookFragmentConverter(Converter):
|
|
||||||
__renderer__ = ManualFragmentDocBookRenderer
|
|
||||||
|
|
||||||
def convert(self, file: Path, tag: str) -> str:
|
|
||||||
assert isinstance(self._md.renderer, ManualFragmentDocBookRenderer)
|
|
||||||
try:
|
try:
|
||||||
with open(file, 'r') as f:
|
with open(file, 'r') as f:
|
||||||
self._md.renderer._title_seen = False
|
|
||||||
self._md.renderer._tag = tag
|
|
||||||
return self._render(f.read())
|
return self._render(f.read())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise RuntimeError(f"failed to render manual {tag} {file}") from e
|
raise RuntimeError(f"failed to render manual {file}") from e
|
||||||
|
|
||||||
|
def _parse(self, src: str, env: Optional[MutableMapping[str, Any]] = None) -> list[Token]:
|
||||||
|
tokens = super()._parse(src, env)
|
||||||
|
for token in tokens:
|
||||||
|
if token.type != "fence" or not token.info.startswith("{=include=} "):
|
||||||
|
continue
|
||||||
|
typ = token.info[12:].strip()
|
||||||
|
if typ == 'options':
|
||||||
|
token.type = 'included_options'
|
||||||
|
self._parse_options(token)
|
||||||
|
elif typ in [ 'sections', 'chapters', 'preface', 'parts', 'appendix' ]:
|
||||||
|
token.type = 'included_' + typ
|
||||||
|
self._parse_included_blocks(token, env)
|
||||||
|
else:
|
||||||
|
raise RuntimeError(f"unsupported structural include type '{typ}'")
|
||||||
|
return tokens
|
||||||
|
|
||||||
|
def _parse_included_blocks(self, token: Token, env: Optional[MutableMapping[str, Any]]) -> None:
|
||||||
|
assert token.map
|
||||||
|
included = token.meta['included'] = []
|
||||||
|
for (lnum, line) in enumerate(token.content.splitlines(), token.map[0] + 2):
|
||||||
|
line = line.strip()
|
||||||
|
path = self._base_paths[-1].parent / line
|
||||||
|
if path in self._base_paths:
|
||||||
|
raise RuntimeError(f"circular include found in line {lnum}")
|
||||||
|
try:
|
||||||
|
self._base_paths.append(path)
|
||||||
|
with open(path, 'r') as f:
|
||||||
|
tokens = self._parse(f.read(), env)
|
||||||
|
included.append((tokens, path))
|
||||||
|
self._base_paths.pop()
|
||||||
|
except Exception as e:
|
||||||
|
raise RuntimeError(f"processing included file {path} from line {lnum}") from e
|
||||||
|
|
||||||
|
def _parse_options(self, token: Token) -> None:
|
||||||
|
assert token.map
|
||||||
|
|
||||||
|
items = {}
|
||||||
|
for (lnum, line) in enumerate(token.content.splitlines(), token.map[0] + 2):
|
||||||
|
if len(args := line.split(":", 1)) != 2:
|
||||||
|
raise RuntimeError(f"options directive with no argument in line {lnum}")
|
||||||
|
(k, v) = (args[0].strip(), args[1].strip())
|
||||||
|
if k in items:
|
||||||
|
raise RuntimeError(f"duplicate options directive {k} in line {lnum}")
|
||||||
|
items[k] = v
|
||||||
|
try:
|
||||||
|
id_prefix = items.pop('id-prefix')
|
||||||
|
varlist_id = items.pop('list-id')
|
||||||
|
source = items.pop('source')
|
||||||
|
except KeyError as e:
|
||||||
|
raise RuntimeError(f"options directive {e} missing in block at line {token.map[0] + 1}")
|
||||||
|
if items.keys():
|
||||||
|
raise RuntimeError(
|
||||||
|
f"unsupported options directives in block at line {token.map[0] + 1}",
|
||||||
|
" ".join(items.keys()))
|
||||||
|
|
||||||
|
try:
|
||||||
|
conv = options.DocBookConverter(
|
||||||
|
self._manpage_urls, self._revision, False, 'fragment', varlist_id, id_prefix)
|
||||||
|
with open(self._base_paths[-1].parent / source, 'r') as f:
|
||||||
|
conv.add_options(json.load(f))
|
||||||
|
token.meta['rendered-options'] = conv.finalize(fragment=True)
|
||||||
|
except Exception as e:
|
||||||
|
raise RuntimeError(f"processing options block in line {token.map[0] + 1}") from e
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Section:
|
def _build_cli_db(p: argparse.ArgumentParser) -> None:
|
||||||
id: Optional[str] = None
|
|
||||||
chapters: list[str]
|
|
||||||
|
|
||||||
def __init__(self) -> None:
|
|
||||||
self.chapters = []
|
|
||||||
|
|
||||||
class SectionAction(argparse.Action):
|
|
||||||
def __call__(self, parser: argparse.ArgumentParser, ns: argparse.Namespace,
|
|
||||||
values: Union[str, Sequence[Any], None], opt_str: Optional[str] = None) -> None:
|
|
||||||
sections = getattr(ns, self.dest)
|
|
||||||
if sections is None: sections = []
|
|
||||||
sections.append(Section())
|
|
||||||
setattr(ns, self.dest, sections)
|
|
||||||
|
|
||||||
class SectionIDAction(argparse.Action):
|
|
||||||
def __call__(self, parser: argparse.ArgumentParser, ns: argparse.Namespace,
|
|
||||||
values: Union[str, Sequence[Any], None], opt_str: Optional[str] = None) -> None:
|
|
||||||
sections = getattr(ns, self.dest)
|
|
||||||
if sections is None: raise argparse.ArgumentError(self, "no active section")
|
|
||||||
sections[-1].id = cast(str, values)
|
|
||||||
|
|
||||||
class ChaptersAction(argparse.Action):
|
|
||||||
def __call__(self, parser: argparse.ArgumentParser, ns: argparse.Namespace,
|
|
||||||
values: Union[str, Sequence[Any], None], opt_str: Optional[str] = None) -> None:
|
|
||||||
sections = getattr(ns, self.dest)
|
|
||||||
if sections is None: raise argparse.ArgumentError(self, "no active section")
|
|
||||||
sections[-1].chapters.extend(map(Path, cast(Sequence[str], values)))
|
|
||||||
|
|
||||||
class SingleFileAction(argparse.Action):
|
|
||||||
def __call__(self, parser: argparse.ArgumentParser, ns: argparse.Namespace,
|
|
||||||
values: Union[str, Sequence[Any], None], opt_str: Optional[str] = None) -> None:
|
|
||||||
assert isinstance(values, Sequence)
|
|
||||||
chapters = getattr(ns, self.dest) or []
|
|
||||||
chapters.append((Path(values[0]), Path(values[1])))
|
|
||||||
setattr(ns, self.dest, chapters)
|
|
||||||
|
|
||||||
def _build_cli_db_section(p: argparse.ArgumentParser) -> None:
|
|
||||||
p.add_argument('--manpage-urls', required=True)
|
p.add_argument('--manpage-urls', required=True)
|
||||||
p.add_argument("outfile")
|
p.add_argument('--revision', required=True)
|
||||||
p.add_argument("--section", dest="contents", action=SectionAction, nargs=0)
|
p.add_argument('infile', type=Path)
|
||||||
p.add_argument("--section-id", dest="contents", action=SectionIDAction)
|
p.add_argument('outfile', type=Path)
|
||||||
p.add_argument("--chapters", dest="contents", action=ChaptersAction, nargs='+')
|
|
||||||
|
|
||||||
def _build_cli_db_fragment(p: argparse.ArgumentParser) -> None:
|
def _run_cli_db(args: argparse.Namespace) -> None:
|
||||||
p.add_argument('--manpage-urls', required=True)
|
|
||||||
p.add_argument("--chapter", action=SingleFileAction, required=True, nargs=2)
|
|
||||||
p.add_argument("--section", action=SingleFileAction, required=True, nargs=2)
|
|
||||||
|
|
||||||
def _run_cli_db_section(args: argparse.Namespace) -> None:
|
|
||||||
with open(args.manpage_urls, 'r') as manpage_urls:
|
with open(args.manpage_urls, 'r') as manpage_urls:
|
||||||
md = DocBookSectionConverter(json.load(manpage_urls))
|
md = DocBookConverter(json.load(manpage_urls), args.revision)
|
||||||
for section in args.contents:
|
converted = md.convert(args.infile)
|
||||||
md.add_section(section.id, section.chapters)
|
args.outfile.write_text(converted)
|
||||||
with open(args.outfile, 'w') as f:
|
|
||||||
f.write(md.finalize())
|
|
||||||
|
|
||||||
def _run_cli_db_fragment(args: argparse.Namespace) -> None:
|
|
||||||
with open(args.manpage_urls, 'r') as manpage_urls:
|
|
||||||
md = DocBookFragmentConverter(json.load(manpage_urls))
|
|
||||||
for kind in [ 'chapter', 'section' ]:
|
|
||||||
for (target, file) in getattr(args, kind):
|
|
||||||
converted = md.convert(file, kind)
|
|
||||||
target.parent.mkdir(parents=True, exist_ok=True)
|
|
||||||
target.write_text(converted)
|
|
||||||
|
|
||||||
def build_cli(p: argparse.ArgumentParser) -> None:
|
def build_cli(p: argparse.ArgumentParser) -> None:
|
||||||
formats = p.add_subparsers(dest='format', required=True)
|
formats = p.add_subparsers(dest='format', required=True)
|
||||||
_build_cli_db_section(formats.add_parser('docbook-section'))
|
_build_cli_db(formats.add_parser('docbook'))
|
||||||
_build_cli_db_fragment(formats.add_parser('docbook-fragment'))
|
|
||||||
|
|
||||||
def run_cli(args: argparse.Namespace) -> None:
|
def run_cli(args: argparse.Namespace) -> None:
|
||||||
if args.format == 'docbook-section':
|
if args.format == 'docbook':
|
||||||
_run_cli_db_section(args)
|
_run_cli_db(args)
|
||||||
elif args.format == 'docbook-fragment':
|
|
||||||
_run_cli_db_fragment(args)
|
|
||||||
else:
|
else:
|
||||||
raise RuntimeError('format not hooked up', args)
|
raise RuntimeError('format not hooked up', args)
|
||||||
|
|
|
@ -29,7 +29,7 @@ class BaseConverter(Converter):
|
||||||
|
|
||||||
_options: dict[str, RenderedOption]
|
_options: dict[str, RenderedOption]
|
||||||
|
|
||||||
def __init__(self, manpage_urls: dict[str, str],
|
def __init__(self, manpage_urls: Mapping[str, str],
|
||||||
revision: str,
|
revision: str,
|
||||||
markdown_by_default: bool):
|
markdown_by_default: bool):
|
||||||
super().__init__(manpage_urls)
|
super().__init__(manpage_urls)
|
||||||
|
@ -231,9 +231,10 @@ class DocBookConverter(BaseConverter):
|
||||||
def _decl_def_footer(self) -> list[str]:
|
def _decl_def_footer(self) -> list[str]:
|
||||||
return [ "</simplelist>" ]
|
return [ "</simplelist>" ]
|
||||||
|
|
||||||
def finalize(self) -> str:
|
def finalize(self, *, fragment: bool = False) -> str:
|
||||||
result = []
|
result = []
|
||||||
|
|
||||||
|
if not fragment:
|
||||||
result.append('<?xml version="1.0" encoding="UTF-8"?>')
|
result.append('<?xml version="1.0" encoding="UTF-8"?>')
|
||||||
if self._document_type == 'appendix':
|
if self._document_type == 'appendix':
|
||||||
result += [
|
result += [
|
||||||
|
|
|
@ -42,10 +42,14 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
installManPage $releaseDir/build/mdcat-*/out/mdcat.1
|
installManPage $releaseDir/build/mdcat-*/out/mdcat.1
|
||||||
|
ln -sr $out/bin/{mdcat,mdless}
|
||||||
|
|
||||||
|
for bin in mdcat mdless; do
|
||||||
installShellCompletion \
|
installShellCompletion \
|
||||||
--bash $releaseDir/build/mdcat-*/out/completions/mdcat.bash \
|
--bash $releaseDir/build/mdcat-*/out/completions/$bin.bash \
|
||||||
--fish $releaseDir/build/mdcat-*/out/completions/mdcat.fish \
|
--fish $releaseDir/build/mdcat-*/out/completions/$bin.fish \
|
||||||
--zsh $releaseDir/build/mdcat-*/out/completions/_mdcat
|
--zsh $releaseDir/build/mdcat-*/out/completions/_$bin
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -23014,6 +23014,8 @@ with pkgs;
|
||||||
|
|
||||||
rover = callPackage ../development/tools/rover { };
|
rover = callPackage ../development/tools/rover { };
|
||||||
|
|
||||||
|
rqlite = callPackage ../servers/sql/rqlite { };
|
||||||
|
|
||||||
rshell = python3.pkgs.callPackage ../development/embedded/rshell { };
|
rshell = python3.pkgs.callPackage ../development/embedded/rshell { };
|
||||||
|
|
||||||
rttr = callPackage ../development/libraries/rttr { };
|
rttr = callPackage ../development/libraries/rttr { };
|
||||||
|
@ -30242,6 +30244,8 @@ with pkgs;
|
||||||
|
|
||||||
pixinsight = libsForQt5.callPackage ../applications/graphics/pixinsight { };
|
pixinsight = libsForQt5.callPackage ../applications/graphics/pixinsight { };
|
||||||
|
|
||||||
|
protonup-qt = python3Packages.callPackage ../applications/misc/protonup-qt { };
|
||||||
|
|
||||||
pmbootstrap = python3Packages.callPackage ../tools/misc/pmbootstrap { };
|
pmbootstrap = python3Packages.callPackage ../tools/misc/pmbootstrap { };
|
||||||
|
|
||||||
popura = callPackage ../tools/networking/popura {};
|
popura = callPackage ../tools/networking/popura {};
|
||||||
|
@ -36342,6 +36346,10 @@ with pkgs;
|
||||||
|
|
||||||
n3 = callPackage ../applications/science/biology/N3 { };
|
n3 = callPackage ../applications/science/biology/N3 { };
|
||||||
|
|
||||||
|
nest = callPackage ../applications/science/biology/nest { };
|
||||||
|
|
||||||
|
nest-mpi = callPackage ../applications/science/biology/nest { withMpi = true; };
|
||||||
|
|
||||||
neuron = callPackage ../applications/science/biology/neuron { python = null; };
|
neuron = callPackage ../applications/science/biology/neuron { python = null; };
|
||||||
|
|
||||||
neuron-mpi = neuron.override {useMpi = true; };
|
neuron-mpi = neuron.override {useMpi = true; };
|
||||||
|
|
|
@ -1421,6 +1421,8 @@ self: super: with self; {
|
||||||
|
|
||||||
brelpy = callPackage ../development/python-modules/brelpy { };
|
brelpy = callPackage ../development/python-modules/brelpy { };
|
||||||
|
|
||||||
|
brian2 = callPackage ../development/python-modules/brian2 { };
|
||||||
|
|
||||||
broadlink = callPackage ../development/python-modules/broadlink { };
|
broadlink = callPackage ../development/python-modules/broadlink { };
|
||||||
|
|
||||||
brother = callPackage ../development/python-modules/brother { };
|
brother = callPackage ../development/python-modules/brother { };
|
||||||
|
@ -6302,6 +6304,8 @@ self: super: with self; {
|
||||||
|
|
||||||
nessclient = callPackage ../development/python-modules/nessclient { };
|
nessclient = callPackage ../development/python-modules/nessclient { };
|
||||||
|
|
||||||
|
nest = toPythonModule(pkgs.nest-mpi.override { withPython = true; python3 = python; });
|
||||||
|
|
||||||
nest-asyncio = callPackage ../development/python-modules/nest-asyncio { };
|
nest-asyncio = callPackage ../development/python-modules/nest-asyncio { };
|
||||||
|
|
||||||
nested-lookup = callPackage ../development/python-modules/nested-lookup { };
|
nested-lookup = callPackage ../development/python-modules/nested-lookup { };
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue