Merge master into staging-next
This commit is contained in:
commit
feb2240b37
|
@ -1,5 +1,8 @@
|
||||||
{
|
{
|
||||||
"nix.conf(5)": "https://nixos.org/manual/nix/stable/#sec-conf-file",
|
"gnunet.conf(5)": "https://docs.gnunet.org/users/configuration.html",
|
||||||
|
"mpd(1)": "https://mpd.readthedocs.io/en/latest/mpd.1.html",
|
||||||
|
"mpd.conf(5)": "https://mpd.readthedocs.io/en/latest/mpd.conf.5.html",
|
||||||
|
"nix.conf(5)": "https://nixos.org/manual/nix/stable/command-ref/conf-file.html",
|
||||||
|
|
||||||
"journald.conf(5)": "https://www.freedesktop.org/software/systemd/man/journald.conf.html",
|
"journald.conf(5)": "https://www.freedesktop.org/software/systemd/man/journald.conf.html",
|
||||||
"logind.conf(5)": "https://www.freedesktop.org/software/systemd/man/logind.conf.html",
|
"logind.conf(5)": "https://www.freedesktop.org/software/systemd/man/logind.conf.html",
|
||||||
|
|
|
@ -78,10 +78,15 @@ rec {
|
||||||
|
|
||||||
2. (modern) a pattern for the platform `parsed` field.
|
2. (modern) a pattern for the platform `parsed` field.
|
||||||
|
|
||||||
|
3. (functional) a predicate function returning a boolean.
|
||||||
|
|
||||||
We can inject these into a pattern for the whole of a structured platform,
|
We can inject these into a pattern for the whole of a structured platform,
|
||||||
and then match that.
|
and then match that.
|
||||||
*/
|
*/
|
||||||
platformMatch = platform: elem: let
|
platformMatch = platform: elem:
|
||||||
|
if builtins.isFunction elem
|
||||||
|
then elem platform
|
||||||
|
else let
|
||||||
pattern =
|
pattern =
|
||||||
if builtins.isString elem
|
if builtins.isString elem
|
||||||
then { system = elem; }
|
then { system = elem; }
|
||||||
|
|
|
@ -10284,15 +10284,6 @@
|
||||||
githubId = 1219785;
|
githubId = 1219785;
|
||||||
name = "Félix Baylac-Jacqué";
|
name = "Félix Baylac-Jacqué";
|
||||||
};
|
};
|
||||||
ninjin = {
|
|
||||||
email = "pontus@stenetorp.se";
|
|
||||||
github = "ninjin";
|
|
||||||
githubId = 354934;
|
|
||||||
name = "Pontus Stenetorp";
|
|
||||||
keys = [{
|
|
||||||
fingerprint = "0966 2F9F 3FDA C22B C22E 4CE1 D430 2875 00E6 483C";
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
nioncode = {
|
nioncode = {
|
||||||
email = "nioncode+github@gmail.com";
|
email = "nioncode+github@gmail.com";
|
||||||
github = "nioncode";
|
github = "nioncode";
|
||||||
|
@ -15429,6 +15420,12 @@
|
||||||
githubId = 17534323;
|
githubId = 17534323;
|
||||||
name = "Quentin Vaucher";
|
name = "Quentin Vaucher";
|
||||||
};
|
};
|
||||||
|
xlambein = {
|
||||||
|
email = "xlambein@gmail.com";
|
||||||
|
github = "xlambein";
|
||||||
|
githubId = 5629059;
|
||||||
|
name = "Xavier Lambein";
|
||||||
|
};
|
||||||
xnaveira = {
|
xnaveira = {
|
||||||
email = "xnaveira@gmail.com";
|
email = "xnaveira@gmail.com";
|
||||||
github = "xnaveira";
|
github = "xnaveira";
|
||||||
|
@ -16379,4 +16376,10 @@
|
||||||
github = "franzmondlichtmann";
|
github = "franzmondlichtmann";
|
||||||
githubId = 105480088;
|
githubId = 105480088;
|
||||||
};
|
};
|
||||||
|
srounce = {
|
||||||
|
name = "Samuel Rounce";
|
||||||
|
email = "me@samuelrounce.co.uk";
|
||||||
|
github = "srounce";
|
||||||
|
githubId = 60792;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,15 +9,14 @@ stdenv.mkDerivation {
|
||||||
perl GetoptLongDescriptive CPANPLUS Readonly LogLog4perl
|
perl GetoptLongDescriptive CPANPLUS Readonly LogLog4perl
|
||||||
];
|
];
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
dontUnpack = true;
|
||||||
|
|
||||||
installPhase =
|
installPhase = ''
|
||||||
''
|
mkdir -p $out/bin
|
||||||
mkdir -p $out/bin
|
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
|
||||||
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
|
patchShebangs $out/bin/nix-generate-from-cpan
|
||||||
patchShebangs $out/bin/nix-generate-from-cpan
|
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
|
||||||
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
|
'';
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with lib.maintainers; [ eelco ];
|
maintainers = with lib.maintainers; [ eelco ];
|
||||||
|
|
|
@ -398,6 +398,19 @@ with lib.maintainers; {
|
||||||
shortName = "Linux Kernel";
|
shortName = "Linux Kernel";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
llvm = {
|
||||||
|
members = [
|
||||||
|
ericson2314
|
||||||
|
sternenseemann
|
||||||
|
lovek323
|
||||||
|
dtzWill
|
||||||
|
primeos
|
||||||
|
];
|
||||||
|
scope = "Maintain LLVM package sets and related packages";
|
||||||
|
shortName = "LLVM";
|
||||||
|
enableFeatureFreezePing = true;
|
||||||
|
};
|
||||||
|
|
||||||
lumiguide = {
|
lumiguide = {
|
||||||
# Verify additions by approval of an already existing member of the team.
|
# Verify additions by approval of an already existing member of the team.
|
||||||
members = [
|
members = [
|
||||||
|
|
|
@ -209,7 +209,7 @@ let
|
||||||
in rec {
|
in rec {
|
||||||
inherit generatedSources;
|
inherit generatedSources;
|
||||||
|
|
||||||
inherit (optionsDoc) optionsJSON optionsNix optionsDocBook;
|
inherit (optionsDoc) optionsJSON optionsNix optionsDocBook optionsUsedDocbook;
|
||||||
|
|
||||||
# Generate the NixOS manual.
|
# Generate the NixOS manual.
|
||||||
manualHTML = runCommand "nixos-manual-html"
|
manualHTML = runCommand "nixos-manual-html"
|
||||||
|
|
|
@ -78,7 +78,7 @@ For example:
|
||||||
|
|
||||||
::: {#ex-options-declarations-util-mkEnableOption-magic .example}
|
::: {#ex-options-declarations-util-mkEnableOption-magic .example}
|
||||||
```nix
|
```nix
|
||||||
lib.mkEnableOption "magic"
|
lib.mkEnableOption (lib.mdDoc "magic")
|
||||||
# is like
|
# is like
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
|
@ -113,7 +113,7 @@ Examples:
|
||||||
|
|
||||||
::: {#ex-options-declarations-util-mkPackageOption-hello .example}
|
::: {#ex-options-declarations-util-mkPackageOption-hello .example}
|
||||||
```nix
|
```nix
|
||||||
lib.mkPackageOption pkgs "hello" { }
|
lib.mkPackageOptionMD pkgs "hello" { }
|
||||||
# is like
|
# is like
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
|
@ -125,7 +125,7 @@ lib.mkOption {
|
||||||
|
|
||||||
::: {#ex-options-declarations-util-mkPackageOption-ghc .example}
|
::: {#ex-options-declarations-util-mkPackageOption-ghc .example}
|
||||||
```nix
|
```nix
|
||||||
lib.mkPackageOption pkgs "GHC" {
|
lib.mkPackageOptionMD pkgs "GHC" {
|
||||||
default = [ "ghc" ];
|
default = [ "ghc" ];
|
||||||
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
|
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ options = {
|
||||||
</para>
|
</para>
|
||||||
<anchor xml:id="ex-options-declarations-util-mkEnableOption-magic" />
|
<anchor xml:id="ex-options-declarations-util-mkEnableOption-magic" />
|
||||||
<programlisting language="nix">
|
<programlisting language="nix">
|
||||||
lib.mkEnableOption "magic"
|
lib.mkEnableOption (lib.mdDoc "magic")
|
||||||
# is like
|
# is like
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
|
@ -188,7 +188,7 @@ mkPackageOption pkgs "name" { default = [ "path" "in&qu
|
||||||
</para>
|
</para>
|
||||||
<anchor xml:id="ex-options-declarations-util-mkPackageOption-hello" />
|
<anchor xml:id="ex-options-declarations-util-mkPackageOption-hello" />
|
||||||
<programlisting language="nix">
|
<programlisting language="nix">
|
||||||
lib.mkPackageOption pkgs "hello" { }
|
lib.mkPackageOptionMD pkgs "hello" { }
|
||||||
# is like
|
# is like
|
||||||
lib.mkOption {
|
lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
|
@ -199,7 +199,7 @@ lib.mkOption {
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" />
|
<anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" />
|
||||||
<programlisting language="nix">
|
<programlisting language="nix">
|
||||||
lib.mkPackageOption pkgs "GHC" {
|
lib.mkPackageOptionMD pkgs "GHC" {
|
||||||
default = [ "ghc" ];
|
default = [ "ghc" ];
|
||||||
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
|
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,6 +130,13 @@
|
||||||
<link xlink:href="options.html#opt-services.photoprism.enable">services.photoprism</link>.
|
<link xlink:href="options.html#opt-services.photoprism.enable">services.photoprism</link>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<link xlink:href="https://github.com/languitar/autosuspend">autosuspend</link>,
|
||||||
|
a python daemon that suspends a system if certain conditions
|
||||||
|
are met, or not met.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
<section xml:id="sec-release-23.05-incompatibilities">
|
<section xml:id="sec-release-23.05-incompatibilities">
|
||||||
|
@ -280,16 +287,6 @@
|
||||||
<literal>llvmPackages_rocm.clang-unwrapped</literal>.
|
<literal>llvmPackages_rocm.clang-unwrapped</literal>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The Nginx module now validates the syntax of config files at
|
|
||||||
build time. For more complex configurations (using
|
|
||||||
<literal>include</literal> with out-of-store files notably)
|
|
||||||
you may need to disable this check by setting
|
|
||||||
<link linkend="opt-services.nginx.validateConfig">services.nginx.validateConfig</link>
|
|
||||||
to <literal>false</literal>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The EC2 image module previously detected and automatically
|
The EC2 image module previously detected and automatically
|
||||||
|
@ -433,6 +430,22 @@
|
||||||
sudo and sources the environment variables.
|
sudo and sources the environment variables.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
DocBook option documentation, which has been deprecated since
|
||||||
|
22.11, will now cause a warning when documentation is built.
|
||||||
|
Out-of-tree modules should migrate to using CommonMark
|
||||||
|
documentation as outlined in
|
||||||
|
<xref linkend="sec-option-declarations" /> to silence this
|
||||||
|
warning.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
DocBook option documentation support will be removed in the
|
||||||
|
next release and CommonMark will become the default. DocBook
|
||||||
|
option documentation that has not been migrated until then
|
||||||
|
will no longer render properly or cause errors.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The <literal>dnsmasq</literal> service now takes configuration
|
The <literal>dnsmasq</literal> service now takes configuration
|
||||||
|
|
|
@ -42,6 +42,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||||
|
|
||||||
- [photoprism](https://photoprism.app/), a AI-Powered Photos App for the Decentralized Web. Available as [services.photoprism](options.html#opt-services.photoprism.enable).
|
- [photoprism](https://photoprism.app/), a AI-Powered Photos App for the Decentralized Web. Available as [services.photoprism](options.html#opt-services.photoprism.enable).
|
||||||
|
|
||||||
|
- [autosuspend](https://github.com/languitar/autosuspend), a python daemon that suspends a system if certain conditions are met, or not met.
|
||||||
|
|
||||||
## Backward Incompatibilities {#sec-release-23.05-incompatibilities}
|
## Backward Incompatibilities {#sec-release-23.05-incompatibilities}
|
||||||
|
|
||||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||||
|
@ -71,8 +73,6 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||||
|
|
||||||
- `llvmPackages_rocm.llvm` will not contain `clang` or `compiler-rt`. `llvmPackages_rocm.clang` will not contain `llvm`. `llvmPackages_rocm.clangNoCompilerRt` has been removed in favor of using `llvmPackages_rocm.clang-unwrapped`.
|
- `llvmPackages_rocm.llvm` will not contain `clang` or `compiler-rt`. `llvmPackages_rocm.clang` will not contain `llvm`. `llvmPackages_rocm.clangNoCompilerRt` has been removed in favor of using `llvmPackages_rocm.clang-unwrapped`.
|
||||||
|
|
||||||
- The Nginx module now validates the syntax of config files at build time. For more complex configurations (using `include` with out-of-store files notably) you may need to disable this check by setting [services.nginx.validateConfig](#opt-services.nginx.validateConfig) to `false`.
|
|
||||||
|
|
||||||
- The EC2 image module previously detected and automatically mounted ext3-formatted instance store devices and partitions in stage-1 (initramfs), storing `/tmp` on the first discovered device. This behaviour, which only catered to very specific use cases and could not be disabled, has been removed. Users relying on this should provide their own implementation, and probably use ext4 and perform the mount in stage-2.
|
- The EC2 image module previously detected and automatically mounted ext3-formatted instance store devices and partitions in stage-1 (initramfs), storing `/tmp` on the first discovered device. This behaviour, which only catered to very specific use cases and could not be disabled, has been removed. Users relying on this should provide their own implementation, and probably use ext4 and perform the mount in stage-2.
|
||||||
|
|
||||||
- `teleport` has been upgraded to major version 11. Please see upstream [upgrade instructions](https://goteleport.com/docs/setup/operations/upgrading/) and [release notes](https://goteleport.com/docs/changelog/#1100).
|
- `teleport` has been upgraded to major version 11. Please see upstream [upgrade instructions](https://goteleport.com/docs/setup/operations/upgrading/) and [release notes](https://goteleport.com/docs/changelog/#1100).
|
||||||
|
@ -108,6 +108,10 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||||
|
|
||||||
- `services.mastodon` gained a tootctl wrapped named `mastodon-tootctl` similar to `nextcloud-occ` which can be executed from any user and switches to the configured mastodon user with sudo and sources the environment variables.
|
- `services.mastodon` gained a tootctl wrapped named `mastodon-tootctl` similar to `nextcloud-occ` which can be executed from any user and switches to the configured mastodon user with sudo and sources the environment variables.
|
||||||
|
|
||||||
|
- DocBook option documentation, which has been deprecated since 22.11, will now cause a warning when documentation is built. Out-of-tree modules should migrate to using CommonMark documentation as outlined in [](#sec-option-declarations) to silence this warning.
|
||||||
|
|
||||||
|
DocBook option documentation support will be removed in the next release and CommonMark will become the default. DocBook option documentation that has not been migrated until then will no longer render properly or cause errors.
|
||||||
|
|
||||||
- The `dnsmasq` service now takes configuration via the
|
- The `dnsmasq` service now takes configuration via the
|
||||||
`services.dnsmasq.settings` attribute set. The option
|
`services.dnsmasq.settings` attribute set. The option
|
||||||
`services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
|
`services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
|
||||||
|
|
|
@ -78,16 +78,13 @@ let
|
||||||
title = args.title or null;
|
title = args.title or null;
|
||||||
name = args.name or (lib.concatStringsSep "." args.path);
|
name = args.name or (lib.concatStringsSep "." args.path);
|
||||||
in ''
|
in ''
|
||||||
<listitem>
|
- [`${lib.optionalString (title != null) "${title} aka "}pkgs.${name}`](
|
||||||
<para>
|
https://search.nixos.org/packages?show=${name}&sort=relevance&query=${name}
|
||||||
<link xlink:href="https://search.nixos.org/packages?show=${name}&sort=relevance&query=${name}">
|
)${
|
||||||
<literal>${lib.optionalString (title != null) "${title} aka "}pkgs.${name}</literal>
|
lib.optionalString (args ? comment) "\n\n ${args.comment}"
|
||||||
</link>
|
}
|
||||||
</para>
|
|
||||||
${lib.optionalString (args ? comment) "<para>${args.comment}</para>"}
|
|
||||||
</listitem>
|
|
||||||
'';
|
'';
|
||||||
in "<itemizedlist>${lib.concatStringsSep "\n" (map (p: describe (unpack p)) packages)}</itemizedlist>";
|
in lib.concatMapStrings (p: describe (unpack p)) packages;
|
||||||
|
|
||||||
optionsNix = builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList);
|
optionsNix = builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList);
|
||||||
|
|
||||||
|
@ -121,7 +118,20 @@ in rec {
|
||||||
inherit self;
|
inherit self;
|
||||||
includeSiteCustomize = true;
|
includeSiteCustomize = true;
|
||||||
});
|
});
|
||||||
in self.withPackages (p: [ p.mistune ]))
|
in self.withPackages (p:
|
||||||
|
let
|
||||||
|
# TODO add our own small test suite when rendering is split out into a new tool
|
||||||
|
markdown-it-py = p.markdown-it-py.override {
|
||||||
|
disableTests = true;
|
||||||
|
};
|
||||||
|
mdit-py-plugins = p.mdit-py-plugins.override {
|
||||||
|
inherit markdown-it-py;
|
||||||
|
disableTests = true;
|
||||||
|
};
|
||||||
|
in [
|
||||||
|
markdown-it-py
|
||||||
|
mdit-py-plugins
|
||||||
|
]))
|
||||||
];
|
];
|
||||||
options = builtins.toFile "options.json"
|
options = builtins.toFile "options.json"
|
||||||
(builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));
|
(builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));
|
||||||
|
@ -139,9 +149,10 @@ in rec {
|
||||||
dst=$out/share/doc/nixos
|
dst=$out/share/doc/nixos
|
||||||
mkdir -p $dst
|
mkdir -p $dst
|
||||||
|
|
||||||
|
TOUCH_IF_DB=$dst/.used-docbook \
|
||||||
python ${./mergeJSON.py} \
|
python ${./mergeJSON.py} \
|
||||||
${lib.optionalString warningsAreErrors "--warnings-are-errors"} \
|
${lib.optionalString warningsAreErrors "--warnings-are-errors"} \
|
||||||
${lib.optionalString (! allowDocBook) "--error-on-docbook"} \
|
${if allowDocBook then "--warn-on-docbook" else "--error-on-docbook"} \
|
||||||
${lib.optionalString markdownByDefault "--markdown-by-default"} \
|
${lib.optionalString markdownByDefault "--markdown-by-default"} \
|
||||||
$baseJSON $options \
|
$baseJSON $options \
|
||||||
> $dst/options.json
|
> $dst/options.json
|
||||||
|
@ -153,6 +164,14 @@ in rec {
|
||||||
echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products
|
echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
optionsUsedDocbook = pkgs.runCommand "options-used-docbook" {} ''
|
||||||
|
if [ -e ${optionsJSON}/share/doc/nixos/.used-docbook ]; then
|
||||||
|
echo 1
|
||||||
|
else
|
||||||
|
echo 0
|
||||||
|
fi >"$out"
|
||||||
|
'';
|
||||||
|
|
||||||
# Convert options.json into an XML file.
|
# Convert options.json into an XML file.
|
||||||
# The actual generation of the xml file is done in nix purely for the convenience
|
# The actual generation of the xml file is done in nix purely for the convenience
|
||||||
# of not having to generate the xml some other way
|
# of not having to generate the xml some other way
|
||||||
|
|
|
@ -3,9 +3,17 @@ import json
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, Dict, List
|
from typing import Any, Dict, List
|
||||||
|
from collections.abc import MutableMapping, Sequence
|
||||||
|
import inspect
|
||||||
|
|
||||||
# for MD conversion
|
# for MD conversion
|
||||||
import mistune
|
import markdown_it
|
||||||
|
import markdown_it.renderer
|
||||||
|
from markdown_it.token import Token
|
||||||
|
from markdown_it.utils import OptionsDict
|
||||||
|
from mdit_py_plugins.container import container_plugin
|
||||||
|
from mdit_py_plugins.deflist import deflist_plugin
|
||||||
|
from mdit_py_plugins.myst_role import myst_role_plugin
|
||||||
import re
|
import re
|
||||||
from xml.sax.saxutils import escape, quoteattr
|
from xml.sax.saxutils import escape, quoteattr
|
||||||
|
|
||||||
|
@ -49,155 +57,175 @@ def unpivot(options: Dict[Key, Option]) -> Dict[str, JSON]:
|
||||||
|
|
||||||
manpage_urls = json.load(open(os.getenv('MANPAGE_URLS')))
|
manpage_urls = json.load(open(os.getenv('MANPAGE_URLS')))
|
||||||
|
|
||||||
admonitions = {
|
class Renderer(markdown_it.renderer.RendererProtocol):
|
||||||
'.warning': 'warning',
|
__output__ = "docbook"
|
||||||
'.important': 'important',
|
def __init__(self, parser=None):
|
||||||
'.note': 'note'
|
self.rules = {
|
||||||
}
|
k: v
|
||||||
class Renderer(mistune.renderers.BaseRenderer):
|
for k, v in inspect.getmembers(self, predicate=inspect.ismethod)
|
||||||
def _get_method(self, name):
|
if not (k.startswith("render") or k.startswith("_"))
|
||||||
try:
|
} | {
|
||||||
return super(Renderer, self)._get_method(name)
|
"container_{.note}_open": self._note_open,
|
||||||
except AttributeError:
|
"container_{.note}_close": self._note_close,
|
||||||
def not_supported(*args, **kwargs):
|
"container_{.important}_open": self._important_open,
|
||||||
raise NotImplementedError("md node not supported yet", name, args, **kwargs)
|
"container_{.important}_close": self._important_close,
|
||||||
return not_supported
|
"container_{.warning}_open": self._warning_open,
|
||||||
|
"container_{.warning}_close": self._warning_close,
|
||||||
def text(self, text):
|
|
||||||
return escape(text)
|
|
||||||
def paragraph(self, text):
|
|
||||||
return text + "\n\n"
|
|
||||||
def newline(self):
|
|
||||||
return "<literallayout>\n</literallayout>"
|
|
||||||
def codespan(self, text):
|
|
||||||
return f"<literal>{escape(text)}</literal>"
|
|
||||||
def block_code(self, text, info=None):
|
|
||||||
info = f" language={quoteattr(info)}" if info is not None else ""
|
|
||||||
return f"<programlisting{info}>\n{escape(text)}</programlisting>"
|
|
||||||
def link(self, link, text=None, title=None):
|
|
||||||
tag = "link"
|
|
||||||
if link[0:1] == '#':
|
|
||||||
if text == "":
|
|
||||||
tag = "xref"
|
|
||||||
attr = "linkend"
|
|
||||||
link = quoteattr(link[1:])
|
|
||||||
else:
|
|
||||||
# try to faithfully reproduce links that were of the form <link href="..."/>
|
|
||||||
# in docbook format
|
|
||||||
if text == link:
|
|
||||||
text = ""
|
|
||||||
attr = "xlink:href"
|
|
||||||
link = quoteattr(link)
|
|
||||||
return f"<{tag} {attr}={link}>{text}</{tag}>"
|
|
||||||
def list(self, text, ordered, level, start=None):
|
|
||||||
if ordered:
|
|
||||||
raise NotImplementedError("ordered lists not supported yet")
|
|
||||||
return f"<itemizedlist>\n{text}\n</itemizedlist>"
|
|
||||||
def list_item(self, text, level):
|
|
||||||
return f"<listitem><para>{text}</para></listitem>\n"
|
|
||||||
def block_text(self, text):
|
|
||||||
return text
|
|
||||||
def emphasis(self, text):
|
|
||||||
return f"<emphasis>{text}</emphasis>"
|
|
||||||
def strong(self, text):
|
|
||||||
return f"<emphasis role=\"strong\">{text}</emphasis>"
|
|
||||||
def admonition(self, text, kind):
|
|
||||||
if kind not in admonitions:
|
|
||||||
raise NotImplementedError(f"admonition {kind} not supported yet")
|
|
||||||
tag = admonitions[kind]
|
|
||||||
# we don't keep whitespace here because usually we'll contain only
|
|
||||||
# a single paragraph and the original docbook string is no longer
|
|
||||||
# available to restore the trailer.
|
|
||||||
return f"<{tag}><para>{text.rstrip()}</para></{tag}>"
|
|
||||||
def block_quote(self, text):
|
|
||||||
return f"<blockquote><para>{text}</para></blockquote>"
|
|
||||||
def command(self, text):
|
|
||||||
return f"<command>{escape(text)}</command>"
|
|
||||||
def option(self, text):
|
|
||||||
return f"<option>{escape(text)}</option>"
|
|
||||||
def file(self, text):
|
|
||||||
return f"<filename>{escape(text)}</filename>"
|
|
||||||
def var(self, text):
|
|
||||||
return f"<varname>{escape(text)}</varname>"
|
|
||||||
def env(self, text):
|
|
||||||
return f"<envar>{escape(text)}</envar>"
|
|
||||||
def manpage(self, page, section):
|
|
||||||
man = f"{page}({section})"
|
|
||||||
title = f"<refentrytitle>{escape(page)}</refentrytitle>"
|
|
||||||
vol = f"<manvolnum>{escape(section)}</manvolnum>"
|
|
||||||
ref = f"<citerefentry>{title}{vol}</citerefentry>"
|
|
||||||
if man in manpage_urls:
|
|
||||||
return self.link(manpage_urls[man], text=ref)
|
|
||||||
else:
|
|
||||||
return ref
|
|
||||||
|
|
||||||
def finalize(self, data):
|
|
||||||
return "".join(data)
|
|
||||||
|
|
||||||
def p_command(md):
|
|
||||||
COMMAND_PATTERN = r'\{command\}`(.*?)`'
|
|
||||||
def parse(self, m, state):
|
|
||||||
return ('command', m.group(1))
|
|
||||||
md.inline.register_rule('command', COMMAND_PATTERN, parse)
|
|
||||||
md.inline.rules.append('command')
|
|
||||||
|
|
||||||
def p_file(md):
|
|
||||||
FILE_PATTERN = r'\{file\}`(.*?)`'
|
|
||||||
def parse(self, m, state):
|
|
||||||
return ('file', m.group(1))
|
|
||||||
md.inline.register_rule('file', FILE_PATTERN, parse)
|
|
||||||
md.inline.rules.append('file')
|
|
||||||
|
|
||||||
def p_var(md):
|
|
||||||
VAR_PATTERN = r'\{var\}`(.*?)`'
|
|
||||||
def parse(self, m, state):
|
|
||||||
return ('var', m.group(1))
|
|
||||||
md.inline.register_rule('var', VAR_PATTERN, parse)
|
|
||||||
md.inline.rules.append('var')
|
|
||||||
|
|
||||||
def p_env(md):
|
|
||||||
ENV_PATTERN = r'\{env\}`(.*?)`'
|
|
||||||
def parse(self, m, state):
|
|
||||||
return ('env', m.group(1))
|
|
||||||
md.inline.register_rule('env', ENV_PATTERN, parse)
|
|
||||||
md.inline.rules.append('env')
|
|
||||||
|
|
||||||
def p_option(md):
|
|
||||||
OPTION_PATTERN = r'\{option\}`(.*?)`'
|
|
||||||
def parse(self, m, state):
|
|
||||||
return ('option', m.group(1))
|
|
||||||
md.inline.register_rule('option', OPTION_PATTERN, parse)
|
|
||||||
md.inline.rules.append('option')
|
|
||||||
|
|
||||||
def p_manpage(md):
|
|
||||||
MANPAGE_PATTERN = r'\{manpage\}`(.*?)\((.+?)\)`'
|
|
||||||
def parse(self, m, state):
|
|
||||||
return ('manpage', m.group(1), m.group(2))
|
|
||||||
md.inline.register_rule('manpage', MANPAGE_PATTERN, parse)
|
|
||||||
md.inline.rules.append('manpage')
|
|
||||||
|
|
||||||
def p_admonition(md):
|
|
||||||
ADMONITION_PATTERN = re.compile(r'^::: \{([^\n]*?)\}\n(.*?)^:::$\n*', flags=re.MULTILINE|re.DOTALL)
|
|
||||||
def parse(self, m, state):
|
|
||||||
return {
|
|
||||||
'type': 'admonition',
|
|
||||||
'children': self.parse(m.group(2), state),
|
|
||||||
'params': [ m.group(1) ],
|
|
||||||
}
|
}
|
||||||
md.block.register_rule('admonition', ADMONITION_PATTERN, parse)
|
def render(self, tokens: Sequence[Token], options: OptionsDict, env: MutableMapping) -> str:
|
||||||
md.block.rules.append('admonition')
|
assert '-link-tag-stack' not in env
|
||||||
|
env['-link-tag-stack'] = []
|
||||||
|
assert '-deflist-stack' not in env
|
||||||
|
env['-deflist-stack'] = []
|
||||||
|
def do_one(i, token):
|
||||||
|
if token.type == "inline":
|
||||||
|
assert token.children is not None
|
||||||
|
return self.renderInline(token.children, options, env)
|
||||||
|
elif token.type in self.rules:
|
||||||
|
return self.rules[token.type](tokens[i], tokens, i, options, env)
|
||||||
|
else:
|
||||||
|
raise NotImplementedError("md token not supported yet", token)
|
||||||
|
return "".join(map(lambda arg: do_one(*arg), enumerate(tokens)))
|
||||||
|
def renderInline(self, tokens: Sequence[Token], options: OptionsDict, env: MutableMapping) -> str:
|
||||||
|
# HACK to support docbook links and xrefs. link handling is only necessary because the docbook
|
||||||
|
# manpage stylesheet converts - in urls to a mathematical minus, which may be somewhat incorrect.
|
||||||
|
for i, token in enumerate(tokens):
|
||||||
|
if token.type != 'link_open':
|
||||||
|
continue
|
||||||
|
token.tag = 'link'
|
||||||
|
# turn [](#foo) into xrefs
|
||||||
|
if token.attrs['href'][0:1] == '#' and tokens[i + 1].type == 'link_close':
|
||||||
|
token.tag = "xref"
|
||||||
|
# turn <x> into links without contents
|
||||||
|
if tokens[i + 1].type == 'text' and tokens[i + 1].content == token.attrs['href']:
|
||||||
|
tokens[i + 1].content = ''
|
||||||
|
|
||||||
md = mistune.create_markdown(renderer=Renderer(), plugins=[
|
def do_one(i, token):
|
||||||
p_command, p_file, p_var, p_env, p_option, p_manpage, p_admonition
|
if token.type in self.rules:
|
||||||
])
|
return self.rules[token.type](tokens[i], tokens, i, options, env)
|
||||||
|
else:
|
||||||
|
raise NotImplementedError("md node not supported yet", token)
|
||||||
|
return "".join(map(lambda arg: do_one(*arg), enumerate(tokens)))
|
||||||
|
|
||||||
|
def text(self, token, tokens, i, options, env):
|
||||||
|
return escape(token.content)
|
||||||
|
def paragraph_open(self, token, tokens, i, options, env):
|
||||||
|
return "<para>"
|
||||||
|
def paragraph_close(self, token, tokens, i, options, env):
|
||||||
|
return "</para>"
|
||||||
|
def hardbreak(self, token, tokens, i, options, env):
|
||||||
|
return "<literallayout>\n</literallayout>"
|
||||||
|
def softbreak(self, token, tokens, i, options, env):
|
||||||
|
# should check options.breaks() and emit hard break if so
|
||||||
|
return "\n"
|
||||||
|
def code_inline(self, token, tokens, i, options, env):
|
||||||
|
return f"<literal>{escape(token.content)}</literal>"
|
||||||
|
def code_block(self, token, tokens, i, options, env):
|
||||||
|
return f"<programlisting>{escape(token.content)}</programlisting>"
|
||||||
|
def link_open(self, token, tokens, i, options, env):
|
||||||
|
env['-link-tag-stack'].append(token.tag)
|
||||||
|
(attr, start) = ('linkend', 1) if token.attrs['href'][0] == '#' else ('xlink:href', 0)
|
||||||
|
return f"<{token.tag} {attr}={quoteattr(token.attrs['href'][start:])}>"
|
||||||
|
def link_close(self, token, tokens, i, options, env):
|
||||||
|
return f"</{env['-link-tag-stack'].pop()}>"
|
||||||
|
def list_item_open(self, token, tokens, i, options, env):
|
||||||
|
return "<listitem>"
|
||||||
|
def list_item_close(self, token, tokens, i, options, env):
|
||||||
|
return "</listitem>\n"
|
||||||
|
# HACK open and close para for docbook change size. remove soon.
|
||||||
|
def bullet_list_open(self, token, tokens, i, options, env):
|
||||||
|
return "<para><itemizedlist>\n"
|
||||||
|
def bullet_list_close(self, token, tokens, i, options, env):
|
||||||
|
return "\n</itemizedlist></para>"
|
||||||
|
def em_open(self, token, tokens, i, options, env):
|
||||||
|
return "<emphasis>"
|
||||||
|
def em_close(self, token, tokens, i, options, env):
|
||||||
|
return "</emphasis>"
|
||||||
|
def strong_open(self, token, tokens, i, options, env):
|
||||||
|
return "<emphasis role=\"strong\">"
|
||||||
|
def strong_close(self, token, tokens, i, options, env):
|
||||||
|
return "</emphasis>"
|
||||||
|
def fence(self, token, tokens, i, options, env):
|
||||||
|
info = f" language={quoteattr(token.info)}" if token.info != "" else ""
|
||||||
|
return f"<programlisting{info}>{escape(token.content)}</programlisting>"
|
||||||
|
def blockquote_open(self, token, tokens, i, options, env):
|
||||||
|
return "<para><blockquote>"
|
||||||
|
def blockquote_close(self, token, tokens, i, options, env):
|
||||||
|
return "</blockquote></para>"
|
||||||
|
def _note_open(self, token, tokens, i, options, env):
|
||||||
|
return "<para><note>"
|
||||||
|
def _note_close(self, token, tokens, i, options, env):
|
||||||
|
return "</note></para>"
|
||||||
|
def _important_open(self, token, tokens, i, options, env):
|
||||||
|
return "<para><important>"
|
||||||
|
def _important_close(self, token, tokens, i, options, env):
|
||||||
|
return "</important></para>"
|
||||||
|
def _warning_open(self, token, tokens, i, options, env):
|
||||||
|
return "<para><warning>"
|
||||||
|
def _warning_close(self, token, tokens, i, options, env):
|
||||||
|
return "</warning></para>"
|
||||||
|
# markdown-it emits tokens based on the html syntax tree, but docbook is
|
||||||
|
# slightly different. html has <dl>{<dt/>{<dd/>}}</dl>,
|
||||||
|
# docbook has <variablelist>{<varlistentry><term/><listitem/></varlistentry>}<variablelist>
|
||||||
|
# we have to reject multiple definitions for the same term for time being.
|
||||||
|
def dl_open(self, token, tokens, i, options, env):
|
||||||
|
env['-deflist-stack'].append({})
|
||||||
|
return "<para><variablelist>"
|
||||||
|
def dl_close(self, token, tokens, i, options, env):
|
||||||
|
env['-deflist-stack'].pop()
|
||||||
|
return "</variablelist></para>"
|
||||||
|
def dt_open(self, token, tokens, i, options, env):
|
||||||
|
env['-deflist-stack'][-1]['has-dd'] = False
|
||||||
|
return "<varlistentry><term>"
|
||||||
|
def dt_close(self, token, tokens, i, options, env):
|
||||||
|
return "</term>"
|
||||||
|
def dd_open(self, token, tokens, i, options, env):
|
||||||
|
if env['-deflist-stack'][-1]['has-dd']:
|
||||||
|
raise Exception("multiple definitions per term not supported")
|
||||||
|
env['-deflist-stack'][-1]['has-dd'] = True
|
||||||
|
return "<listitem>"
|
||||||
|
def dd_close(self, token, tokens, i, options, env):
|
||||||
|
return "</listitem></varlistentry>"
|
||||||
|
def myst_role(self, token, tokens, i, options, env):
|
||||||
|
if token.meta['name'] == 'command':
|
||||||
|
return f"<command>{escape(token.content)}</command>"
|
||||||
|
if token.meta['name'] == 'file':
|
||||||
|
return f"<filename>{escape(token.content)}</filename>"
|
||||||
|
if token.meta['name'] == 'var':
|
||||||
|
return f"<varname>{escape(token.content)}</varname>"
|
||||||
|
if token.meta['name'] == 'env':
|
||||||
|
return f"<envar>{escape(token.content)}</envar>"
|
||||||
|
if token.meta['name'] == 'option':
|
||||||
|
return f"<option>{escape(token.content)}</option>"
|
||||||
|
if token.meta['name'] == 'manpage':
|
||||||
|
[page, section] = [ s.strip() for s in token.content.rsplit('(', 1) ]
|
||||||
|
section = section[:-1]
|
||||||
|
man = f"{page}({section})"
|
||||||
|
title = f"<refentrytitle>{escape(page)}</refentrytitle>"
|
||||||
|
vol = f"<manvolnum>{escape(section)}</manvolnum>"
|
||||||
|
ref = f"<citerefentry>{title}{vol}</citerefentry>"
|
||||||
|
if man in manpage_urls:
|
||||||
|
return f"<link xlink:href={quoteattr(manpage_urls[man])}>{ref}</link>"
|
||||||
|
else:
|
||||||
|
return ref
|
||||||
|
raise NotImplementedError("md node not supported yet", token)
|
||||||
|
|
||||||
|
md = (
|
||||||
|
markdown_it.MarkdownIt(renderer_cls=Renderer)
|
||||||
|
# TODO maybe fork the plugin and have only a single rule for all?
|
||||||
|
.use(container_plugin, name="{.note}")
|
||||||
|
.use(container_plugin, name="{.important}")
|
||||||
|
.use(container_plugin, name="{.warning}")
|
||||||
|
.use(deflist_plugin)
|
||||||
|
.use(myst_role_plugin)
|
||||||
|
)
|
||||||
|
|
||||||
# converts in-place!
|
# converts in-place!
|
||||||
def convertMD(options: Dict[str, Any]) -> str:
|
def convertMD(options: Dict[str, Any]) -> str:
|
||||||
def convertString(path: str, text: str) -> str:
|
def convertString(path: str, text: str) -> str:
|
||||||
try:
|
try:
|
||||||
rendered = md(text)
|
rendered = md.render(text)
|
||||||
# keep trailing spaces so we can diff the generated XML to check for conversion bugs.
|
return rendered
|
||||||
return rendered.rstrip() + text[len(text.rstrip()):]
|
|
||||||
except:
|
except:
|
||||||
print(f"error in {path}")
|
print(f"error in {path}")
|
||||||
raise
|
raise
|
||||||
|
@ -208,19 +236,45 @@ def convertMD(options: Dict[str, Any]) -> str:
|
||||||
if '_type' not in option[key]: return False
|
if '_type' not in option[key]: return False
|
||||||
return option[key]['_type'] == typ
|
return option[key]['_type'] == typ
|
||||||
|
|
||||||
|
def convertCode(name: str, option: Dict[str, Any], key: str):
|
||||||
|
rendered = f"{key}-db"
|
||||||
|
if optionIs(option, key, 'literalMD'):
|
||||||
|
option[rendered] = convertString(name, f"*{key.capitalize()}:*\n{option[key]['text']}")
|
||||||
|
elif optionIs(option, key, 'literalExpression'):
|
||||||
|
code = option[key]['text']
|
||||||
|
# for multi-line code blocks we only have to count ` runs at the beginning
|
||||||
|
# of a line, but this is much easier.
|
||||||
|
multiline = '\n' in code
|
||||||
|
longest, current = (0, 0)
|
||||||
|
for c in code:
|
||||||
|
current = current + 1 if c == '`' else 0
|
||||||
|
longest = max(current, longest)
|
||||||
|
# inline literals need a space to separate ticks from content, code blocks
|
||||||
|
# need newlines. inline literals need one extra tick, code blocks need three.
|
||||||
|
ticks, sep = ('`' * (longest + (3 if multiline else 1)), '\n' if multiline else ' ')
|
||||||
|
code = f"{ticks}{sep}{code}{sep}{ticks}"
|
||||||
|
option[rendered] = convertString(name, f"*{key.capitalize()}:*\n{code}")
|
||||||
|
elif optionIs(option, key, 'literalDocBook'):
|
||||||
|
option[rendered] = f"<para><emphasis>{key.capitalize()}:</emphasis> {option[key]['text']}</para>"
|
||||||
|
elif key in option:
|
||||||
|
raise Exception(f"{name} {key} has unrecognized type", option[key])
|
||||||
|
|
||||||
for (name, option) in options.items():
|
for (name, option) in options.items():
|
||||||
try:
|
try:
|
||||||
if optionIs(option, 'description', 'mdDoc'):
|
if optionIs(option, 'description', 'mdDoc'):
|
||||||
option['description'] = convertString(name, option['description']['text'])
|
option['description'] = convertString(name, option['description']['text'])
|
||||||
elif markdownByDefault:
|
elif markdownByDefault:
|
||||||
option['description'] = convertString(name, option['description'])
|
option['description'] = convertString(name, option['description'])
|
||||||
|
else:
|
||||||
|
option['description'] = ("<nixos:option-description><para>" +
|
||||||
|
option['description'] +
|
||||||
|
"</para></nixos:option-description>")
|
||||||
|
|
||||||
if optionIs(option, 'example', 'literalMD'):
|
convertCode(name, option, 'example')
|
||||||
docbook = convertString(name, option['example']['text'])
|
convertCode(name, option, 'default')
|
||||||
option['example'] = { '_type': 'literalDocBook', 'text': docbook }
|
|
||||||
if optionIs(option, 'default', 'literalMD'):
|
if 'relatedPackages' in option:
|
||||||
docbook = convertString(name, option['default']['text'])
|
option['relatedPackages'] = convertString(name, option['relatedPackages'])
|
||||||
option['default'] = { '_type': 'literalDocBook', 'text': docbook }
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception(f"Failed to render option {name}: {str(e)}")
|
raise Exception(f"Failed to render option {name}: {str(e)}")
|
||||||
|
|
||||||
|
@ -228,6 +282,7 @@ def convertMD(options: Dict[str, Any]) -> str:
|
||||||
return options
|
return options
|
||||||
|
|
||||||
warningsAreErrors = False
|
warningsAreErrors = False
|
||||||
|
warnOnDocbook = False
|
||||||
errorOnDocbook = False
|
errorOnDocbook = False
|
||||||
markdownByDefault = False
|
markdownByDefault = False
|
||||||
optOffset = 0
|
optOffset = 0
|
||||||
|
@ -235,7 +290,10 @@ for arg in sys.argv[1:]:
|
||||||
if arg == "--warnings-are-errors":
|
if arg == "--warnings-are-errors":
|
||||||
optOffset += 1
|
optOffset += 1
|
||||||
warningsAreErrors = True
|
warningsAreErrors = True
|
||||||
if arg == "--error-on-docbook":
|
if arg == "--warn-on-docbook":
|
||||||
|
optOffset += 1
|
||||||
|
warnOnDocbook = True
|
||||||
|
elif arg == "--error-on-docbook":
|
||||||
optOffset += 1
|
optOffset += 1
|
||||||
errorOnDocbook = True
|
errorOnDocbook = True
|
||||||
if arg == "--markdown-by-default":
|
if arg == "--markdown-by-default":
|
||||||
|
@ -278,26 +336,27 @@ def is_docbook(o, key):
|
||||||
# check that every option has a description
|
# check that every option has a description
|
||||||
hasWarnings = False
|
hasWarnings = False
|
||||||
hasErrors = False
|
hasErrors = False
|
||||||
hasDocBookErrors = False
|
hasDocBook = False
|
||||||
for (k, v) in options.items():
|
for (k, v) in options.items():
|
||||||
if errorOnDocbook:
|
if warnOnDocbook or errorOnDocbook:
|
||||||
|
kind = "error" if errorOnDocbook else "warning"
|
||||||
if isinstance(v.value.get('description', {}), str):
|
if isinstance(v.value.get('description', {}), str):
|
||||||
hasErrors = True
|
hasErrors |= errorOnDocbook
|
||||||
hasDocBookErrors = True
|
hasDocBook = True
|
||||||
print(
|
print(
|
||||||
f"\x1b[1;31merror: option {v.name} description uses DocBook\x1b[0m",
|
f"\x1b[1;31m{kind}: option {v.name} description uses DocBook\x1b[0m",
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
elif is_docbook(v.value, 'defaultText'):
|
elif is_docbook(v.value, 'defaultText'):
|
||||||
hasErrors = True
|
hasErrors |= errorOnDocbook
|
||||||
hasDocBookErrors = True
|
hasDocBook = True
|
||||||
print(
|
print(
|
||||||
f"\x1b[1;31merror: option {v.name} default uses DocBook\x1b[0m",
|
f"\x1b[1;31m{kind}: option {v.name} default uses DocBook\x1b[0m",
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
elif is_docbook(v.value, 'example'):
|
elif is_docbook(v.value, 'example'):
|
||||||
hasErrors = True
|
hasErrors |= errorOnDocbook
|
||||||
hasDocBookErrors = True
|
hasDocBook = True
|
||||||
print(
|
print(
|
||||||
f"\x1b[1;31merror: option {v.name} example uses DocBook\x1b[0m",
|
f"\x1b[1;31m{kind}: option {v.name} example uses DocBook\x1b[0m",
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
|
|
||||||
if v.value.get('description', None) is None:
|
if v.value.get('description', None) is None:
|
||||||
|
@ -310,10 +369,14 @@ for (k, v) in options.items():
|
||||||
f"\x1b[1;31m{severity}: option {v.name} has no type. Please specify a valid type, see " +
|
f"\x1b[1;31m{severity}: option {v.name} has no type. Please specify a valid type, see " +
|
||||||
"https://nixos.org/manual/nixos/stable/index.html#sec-option-types\x1b[0m", file=sys.stderr)
|
"https://nixos.org/manual/nixos/stable/index.html#sec-option-types\x1b[0m", file=sys.stderr)
|
||||||
|
|
||||||
if hasDocBookErrors:
|
if hasDocBook:
|
||||||
|
(why, what) = (
|
||||||
|
("disallowed for in-tree modules", "contribution") if errorOnDocbook
|
||||||
|
else ("deprecated for option documentation", "module")
|
||||||
|
)
|
||||||
print("Explanation: The documentation contains descriptions, examples, or defaults written in DocBook. " +
|
print("Explanation: The documentation contains descriptions, examples, or defaults written in DocBook. " +
|
||||||
"NixOS is in the process of migrating from DocBook to Markdown, and " +
|
"NixOS is in the process of migrating from DocBook to Markdown, and " +
|
||||||
"DocBook is disallowed for in-tree modules. To change your contribution to "+
|
f"DocBook is {why}. To change your {what} to "+
|
||||||
"use Markdown, apply mdDoc and literalMD and use the *MD variants of option creation " +
|
"use Markdown, apply mdDoc and literalMD and use the *MD variants of option creation " +
|
||||||
"functions where they are available. For example:\n" +
|
"functions where they are available. For example:\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
|
@ -326,6 +389,9 @@ if hasDocBookErrors:
|
||||||
" example.package = mkPackageOptionMD pkgs \"your-package\" {};\n" +
|
" example.package = mkPackageOptionMD pkgs \"your-package\" {};\n" +
|
||||||
" imports = [ (mkAliasOptionModuleMD [ \"example\" \"args\" ] [ \"example\" \"settings\" ]) ];",
|
" imports = [ (mkAliasOptionModuleMD [ \"example\" \"args\" ] [ \"example\" \"settings\" ]) ];",
|
||||||
file = sys.stderr)
|
file = sys.stderr)
|
||||||
|
with open(os.getenv('TOUCH_IF_DB'), 'x'):
|
||||||
|
# just make sure it exists
|
||||||
|
pass
|
||||||
|
|
||||||
if hasErrors:
|
if hasErrors:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
@ -53,12 +53,8 @@
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
||||||
<nixos:option-description>
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
<para>
|
select="attr[@name = 'description']/string/@value" />
|
||||||
<xsl:value-of disable-output-escaping="yes"
|
|
||||||
select="attr[@name = 'description']/string/@value" />
|
|
||||||
</para>
|
|
||||||
</nixos:option-description>
|
|
||||||
|
|
||||||
<xsl:if test="attr[@name = 'type']">
|
<xsl:if test="attr[@name = 'type']">
|
||||||
<para>
|
<para>
|
||||||
|
@ -72,29 +68,22 @@
|
||||||
</para>
|
</para>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:if test="attr[@name = 'default']">
|
<xsl:if test="attr[@name = 'default-db']">
|
||||||
<para>
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
<emphasis>Default:</emphasis>
|
select="attr[@name = 'default-db']/string/@value" />
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:apply-templates select="attr[@name = 'default']/*" mode="top" />
|
|
||||||
</para>
|
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:if test="attr[@name = 'example']">
|
<xsl:if test="attr[@name = 'example-db']">
|
||||||
<para>
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
<emphasis>Example:</emphasis>
|
select="attr[@name = 'example-db']/string/@value" />
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:apply-templates select="attr[@name = 'example']/*" mode="top" />
|
|
||||||
</para>
|
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:if test="attr[@name = 'relatedPackages']">
|
<xsl:if test="attr[@name = 'relatedPackages']">
|
||||||
<para>
|
<para>
|
||||||
<emphasis>Related packages:</emphasis>
|
<emphasis>Related packages:</emphasis>
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:value-of disable-output-escaping="yes"
|
|
||||||
select="attr[@name = 'relatedPackages']/string/@value" />
|
|
||||||
</para>
|
</para>
|
||||||
|
<xsl:value-of disable-output-escaping="yes"
|
||||||
|
select="attr[@name = 'relatedPackages']/string/@value" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:if test="count(attr[@name = 'declarations']/list/*) != 0">
|
<xsl:if test="count(attr[@name = 'declarations']/list/*) != 0">
|
||||||
|
@ -121,18 +110,6 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalExpression']]]" mode = "top">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="contains(attr[@name = 'text']/string/@value, '
')">
|
|
||||||
<programlisting><xsl:value-of select="attr[@name = 'text']/string/@value" /></programlisting>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<literal><xsl:value-of select="attr[@name = 'text']/string/@value" /></literal>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalDocBook']]]" mode = "top">
|
<xsl:template match="attrs[attr[@name = '_type' and string[@value = 'literalDocBook']]]" mode = "top">
|
||||||
<xsl:value-of disable-output-escaping="yes" select="attr[@name = 'text']/string/@value" />
|
<xsl:value-of disable-output-escaping="yes" select="attr[@name = 'text']/string/@value" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
@ -7,7 +7,7 @@ in
|
||||||
options = {
|
options = {
|
||||||
testScript = mkOption {
|
testScript = mkOption {
|
||||||
type = either str (functionTo str);
|
type = either str (functionTo str);
|
||||||
description = ''
|
description = mdDoc ''
|
||||||
A series of python declarations and statements that you write to perform
|
A series of python declarations and statements that you write to perform
|
||||||
the test.
|
the test.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -181,7 +181,7 @@ in
|
||||||
example = "pid";
|
example = "pid";
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
The name of the column in the log table to which the pid of the
|
The name of the column in the log table to which the pid of the
|
||||||
process utilising the `pam_mysql's` authentication
|
process utilising the `pam_mysql` authentication
|
||||||
service is stored.
|
service is stored.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ in
|
||||||
# see discussion in https://github.com/NixOS/nixpkgs/pull/204178#issuecomment-1336289021
|
# see discussion in https://github.com/NixOS/nixpkgs/pull/204178#issuecomment-1336289021
|
||||||
nix.registry.nixpkgs.to = {
|
nix.registry.nixpkgs.to = {
|
||||||
type = "path";
|
type = "path";
|
||||||
path = nixpkgs;
|
path = "${channelSources}/nixos";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
|
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
x86_64-linux = "/nix/store/vggs4ndlda1bhnldjrs4nm5a2walsnl6-nix-2.13.1";
|
x86_64-linux = "/nix/store/h88w1442c7hzkbw8sgpcsbqp4lhz6l5p-nix-2.12.0";
|
||||||
i686-linux = "/nix/store/5g6w3p8l8k2mfghxrg48w7fcqbmr3c2p-nix-2.13.1";
|
i686-linux = "/nix/store/j23527l1c3hfx17nssc0v53sq6c741zs-nix-2.12.0";
|
||||||
aarch64-linux = "/nix/store/pkbg60qv1w387c80g4xnb6w06461vw3i-nix-2.13.1";
|
aarch64-linux = "/nix/store/zgzmdymyh934y3r4vqh8z337ba4cwsjb-nix-2.12.0";
|
||||||
x86_64-darwin = "/nix/store/jahjn6dvlw5kygqhg6da1b2ydcdak4lx-nix-2.13.1";
|
x86_64-darwin = "/nix/store/wnlrzllazdyg1nrw9na497p4w0m7i7mm-nix-2.12.0";
|
||||||
aarch64-darwin = "/nix/store/2qalrx6py8r640wqsldmdf2zsaf8cpsg-nix-2.13.1";
|
aarch64-darwin = "/nix/store/7n5yamgzg5dpp5vb6ipdqgfh6cf30wmn-nix-2.12.0";
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,6 +357,14 @@ in
|
||||||
(mkIf cfg.nixos.enable {
|
(mkIf cfg.nixos.enable {
|
||||||
system.build.manual = manual;
|
system.build.manual = manual;
|
||||||
|
|
||||||
|
system.activationScripts.check-manual-docbook = ''
|
||||||
|
if [[ $(cat ${manual.optionsUsedDocbook}) = 1 ]]; then
|
||||||
|
echo -e "\e[31;1mwarning\e[0m: This configuration contains option documentation in docbook." \
|
||||||
|
"Support for docbook is deprecated and will be removed after NixOS 23.05." \
|
||||||
|
"See nix-store --read-log ${builtins.unsafeDiscardStringContext manual.optionsJSON.drvPath}"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
environment.systemPackages = []
|
environment.systemPackages = []
|
||||||
++ optional cfg.man.enable manual.manpages
|
++ optional cfg.man.enable manual.manpages
|
||||||
++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];
|
++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];
|
||||||
|
|
|
@ -571,6 +571,7 @@
|
||||||
./services/misc/atuin.nix
|
./services/misc/atuin.nix
|
||||||
./services/misc/autofs.nix
|
./services/misc/autofs.nix
|
||||||
./services/misc/autorandr.nix
|
./services/misc/autorandr.nix
|
||||||
|
./services/misc/autosuspend.nix
|
||||||
./services/misc/bazarr.nix
|
./services/misc/bazarr.nix
|
||||||
./services/misc/beanstalkd.nix
|
./services/misc/beanstalkd.nix
|
||||||
./services/misc/bees.nix
|
./services/misc/bees.nix
|
||||||
|
|
|
@ -727,7 +727,7 @@ in {
|
||||||
Default values inheritable by all configured certs. You can
|
Default values inheritable by all configured certs. You can
|
||||||
use this to define options shared by all your certs. These defaults
|
use this to define options shared by all your certs. These defaults
|
||||||
can also be ignored on a per-cert basis using the
|
can also be ignored on a per-cert basis using the
|
||||||
`security.acme.certs.''${cert}.inheritDefaults' option.
|
{option}`security.acme.certs.''${cert}.inheritDefaults` option.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ in {
|
||||||
type = types.enum [ false true "lock" ];
|
type = types.enum [ false true "lock" ];
|
||||||
default = false;
|
default = false;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Whether to enable the Linux audit system. The special `lock' value can be used to
|
Whether to enable the Linux audit system. The special `lock` value can be used to
|
||||||
enable auditing and prevent disabling it until a restart. Be careful about locking
|
enable auditing and prevent disabling it until a restart. Be careful about locking
|
||||||
this, as it will prevent you from changing your audit configuration until you
|
this, as it will prevent you from changing your audit configuration until you
|
||||||
restart. If possible, test your configuration using build-vm beforehand.
|
restart. If possible, test your configuration using build-vm beforehand.
|
||||||
|
|
|
@ -94,7 +94,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
rootName = "${mkPathSafeName name}-chroot";
|
|
||||||
inherit (config.confinement) binSh fullUnit;
|
inherit (config.confinement) binSh fullUnit;
|
||||||
wantsAPIVFS = lib.mkDefault (config.confinement.mode == "full-apivfs");
|
wantsAPIVFS = lib.mkDefault (config.confinement.mode == "full-apivfs");
|
||||||
in lib.mkIf config.confinement.enable {
|
in lib.mkIf config.confinement.enable {
|
||||||
|
|
|
@ -102,7 +102,7 @@ in {
|
||||||
Extra directives added to to the end of MPD's configuration file,
|
Extra directives added to to the end of MPD's configuration file,
|
||||||
mpd.conf. Basic configuration like file location and uid/gid
|
mpd.conf. Basic configuration like file location and uid/gid
|
||||||
is added automatically to the beginning of the file. For available
|
is added automatically to the beginning of the file. For available
|
||||||
options see `man 5 mpd.conf`'.
|
options see {manpage}`mpd.conf(5)`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,21 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exclude = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Patterns to exclude when backing up. See
|
||||||
|
https://restic.readthedocs.io/en/latest/040_backup.html#excluding-files for
|
||||||
|
details on syntax.
|
||||||
|
'';
|
||||||
|
example = [
|
||||||
|
"/var/cache"
|
||||||
|
"/home/*/.cache"
|
||||||
|
".git"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
timerConfig = mkOption {
|
timerConfig = mkOption {
|
||||||
type = types.attrsOf unitOption;
|
type = types.attrsOf unitOption;
|
||||||
default = {
|
default = {
|
||||||
|
@ -249,6 +264,7 @@ in
|
||||||
example = {
|
example = {
|
||||||
localbackup = {
|
localbackup = {
|
||||||
paths = [ "/home" ];
|
paths = [ "/home" ];
|
||||||
|
exclude = [ "/home/*/.cache" ];
|
||||||
repository = "/mnt/backup-hdd";
|
repository = "/mnt/backup-hdd";
|
||||||
passwordFile = "/etc/nixos/secrets/restic-password";
|
passwordFile = "/etc/nixos/secrets/restic-password";
|
||||||
initialize = true;
|
initialize = true;
|
||||||
|
@ -270,12 +286,17 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
warnings = mapAttrsToList (n: v: "services.restic.backups.${n}.s3CredentialsFile is deprecated, please use services.restic.backups.${n}.environmentFile instead.") (filterAttrs (n: v: v.s3CredentialsFile != null) config.services.restic.backups);
|
warnings = mapAttrsToList (n: v: "services.restic.backups.${n}.s3CredentialsFile is deprecated, please use services.restic.backups.${n}.environmentFile instead.") (filterAttrs (n: v: v.s3CredentialsFile != null) config.services.restic.backups);
|
||||||
|
assertions = mapAttrsToList (n: v: {
|
||||||
|
assertion = (v.repository == null) != (v.repositoryFile == null);
|
||||||
|
message = "services.restic.backups.${n}: exactly one of repository or repositoryFile should be set";
|
||||||
|
}) config.services.restic.backups;
|
||||||
systemd.services =
|
systemd.services =
|
||||||
mapAttrs'
|
mapAttrs'
|
||||||
(name: backup:
|
(name: backup:
|
||||||
let
|
let
|
||||||
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
|
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
|
||||||
resticCmd = "${backup.package}/bin/restic${extraOptions}";
|
resticCmd = "${backup.package}/bin/restic${extraOptions}";
|
||||||
|
excludeFlags = if (backup.exclude != []) then ["--exclude-file=${pkgs.writeText "exclude-patterns" (concatStringsSep "\n" backup.exclude)}"] else [];
|
||||||
filesFromTmpFile = "/run/restic-backups-${name}/includes";
|
filesFromTmpFile = "/run/restic-backups-${name}/includes";
|
||||||
backupPaths =
|
backupPaths =
|
||||||
if (backup.dynamicFilesFrom == null)
|
if (backup.dynamicFilesFrom == null)
|
||||||
|
@ -311,7 +332,7 @@ in
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = (optionals (backupPaths != "") [ "${resticCmd} backup --cache-dir=%C/restic-backups-${name} ${concatStringsSep " " backup.extraBackupArgs} ${backupPaths}" ])
|
ExecStart = (optionals (backupPaths != "") [ "${resticCmd} backup --cache-dir=%C/restic-backups-${name} ${concatStringsSep " " (backup.extraBackupArgs ++ excludeFlags)} ${backupPaths}" ])
|
||||||
++ pruneCmd;
|
++ pruneCmd;
|
||||||
User = backup.user;
|
User = backup.user;
|
||||||
RuntimeDirectory = "restic-backups-${name}";
|
RuntimeDirectory = "restic-backups-${name}";
|
||||||
|
|
230
nixos/modules/services/misc/autosuspend.nix
Normal file
230
nixos/modules/services/misc/autosuspend.nix
Normal file
|
@ -0,0 +1,230 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mapAttrs' nameValuePair filterAttrs types mkEnableOption
|
||||||
|
mdDoc mkPackageOptionMD mkOption literalExpression mkIf flatten
|
||||||
|
maintainers attrValues;
|
||||||
|
|
||||||
|
cfg = config.services.autosuspend;
|
||||||
|
|
||||||
|
settingsFormat = pkgs.formats.ini { };
|
||||||
|
|
||||||
|
checks =
|
||||||
|
mapAttrs'
|
||||||
|
(n: v: nameValuePair "check.${n}" (filterAttrs (_: v: v != null) v))
|
||||||
|
cfg.checks;
|
||||||
|
wakeups =
|
||||||
|
mapAttrs'
|
||||||
|
(n: v: nameValuePair "wakeup.${n}" (filterAttrs (_: v: v != null) v))
|
||||||
|
cfg.wakeups;
|
||||||
|
|
||||||
|
# Whether the given check is enabled
|
||||||
|
hasCheck = class:
|
||||||
|
(filterAttrs
|
||||||
|
(n: v: v.enabled && (if v.class == null then n else v.class) == class)
|
||||||
|
cfg.checks)
|
||||||
|
!= { };
|
||||||
|
|
||||||
|
# Dependencies needed by specific checks
|
||||||
|
dependenciesForChecks = {
|
||||||
|
"Smb" = pkgs.samba;
|
||||||
|
"XIdleTime" = [ pkgs.xprintidle pkgs.sudo ];
|
||||||
|
};
|
||||||
|
|
||||||
|
autosuspend-conf =
|
||||||
|
settingsFormat.generate "autosuspend.conf" ({ general = cfg.settings; } // checks // wakeups);
|
||||||
|
|
||||||
|
autosuspend = cfg.package;
|
||||||
|
|
||||||
|
checkType = types.submodule {
|
||||||
|
freeformType = settingsFormat.type.nestedTypes.elemType;
|
||||||
|
|
||||||
|
options.enabled = mkEnableOption (mdDoc "this activity check") // { default = true; };
|
||||||
|
|
||||||
|
options.class = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = with types; nullOr (enum [
|
||||||
|
"ActiveCalendarEvent"
|
||||||
|
"ActiveConnection"
|
||||||
|
"ExternalCommand"
|
||||||
|
"JsonPath"
|
||||||
|
"Kodi"
|
||||||
|
"KodiIdleTime"
|
||||||
|
"LastLogActivity"
|
||||||
|
"Load"
|
||||||
|
"LogindSessionsIdle"
|
||||||
|
"Mpd"
|
||||||
|
"NetworkBandwidth"
|
||||||
|
"Ping"
|
||||||
|
"Processes"
|
||||||
|
"Smb"
|
||||||
|
"Users"
|
||||||
|
"XIdleTime"
|
||||||
|
"XPath"
|
||||||
|
]);
|
||||||
|
description = mdDoc ''
|
||||||
|
Name of the class implementing the check. If this option is not specified, the check's
|
||||||
|
name must represent a valid internal check class.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wakeupType = types.submodule {
|
||||||
|
freeformType = settingsFormat.type.nestedTypes.elemType;
|
||||||
|
|
||||||
|
options.enabled = mkEnableOption (mdDoc "this wake-up check") // { default = true; };
|
||||||
|
|
||||||
|
options.class = mkOption {
|
||||||
|
default = null;
|
||||||
|
type = with types; nullOr (enum [
|
||||||
|
"Calendar"
|
||||||
|
"Command"
|
||||||
|
"File"
|
||||||
|
"Periodic"
|
||||||
|
"SystemdTimer"
|
||||||
|
"XPath"
|
||||||
|
"XPathDelta"
|
||||||
|
]);
|
||||||
|
description = mdDoc ''
|
||||||
|
Name of the class implementing the check. If this option is not specified, the check's
|
||||||
|
name must represent a valid internal check class.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
services.autosuspend = {
|
||||||
|
enable = mkEnableOption (mdDoc "the autosuspend daemon");
|
||||||
|
|
||||||
|
package = mkPackageOptionMD pkgs "autosuspend" { };
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = types.submodule {
|
||||||
|
freeformType = settingsFormat.type.nestedTypes.elemType;
|
||||||
|
|
||||||
|
options = {
|
||||||
|
# Provide reasonable defaults for these two (required) options
|
||||||
|
suspend_cmd = mkOption {
|
||||||
|
default = "systemctl suspend";
|
||||||
|
type = with types; str;
|
||||||
|
description = mdDoc ''
|
||||||
|
The command to execute in case the host shall be suspended. This line can contain
|
||||||
|
additional command line arguments to the command to execute.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
wakeup_cmd = mkOption {
|
||||||
|
default = ''sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm && echo {timestamp:.0f} > /sys/class/rtc/rtc0/wakealarm' '';
|
||||||
|
type = with types; str;
|
||||||
|
description = mdDoc ''
|
||||||
|
The command to execute for scheduling a wake up of the system. The given string is
|
||||||
|
processed using Python’s `str.format()` and a format argument called `timestamp`
|
||||||
|
encodes the UTC timestamp of the planned wake up time (float). Additionally `iso`
|
||||||
|
can be used to acquire the timestamp in ISO 8601 format.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
interval = 30;
|
||||||
|
idle_time = 120;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = mdDoc ''
|
||||||
|
Configuration for autosuspend, see
|
||||||
|
<https://autosuspend.readthedocs.io/en/latest/configuration_file.html#general-configuration>
|
||||||
|
for supported values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
checks = mkOption {
|
||||||
|
default = { };
|
||||||
|
type = with types; attrsOf checkType;
|
||||||
|
description = mdDoc ''
|
||||||
|
Checks for activity. For more information, see:
|
||||||
|
- <https://autosuspend.readthedocs.io/en/latest/configuration_file.html#activity-check-configuration>
|
||||||
|
- <https://autosuspend.readthedocs.io/en/latest/available_checks.html>
|
||||||
|
'';
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
# Basic activity check configuration.
|
||||||
|
# The check class name is derived from the section header (Ping in this case).
|
||||||
|
# Remember to enable desired checks. They are disabled by default.
|
||||||
|
Ping = {
|
||||||
|
hosts = "192.168.0.7";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This check is disabled.
|
||||||
|
Smb.enabled = false;
|
||||||
|
|
||||||
|
# Example for a custom check name.
|
||||||
|
# This will use the Users check with the custom name RemoteUsers.
|
||||||
|
# Custom names are necessary in case a check class is used multiple times.
|
||||||
|
# Custom names can also be used for clarification.
|
||||||
|
RemoteUsers = {
|
||||||
|
class = "Users";
|
||||||
|
name = ".*";
|
||||||
|
terminal = ".*";
|
||||||
|
host = "[0-9].*";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Here the Users activity check is used again with different settings and a different name
|
||||||
|
LocalUsers = {
|
||||||
|
class = "Users";
|
||||||
|
name = ".*";
|
||||||
|
terminal = ".*";
|
||||||
|
host = "localhost";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
wakeups = mkOption {
|
||||||
|
default = { };
|
||||||
|
type = with types; attrsOf wakeupType;
|
||||||
|
description = mdDoc ''
|
||||||
|
Checks for wake up. For more information, see:
|
||||||
|
- <https://autosuspend.readthedocs.io/en/latest/configuration_file.html#wake-up-check-configuration>
|
||||||
|
- <https://autosuspend.readthedocs.io/en/latest/available_wakeups.html>
|
||||||
|
'';
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
# Wake up checks reuse the same configuration mechanism as activity checks.
|
||||||
|
Calendar = {
|
||||||
|
url = "http://example.org/test.ics";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.autosuspend = {
|
||||||
|
description = "A daemon to suspend your server in case of inactivity";
|
||||||
|
documentation = [ "https://autosuspend.readthedocs.io/en/latest/systemd_integration.html" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
path = flatten (attrValues (filterAttrs (n: _: hasCheck n) dependenciesForChecks));
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = ''${autosuspend}/bin/autosuspend -l ${autosuspend}/etc/autosuspend-logging.conf -c ${autosuspend-conf} daemon'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.autosuspend-detect-suspend = {
|
||||||
|
description = "Notifies autosuspend about suspension";
|
||||||
|
documentation = [ "https://autosuspend.readthedocs.io/en/latest/systemd_integration.html" ];
|
||||||
|
wantedBy = [ "sleep.target" ];
|
||||||
|
after = [ "sleep.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = ''${autosuspend}/bin/autosuspend -l ${autosuspend}/etc/autosuspend-logging.conf -c ${autosuspend-conf} presuspend'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
maintainers = with maintainers; [ xlambein ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -22,7 +22,7 @@ in
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Whether to enable `gpsd', a GPS service daemon.
|
Whether to enable `gpsd`, a GPS service daemon.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ in
|
||||||
default = "/var/lib/weechat";
|
default = "/var/lib/weechat";
|
||||||
};
|
};
|
||||||
sessionName = mkOption {
|
sessionName = mkOption {
|
||||||
description = lib.mdDoc "Name of the `screen' session for weechat.";
|
description = lib.mdDoc "Name of the `screen` session for weechat.";
|
||||||
default = "weechat-screen";
|
default = "weechat-screen";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,8 +54,8 @@ in {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "_tuptime";
|
User = "_tuptime";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = "${pkgs.tuptime}/bin/tuptime -x";
|
ExecStart = "${pkgs.tuptime}/bin/tuptime -q";
|
||||||
ExecStop = "${pkgs.tuptime}/bin/tuptime -xg";
|
ExecStop = "${pkgs.tuptime}/bin/tuptime -qg";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ in {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "_tuptime";
|
User = "_tuptime";
|
||||||
ExecStart = "${pkgs.tuptime}/bin/tuptime -x";
|
ExecStart = "${pkgs.tuptime}/bin/tuptime -q";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,6 +7,8 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
meta.maintainers = [ lib.maintainers.julienmalka ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.uptime-kuma = {
|
services.uptime-kuma = {
|
||||||
enable = mkEnableOption (mdDoc "Uptime Kuma, this assumes a reverse proxy to be set.");
|
enable = mkEnableOption (mdDoc "Uptime Kuma, this assumes a reverse proxy to be set.");
|
||||||
|
|
|
@ -47,7 +47,7 @@ in
|
||||||
Whether to run the Avahi daemon, which allows Avahi clients
|
Whether to run the Avahi daemon, which allows Avahi clients
|
||||||
to use Avahi's service discovery facilities and also allows
|
to use Avahi's service discovery facilities and also allows
|
||||||
the local machine to advertise its presence and services
|
the local machine to advertise its presence and services
|
||||||
(through the mDNS responder implemented by `avahi-daemon').
|
(through the mDNS responder implemented by `avahi-daemon`).
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Whether to enable the mDNS NSS (Name Service Switch) plug-in.
|
Whether to enable the mDNS NSS (Name Service Switch) plug-in.
|
||||||
Enabling it allows applications to resolve names in the `.local'
|
Enabling it allows applications to resolve names in the `.local`
|
||||||
domain by transparently querying the Avahi daemon.
|
domain by transparently querying the Avahi daemon.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,8 +124,8 @@ in
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Additional options that will be copied verbatim in `gnunet.conf'.
|
Additional options that will be copied verbatim in `gnunet.conf`.
|
||||||
See `gnunet.conf(5)' for details.
|
See {manpage}`gnunet.conf(5)` for details.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,7 +124,7 @@ in
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = literalExpression ''[ "55.1.2.3" ]'';
|
example = literalExpression ''[ "55.1.2.3" ]'';
|
||||||
description = lib.mdDoc "Public IPs for NAT reflection; for connections to `loopbackip:sourcePort' from the host itself and from other hosts behind NAT";
|
description = lib.mdDoc "Public IPs for NAT reflection; for connections to `loopbackip:sourcePort` from the host itself and from other hosts behind NAT";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,6 +71,17 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
credentials = mkOption {
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Credentials envs used to configure nomad secrets.
|
||||||
|
'';
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = { };
|
||||||
|
|
||||||
|
example = {
|
||||||
|
logs_remote_write_password = "/run/keys/nomad_write_password";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = format.type;
|
type = format.type;
|
||||||
|
@ -148,7 +159,8 @@ in
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
"${cfg.package}/bin/nomad agent -config=/etc/nomad.json -plugin-dir=${pluginsDir}/bin" +
|
"${cfg.package}/bin/nomad agent -config=/etc/nomad.json -plugin-dir=${pluginsDir}/bin" +
|
||||||
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths;
|
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths +
|
||||||
|
concatMapStrings (key: " -config=\${CREDENTIALS_DIRECTORY}/${key}") (lib.attrNames cfg.credentials);
|
||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
KillSignal = "SIGINT";
|
KillSignal = "SIGINT";
|
||||||
LimitNOFILE = 65536;
|
LimitNOFILE = 65536;
|
||||||
|
@ -157,6 +169,7 @@ in
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 2;
|
RestartSec = 2;
|
||||||
TasksMax = "infinity";
|
TasksMax = "infinity";
|
||||||
|
LoadCredential = lib.mapAttrsToList (key: value: "${key}:${value}") cfg.credentials;
|
||||||
}
|
}
|
||||||
(mkIf cfg.enableDocker {
|
(mkIf cfg.enableDocker {
|
||||||
SupplementaryGroups = "docker"; # space-separated string
|
SupplementaryGroups = "docker"; # space-separated string
|
||||||
|
|
|
@ -37,7 +37,7 @@ in
|
||||||
- stderr
|
- stderr
|
||||||
- file:/path/to/file
|
- file:/path/to/file
|
||||||
- syslog:FACILITY where FACILITY is any of "daemon", "local0",
|
- syslog:FACILITY where FACILITY is any of "daemon", "local0",
|
||||||
etc.
|
etc.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,6 +125,7 @@ in
|
||||||
lib.mdDoc ''
|
lib.mdDoc ''
|
||||||
Way to disclose client IP to the proxy.
|
Way to disclose client IP to the proxy.
|
||||||
- "false": do not disclose
|
- "false": do not disclose
|
||||||
|
|
||||||
http-connect supports the following ways:
|
http-connect supports the following ways:
|
||||||
- "X-Forwarded-For": add header "X-Forwarded-For: IP"
|
- "X-Forwarded-For": add header "X-Forwarded-For: IP"
|
||||||
- "Forwarded_ip": add header "Forwarded: for=IP" (see RFC7239)
|
- "Forwarded_ip": add header "Forwarded: for=IP" (see RFC7239)
|
||||||
|
|
|
@ -14,7 +14,7 @@ with lib;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Whether to enable `rpcbind', an ONC RPC directory service
|
Whether to enable `rpcbind`, an ONC RPC directory service
|
||||||
notably used by NFS and NIS, and which can be queried
|
notably used by NFS and NIS, and which can be queried
|
||||||
using the rpcinfo(1) command. `rpcbind` is a replacement for
|
using the rpcinfo(1) command. `rpcbind` is a replacement for
|
||||||
`portmap`.
|
`portmap`.
|
||||||
|
|
|
@ -40,7 +40,7 @@ in
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
List of network interfaces where listening for connections.
|
List of network interfaces where listening for connections.
|
||||||
When providing the empty list, `[]', lshd listens on all
|
When providing the empty list, `[]`, lshd listens on all
|
||||||
network interfaces.
|
network interfaces.
|
||||||
'';
|
'';
|
||||||
example = [ "localhost" "1.2.3.4:443" ];
|
example = [ "localhost" "1.2.3.4:443" ];
|
||||||
|
|
|
@ -28,7 +28,7 @@ in
|
||||||
host = mkOption {
|
host = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = mdDoc "External host name";
|
description = mdDoc "External host name";
|
||||||
defaultText = lib.literalExpression "config.networking.domain or config.networking.hostName ";
|
defaultText = lib.literalExpression "config.networking.domain or config.networking.hostName";
|
||||||
default =
|
default =
|
||||||
if domain == null then
|
if domain == null then
|
||||||
config.networking.hostName
|
config.networking.hostName
|
||||||
|
|
|
@ -86,7 +86,7 @@ in
|
||||||
|
|
||||||
banaction = mkOption {
|
banaction = mkOption {
|
||||||
default = if config.networking.nftables.enable then "nftables-multiport" else "iptables-multiport";
|
default = if config.networking.nftables.enable then "nftables-multiport" else "iptables-multiport";
|
||||||
defaultText = literalExpression '' if config.networking.nftables.enable then "nftables-multiport" else "iptables-multiport" '';
|
defaultText = literalExpression ''if config.networking.nftables.enable then "nftables-multiport" else "iptables-multiport"'';
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Default banning action (e.g. iptables, iptables-new, iptables-multiport,
|
Default banning action (e.g. iptables, iptables-new, iptables-multiport,
|
||||||
|
@ -98,7 +98,7 @@ in
|
||||||
|
|
||||||
banaction-allports = mkOption {
|
banaction-allports = mkOption {
|
||||||
default = if config.networking.nftables.enable then "nftables-allport" else "iptables-allport";
|
default = if config.networking.nftables.enable then "nftables-allport" else "iptables-allport";
|
||||||
defaultText = literalExpression '' if config.networking.nftables.enable then "nftables-allport" else "iptables-allport" '';
|
defaultText = literalExpression ''if config.networking.nftables.enable then "nftables-allport" else "iptables-allport"'';
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Default banning action (e.g. iptables, iptables-new, iptables-multiport,
|
Default banning action (e.g. iptables, iptables-new, iptables-multiport,
|
||||||
|
|
|
@ -144,7 +144,7 @@ in {
|
||||||
interface. If unset no authentication will be required.
|
interface. If unset no authentication will be required.
|
||||||
|
|
||||||
The file must contain user names and password hashes in the format
|
The file must contain user names and password hashes in the format
|
||||||
`username:hash `, one for each line. Usernames must
|
`username:hash`, one for each line. Usernames must
|
||||||
start with a lowecase ([a-z]) ASCII character, might contain
|
start with a lowecase ([a-z]) ASCII character, might contain
|
||||||
non-consecutive underscores except at the end, and consists of
|
non-consecutive underscores except at the end, and consists of
|
||||||
small-case a-z characters and digits 0-9.
|
small-case a-z characters and digits 0-9.
|
||||||
|
|
|
@ -950,16 +950,16 @@ in
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Attribute map for `id'.
|
Attribute map for `id`.
|
||||||
Defaults to `NameID' of SAML response.
|
Defaults to `NameID` of SAML response.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
username = mkOption {
|
username = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Attribute map for `username'.
|
Attribute map for `username`.
|
||||||
Defaults to `NameID' of SAML response.
|
Defaults to `NameID` of SAML response.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
email = mkOption {
|
email = mkOption {
|
||||||
|
|
|
@ -288,7 +288,7 @@ let
|
||||||
|
|
||||||
configPath = if cfg.enableReload
|
configPath = if cfg.enableReload
|
||||||
then "/etc/nginx/nginx.conf"
|
then "/etc/nginx/nginx.conf"
|
||||||
else finalConfigFile;
|
else configFile;
|
||||||
|
|
||||||
execCommand = "${cfg.package}/bin/nginx -c '${configPath}'";
|
execCommand = "${cfg.package}/bin/nginx -c '${configPath}'";
|
||||||
|
|
||||||
|
@ -440,38 +440,6 @@ let
|
||||||
);
|
);
|
||||||
|
|
||||||
mkCertOwnershipAssertion = import ../../../security/acme/mk-cert-ownership-assertion.nix;
|
mkCertOwnershipAssertion = import ../../../security/acme/mk-cert-ownership-assertion.nix;
|
||||||
|
|
||||||
snakeOilCert = pkgs.runCommand "nginx-config-validate-cert" { nativeBuildInputs = [ pkgs.openssl.bin ]; } ''
|
|
||||||
mkdir $out
|
|
||||||
openssl genrsa -des3 -passout pass:xxxxx -out server.pass.key 2048
|
|
||||||
openssl rsa -passin pass:xxxxx -in server.pass.key -out $out/server.key
|
|
||||||
openssl req -new -key $out/server.key -out server.csr \
|
|
||||||
-subj "/C=UK/ST=Warwickshire/L=Leamington/O=OrgName/OU=IT Department/CN=example.com"
|
|
||||||
openssl x509 -req -days 1 -in server.csr -signkey $out/server.key -out $out/server.crt
|
|
||||||
'';
|
|
||||||
validatedConfigFile = pkgs.runCommand "validated-nginx.conf" { nativeBuildInputs = [ cfg.package ]; } ''
|
|
||||||
# nginx absolutely wants to read the certificates even when told to only validate config, so let's provide fake certs
|
|
||||||
sed ${configFile} \
|
|
||||||
-e "s|ssl_certificate .*;|ssl_certificate ${snakeOilCert}/server.crt;|g" \
|
|
||||||
-e "s|ssl_trusted_certificate .*;|ssl_trusted_certificate ${snakeOilCert}/server.crt;|g" \
|
|
||||||
-e "s|ssl_certificate_key .*;|ssl_certificate_key ${snakeOilCert}/server.key;|g" \
|
|
||||||
> conf
|
|
||||||
|
|
||||||
LD_PRELOAD=${pkgs.libredirect}/lib/libredirect.so \
|
|
||||||
NIX_REDIRECTS="/etc/resolv.conf=/dev/null" \
|
|
||||||
nginx -t -c $(readlink -f ./conf) > out 2>&1 || true
|
|
||||||
if ! grep -q "syntax is ok" out; then
|
|
||||||
echo nginx config validation failed.
|
|
||||||
echo config was ${configFile}.
|
|
||||||
echo 'in case of false positive, set `services.nginx.validateConfig` to false.'
|
|
||||||
echo nginx output:
|
|
||||||
cat out
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cp ${configFile} $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
finalConfigFile = if cfg.validateConfig then validatedConfigFile else configFile;
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -580,17 +548,6 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
validateConfig = mkOption {
|
|
||||||
# FIXME: re-enable if we can make of the configurations work.
|
|
||||||
#default = pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform;
|
|
||||||
default = false;
|
|
||||||
defaultText = literalExpression "pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform";
|
|
||||||
type = types.bool;
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
Validate the generated nginx config at build time. The check is not very robust and can be disabled in case of false positives. This is notably the case when cross-compiling or when using `include` with files outside of the store.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
additionalModules = mkOption {
|
additionalModules = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf (types.attrsOf types.anything);
|
type = types.listOf (types.attrsOf types.anything);
|
||||||
|
@ -1128,7 +1085,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."nginx/nginx.conf" = mkIf cfg.enableReload {
|
environment.etc."nginx/nginx.conf" = mkIf cfg.enableReload {
|
||||||
source = finalConfigFile;
|
source = configFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
# This service waits for all certificates to be available
|
# This service waits for all certificates to be available
|
||||||
|
@ -1147,7 +1104,7 @@ in
|
||||||
# certs are updated _after_ config has been reloaded.
|
# certs are updated _after_ config has been reloaded.
|
||||||
before = sslTargets;
|
before = sslTargets;
|
||||||
after = sslServices;
|
after = sslServices;
|
||||||
restartTriggers = optionals cfg.enableReload [ finalConfigFile ];
|
restartTriggers = optionals cfg.enableReload [ configFile ];
|
||||||
# Block reloading if not all certs exist yet.
|
# Block reloading if not all certs exist yet.
|
||||||
# Happens when config changes add new vhosts/certs.
|
# Happens when config changes add new vhosts/certs.
|
||||||
unitConfig.ConditionPathExists = optionals (sslServices != []) (map (certName: certs.${certName}.directory + "/fullchain.pem") dependentCertNames);
|
unitConfig.ConditionPathExists = optionals (sslServices != []) (map (certName: certs.${certName}.directory + "/fullchain.pem") dependentCertNames);
|
||||||
|
|
|
@ -35,7 +35,7 @@ in {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
description = lib.mdDoc "Which package to use for the envfs.";
|
description = lib.mdDoc "Which package to use for the envfs.";
|
||||||
default = pkgs.envfs;
|
default = pkgs.envfs;
|
||||||
defaultText = lib.mdDoc "pkgs.envfs";
|
defaultText = lib.literalExpression "pkgs.envfs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,7 +61,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
|
|
||||||
specialisation.reloadWithErrorsSystem.configuration = {
|
specialisation.reloadWithErrorsSystem.configuration = {
|
||||||
services.nginx.package = pkgs.nginxMainline;
|
services.nginx.package = pkgs.nginxMainline;
|
||||||
services.nginx.virtualHosts."hello".extraConfig = "access_log /does/not/exist.log;";
|
services.nginx.virtualHosts."!@$$(#*%".locations."~@#*$*!)".proxyPass = ";;;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,17 +7,27 @@ import ./make-test-python.nix (
|
||||||
rcloneRepository = "rclone:local:/tmp/restic-rclone-backup";
|
rcloneRepository = "rclone:local:/tmp/restic-rclone-backup";
|
||||||
|
|
||||||
backupPrepareCommand = ''
|
backupPrepareCommand = ''
|
||||||
touch /opt/backupPrepareCommand
|
touch /tmp/backupPrepareCommand
|
||||||
test ! -e /opt/backupCleanupCommand
|
test ! -e /tmp/backupCleanupCommand
|
||||||
'';
|
'';
|
||||||
|
|
||||||
backupCleanupCommand = ''
|
backupCleanupCommand = ''
|
||||||
rm /opt/backupPrepareCommand
|
rm /tmp/backupPrepareCommand
|
||||||
touch /opt/backupCleanupCommand
|
touch /tmp/backupCleanupCommand
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
testDir = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "test-files-to-backup";
|
||||||
|
unpackPhase = "true";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
touch $out/some_file
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
passwordFile = "${pkgs.writeText "password" "correcthorsebatterystaple"}";
|
passwordFile = "${pkgs.writeText "password" "correcthorsebatterystaple"}";
|
||||||
paths = [ "/opt" ];
|
paths = [ "/opt" ];
|
||||||
|
exclude = [ "/opt/excluded_file_*" ];
|
||||||
pruneOpts = [
|
pruneOpts = [
|
||||||
"--keep-daily 2"
|
"--keep-daily 2"
|
||||||
"--keep-weekly 1"
|
"--keep-weekly 1"
|
||||||
|
@ -38,17 +48,17 @@ import ./make-test-python.nix (
|
||||||
{
|
{
|
||||||
services.restic.backups = {
|
services.restic.backups = {
|
||||||
remotebackup = {
|
remotebackup = {
|
||||||
inherit passwordFile paths pruneOpts backupPrepareCommand backupCleanupCommand;
|
inherit passwordFile paths exclude pruneOpts backupPrepareCommand backupCleanupCommand;
|
||||||
repository = remoteRepository;
|
repository = remoteRepository;
|
||||||
initialize = true;
|
initialize = true;
|
||||||
};
|
};
|
||||||
remote-from-file-backup = {
|
remote-from-file-backup = {
|
||||||
inherit passwordFile paths pruneOpts;
|
inherit passwordFile paths exclude pruneOpts;
|
||||||
initialize = true;
|
initialize = true;
|
||||||
repositoryFile = pkgs.writeText "repositoryFile" remoteFromFileRepository;
|
repositoryFile = pkgs.writeText "repositoryFile" remoteFromFileRepository;
|
||||||
};
|
};
|
||||||
rclonebackup = {
|
rclonebackup = {
|
||||||
inherit passwordFile paths pruneOpts;
|
inherit passwordFile paths exclude pruneOpts;
|
||||||
initialize = true;
|
initialize = true;
|
||||||
repository = rcloneRepository;
|
repository = rcloneRepository;
|
||||||
rcloneConfig = {
|
rcloneConfig = {
|
||||||
|
@ -94,16 +104,21 @@ import ./make-test-python.nix (
|
||||||
)
|
)
|
||||||
server.succeed(
|
server.succeed(
|
||||||
# set up
|
# set up
|
||||||
"mkdir -p /opt",
|
"cp -rT ${testDir} /opt",
|
||||||
"touch /opt/some_file",
|
"touch /opt/excluded_file_1 /opt/excluded_file_2",
|
||||||
"mkdir -p /tmp/restic-rclone-backup",
|
"mkdir -p /tmp/restic-rclone-backup",
|
||||||
|
|
||||||
# test that remotebackup runs custom commands and produces a snapshot
|
# test that remotebackup runs custom commands and produces a snapshot
|
||||||
"timedatectl set-time '2016-12-13 13:45'",
|
"timedatectl set-time '2016-12-13 13:45'",
|
||||||
"systemctl start restic-backups-remotebackup.service",
|
"systemctl start restic-backups-remotebackup.service",
|
||||||
"rm /opt/backupCleanupCommand",
|
"rm /tmp/backupCleanupCommand",
|
||||||
'${pkgs.restic}/bin/restic -r ${remoteRepository} -p ${passwordFile} snapshots --json | ${pkgs.jq}/bin/jq "length | . == 1"',
|
'${pkgs.restic}/bin/restic -r ${remoteRepository} -p ${passwordFile} snapshots --json | ${pkgs.jq}/bin/jq "length | . == 1"',
|
||||||
|
|
||||||
|
# test that restoring that snapshot produces the same directory
|
||||||
|
"mkdir /tmp/restore-1",
|
||||||
|
"${pkgs.restic}/bin/restic -r ${remoteRepository} -p ${passwordFile} restore latest -t /tmp/restore-1",
|
||||||
|
"diff -ru ${testDir} /tmp/restore-1/opt",
|
||||||
|
|
||||||
# test that remote-from-file-backup produces a snapshot
|
# test that remote-from-file-backup produces a snapshot
|
||||||
"systemctl start restic-backups-remote-from-file-backup.service",
|
"systemctl start restic-backups-remote-from-file-backup.service",
|
||||||
'${pkgs.restic}/bin/restic -r ${remoteFromFileRepository} -p ${passwordFile} snapshots --json | ${pkgs.jq}/bin/jq "length | . == 1"',
|
'${pkgs.restic}/bin/restic -r ${remoteFromFileRepository} -p ${passwordFile} snapshots --json | ${pkgs.jq}/bin/jq "length | . == 1"',
|
||||||
|
@ -120,27 +135,27 @@ import ./make-test-python.nix (
|
||||||
# test that we can create four snapshots in remotebackup and rclonebackup
|
# test that we can create four snapshots in remotebackup and rclonebackup
|
||||||
"timedatectl set-time '2017-12-13 13:45'",
|
"timedatectl set-time '2017-12-13 13:45'",
|
||||||
"systemctl start restic-backups-remotebackup.service",
|
"systemctl start restic-backups-remotebackup.service",
|
||||||
"rm /opt/backupCleanupCommand",
|
"rm /tmp/backupCleanupCommand",
|
||||||
"systemctl start restic-backups-rclonebackup.service",
|
"systemctl start restic-backups-rclonebackup.service",
|
||||||
|
|
||||||
"timedatectl set-time '2018-12-13 13:45'",
|
"timedatectl set-time '2018-12-13 13:45'",
|
||||||
"systemctl start restic-backups-remotebackup.service",
|
"systemctl start restic-backups-remotebackup.service",
|
||||||
"rm /opt/backupCleanupCommand",
|
"rm /tmp/backupCleanupCommand",
|
||||||
"systemctl start restic-backups-rclonebackup.service",
|
"systemctl start restic-backups-rclonebackup.service",
|
||||||
|
|
||||||
"timedatectl set-time '2018-12-14 13:45'",
|
"timedatectl set-time '2018-12-14 13:45'",
|
||||||
"systemctl start restic-backups-remotebackup.service",
|
"systemctl start restic-backups-remotebackup.service",
|
||||||
"rm /opt/backupCleanupCommand",
|
"rm /tmp/backupCleanupCommand",
|
||||||
"systemctl start restic-backups-rclonebackup.service",
|
"systemctl start restic-backups-rclonebackup.service",
|
||||||
|
|
||||||
"timedatectl set-time '2018-12-15 13:45'",
|
"timedatectl set-time '2018-12-15 13:45'",
|
||||||
"systemctl start restic-backups-remotebackup.service",
|
"systemctl start restic-backups-remotebackup.service",
|
||||||
"rm /opt/backupCleanupCommand",
|
"rm /tmp/backupCleanupCommand",
|
||||||
"systemctl start restic-backups-rclonebackup.service",
|
"systemctl start restic-backups-rclonebackup.service",
|
||||||
|
|
||||||
"timedatectl set-time '2018-12-16 13:45'",
|
"timedatectl set-time '2018-12-16 13:45'",
|
||||||
"systemctl start restic-backups-remotebackup.service",
|
"systemctl start restic-backups-remotebackup.service",
|
||||||
"rm /opt/backupCleanupCommand",
|
"rm /tmp/backupCleanupCommand",
|
||||||
"systemctl start restic-backups-rclonebackup.service",
|
"systemctl start restic-backups-rclonebackup.service",
|
||||||
|
|
||||||
'${pkgs.restic}/bin/restic -r ${remoteRepository} -p ${passwordFile} snapshots --json | ${pkgs.jq}/bin/jq "length | . == 4"',
|
'${pkgs.restic}/bin/restic -r ${remoteRepository} -p ${passwordFile} snapshots --json | ${pkgs.jq}/bin/jq "length | . == 4"',
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "aeolus";
|
pname = "aeolus";
|
||||||
version = "0.9.9";
|
version = "0.10.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
|
url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
|
||||||
sha256 = "04y1j36y7vc93bv299vfiawbww4ym6q7avfx8vw6rmxr817zrch3";
|
sha256 = "sha256-J9xrd/N4LrvGgi89Yj4ob4ZPUAEchrXJJQ+YVJ29Qhk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "GTK client for MPD (Music player daemon)";
|
description = "GTK client for MPD (Music player daemon)";
|
||||||
homepage = "http://ario-player.sourceforge.net/";
|
homepage = "https://ario-player.sourceforge.net/";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.garrison ];
|
maintainers = [ maintainers.garrison ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
#, aacSupport ? false, TODO: neroAacEnc
|
#, aacSupport ? false, TODO: neroAacEnc
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2.9.7";
|
version = "2.9.7";
|
||||||
pname = "asunder";
|
pname = "asunder";
|
||||||
|
@ -23,20 +21,20 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ gtk2 libcddb ];
|
buildInputs = [ gtk2 libcddb ];
|
||||||
|
|
||||||
runtimeDeps =
|
runtimeDeps =
|
||||||
optional mp3Support lame ++
|
lib.optional mp3Support lame ++
|
||||||
optional oggSupport vorbis-tools ++
|
lib.optional oggSupport vorbis-tools ++
|
||||||
optional flacSupport flac ++
|
lib.optional flacSupport flac ++
|
||||||
optional opusSupport opusTools ++
|
lib.optional opusSupport opusTools ++
|
||||||
optional wavpackSupport wavpack ++
|
lib.optional wavpackSupport wavpack ++
|
||||||
optional monkeysAudioSupport monkeysAudio ++
|
lib.optional monkeysAudioSupport monkeysAudio ++
|
||||||
[ cdparanoia ];
|
[ cdparanoia ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram "$out/bin/asunder" \
|
wrapProgram "$out/bin/asunder" \
|
||||||
--prefix PATH : "${makeBinPath runtimeDeps}"
|
--prefix PATH : "${lib.makeBinPath runtimeDeps}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "A graphical Audio CD ripper and encoder for Linux";
|
description = "A graphical Audio CD ripper and encoder for Linux";
|
||||||
homepage = "http://littlesvr.ca/asunder/index.php";
|
homepage = "http://littlesvr.ca/asunder/index.php";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
withGtk2 ? true, gtk2 ? null,
|
withGtk2 ? true, gtk2 ? null,
|
||||||
withGtk3 ? true, gtk3 ? null }:
|
withGtk3 ? true, gtk3 ? null }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
assert withFrontend -> python3Packages ? pyqt5;
|
assert withFrontend -> python3Packages ? pyqt5;
|
||||||
assert withQt -> qtbase != null;
|
assert withQt -> qtbase != null;
|
||||||
assert withQt -> wrapQtAppsHook != null;
|
assert withQt -> wrapQtAppsHook != null;
|
||||||
|
@ -30,13 +28,13 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
pythonPath = with python3Packages; [
|
pythonPath = with python3Packages; [
|
||||||
rdflib pyliblo
|
rdflib pyliblo
|
||||||
] ++ optional withFrontend pyqt5;
|
] ++ lib.optional withFrontend pyqt5;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
file liblo alsa-lib fluidsynth jack2 libpulseaudio libsndfile
|
file liblo alsa-lib fluidsynth jack2 libpulseaudio libsndfile
|
||||||
] ++ optional withQt qtbase
|
] ++ lib.optional withQt qtbase
|
||||||
++ optional withGtk2 gtk2
|
++ lib.optional withGtk2 gtk2
|
||||||
++ optional withGtk3 gtk3;
|
++ lib.optional withGtk3 gtk3;
|
||||||
|
|
||||||
propagatedBuildInputs = pythonPath;
|
propagatedBuildInputs = pythonPath;
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
#, vtxSupport ? true, libayemu ? null
|
#, vtxSupport ? true, libayemu ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
assert samplerateSupport -> jackSupport;
|
assert samplerateSupport -> jackSupport;
|
||||||
|
|
||||||
# vorbis and tremor are mutually exclusive
|
# vorbis and tremor are mutually exclusive
|
||||||
|
@ -113,16 +111,16 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [ ./option-debugging.patch ];
|
patches = [ ./option-debugging.patch ];
|
||||||
|
|
||||||
configurePhase = "./configure " + concatStringsSep " " ([
|
configurePhase = "./configure " + lib.concatStringsSep " " ([
|
||||||
"prefix=$out"
|
"prefix=$out"
|
||||||
"CONFIG_WAV=y"
|
"CONFIG_WAV=y"
|
||||||
] ++ concatMap (a: a.flags) opts);
|
] ++ lib.concatMap (a: a.flags) opts);
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ ncurses ]
|
buildInputs = [ ncurses ]
|
||||||
++ lib.optional stdenv.cc.isClang clangGCC
|
++ lib.optional stdenv.cc.isClang clangGCC
|
||||||
++ lib.optionals stdenv.isDarwin [ libiconv CoreAudio AudioUnit VideoToolbox ]
|
++ lib.optionals stdenv.isDarwin [ libiconv CoreAudio AudioUnit VideoToolbox ]
|
||||||
++ flatten (concatMap (a: a.deps) opts);
|
++ lib.flatten (lib.concatMap (a: a.deps) opts);
|
||||||
|
|
||||||
makeFlags = [ "LD=$(CC)" ];
|
makeFlags = [ "LD=$(CC)" ];
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
, which
|
, which
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "crip";
|
pname = "crip";
|
||||||
version = "3.9";
|
version = "3.9";
|
||||||
|
@ -29,7 +27,7 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ perlPackages.perl perlPackages.CDDB_get ];
|
buildInputs = [ perlPackages.perl perlPackages.CDDB_get ];
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
toolDeps = makeBinPath [
|
toolDeps = lib.makeBinPath [
|
||||||
cdparanoia
|
cdparanoia
|
||||||
coreutils
|
coreutils
|
||||||
eject
|
eject
|
||||||
|
@ -46,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin/
|
mkdir -p $out/bin/
|
||||||
|
|
||||||
for script in ${escapeShellArgs scripts}; do
|
for script in ${lib.escapeShellArgs scripts}; do
|
||||||
cp $script $out/bin/
|
cp $script $out/bin/
|
||||||
|
|
||||||
substituteInPlace $out/bin/$script \
|
substituteInPlace $out/bin/$script \
|
||||||
|
@ -63,6 +61,6 @@ stdenv.mkDerivation rec {
|
||||||
description = "Terminal-based ripper/encoder/tagger tool for creating Ogg Vorbis/FLAC files";
|
description = "Terminal-based ripper/encoder/tagger tool for creating Ogg Vorbis/FLAC files";
|
||||||
license = lib.licenses.gpl1Only;
|
license = lib.licenses.gpl1Only;
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
maintainers = [ maintainers.endgame ];
|
maintainers = [ lib.maintainers.endgame ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||||
64 bits floating point internal audio processing.
|
64 bits floating point internal audio processing.
|
||||||
Nice GUI with powerful metering for every plugin.
|
Nice GUI with powerful metering for every plugin.
|
||||||
'';
|
'';
|
||||||
homepage = "http://eq10q.sourceforge.net/";
|
homepage = "https://eq10q.sourceforge.net/";
|
||||||
license = lib.licenses.gpl3;
|
license = lib.licenses.gpl3;
|
||||||
maintainers = [ lib.maintainers.magnetophon ];
|
maintainers = [ lib.maintainers.magnetophon ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
|
|
|
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Compact open source software speech synthesizer";
|
description = "Compact open source software speech synthesizer";
|
||||||
homepage = "http://espeak.sourceforge.net/";
|
homepage = "https://espeak.sourceforge.net/";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Phoneme editor for espeak";
|
description = "Phoneme editor for espeak";
|
||||||
homepage = "http://espeak.sourceforge.net/";
|
homepage = "https://espeak.sourceforge.net/";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ flac libao libogg popt ];
|
buildInputs = [ flac libao libogg popt ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://flac-tools.sourceforge.net/";
|
homepage = "https://flac-tools.sourceforge.net/";
|
||||||
description = "A command-line program for playing FLAC audio files";
|
description = "A command-line program for playing FLAC audio files";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "flacon";
|
pname = "flacon";
|
||||||
version = "9.2.0";
|
version = "9.5.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "flacon";
|
owner = "flacon";
|
||||||
repo = "flacon";
|
repo = "flacon";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-qnjWpsgCRAi09o9O7CBc0R9MN1EpXVmCoxB2npc9qpM=";
|
sha256 = "sha256-45aA2Ib69Gb1Mg/5907rp1nfRbNyQq12pm/aFwTdgeA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||||
|
|
|
@ -7,8 +7,6 @@ assert alsaSupport -> alsa-lib != null;
|
||||||
assert jackSupport -> libjack2 != null;
|
assert jackSupport -> libjack2 != null;
|
||||||
assert portaudioSupport -> portaudio != null;
|
assert portaudioSupport -> portaudio != null;
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "fmit";
|
pname = "fmit";
|
||||||
version = "1.2.14";
|
version = "1.2.14";
|
||||||
|
@ -22,9 +20,9 @@ mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ qmake itstool wrapQtAppsHook ];
|
nativeBuildInputs = [ qmake itstool wrapQtAppsHook ];
|
||||||
buildInputs = [ fftw qtbase qtmultimedia ]
|
buildInputs = [ fftw qtbase qtmultimedia ]
|
||||||
++ optionals alsaSupport [ alsa-lib ]
|
++ lib.optionals alsaSupport [ alsa-lib ]
|
||||||
++ optionals jackSupport [ libjack2 ]
|
++ lib.optionals jackSupport [ libjack2 ]
|
||||||
++ optionals portaudioSupport [ portaudio ];
|
++ lib.optionals portaudioSupport [ portaudio ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}'
|
substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}'
|
||||||
|
@ -32,13 +30,13 @@ mkDerivation rec {
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
qmakeFlags="$qmakeFlags \
|
qmakeFlags="$qmakeFlags \
|
||||||
CONFIG+=${optionalString alsaSupport "acs_alsa"} \
|
CONFIG+=${lib.optionalString alsaSupport "acs_alsa"} \
|
||||||
CONFIG+=${optionalString jackSupport "acs_jack"} \
|
CONFIG+=${lib.optionalString jackSupport "acs_jack"} \
|
||||||
CONFIG+=${optionalString portaudioSupport "acs_portaudio"} \
|
CONFIG+=${lib.optionalString portaudioSupport "acs_portaudio"} \
|
||||||
PREFIXSHORTCUT=$out"
|
PREFIXSHORTCUT=$out"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Free Musical Instrument Tuner";
|
description = "Free Musical Instrument Tuner";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
FMIT is a graphical utility for tuning musical instruments, with error
|
FMIT is a graphical utility for tuning musical instruments, with error
|
||||||
|
|
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Generates playlists such that each song sounds good following the previous song";
|
description = "Generates playlists such that each song sounds good following the previous song";
|
||||||
homepage = "http://gjay.sourceforge.net/";
|
homepage = "https://gjay.sourceforge.net/";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ pSub ];
|
maintainers = with maintainers; [ pSub ];
|
||||||
platforms = with platforms; linux;
|
platforms = with platforms; linux;
|
||||||
|
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Programmable auditory binaural-beat synthesizer";
|
description = "Programmable auditory binaural-beat synthesizer";
|
||||||
homepage = "http://gnaural.sourceforge.net/";
|
homepage = "https://gnaural.sourceforge.net/";
|
||||||
maintainers = with maintainers; [ ehmry ];
|
maintainers = with maintainers; [ ehmry ];
|
||||||
license = with licenses; [ gpl2Only ];
|
license = with licenses; [ gpl2Only ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,12 +8,11 @@
|
||||||
, isStereo ? false
|
, isStereo ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
pname = "goattracker" + optionalString isStereo "-stereo";
|
pname = "goattracker" + lib.optionalString isStereo "-stereo";
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = pname;
|
name = pname;
|
||||||
desktopName = "GoatTracker 2" + optionalString isStereo " Stereo";
|
desktopName = "GoatTracker 2" + lib.optionalString isStereo " Stereo";
|
||||||
genericName = "Music Tracker";
|
genericName = "Music Tracker";
|
||||||
exec = if isStereo
|
exec = if isStereo
|
||||||
then "gt2stereo"
|
then "gt2stereo"
|
||||||
|
@ -30,7 +29,7 @@ in stdenv.mkDerivation rec {
|
||||||
else "2.76"; # normal
|
else "2.76"; # normal
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/goattracker2/GoatTracker_${version}${optionalString isStereo "_Stereo"}.zip";
|
url = "mirror://sourceforge/goattracker2/GoatTracker_${version}${lib.optionalString isStereo "_Stereo"}.zip";
|
||||||
sha256 = if isStereo
|
sha256 = if isStereo
|
||||||
then "1hiig2d152sv9kazwz33i56x1c54h5sh21ipkqnp6qlnwj8x1ksy" # stereo
|
then "1hiig2d152sv9kazwz33i56x1c54h5sh21ipkqnp6qlnwj8x1ksy" # stereo
|
||||||
else "0d7a3han4jw4bwiba3j87racswaajgl3pj4sb5lawdqdxicv3dn1"; # normal
|
else "0d7a3han4jw4bwiba3j87racswaajgl3pj4sb5lawdqdxicv3dn1"; # normal
|
||||||
|
@ -63,11 +62,11 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A crossplatform music editor for creating Commodore 64 music. Uses reSID library by Dag Lem and supports alternatively HardSID & CatWeasel devices"
|
description = "A crossplatform music editor for creating Commodore 64 music. Uses reSID library by Dag Lem and supports alternatively HardSID & CatWeasel devices"
|
||||||
+ optionalString isStereo " - Stereo version";
|
+ lib.optionalString isStereo " - Stereo version";
|
||||||
homepage = "https://cadaver.github.io/tools.html";
|
homepage = "https://cadaver.github.io/tools.html";
|
||||||
downloadPage = "https://sourceforge.net/projects/goattracker2/";
|
downloadPage = "https://sourceforge.net/projects/goattracker2/";
|
||||||
license = licenses.gpl2Plus;
|
license = lib.licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ fgaz ];
|
maintainers = with lib.maintainers; [ fgaz ];
|
||||||
platforms = platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "goodvibes";
|
pname = "goodvibes";
|
||||||
version = "0.7.5";
|
version = "0.7.6";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-CE9f0GnXr7wSpp8jyW0ZxGKx16r6tOaObzQXKcy5nPY=";
|
hash = "sha256-w0nmTYcq2DBHSjQ23zWxT6optyH+lRAMRa210F7XEvE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A command line editor for id3v2 tags";
|
description = "A command line editor for id3v2 tags";
|
||||||
homepage = "http://id3v2.sourceforge.net/";
|
homepage = "https://id3v2.sourceforge.net/";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = with platforms; unix;
|
platforms = with platforms; unix;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||||
be controlled using the ALSA sequencer. It's phat; it turns your
|
be controlled using the ALSA sequencer. It's phat; it turns your
|
||||||
computer into an effects box.
|
computer into an effects box.
|
||||||
'';
|
'';
|
||||||
homepage = "http://jack-rack.sourceforge.net/";
|
homepage = "https://jack-rack.sourceforge.net/";
|
||||||
license = lib.licenses.gpl2Plus;
|
license = lib.licenses.gpl2Plus;
|
||||||
maintainers = [ lib.maintainers.astsmtl ];
|
maintainers = [ lib.maintainers.astsmtl ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
|
|
|
@ -33,7 +33,7 @@ mkDerivation rec {
|
||||||
management, no track suggestions, no media player. Just a fast,
|
management, no track suggestions, no media player. Just a fast,
|
||||||
efficient workflow tool.
|
efficient workflow tool.
|
||||||
'';
|
'';
|
||||||
homepage = "http://www.ibrahimshaath.co.uk/keyfinder/";
|
homepage = "https://www.ibrahimshaath.co.uk/keyfinder/";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
prefixKey = "PREFIX=";
|
prefixKey = "PREFIX=";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://das.nasophon.de/klick/";
|
homepage = "https://das.nasophon.de/klick/";
|
||||||
description = "Advanced command-line metronome for JACK";
|
description = "Advanced command-line metronome for JACK";
|
||||||
license = lib.licenses.gpl2Plus;
|
license = lib.licenses.gpl2Plus;
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux;
|
||||||
|
|
|
@ -63,8 +63,8 @@ stdenv.mkDerivation rec {
|
||||||
channels. Additionally, the program can drive MIDI instruments (with the
|
channels. Additionally, the program can drive MIDI instruments (with the
|
||||||
gp32 and gp2x a custom MIDI interface is required).
|
gp32 and gp2x a custom MIDI interface is required).
|
||||||
'';
|
'';
|
||||||
homepage = "http://www.littlegptracker.com/";
|
homepage = "https://www.littlegptracker.com/";
|
||||||
downloadPage = "http://www.littlegptracker.com/download.php";
|
downloadPage = "https://www.littlegptracker.com/download.php";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ fgaz ];
|
maintainers = with maintainers; [ fgaz ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
|
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Lossless mp3 normalizer with statistical analysis";
|
description = "Lossless mp3 normalizer with statistical analysis";
|
||||||
homepage = "http://mp3gain.sourceforge.net/";
|
homepage = "https://mp3gain.sourceforge.net/";
|
||||||
license = licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ devhell ];
|
maintainers = with maintainers; [ devhell ];
|
||||||
|
|
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||||
also other MPEG versions and layers. The tool is also aware of the most
|
also other MPEG versions and layers. The tool is also aware of the most
|
||||||
common types of tags (ID3v1, ID3v2, APEv2).
|
common types of tags (ID3v1, ID3v2, APEv2).
|
||||||
'';
|
'';
|
||||||
homepage = "http://mp3val.sourceforge.net/index.shtml";
|
homepage = "https://mp3val.sourceforge.net/index.shtml";
|
||||||
license = lib.licenses.gpl2;
|
license = lib.licenses.gpl2;
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
maintainers = [ lib.maintainers.devhell ];
|
maintainers = [ lib.maintainers.devhell ];
|
||||||
|
|
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://mpc123.sourceforge.net/";
|
homepage = "https://mpc123.sourceforge.net/";
|
||||||
|
|
||||||
description = "A Musepack (.mpc) audio player";
|
description = "A Musepack (.mpc) audio player";
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Command-line MP3 player";
|
description = "Command-line MP3 player";
|
||||||
homepage = "http://mpg321.sourceforge.net/";
|
homepage = "https://mpg321.sourceforge.net/";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://munt.sourceforge.net/";
|
homepage = "https://munt.sourceforge.net/";
|
||||||
description = "A library to emulate Roland MT-32, CM-32L, CM-64 and LAPC-I devices";
|
description = "A library to emulate Roland MT-32, CM-32L, CM-64 and LAPC-I devices";
|
||||||
license = with licenses; [ lgpl21Plus ];
|
license = with licenses; [ lgpl21Plus ];
|
||||||
maintainers = with maintainers; [ OPNA2608 ];
|
maintainers = with maintainers; [ OPNA2608 ];
|
||||||
|
|
|
@ -63,7 +63,7 @@ mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://munt.sourceforge.net/";
|
homepage = "https://munt.sourceforge.net/";
|
||||||
description = "A synthesizer application built on Qt and libmt32emu";
|
description = "A synthesizer application built on Qt and libmt32emu";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
mt32emu-qt is a synthesiser application that facilitates both realtime
|
mt32emu-qt is a synthesiser application that facilitates both realtime
|
||||||
|
|
|
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://munt.sourceforge.net/";
|
homepage = "https://munt.sourceforge.net/";
|
||||||
description = "Produces a WAVE file from a Standard MIDI file (SMF)";
|
description = "Produces a WAVE file from a Standard MIDI file (SMF)";
|
||||||
license = with licenses; [ gpl3Plus ];
|
license = with licenses; [ gpl3Plus ];
|
||||||
maintainers = with maintainers; [ OPNA2608 ];
|
maintainers = with maintainers; [ OPNA2608 ];
|
||||||
|
|
|
@ -5,17 +5,15 @@ let
|
||||||
appName = "MuseScore ${builtins.head versionComponents}";
|
appName = "MuseScore ${builtins.head versionComponents}";
|
||||||
in
|
in
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "musescore-darwin";
|
pname = "musescore-darwin";
|
||||||
version = concatStringsSep "." versionComponents;
|
version = lib.concatStringsSep "." versionComponents;
|
||||||
|
|
||||||
# The disk image contains the .app and a symlink to /Applications.
|
# The disk image contains the .app and a symlink to /Applications.
|
||||||
sourceRoot = "${appName}.app";
|
sourceRoot = "${appName}.app";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/musescore/MuseScore/releases/download/v${concatStringsSep "." (take 3 versionComponents)}/MuseScore-${version}.dmg";
|
url = "https://github.com/musescore/MuseScore/releases/download/v${lib.concatStringsSep "." (lib.take 3 versionComponents)}/MuseScore-${version}.dmg";
|
||||||
sha256 = "sha256-lHckfhTTrDzaGwlbnZ5w0O1gMPbRmrmgATIGMY517l0=";
|
sha256 = "sha256-lHckfhTTrDzaGwlbnZ5w0O1gMPbRmrmgATIGMY517l0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{ cmake
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, cmake
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, boost
|
, boost
|
||||||
, curl
|
, curl
|
||||||
|
@ -12,13 +14,11 @@
|
||||||
, libopenmpt
|
, libopenmpt
|
||||||
, mpg123
|
, mpg123
|
||||||
, ncurses
|
, ncurses
|
||||||
, lib
|
|
||||||
, stdenv
|
|
||||||
, taglib
|
, taglib
|
||||||
# Linux Dependencies
|
# Linux Dependencies
|
||||||
, alsa-lib
|
, alsa-lib
|
||||||
, pulseaudio
|
, pulseaudio
|
||||||
, systemdSupport ? stdenv.isLinux
|
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||||
, systemd
|
, systemd
|
||||||
# Darwin Dependencies
|
# Darwin Dependencies
|
||||||
, Cocoa
|
, Cocoa
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
, pcreSupport ? false, pcre ? null
|
, pcreSupport ? false, pcre ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
assert pcreSupport -> pcre != null;
|
assert pcreSupport -> pcre != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -28,13 +26,13 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ glib ncurses libmpdclient boost ]
|
buildInputs = [ glib ncurses libmpdclient boost ]
|
||||||
++ optional pcreSupport pcre;
|
++ lib.optional pcreSupport pcre;
|
||||||
nativeBuildInputs = [ meson ninja pkg-config gettext ];
|
nativeBuildInputs = [ meson ninja pkg-config gettext ];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dlirc=disabled"
|
"-Dlirc=disabled"
|
||||||
"-Ddocumentation=disabled"
|
"-Ddocumentation=disabled"
|
||||||
] ++ optional (!pcreSupport) "-Dregex=disabled";
|
] ++ lib.optional (!pcreSupport) "-Dregex=disabled";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Curses-based interface for MPD (music player daemon)";
|
description = "Curses-based interface for MPD (music player daemon)";
|
||||||
|
|
|
@ -52,7 +52,7 @@ stdenv.mkDerivation {
|
||||||
special effects by "spectral smoothing" the sounds.
|
special effects by "spectral smoothing" the sounds.
|
||||||
It can transform any sound/music to a texture.
|
It can transform any sound/music to a texture.
|
||||||
'';
|
'';
|
||||||
homepage = "http://hypermammut.sourceforge.net/paulstretch/";
|
homepage = "https://hypermammut.sourceforge.net/paulstretch/";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
{ lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsa-lib
|
{ lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsa-lib
|
||||||
, mpg123, releasePath ? null }:
|
, mpg123, releasePath ? null }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
# To use the full release version:
|
# To use the full release version:
|
||||||
# 1) Sign into https://backstage.renoise.com and download the release version to some stable location.
|
# 1) Sign into https://backstage.renoise.com and download the release version to some stable location.
|
||||||
# 2) Override the releasePath attribute to point to the location of the newly downloaded bundle.
|
# 2) Override the releasePath attribute to point to the location of the newly downloaded bundle.
|
||||||
# Note: Renoise creates an individual build for each license which screws somewhat with the
|
# Note: Renoise creates an individual build for each license which screws somewhat with the
|
||||||
# use of functions like requireFile as the hash will be different for every user.
|
# use of functions like requireFile as the hash will be different for every user.
|
||||||
let
|
let
|
||||||
urlVersion = replaceStrings [ "." ] [ "_" ];
|
urlVersion = lib.replaceStrings [ "." ] [ "_" ];
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -80,7 +78,7 @@ stdenv.mkDerivation rec {
|
||||||
description = "Modern tracker-based DAW";
|
description = "Modern tracker-based DAW";
|
||||||
homepage = "https://www.renoise.com/";
|
homepage = "https://www.renoise.com/";
|
||||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
license = licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
maintainers = [];
|
maintainers = [];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "snd";
|
pname = "snd";
|
||||||
version = "22.5";
|
version = "23.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
|
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
|
||||||
sha256 = "sha256-a/nYq6Cfbx93jfA6I8it+U0U36dOAFSpRis32spPks4=";
|
sha256 = "sha256-WnQtXr1IcOpNJBrSvLf2rNu2XPs8JU01LWsQSzvvivA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
|
@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
version = version;
|
version = version;
|
||||||
homepage = "http://shibatch.sourceforge.net/";
|
homepage = "https://shibatch.sourceforge.net/";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ leenaars];
|
maintainers = with maintainers; [ leenaars];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ glib libogg libvorbis libmad ];
|
buildInputs = [ glib libogg libvorbis libmad ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://streamripper.sourceforge.net/";
|
homepage = "https://streamripper.sourceforge.net/";
|
||||||
description = "Application that lets you record streaming mp3 to your hard drive";
|
description = "Application that lets you record streaming mp3 to your hard drive";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||||
TAP Pitch Shifter, TAP Reflector, TAP Reverberator, TAP Rotary Speaker, TAP Scaling Limiter,
|
TAP Pitch Shifter, TAP Reflector, TAP Reverberator, TAP Rotary Speaker, TAP Scaling Limiter,
|
||||||
TAP Sigmoid Booster, TAP Stereo Echo, TAP Tremolo, TAP TubeWarmth, TAP Vibrato.
|
TAP Sigmoid Booster, TAP Stereo Echo, TAP Tremolo, TAP TubeWarmth, TAP Vibrato.
|
||||||
'';
|
'';
|
||||||
homepage = "http://tap-plugins.sourceforge.net/ladspa.html";
|
homepage = "https://tap-plugins.sourceforge.net/ladspa.html";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = [ maintainers.fps ];
|
maintainers = [ maintainers.fps ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Extended module player";
|
description = "Extended module player";
|
||||||
homepage = "http://xmp.sourceforge.net/";
|
homepage = "https://xmp.sourceforge.net/";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||||
synths) with user interfaces, permitting them to be hosted
|
synths) with user interfaces, permitting them to be hosted
|
||||||
in-process by audio applications.
|
in-process by audio applications.
|
||||||
'';
|
'';
|
||||||
homepage = "http://dssi.sourceforge.net/download.html#Xsynth-DSSI";
|
homepage = "https://dssi.sourceforge.net/download.html#Xsynth-DSSI";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ maintainers.goibhniu ];
|
maintainers = [ maintainers.goibhniu ];
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "youtube-music";
|
pname = "youtube-music";
|
||||||
version = "1.18.0";
|
version = "1.19.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/th-ch/youtube-music/releases/download/v${version}/YouTube-Music-${version}.AppImage";
|
url = "https://github.com/th-ch/youtube-music/releases/download/v${version}/YouTube-Music-${version}.AppImage";
|
||||||
sha256 = "sha256-7U+zyLyXMVVMtRAT5yTEUqS3/qP5Kx/Yuu263VcsbAE=";
|
sha256 = "sha256-o/a+6EKPEcE9waXQK3hxtp7FPqokteoUAt0iOJk8bYw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
appimageContents = appimageTools.extract { inherit pname version src; };
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
||||||
|
|
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://www.zamaudio.com/?p=976";
|
homepage = "https://www.zamaudio.com/?p=976";
|
||||||
description = "A collection of LV2/LADSPA/VST/JACK audio plugins by ZamAudio";
|
description = "A collection of LV2/LADSPA/VST/JACK audio plugins by ZamAudio";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.magnetophon ];
|
maintainers = [ maintainers.magnetophon ];
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
, withWallet ? true
|
, withWallet ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = if withGui then "bitcoin-knots" else "bitcoind-knots";
|
pname = if withGui then "bitcoin-knots" else "bitcoind-knots";
|
||||||
version = "23.0.knots20220529";
|
version = "23.0.knots20220529";
|
||||||
|
@ -35,24 +34,24 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[ autoreconfHook pkg-config ]
|
[ autoreconfHook pkg-config ]
|
||||||
++ optionals stdenv.isLinux [ util-linux ]
|
++ lib.optionals stdenv.isLinux [ util-linux ]
|
||||||
++ optionals stdenv.isDarwin [ hexdump ]
|
++ lib.optionals stdenv.isDarwin [ hexdump ]
|
||||||
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
||||||
++ optionals withGui [ wrapQtAppsHook ];
|
++ lib.optionals withGui [ wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
|
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
|
||||||
++ optionals withWallet [ db48 sqlite ]
|
++ lib.optionals withWallet [ db48 sqlite ]
|
||||||
++ optionals withGui [ qrencode qtbase qttools ];
|
++ lib.optionals withGui [ qrencode qtbase qttools ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-boost-libdir=${boost.out}/lib"
|
"--with-boost-libdir=${boost.out}/lib"
|
||||||
"--disable-bench"
|
"--disable-bench"
|
||||||
] ++ optionals (!doCheck) [
|
] ++ lib.optionals (!doCheck) [
|
||||||
"--disable-tests"
|
"--disable-tests"
|
||||||
"--disable-gui-tests"
|
"--disable-gui-tests"
|
||||||
] ++ optionals (!withWallet) [
|
] ++ lib.optionals (!withWallet) [
|
||||||
"--disable-wallet"
|
"--disable-wallet"
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
"--with-gui=qt5"
|
"--with-gui=qt5"
|
||||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||||
];
|
];
|
||||||
|
@ -65,7 +64,7 @@ stdenv.mkDerivation rec {
|
||||||
[ "LC_ALL=en_US.UTF-8" ]
|
[ "LC_ALL=en_US.UTF-8" ]
|
||||||
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
|
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
|
||||||
# See also https://github.com/NixOS/nixpkgs/issues/24256
|
# See also https://github.com/NixOS/nixpkgs/issues/24256
|
||||||
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
|
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -73,7 +72,7 @@ stdenv.mkDerivation rec {
|
||||||
smoke-test = nixosTests.bitcoind-knots;
|
smoke-test = nixosTests.bitcoind-knots;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "A derivative of Bitcoin Core with a collection of improvements";
|
description = "A derivative of Bitcoin Core with a collection of improvements";
|
||||||
homepage = "https://bitcoinknots.org/";
|
homepage = "https://bitcoinknots.org/";
|
||||||
maintainers = with maintainers; [ prusnak mmahut ];
|
maintainers = with maintainers; [ prusnak mmahut ];
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
, withGui, wrapQtAppsHook ? null, qtbase ? null, qttools ? null
|
, withGui, wrapQtAppsHook ? null, qtbase ? null, qttools ? null
|
||||||
, Foundation, ApplicationServices, AppKit }:
|
, Foundation, ApplicationServices, AppKit }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "bitcoin" + optionalString (!withGui) "d" + "-unlimited";
|
pname = "bitcoin" + lib.optionalString (!withGui) "d" + "-unlimited";
|
||||||
version = "1.10.0.0";
|
version = "1.10.0.0";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
|
@ -17,19 +15,19 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook python3 ]
|
nativeBuildInputs = [ pkg-config autoreconfHook python3 ]
|
||||||
++ optionals withGui [ wrapQtAppsHook qttools ];
|
++ lib.optionals withGui [ wrapQtAppsHook qttools ];
|
||||||
buildInputs = [ openssl db48 boost zlib
|
buildInputs = [ openssl db48 boost zlib
|
||||||
miniupnpc util-linux protobuf libevent ]
|
miniupnpc util-linux protobuf libevent ]
|
||||||
++ optionals withGui [ qtbase qttools qrencode ]
|
++ lib.optionals withGui [ qtbase qttools qrencode ]
|
||||||
++ optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ];
|
++ lib.optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ];
|
||||||
|
|
||||||
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
||||||
++ optionals withGui [ "--with-gui=qt5"
|
++ lib.optionals withGui [ "--with-gui=qt5"
|
||||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||||
];
|
];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Peer-to-peer electronic cash system (Unlimited client)";
|
description = "Peer-to-peer electronic cash system (Unlimited client)";
|
||||||
longDescription= ''
|
longDescription= ''
|
||||||
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
, withWallet ? true
|
, withWallet ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
desktop = fetchurl {
|
desktop = fetchurl {
|
||||||
# c2e5f3e is the last commit when the debian/bitcoin-qt.desktop file was changed
|
# c2e5f3e is the last commit when the debian/bitcoin-qt.desktop file was changed
|
||||||
|
@ -45,16 +44,16 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[ autoreconfHook pkg-config ]
|
[ autoreconfHook pkg-config ]
|
||||||
++ optionals stdenv.isLinux [ util-linux ]
|
++ lib.optionals stdenv.isLinux [ util-linux ]
|
||||||
++ optionals stdenv.isDarwin [ hexdump ]
|
++ lib.optionals stdenv.isDarwin [ hexdump ]
|
||||||
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
||||||
++ optionals withGui [ wrapQtAppsHook ];
|
++ lib.optionals withGui [ wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
|
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
|
||||||
++ optionals withWallet [ db48 sqlite ]
|
++ lib.optionals withWallet [ db48 sqlite ]
|
||||||
++ optionals withGui [ qrencode qtbase qttools ];
|
++ lib.optionals withGui [ qrencode qtbase qttools ];
|
||||||
|
|
||||||
postInstall = optionalString withGui ''
|
postInstall = lib.optionalString withGui ''
|
||||||
install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
|
install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
|
||||||
substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
|
substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
|
||||||
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
|
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
|
||||||
|
@ -63,12 +62,12 @@ stdenv.mkDerivation rec {
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-boost-libdir=${boost.out}/lib"
|
"--with-boost-libdir=${boost.out}/lib"
|
||||||
"--disable-bench"
|
"--disable-bench"
|
||||||
] ++ optionals (!doCheck) [
|
] ++ lib.optionals (!doCheck) [
|
||||||
"--disable-tests"
|
"--disable-tests"
|
||||||
"--disable-gui-tests"
|
"--disable-gui-tests"
|
||||||
] ++ optionals (!withWallet) [
|
] ++ lib.optionals (!withWallet) [
|
||||||
"--disable-wallet"
|
"--disable-wallet"
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
"--with-gui=qt5"
|
"--with-gui=qt5"
|
||||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||||
];
|
];
|
||||||
|
@ -81,7 +80,7 @@ stdenv.mkDerivation rec {
|
||||||
[ "LC_ALL=en_US.UTF-8" ]
|
[ "LC_ALL=en_US.UTF-8" ]
|
||||||
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
|
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
|
||||||
# See also https://github.com/NixOS/nixpkgs/issues/24256
|
# See also https://github.com/NixOS/nixpkgs/issues/24256
|
||||||
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
|
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -89,7 +88,7 @@ stdenv.mkDerivation rec {
|
||||||
smoke-test = nixosTests.bitcoind;
|
smoke-test = nixosTests.bitcoind;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Peer-to-peer electronic cash system";
|
description = "Peer-to-peer electronic cash system";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
, openssl
|
, openssl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "btcdeb";
|
pname = "btcdeb";
|
||||||
version = "unstable-2022-04-03";
|
version = "unstable-2022-04-03";
|
||||||
|
@ -20,7 +19,7 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||||
buildInputs = [ openssl ];
|
buildInputs = [ openssl ];
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Bitcoin Script Debugger";
|
description = "Bitcoin Script Debugger";
|
||||||
homepage = "https://github.com/bitcoin-core/btcdeb";
|
homepage = "https://github.com/bitcoin-core/btcdeb";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
|
@ -15,13 +15,11 @@
|
||||||
, wrapQtAppsHook ? null
|
, wrapQtAppsHook ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "digibyte";
|
pname = "digibyte";
|
||||||
version = "7.17.3";
|
version = "7.17.3";
|
||||||
|
|
||||||
name = pname + toString (optional (!withGui) "d") + "-" + version;
|
name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "digibyte-core";
|
owner = "digibyte-core";
|
||||||
|
@ -34,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
pkg-config
|
pkg-config
|
||||||
hexdump
|
hexdump
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -44,7 +42,7 @@ stdenv.mkDerivation rec {
|
||||||
libevent
|
libevent
|
||||||
db4
|
db4
|
||||||
zeromq
|
zeromq
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
qtbase
|
qtbase
|
||||||
qttools
|
qttools
|
||||||
protobuf
|
protobuf
|
||||||
|
@ -54,12 +52,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-boost-libdir=${boost.out}/lib"
|
"--with-boost-libdir=${boost.out}/lib"
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
"--with-gui=qt5"
|
"--with-gui=qt5"
|
||||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "DigiByte (DGB) is a rapidly growing decentralized, global blockchain";
|
description = "DigiByte (DGB) is a rapidly growing decentralized, global blockchain";
|
||||||
homepage = "https://digibyte.io/";
|
homepage = "https://digibyte.io/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
, withGui, withUpnp ? true, withUtils ? true, withWallet ? true
|
, withGui, withUpnp ? true, withUtils ? true, withWallet ? true
|
||||||
, withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }:
|
, withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "dogecoin" + optionalString (!withGui) "d";
|
pname = "dogecoin" + lib.optionalString (!withGui) "d";
|
||||||
version = "1.14.6";
|
version = "1.14.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
@ -18,32 +17,32 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-PmbmmA2Mq07dwB3cI7A9c/ewtu0I+sWvQT39Yekm/sU=";
|
sha256 = "sha256-PmbmmA2Mq07dwB3cI7A9c/ewtu0I+sWvQT39Yekm/sU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = optionalString withGui ''
|
preConfigure = lib.optionalString withGui ''
|
||||||
export LRELEASE=${getDev qttools}/bin/lrelease
|
export LRELEASE=${lib.getDev qttools}/bin/lrelease
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook util-linux ]
|
nativeBuildInputs = [ pkg-config autoreconfHook util-linux ]
|
||||||
++ optionals withGui [ wrapQtAppsHook qttools ];
|
++ lib.optionals withGui [ wrapQtAppsHook qttools ];
|
||||||
|
|
||||||
buildInputs = [ openssl protobuf boost zlib libevent ]
|
buildInputs = [ openssl protobuf boost zlib libevent ]
|
||||||
++ optionals withGui [ qtbase qrencode ]
|
++ lib.optionals withGui [ qtbase qrencode ]
|
||||||
++ optionals withUpnp [ miniupnpc ]
|
++ lib.optionals withUpnp [ miniupnpc ]
|
||||||
++ optionals withWallet [ db5 ]
|
++ lib.optionals withWallet [ db5 ]
|
||||||
++ optionals withZmq [ zeromq ]
|
++ lib.optionals withZmq [ zeromq ]
|
||||||
++ optionals stdenv.isDarwin [ Cocoa ];
|
++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-incompatible-bdb"
|
"--with-incompatible-bdb"
|
||||||
"--with-boost-libdir=${boost.out}/lib"
|
"--with-boost-libdir=${boost.out}/lib"
|
||||||
] ++ optionals (!withGui) [ "--with-gui=no" ]
|
] ++ lib.optionals (!withGui) [ "--with-gui=no" ]
|
||||||
++ optionals (!withUpnp) [ "--without-miniupnpc" ]
|
++ lib.optionals (!withUpnp) [ "--without-miniupnpc" ]
|
||||||
++ optionals (!withUtils) [ "--without-utils" ]
|
++ lib.optionals (!withUtils) [ "--without-utils" ]
|
||||||
++ optionals (!withWallet) [ "--disable-wallet" ]
|
++ lib.optionals (!withWallet) [ "--disable-wallet" ]
|
||||||
++ optionals (!withZmq) [ "--disable-zmq" ];
|
++ lib.optionals (!withZmq) [ "--disable-zmq" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Wow, such coin, much shiba, very rich";
|
description = "Wow, such coin, much shiba, very rich";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Dogecoin is a decentralized, peer-to-peer digital currency that
|
Dogecoin is a decentralized, peer-to-peer digital currency that
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
, withWallet ? true
|
, withWallet ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = if withGui then "elements" else "elementsd";
|
pname = if withGui then "elements" else "elementsd";
|
||||||
version = "22.0.2";
|
version = "22.0.2";
|
||||||
|
@ -36,24 +35,24 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[ autoreconfHook pkg-config ]
|
[ autoreconfHook pkg-config ]
|
||||||
++ optionals stdenv.isLinux [ util-linux ]
|
++ lib.optionals stdenv.isLinux [ util-linux ]
|
||||||
++ optionals stdenv.isDarwin [ hexdump ]
|
++ lib.optionals stdenv.isDarwin [ hexdump ]
|
||||||
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
|
||||||
++ optionals withGui [ wrapQtAppsHook ];
|
++ lib.optionals withGui [ wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
|
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
|
||||||
++ optionals withWallet [ db48 sqlite ]
|
++ lib.optionals withWallet [ db48 sqlite ]
|
||||||
++ optionals withGui [ qrencode qtbase qttools ];
|
++ lib.optionals withGui [ qrencode qtbase qttools ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-boost-libdir=${boost.out}/lib"
|
"--with-boost-libdir=${boost.out}/lib"
|
||||||
"--disable-bench"
|
"--disable-bench"
|
||||||
] ++ optionals (!doCheck) [
|
] ++ lib.optionals (!doCheck) [
|
||||||
"--disable-tests"
|
"--disable-tests"
|
||||||
"--disable-gui-tests"
|
"--disable-gui-tests"
|
||||||
] ++ optionals (!withWallet) [
|
] ++ lib.optionals (!withWallet) [
|
||||||
"--disable-wallet"
|
"--disable-wallet"
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
"--with-gui=qt5"
|
"--with-gui=qt5"
|
||||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||||
];
|
];
|
||||||
|
@ -70,11 +69,11 @@ stdenv.mkDerivation rec {
|
||||||
[ "LC_ALL=en_US.UTF-8" ]
|
[ "LC_ALL=en_US.UTF-8" ]
|
||||||
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
|
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
|
||||||
# See also https://github.com/NixOS/nixpkgs/issues/24256
|
# See also https://github.com/NixOS/nixpkgs/issues/24256
|
||||||
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
|
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol";
|
description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol";
|
||||||
longDescription= ''
|
longDescription= ''
|
||||||
The Elements blockchain platform is a collection of feature experiments and extensions to the
|
The Elements blockchain platform is a collection of feature experiments and extensions to the
|
||||||
|
|
|
@ -9,10 +9,8 @@
|
||||||
, fmt
|
, fmt
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "litecoin" + optionalString (!withGui) "d";
|
pname = "litecoin" + lib.optionalString (!withGui) "d";
|
||||||
version = "0.21.2.1";
|
version = "0.21.2.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
@ -25,11 +23,11 @@ mkDerivation rec {
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||||
buildInputs = [ openssl db48 boost zlib zeromq fmt
|
buildInputs = [ openssl db48 boost zlib zeromq fmt
|
||||||
miniupnpc glib protobuf util-linux libevent ]
|
miniupnpc glib protobuf util-linux libevent ]
|
||||||
++ optionals stdenv.isDarwin [ AppKit ]
|
++ lib.optionals stdenv.isDarwin [ AppKit ]
|
||||||
++ optionals withGui [ qtbase qttools qrencode ];
|
++ lib.optionals withGui [ qtbase qttools qrencode ];
|
||||||
|
|
||||||
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
||||||
++ optionals withGui [
|
++ lib.optionals withGui [
|
||||||
"--with-gui=qt5"
|
"--with-gui=qt5"
|
||||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ];
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ];
|
||||||
|
|
||||||
|
@ -40,7 +38,7 @@ mkDerivation rec {
|
||||||
./src/test/test_litecoin
|
./src/test/test_litecoin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
||||||
description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm";
|
description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm";
|
||||||
longDescription= ''
|
longDescription= ''
|
||||||
|
|
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Compiler and inspector for the miniscript Bitcoin policy language";
|
description = "Compiler and inspector for the miniscript Bitcoin policy language";
|
||||||
longDescription = "Miniscript is a language for writing (a subset of) Bitcoin Scripts in a structured way, enabling analysis, composition, generic signing and more.";
|
longDescription = "Miniscript is a language for writing (a subset of) Bitcoin Scripts in a structured way, enabling analysis, composition, generic signing and more.";
|
||||||
homepage = "http://bitcoin.sipa.be/miniscript/";
|
homepage = "https://bitcoin.sipa.be/miniscript/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ RaghavSood jb55 ];
|
maintainers = with maintainers; [ RaghavSood jb55 ];
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
, python3
|
, python3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "particl-core";
|
pname = "particl-core";
|
||||||
version = "23.0.3.0";
|
version = "23.0.3.0";
|
||||||
|
@ -33,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--disable-bench"
|
"--disable-bench"
|
||||||
"--with-boost-libdir=${boost.out}/lib"
|
"--with-boost-libdir=${boost.out}/lib"
|
||||||
] ++ optionals (!doCheck) [
|
] ++ lib.optionals (!doCheck) [
|
||||||
"--enable-tests=no"
|
"--enable-tests=no"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -42,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||||
preCheck = "patchShebangs test";
|
preCheck = "patchShebangs test";
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||||
description = "Privacy-Focused Marketplace & Decentralized Application Platform";
|
description = "Privacy-Focused Marketplace & Decentralized Application Platform";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
|
|
@ -16,13 +16,11 @@
|
||||||
, wrapQtAppsHook ? null
|
, wrapQtAppsHook ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "vertcoin";
|
pname = "vertcoin";
|
||||||
version = "0.18.0";
|
version = "0.18.0";
|
||||||
|
|
||||||
name = pname + toString (optional (!withGui) "d") + "-" + version;
|
name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname + "-project";
|
owner = pname + "-project";
|
||||||
|
@ -35,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
pkg-config
|
pkg-config
|
||||||
hexdump
|
hexdump
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -46,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||||
db4
|
db4
|
||||||
zeromq
|
zeromq
|
||||||
gmp
|
gmp
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
qtbase
|
qtbase
|
||||||
qttools
|
qttools
|
||||||
protobuf
|
protobuf
|
||||||
|
@ -56,12 +54,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-boost-libdir=${boost.out}/lib"
|
"--with-boost-libdir=${boost.out}/lib"
|
||||||
] ++ optionals withGui [
|
] ++ lib.optionals withGui [
|
||||||
"--with-gui=qt5"
|
"--with-gui=qt5"
|
||||||
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "A digital currency with mining decentralisation and ASIC resistance as a key focus";
|
description = "A digital currency with mining decentralisation and ASIC resistance as a key focus";
|
||||||
homepage = "https://vertcoin.org/";
|
homepage = "https://vertcoin.org/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
, readline, libsodium, rapidjson
|
, readline, libsodium, rapidjson
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wownero";
|
pname = "wownero";
|
||||||
version = "0.8.0.1";
|
version = "0.8.0.1";
|
||||||
|
@ -41,7 +40,7 @@ stdenv.mkDerivation rec {
|
||||||
"-DMANUAL_SUBMODULES=ON"
|
"-DMANUAL_SUBMODULES=ON"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = ''
|
description = ''
|
||||||
A privacy-centric memecoin that was fairly launched on April 1, 2018 with
|
A privacy-centric memecoin that was fairly launched on April 1, 2018 with
|
||||||
no pre-mine, stealth-mine or ICO
|
no pre-mine, stealth-mine or ICO
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
, yelp-tools
|
, yelp-tools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lightdm";
|
pname = "lightdm";
|
||||||
version = "1.32.0";
|
version = "1.32.0";
|
||||||
|
@ -69,7 +67,7 @@ stdenv.mkDerivation rec {
|
||||||
libxklavier
|
libxklavier
|
||||||
pam
|
pam
|
||||||
polkit
|
polkit
|
||||||
] ++ optional withQt5 qtbase;
|
] ++ lib.optional withQt5 qtbase;
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Adds option to disable writing dmrc files
|
# Adds option to disable writing dmrc files
|
||||||
|
@ -96,7 +94,7 @@ stdenv.mkDerivation rec {
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--disable-tests"
|
"--disable-tests"
|
||||||
"--disable-dmrc"
|
"--disable-dmrc"
|
||||||
] ++ optional withQt5 "--enable-liblightdm-qt5";
|
] ++ lib.optional withQt5 "--enable-liblightdm-qt5";
|
||||||
|
|
||||||
installFlags = [
|
installFlags = [
|
||||||
"sysconfdir=${placeholder "out"}/etc"
|
"sysconfdir=${placeholder "out"}/etc"
|
||||||
|
@ -120,7 +118,7 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/canonical/lightdm";
|
homepage = "https://github.com/canonical/lightdm";
|
||||||
description = "A cross-desktop display manager";
|
description = "A cross-desktop display manager";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
|
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Ascii-art Editor Without A Name";
|
description = "Ascii-art Editor Without A Name";
|
||||||
homepage = "http://aewan.sourceforge.net/";
|
homepage = "https://aewan.sourceforge.net/";
|
||||||
license = lib.licenses.gpl2Plus;
|
license = lib.licenses.gpl2Plus;
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "bonzomatic";
|
pname = "bonzomatic";
|
||||||
version = "2022-02-05";
|
version = "2022-08-20";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Gargaj";
|
owner = "Gargaj";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-y0zNluIDxms+Lpg7yBiEJNNyxx5TLaSiWBKXjqXiVJg=";
|
sha256 = "sha256-AaUMefxQd00O+MAH4OLoyQIXZCRQQbt2ucgt7pVvN24=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake makeWrapper ];
|
nativeBuildInputs = [ cmake makeWrapper ];
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue