Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-01-22 18:01:03 +00:00 committed by GitHub
commit feb2240b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
792 changed files with 4215 additions and 4212 deletions

View file

@ -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",
"logind.conf(5)": "https://www.freedesktop.org/software/systemd/man/logind.conf.html",

View file

@ -78,10 +78,15 @@ rec {
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,
and then match that.
*/
platformMatch = platform: elem: let
platformMatch = platform: elem:
if builtins.isFunction elem
then elem platform
else let
pattern =
if builtins.isString elem
then { system = elem; }

View file

@ -10284,15 +10284,6 @@
githubId = 1219785;
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 = {
email = "nioncode+github@gmail.com";
github = "nioncode";
@ -15429,6 +15420,12 @@
githubId = 17534323;
name = "Quentin Vaucher";
};
xlambein = {
email = "xlambein@gmail.com";
github = "xlambein";
githubId = 5629059;
name = "Xavier Lambein";
};
xnaveira = {
email = "xnaveira@gmail.com";
github = "xnaveira";
@ -16379,4 +16376,10 @@
github = "franzmondlichtmann";
githubId = 105480088;
};
srounce = {
name = "Samuel Rounce";
email = "me@samuelrounce.co.uk";
github = "srounce";
githubId = 60792;
};
}

View file

@ -9,15 +9,14 @@ stdenv.mkDerivation {
perl GetoptLongDescriptive CPANPLUS Readonly LogLog4perl
];
phases = [ "installPhase" ];
dontUnpack = true;
installPhase =
''
mkdir -p $out/bin
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
patchShebangs $out/bin/nix-generate-from-cpan
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
'';
installPhase = ''
mkdir -p $out/bin
cp ${./nix-generate-from-cpan.pl} $out/bin/nix-generate-from-cpan
patchShebangs $out/bin/nix-generate-from-cpan
wrapProgram $out/bin/nix-generate-from-cpan --set PERL5LIB $PERL5LIB
'';
meta = {
maintainers = with lib.maintainers; [ eelco ];

View file

@ -398,6 +398,19 @@ with lib.maintainers; {
shortName = "Linux Kernel";
};
llvm = {
members = [
ericson2314
sternenseemann
lovek323
dtzWill
primeos
];
scope = "Maintain LLVM package sets and related packages";
shortName = "LLVM";
enableFeatureFreezePing = true;
};
lumiguide = {
# Verify additions by approval of an already existing member of the team.
members = [

View file

@ -209,7 +209,7 @@ let
in rec {
inherit generatedSources;
inherit (optionsDoc) optionsJSON optionsNix optionsDocBook;
inherit (optionsDoc) optionsJSON optionsNix optionsDocBook optionsUsedDocbook;
# Generate the NixOS manual.
manualHTML = runCommand "nixos-manual-html"

View file

@ -78,7 +78,7 @@ For example:
::: {#ex-options-declarations-util-mkEnableOption-magic .example}
```nix
lib.mkEnableOption "magic"
lib.mkEnableOption (lib.mdDoc "magic")
# is like
lib.mkOption {
type = lib.types.bool;
@ -113,7 +113,7 @@ Examples:
::: {#ex-options-declarations-util-mkPackageOption-hello .example}
```nix
lib.mkPackageOption pkgs "hello" { }
lib.mkPackageOptionMD pkgs "hello" { }
# is like
lib.mkOption {
type = lib.types.package;
@ -125,7 +125,7 @@ lib.mkOption {
::: {#ex-options-declarations-util-mkPackageOption-ghc .example}
```nix
lib.mkPackageOption pkgs "GHC" {
lib.mkPackageOptionMD pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
}

View file

@ -128,7 +128,7 @@ options = {
</para>
<anchor xml:id="ex-options-declarations-util-mkEnableOption-magic" />
<programlisting language="nix">
lib.mkEnableOption &quot;magic&quot;
lib.mkEnableOption (lib.mdDoc &quot;magic&quot;)
# is like
lib.mkOption {
type = lib.types.bool;
@ -188,7 +188,7 @@ mkPackageOption pkgs &quot;name&quot; { default = [ &quot;path&quot; &quot;in&qu
</para>
<anchor xml:id="ex-options-declarations-util-mkPackageOption-hello" />
<programlisting language="nix">
lib.mkPackageOption pkgs &quot;hello&quot; { }
lib.mkPackageOptionMD pkgs &quot;hello&quot; { }
# is like
lib.mkOption {
type = lib.types.package;
@ -199,7 +199,7 @@ lib.mkOption {
</programlisting>
<anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" />
<programlisting language="nix">
lib.mkPackageOption pkgs &quot;GHC&quot; {
lib.mkPackageOptionMD pkgs &quot;GHC&quot; {
default = [ &quot;ghc&quot; ];
example = &quot;pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;;
}

View file

@ -130,6 +130,13 @@
<link xlink:href="options.html#opt-services.photoprism.enable">services.photoprism</link>.
</para>
</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>
</section>
<section xml:id="sec-release-23.05-incompatibilities">
@ -280,16 +287,6 @@
<literal>llvmPackages_rocm.clang-unwrapped</literal>.
</para>
</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>
<para>
The EC2 image module previously detected and automatically
@ -433,6 +430,22 @@
sudo and sources the environment variables.
</para>
</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>
<para>
The <literal>dnsmasq</literal> service now takes configuration

View file

@ -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).
- [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}
<!-- 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`.
- 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.
- `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.
- 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
`services.dnsmasq.settings` attribute set. The option
`services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches

View file

@ -78,16 +78,13 @@ let
title = args.title or null;
name = args.name or (lib.concatStringsSep "." args.path);
in ''
<listitem>
<para>
<link xlink:href="https://search.nixos.org/packages?show=${name}&amp;sort=relevance&amp;query=${name}">
<literal>${lib.optionalString (title != null) "${title} aka "}pkgs.${name}</literal>
</link>
</para>
${lib.optionalString (args ? comment) "<para>${args.comment}</para>"}
</listitem>
- [`${lib.optionalString (title != null) "${title} aka "}pkgs.${name}`](
https://search.nixos.org/packages?show=${name}&sort=relevance&query=${name}
)${
lib.optionalString (args ? comment) "\n\n ${args.comment}"
}
'';
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);
@ -121,7 +118,20 @@ in rec {
inherit self;
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"
(builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));
@ -139,9 +149,10 @@ in rec {
dst=$out/share/doc/nixos
mkdir -p $dst
TOUCH_IF_DB=$dst/.used-docbook \
python ${./mergeJSON.py} \
${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"} \
$baseJSON $options \
> $dst/options.json
@ -153,6 +164,14 @@ in rec {
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.
# 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

View file

@ -3,9 +3,17 @@ import json
import os
import sys
from typing import Any, Dict, List
from collections.abc import MutableMapping, Sequence
import inspect
# 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
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')))
admonitions = {
'.warning': 'warning',
'.important': 'important',
'.note': 'note'
}
class Renderer(mistune.renderers.BaseRenderer):
def _get_method(self, name):
try:
return super(Renderer, self)._get_method(name)
except AttributeError:
def not_supported(*args, **kwargs):
raise NotImplementedError("md node not supported yet", name, args, **kwargs)
return not_supported
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) ],
class Renderer(markdown_it.renderer.RendererProtocol):
__output__ = "docbook"
def __init__(self, parser=None):
self.rules = {
k: v
for k, v in inspect.getmembers(self, predicate=inspect.ismethod)
if not (k.startswith("render") or k.startswith("_"))
} | {
"container_{.note}_open": self._note_open,
"container_{.note}_close": self._note_close,
"container_{.important}_open": self._important_open,
"container_{.important}_close": self._important_close,
"container_{.warning}_open": self._warning_open,
"container_{.warning}_close": self._warning_close,
}
md.block.register_rule('admonition', ADMONITION_PATTERN, parse)
md.block.rules.append('admonition')
def render(self, tokens: Sequence[Token], options: OptionsDict, env: MutableMapping) -> str:
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=[
p_command, p_file, p_var, p_env, p_option, p_manpage, p_admonition
])
def do_one(i, token):
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!
def convertMD(options: Dict[str, Any]) -> str:
def convertString(path: str, text: str) -> str:
try:
rendered = md(text)
# keep trailing spaces so we can diff the generated XML to check for conversion bugs.
return rendered.rstrip() + text[len(text.rstrip()):]
rendered = md.render(text)
return rendered
except:
print(f"error in {path}")
raise
@ -208,19 +236,45 @@ def convertMD(options: Dict[str, Any]) -> str:
if '_type' not in option[key]: return False
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():
try:
if optionIs(option, 'description', 'mdDoc'):
option['description'] = convertString(name, option['description']['text'])
elif markdownByDefault:
option['description'] = convertString(name, option['description'])
else:
option['description'] = ("<nixos:option-description><para>" +
option['description'] +
"</para></nixos:option-description>")
if optionIs(option, 'example', 'literalMD'):
docbook = convertString(name, option['example']['text'])
option['example'] = { '_type': 'literalDocBook', 'text': docbook }
if optionIs(option, 'default', 'literalMD'):
docbook = convertString(name, option['default']['text'])
option['default'] = { '_type': 'literalDocBook', 'text': docbook }
convertCode(name, option, 'example')
convertCode(name, option, 'default')
if 'relatedPackages' in option:
option['relatedPackages'] = convertString(name, option['relatedPackages'])
except Exception as e:
raise Exception(f"Failed to render option {name}: {str(e)}")
@ -228,6 +282,7 @@ def convertMD(options: Dict[str, Any]) -> str:
return options
warningsAreErrors = False
warnOnDocbook = False
errorOnDocbook = False
markdownByDefault = False
optOffset = 0
@ -235,7 +290,10 @@ for arg in sys.argv[1:]:
if arg == "--warnings-are-errors":
optOffset += 1
warningsAreErrors = True
if arg == "--error-on-docbook":
if arg == "--warn-on-docbook":
optOffset += 1
warnOnDocbook = True
elif arg == "--error-on-docbook":
optOffset += 1
errorOnDocbook = True
if arg == "--markdown-by-default":
@ -278,26 +336,27 @@ def is_docbook(o, key):
# check that every option has a description
hasWarnings = False
hasErrors = False
hasDocBookErrors = False
hasDocBook = False
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):
hasErrors = True
hasDocBookErrors = True
hasErrors |= errorOnDocbook
hasDocBook = True
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)
elif is_docbook(v.value, 'defaultText'):
hasErrors = True
hasDocBookErrors = True
hasErrors |= errorOnDocbook
hasDocBook = True
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)
elif is_docbook(v.value, 'example'):
hasErrors = True
hasDocBookErrors = True
hasErrors |= errorOnDocbook
hasDocBook = True
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)
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 " +
"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. " +
"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 " +
"functions where they are available. For example:\n" +
"\n" +
@ -326,6 +389,9 @@ if hasDocBookErrors:
" example.package = mkPackageOptionMD pkgs \"your-package\" {};\n" +
" imports = [ (mkAliasOptionModuleMD [ \"example\" \"args\" ] [ \"example\" \"settings\" ]) ];",
file = sys.stderr)
with open(os.getenv('TOUCH_IF_DB'), 'x'):
# just make sure it exists
pass
if hasErrors:
sys.exit(1)

View file

@ -53,12 +53,8 @@
<listitem>
<nixos:option-description>
<para>
<xsl:value-of disable-output-escaping="yes"
select="attr[@name = 'description']/string/@value" />
</para>
</nixos:option-description>
<xsl:value-of disable-output-escaping="yes"
select="attr[@name = 'description']/string/@value" />
<xsl:if test="attr[@name = 'type']">
<para>
@ -72,29 +68,22 @@
</para>
</xsl:if>
<xsl:if test="attr[@name = 'default']">
<para>
<emphasis>Default:</emphasis>
<xsl:text> </xsl:text>
<xsl:apply-templates select="attr[@name = 'default']/*" mode="top" />
</para>
<xsl:if test="attr[@name = 'default-db']">
<xsl:value-of disable-output-escaping="yes"
select="attr[@name = 'default-db']/string/@value" />
</xsl:if>
<xsl:if test="attr[@name = 'example']">
<para>
<emphasis>Example:</emphasis>
<xsl:text> </xsl:text>
<xsl:apply-templates select="attr[@name = 'example']/*" mode="top" />
</para>
<xsl:if test="attr[@name = 'example-db']">
<xsl:value-of disable-output-escaping="yes"
select="attr[@name = 'example-db']/string/@value" />
</xsl:if>
<xsl:if test="attr[@name = 'relatedPackages']">
<para>
<emphasis>Related packages:</emphasis>
<xsl:text> </xsl:text>
<xsl:value-of disable-output-escaping="yes"
select="attr[@name = 'relatedPackages']/string/@value" />
</para>
<xsl:value-of disable-output-escaping="yes"
select="attr[@name = 'relatedPackages']/string/@value" />
</xsl:if>
<xsl:if test="count(attr[@name = 'declarations']/list/*) != 0">
@ -121,18 +110,6 @@
</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, '&#010;')">
<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:value-of disable-output-escaping="yes" select="attr[@name = 'text']/string/@value" />
</xsl:template>

View file

@ -7,7 +7,7 @@ in
options = {
testScript = mkOption {
type = either str (functionTo str);
description = ''
description = mdDoc ''
A series of python declarations and statements that you write to perform
the test.
'';

View file

@ -181,7 +181,7 @@ in
example = "pid";
description = lib.mdDoc ''
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.
'';
};

View file

@ -42,7 +42,7 @@ in
# see discussion in https://github.com/NixOS/nixpkgs/pull/204178#issuecomment-1336289021
nix.registry.nixpkgs.to = {
type = "path";
path = nixpkgs;
path = "${channelSources}/nixos";
};
# Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required

View file

@ -1,7 +1,7 @@
{
x86_64-linux = "/nix/store/vggs4ndlda1bhnldjrs4nm5a2walsnl6-nix-2.13.1";
i686-linux = "/nix/store/5g6w3p8l8k2mfghxrg48w7fcqbmr3c2p-nix-2.13.1";
aarch64-linux = "/nix/store/pkbg60qv1w387c80g4xnb6w06461vw3i-nix-2.13.1";
x86_64-darwin = "/nix/store/jahjn6dvlw5kygqhg6da1b2ydcdak4lx-nix-2.13.1";
aarch64-darwin = "/nix/store/2qalrx6py8r640wqsldmdf2zsaf8cpsg-nix-2.13.1";
x86_64-linux = "/nix/store/h88w1442c7hzkbw8sgpcsbqp4lhz6l5p-nix-2.12.0";
i686-linux = "/nix/store/j23527l1c3hfx17nssc0v53sq6c741zs-nix-2.12.0";
aarch64-linux = "/nix/store/zgzmdymyh934y3r4vqh8z337ba4cwsjb-nix-2.12.0";
x86_64-darwin = "/nix/store/wnlrzllazdyg1nrw9na497p4w0m7i7mm-nix-2.12.0";
aarch64-darwin = "/nix/store/7n5yamgzg5dpp5vb6ipdqgfh6cf30wmn-nix-2.12.0";
}

View file

@ -357,6 +357,14 @@ in
(mkIf cfg.nixos.enable {
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 = []
++ optional cfg.man.enable manual.manpages
++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];

View file

@ -571,6 +571,7 @@
./services/misc/atuin.nix
./services/misc/autofs.nix
./services/misc/autorandr.nix
./services/misc/autosuspend.nix
./services/misc/bazarr.nix
./services/misc/beanstalkd.nix
./services/misc/bees.nix

View file

@ -727,7 +727,7 @@ in {
Default values inheritable by all configured certs. You can
use this to define options shared by all your certs. These defaults
can also be ignored on a per-cert basis using the
`security.acme.certs.''${cert}.inheritDefaults' option.
{option}`security.acme.certs.''${cert}.inheritDefaults` option.
'';
};

View file

@ -57,7 +57,7 @@ in {
type = types.enum [ false true "lock" ];
default = false;
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
this, as it will prevent you from changing your audit configuration until you
restart. If possible, test your configuration using build-vm beforehand.

View file

@ -94,7 +94,6 @@ in {
};
config = let
rootName = "${mkPathSafeName name}-chroot";
inherit (config.confinement) binSh fullUnit;
wantsAPIVFS = lib.mkDefault (config.confinement.mode == "full-apivfs");
in lib.mkIf config.confinement.enable {

View file

@ -102,7 +102,7 @@ in {
Extra directives added to to the end of MPD's configuration file,
mpd.conf. Basic configuration like file location and uid/gid
is added automatically to the beginning of the file. For available
options see `man 5 mpd.conf`'.
options see {manpage}`mpd.conf(5)`.
'';
};

View file

@ -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 {
type = types.attrsOf unitOption;
default = {
@ -249,6 +264,7 @@ in
example = {
localbackup = {
paths = [ "/home" ];
exclude = [ "/home/*/.cache" ];
repository = "/mnt/backup-hdd";
passwordFile = "/etc/nixos/secrets/restic-password";
initialize = true;
@ -270,12 +286,17 @@ in
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);
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 =
mapAttrs'
(name: backup:
let
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.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";
backupPaths =
if (backup.dynamicFilesFrom == null)
@ -311,7 +332,7 @@ in
restartIfChanged = false;
serviceConfig = {
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;
User = backup.user;
RuntimeDirectory = "restic-backups-${name}";

View 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 Pythons `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 ];
};
}

View file

@ -22,7 +22,7 @@ in
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to enable `gpsd', a GPS service daemon.
Whether to enable `gpsd`, a GPS service daemon.
'';
};

View file

@ -15,7 +15,7 @@ in
default = "/var/lib/weechat";
};
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";
type = types.str;
};

View file

@ -54,8 +54,8 @@ in {
Type = "oneshot";
User = "_tuptime";
RemainAfterExit = true;
ExecStart = "${pkgs.tuptime}/bin/tuptime -x";
ExecStop = "${pkgs.tuptime}/bin/tuptime -xg";
ExecStart = "${pkgs.tuptime}/bin/tuptime -q";
ExecStop = "${pkgs.tuptime}/bin/tuptime -qg";
};
};
@ -64,7 +64,7 @@ in {
serviceConfig = {
Type = "oneshot";
User = "_tuptime";
ExecStart = "${pkgs.tuptime}/bin/tuptime -x";
ExecStart = "${pkgs.tuptime}/bin/tuptime -q";
};
};
};

View file

@ -7,6 +7,8 @@ let
in
{
meta.maintainers = [ lib.maintainers.julienmalka ];
options = {
services.uptime-kuma = {
enable = mkEnableOption (mdDoc "Uptime Kuma, this assumes a reverse proxy to be set.");

View file

@ -47,7 +47,7 @@ in
Whether to run the Avahi daemon, which allows Avahi clients
to use Avahi's service discovery facilities and also allows
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;
description = lib.mdDoc ''
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.
'';
};

View file

@ -124,8 +124,8 @@ in
type = types.lines;
default = "";
description = lib.mdDoc ''
Additional options that will be copied verbatim in `gnunet.conf'.
See `gnunet.conf(5)' for details.
Additional options that will be copied verbatim in `gnunet.conf`.
See {manpage}`gnunet.conf(5)` for details.
'';
};
};

View file

@ -124,7 +124,7 @@ in
type = types.listOf types.str;
default = [ ];
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";
};
};
});

View file

@ -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 {
type = format.type;
@ -148,7 +159,8 @@ in
};
in
"${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";
KillSignal = "SIGINT";
LimitNOFILE = 65536;
@ -157,6 +169,7 @@ in
Restart = "on-failure";
RestartSec = 2;
TasksMax = "infinity";
LoadCredential = lib.mapAttrsToList (key: value: "${key}:${value}") cfg.credentials;
}
(mkIf cfg.enableDocker {
SupplementaryGroups = "docker"; # space-separated string

View file

@ -37,7 +37,7 @@ in
- stderr
- file:/path/to/file
- syslog:FACILITY where FACILITY is any of "daemon", "local0",
etc.
etc.
'';
};
@ -125,6 +125,7 @@ in
lib.mdDoc ''
Way to disclose client IP to the proxy.
- "false": do not disclose
http-connect supports the following ways:
- "X-Forwarded-For": add header "X-Forwarded-For: IP"
- "Forwarded_ip": add header "Forwarded: for=IP" (see RFC7239)

View file

@ -14,7 +14,7 @@ with lib;
type = types.bool;
default = false;
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
using the rpcinfo(1) command. `rpcbind` is a replacement for
`portmap`.

View file

@ -40,7 +40,7 @@ in
type = types.listOf types.str;
description = lib.mdDoc ''
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.
'';
example = [ "localhost" "1.2.3.4:443" ];

View file

@ -28,7 +28,7 @@ in
host = mkOption {
type = types.str;
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 =
if domain == null then
config.networking.hostName

View file

@ -86,7 +86,7 @@ in
banaction = mkOption {
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;
description = lib.mdDoc ''
Default banning action (e.g. iptables, iptables-new, iptables-multiport,
@ -98,7 +98,7 @@ in
banaction-allports = mkOption {
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;
description = lib.mdDoc ''
Default banning action (e.g. iptables, iptables-new, iptables-multiport,

View file

@ -144,7 +144,7 @@ in {
interface. If unset no authentication will be required.
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
non-consecutive underscores except at the end, and consists of
small-case a-z characters and digits 0-9.

View file

@ -950,16 +950,16 @@ in
type = types.str;
default = "";
description = lib.mdDoc ''
Attribute map for `id'.
Defaults to `NameID' of SAML response.
Attribute map for `id`.
Defaults to `NameID` of SAML response.
'';
};
username = mkOption {
type = types.str;
default = "";
description = lib.mdDoc ''
Attribute map for `username'.
Defaults to `NameID' of SAML response.
Attribute map for `username`.
Defaults to `NameID` of SAML response.
'';
};
email = mkOption {

View file

@ -288,7 +288,7 @@ let
configPath = if cfg.enableReload
then "/etc/nginx/nginx.conf"
else finalConfigFile;
else configFile;
execCommand = "${cfg.package}/bin/nginx -c '${configPath}'";
@ -440,38 +440,6 @@ let
);
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
{
@ -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 {
default = [];
type = types.listOf (types.attrsOf types.anything);
@ -1128,7 +1085,7 @@ in
};
environment.etc."nginx/nginx.conf" = mkIf cfg.enableReload {
source = finalConfigFile;
source = configFile;
};
# This service waits for all certificates to be available
@ -1147,7 +1104,7 @@ in
# certs are updated _after_ config has been reloaded.
before = sslTargets;
after = sslServices;
restartTriggers = optionals cfg.enableReload [ finalConfigFile ];
restartTriggers = optionals cfg.enableReload [ configFile ];
# Block reloading if not all certs exist yet.
# Happens when config changes add new vhosts/certs.
unitConfig.ConditionPathExists = optionals (sslServices != []) (map (certName: certs.${certName}.directory + "/fullchain.pem") dependentCertNames);

View file

@ -35,7 +35,7 @@ in {
type = lib.types.package;
description = lib.mdDoc "Which package to use for the envfs.";
default = pkgs.envfs;
defaultText = lib.mdDoc "pkgs.envfs";
defaultText = lib.literalExpression "pkgs.envfs";
};
};
};

View file

@ -61,7 +61,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
specialisation.reloadWithErrorsSystem.configuration = {
services.nginx.package = pkgs.nginxMainline;
services.nginx.virtualHosts."hello".extraConfig = "access_log /does/not/exist.log;";
services.nginx.virtualHosts."!@$$(#*%".locations."~@#*$*!)".proxyPass = ";;;";
};
};
};

View file

@ -7,17 +7,27 @@ import ./make-test-python.nix (
rcloneRepository = "rclone:local:/tmp/restic-rclone-backup";
backupPrepareCommand = ''
touch /opt/backupPrepareCommand
test ! -e /opt/backupCleanupCommand
touch /tmp/backupPrepareCommand
test ! -e /tmp/backupCleanupCommand
'';
backupCleanupCommand = ''
rm /opt/backupPrepareCommand
touch /opt/backupCleanupCommand
rm /tmp/backupPrepareCommand
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"}";
paths = [ "/opt" ];
exclude = [ "/opt/excluded_file_*" ];
pruneOpts = [
"--keep-daily 2"
"--keep-weekly 1"
@ -38,17 +48,17 @@ import ./make-test-python.nix (
{
services.restic.backups = {
remotebackup = {
inherit passwordFile paths pruneOpts backupPrepareCommand backupCleanupCommand;
inherit passwordFile paths exclude pruneOpts backupPrepareCommand backupCleanupCommand;
repository = remoteRepository;
initialize = true;
};
remote-from-file-backup = {
inherit passwordFile paths pruneOpts;
inherit passwordFile paths exclude pruneOpts;
initialize = true;
repositoryFile = pkgs.writeText "repositoryFile" remoteFromFileRepository;
};
rclonebackup = {
inherit passwordFile paths pruneOpts;
inherit passwordFile paths exclude pruneOpts;
initialize = true;
repository = rcloneRepository;
rcloneConfig = {
@ -94,16 +104,21 @@ import ./make-test-python.nix (
)
server.succeed(
# set up
"mkdir -p /opt",
"touch /opt/some_file",
"cp -rT ${testDir} /opt",
"touch /opt/excluded_file_1 /opt/excluded_file_2",
"mkdir -p /tmp/restic-rclone-backup",
# test that remotebackup runs custom commands and produces a snapshot
"timedatectl set-time '2016-12-13 13:45'",
"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"',
# 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
"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"',
@ -120,27 +135,27 @@ import ./make-test-python.nix (
# test that we can create four snapshots in remotebackup and rclonebackup
"timedatectl set-time '2017-12-13 13:45'",
"systemctl start restic-backups-remotebackup.service",
"rm /opt/backupCleanupCommand",
"rm /tmp/backupCleanupCommand",
"systemctl start restic-backups-rclonebackup.service",
"timedatectl set-time '2018-12-13 13:45'",
"systemctl start restic-backups-remotebackup.service",
"rm /opt/backupCleanupCommand",
"rm /tmp/backupCleanupCommand",
"systemctl start restic-backups-rclonebackup.service",
"timedatectl set-time '2018-12-14 13:45'",
"systemctl start restic-backups-remotebackup.service",
"rm /opt/backupCleanupCommand",
"rm /tmp/backupCleanupCommand",
"systemctl start restic-backups-rclonebackup.service",
"timedatectl set-time '2018-12-15 13:45'",
"systemctl start restic-backups-remotebackup.service",
"rm /opt/backupCleanupCommand",
"rm /tmp/backupCleanupCommand",
"systemctl start restic-backups-rclonebackup.service",
"timedatectl set-time '2018-12-16 13:45'",
"systemctl start restic-backups-remotebackup.service",
"rm /opt/backupCleanupCommand",
"rm /tmp/backupCleanupCommand",
"systemctl start restic-backups-rclonebackup.service",
'${pkgs.restic}/bin/restic -r ${remoteRepository} -p ${passwordFile} snapshots --json | ${pkgs.jq}/bin/jq "length | . == 4"',

View file

@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
pname = "aeolus";
version = "0.9.9";
version = "0.10.4";
src = fetchurl {
url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "04y1j36y7vc93bv299vfiawbww4ym6q7avfx8vw6rmxr817zrch3";
sha256 = "sha256-J9xrd/N4LrvGgi89Yj4ob4ZPUAEchrXJJQ+YVJ29Qhk=";
};
buildInputs = [

View file

@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "GTK client for MPD (Music player daemon)";
homepage = "http://ario-player.sourceforge.net/";
homepage = "https://ario-player.sourceforge.net/";
license = licenses.gpl2Plus;
maintainers = [ maintainers.garrison ];
platforms = platforms.all;

View file

@ -9,8 +9,6 @@
#, aacSupport ? false, TODO: neroAacEnc
}:
with lib;
stdenv.mkDerivation rec {
version = "2.9.7";
pname = "asunder";
@ -23,20 +21,20 @@ stdenv.mkDerivation rec {
buildInputs = [ gtk2 libcddb ];
runtimeDeps =
optional mp3Support lame ++
optional oggSupport vorbis-tools ++
optional flacSupport flac ++
optional opusSupport opusTools ++
optional wavpackSupport wavpack ++
optional monkeysAudioSupport monkeysAudio ++
lib.optional mp3Support lame ++
lib.optional oggSupport vorbis-tools ++
lib.optional flacSupport flac ++
lib.optional opusSupport opusTools ++
lib.optional wavpackSupport wavpack ++
lib.optional monkeysAudioSupport monkeysAudio ++
[ cdparanoia ];
postInstall = ''
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";
homepage = "http://littlesvr.ca/asunder/index.php";
license = licenses.gpl2;

View file

@ -5,8 +5,6 @@
withGtk2 ? true, gtk2 ? null,
withGtk3 ? true, gtk3 ? null }:
with lib;
assert withFrontend -> python3Packages ? pyqt5;
assert withQt -> qtbase != null;
assert withQt -> wrapQtAppsHook != null;
@ -30,13 +28,13 @@ stdenv.mkDerivation rec {
pythonPath = with python3Packages; [
rdflib pyliblo
] ++ optional withFrontend pyqt5;
] ++ lib.optional withFrontend pyqt5;
buildInputs = [
file liblo alsa-lib fluidsynth jack2 libpulseaudio libsndfile
] ++ optional withQt qtbase
++ optional withGtk2 gtk2
++ optional withGtk3 gtk3;
] ++ lib.optional withQt qtbase
++ lib.optional withGtk2 gtk2
++ lib.optional withGtk3 gtk3;
propagatedBuildInputs = pythonPath;

View file

@ -39,8 +39,6 @@
#, vtxSupport ? true, libayemu ? null
}:
with lib;
assert samplerateSupport -> jackSupport;
# vorbis and tremor are mutually exclusive
@ -113,16 +111,16 @@ stdenv.mkDerivation rec {
patches = [ ./option-debugging.patch ];
configurePhase = "./configure " + concatStringsSep " " ([
configurePhase = "./configure " + lib.concatStringsSep " " ([
"prefix=$out"
"CONFIG_WAV=y"
] ++ concatMap (a: a.flags) opts);
] ++ lib.concatMap (a: a.flags) opts);
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ncurses ]
++ lib.optional stdenv.cc.isClang clangGCC
++ 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)" ];

View file

@ -16,8 +16,6 @@
, which
}:
with lib;
stdenv.mkDerivation rec {
pname = "crip";
version = "3.9";
@ -29,7 +27,7 @@ stdenv.mkDerivation rec {
buildInputs = [ perlPackages.perl perlPackages.CDDB_get ];
nativeBuildInputs = [ makeWrapper ];
toolDeps = makeBinPath [
toolDeps = lib.makeBinPath [
cdparanoia
coreutils
eject
@ -46,7 +44,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin/
for script in ${escapeShellArgs scripts}; do
for script in ${lib.escapeShellArgs scripts}; do
cp $script $out/bin/
substituteInPlace $out/bin/$script \
@ -63,6 +61,6 @@ stdenv.mkDerivation rec {
description = "Terminal-based ripper/encoder/tagger tool for creating Ogg Vorbis/FLAC files";
license = lib.licenses.gpl1Only;
platforms = lib.platforms.linux;
maintainers = [ maintainers.endgame ];
maintainers = [ lib.maintainers.endgame ];
};
}

View file

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
64 bits floating point internal audio processing.
Nice GUI with powerful metering for every plugin.
'';
homepage = "http://eq10q.sourceforge.net/";
homepage = "https://eq10q.sourceforge.net/";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.magnetophon ];
platforms = lib.platforms.linux;

View file

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Compact open source software speech synthesizer";
homepage = "http://espeak.sourceforge.net/";
homepage = "https://espeak.sourceforge.net/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
};

View file

@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Phoneme editor for espeak";
homepage = "http://espeak.sourceforge.net/";
homepage = "https://espeak.sourceforge.net/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
};

View file

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ flac libao libogg popt ];
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";
license = licenses.gpl2Plus;
platforms = platforms.all;

View file

@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
pname = "flacon";
version = "9.2.0";
version = "9.5.1";
src = fetchFromGitHub {
owner = "flacon";
repo = "flacon";
rev = "v${version}";
sha256 = "sha256-qnjWpsgCRAi09o9O7CBc0R9MN1EpXVmCoxB2npc9qpM=";
sha256 = "sha256-45aA2Ib69Gb1Mg/5907rp1nfRbNyQq12pm/aFwTdgeA=";
};
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];

View file

@ -7,8 +7,6 @@ assert alsaSupport -> alsa-lib != null;
assert jackSupport -> libjack2 != null;
assert portaudioSupport -> portaudio != null;
with lib;
mkDerivation rec {
pname = "fmit";
version = "1.2.14";
@ -22,9 +20,9 @@ mkDerivation rec {
nativeBuildInputs = [ qmake itstool wrapQtAppsHook ];
buildInputs = [ fftw qtbase qtmultimedia ]
++ optionals alsaSupport [ alsa-lib ]
++ optionals jackSupport [ libjack2 ]
++ optionals portaudioSupport [ portaudio ];
++ lib.optionals alsaSupport [ alsa-lib ]
++ lib.optionals jackSupport [ libjack2 ]
++ lib.optionals portaudioSupport [ portaudio ];
postPatch = ''
substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}'
@ -32,13 +30,13 @@ mkDerivation rec {
preConfigure = ''
qmakeFlags="$qmakeFlags \
CONFIG+=${optionalString alsaSupport "acs_alsa"} \
CONFIG+=${optionalString jackSupport "acs_jack"} \
CONFIG+=${optionalString portaudioSupport "acs_portaudio"} \
CONFIG+=${lib.optionalString alsaSupport "acs_alsa"} \
CONFIG+=${lib.optionalString jackSupport "acs_jack"} \
CONFIG+=${lib.optionalString portaudioSupport "acs_portaudio"} \
PREFIXSHORTCUT=$out"
'';
meta = {
meta = with lib; {
description = "Free Musical Instrument Tuner";
longDescription = ''
FMIT is a graphical utility for tuning musical instruments, with error

View file

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
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;
maintainers = with maintainers; [ pSub ];
platforms = with platforms; linux;

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Programmable auditory binaural-beat synthesizer";
homepage = "http://gnaural.sourceforge.net/";
homepage = "https://gnaural.sourceforge.net/";
maintainers = with maintainers; [ ehmry ];
license = with licenses; [ gpl2Only ];
};

View file

@ -8,12 +8,11 @@
, isStereo ? false
}:
with lib;
let
pname = "goattracker" + optionalString isStereo "-stereo";
pname = "goattracker" + lib.optionalString isStereo "-stereo";
desktopItem = makeDesktopItem {
name = pname;
desktopName = "GoatTracker 2" + optionalString isStereo " Stereo";
desktopName = "GoatTracker 2" + lib.optionalString isStereo " Stereo";
genericName = "Music Tracker";
exec = if isStereo
then "gt2stereo"
@ -30,7 +29,7 @@ in stdenv.mkDerivation rec {
else "2.76"; # normal
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
then "1hiig2d152sv9kazwz33i56x1c54h5sh21ipkqnp6qlnwj8x1ksy" # stereo
else "0d7a3han4jw4bwiba3j87racswaajgl3pj4sb5lawdqdxicv3dn1"; # normal
@ -63,11 +62,11 @@ in stdenv.mkDerivation rec {
meta = {
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";
downloadPage = "https://sourceforge.net/projects/goattracker2/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
};
}

View file

@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "goodvibes";
version = "0.7.5";
version = "0.7.6";
src = fetchFromGitLab {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-CE9f0GnXr7wSpp8jyW0ZxGKx16r6tOaObzQXKcy5nPY=";
hash = "sha256-w0nmTYcq2DBHSjQ23zWxT6optyH+lRAMRa210F7XEvE=";
};
nativeBuildInputs = [

View file

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "A command line editor for id3v2 tags";
homepage = "http://id3v2.sourceforge.net/";
homepage = "https://id3v2.sourceforge.net/";
license = licenses.gpl2Plus;
platforms = with platforms; unix;
};

View file

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
be controlled using the ALSA sequencer. It's phat; it turns your
computer into an effects box.
'';
homepage = "http://jack-rack.sourceforge.net/";
homepage = "https://jack-rack.sourceforge.net/";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.astsmtl ];
platforms = lib.platforms.linux;

View file

@ -33,7 +33,7 @@ mkDerivation rec {
management, no track suggestions, no media player. Just a fast,
efficient workflow tool.
'';
homepage = "http://www.ibrahimshaath.co.uk/keyfinder/";
homepage = "https://www.ibrahimshaath.co.uk/keyfinder/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
};

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
prefixKey = "PREFIX=";
meta = {
homepage = "http://das.nasophon.de/klick/";
homepage = "https://das.nasophon.de/klick/";
description = "Advanced command-line metronome for JACK";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;

View file

@ -63,8 +63,8 @@ stdenv.mkDerivation rec {
channels. Additionally, the program can drive MIDI instruments (with the
gp32 and gp2x a custom MIDI interface is required).
'';
homepage = "http://www.littlegptracker.com/";
downloadPage = "http://www.littlegptracker.com/download.php";
homepage = "https://www.littlegptracker.com/";
downloadPage = "https://www.littlegptracker.com/download.php";
license = licenses.bsd3;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;

View file

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Lossless mp3 normalizer with statistical analysis";
homepage = "http://mp3gain.sourceforge.net/";
homepage = "https://mp3gain.sourceforge.net/";
license = licenses.lgpl21;
platforms = platforms.unix;
maintainers = with maintainers; [ devhell ];

View file

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
also other MPEG versions and layers. The tool is also aware of the most
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;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.devhell ];

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
'';
meta = {
homepage = "http://mpc123.sourceforge.net/";
homepage = "https://mpc123.sourceforge.net/";
description = "A Musepack (.mpc) audio player";

View file

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Command-line MP3 player";
homepage = "http://mpg321.sourceforge.net/";
homepage = "https://mpg321.sourceforge.net/";
license = licenses.gpl2;
platforms = platforms.unix;
};

View file

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
'';
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";
license = with licenses; [ lgpl21Plus ];
maintainers = with maintainers; [ OPNA2608 ];

View file

@ -63,7 +63,7 @@ mkDerivation rec {
'';
meta = with lib; {
homepage = "http://munt.sourceforge.net/";
homepage = "https://munt.sourceforge.net/";
description = "A synthesizer application built on Qt and libmt32emu";
longDescription = ''
mt32emu-qt is a synthesiser application that facilitates both realtime

View file

@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
];
meta = with lib; {
homepage = "http://munt.sourceforge.net/";
homepage = "https://munt.sourceforge.net/";
description = "Produces a WAVE file from a Standard MIDI file (SMF)";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ OPNA2608 ];

View file

@ -5,17 +5,15 @@ let
appName = "MuseScore ${builtins.head versionComponents}";
in
with lib;
stdenv.mkDerivation rec {
pname = "musescore-darwin";
version = concatStringsSep "." versionComponents;
version = lib.concatStringsSep "." versionComponents;
# The disk image contains the .app and a symlink to /Applications.
sourceRoot = "${appName}.app";
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=";
};

View file

@ -1,4 +1,6 @@
{ cmake
{ lib
, stdenv
, cmake
, pkg-config
, boost
, curl
@ -12,13 +14,11 @@
, libopenmpt
, mpg123
, ncurses
, lib
, stdenv
, taglib
# Linux Dependencies
, alsa-lib
, pulseaudio
, systemdSupport ? stdenv.isLinux
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
, systemd
# Darwin Dependencies
, Cocoa

View file

@ -12,8 +12,6 @@
, pcreSupport ? false, pcre ? null
}:
with lib;
assert pcreSupport -> pcre != null;
stdenv.mkDerivation rec {
@ -28,13 +26,13 @@ stdenv.mkDerivation rec {
};
buildInputs = [ glib ncurses libmpdclient boost ]
++ optional pcreSupport pcre;
++ lib.optional pcreSupport pcre;
nativeBuildInputs = [ meson ninja pkg-config gettext ];
mesonFlags = [
"-Dlirc=disabled"
"-Ddocumentation=disabled"
] ++ optional (!pcreSupport) "-Dregex=disabled";
] ++ lib.optional (!pcreSupport) "-Dregex=disabled";
meta = with lib; {
description = "Curses-based interface for MPD (music player daemon)";

View file

@ -52,7 +52,7 @@ stdenv.mkDerivation {
special effects by "spectral smoothing" the sounds.
It can transform any sound/music to a texture.
'';
homepage = "http://hypermammut.sourceforge.net/paulstretch/";
homepage = "https://hypermammut.sourceforge.net/paulstretch/";
platforms = platforms.linux;
license = licenses.gpl2;
};

View file

@ -1,15 +1,13 @@
{ lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsa-lib
, mpg123, releasePath ? null }:
with lib;
# To use the full release version:
# 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.
# 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.
let
urlVersion = replaceStrings [ "." ] [ "_" ];
urlVersion = lib.replaceStrings [ "." ] [ "_" ];
in
stdenv.mkDerivation rec {
@ -80,7 +78,7 @@ stdenv.mkDerivation rec {
description = "Modern tracker-based DAW";
homepage = "https://www.renoise.com/";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
license = lib.licenses.unfree;
maintainers = [];
platforms = [ "x86_64-linux" ];
};

View file

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "snd";
version = "22.5";
version = "23.0";
src = fetchurl {
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
sha256 = "sha256-a/nYq6Cfbx93jfA6I8it+U0U36dOAFSpRis32spPks4=";
sha256 = "sha256-WnQtXr1IcOpNJBrSvLf2rNu2XPs8JU01LWsQSzvvivA=";
};
nativeBuildInputs = [ pkg-config ];

View file

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
'';
version = version;
homepage = "http://shibatch.sourceforge.net/";
homepage = "https://shibatch.sourceforge.net/";
license = licenses.gpl2;
maintainers = with maintainers; [ leenaars];
platforms = platforms.linux;

View file

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ glib libogg libvorbis libmad ];
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";
license = licenses.gpl2;
};

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
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.
'';
homepage = "http://tap-plugins.sourceforge.net/ladspa.html";
homepage = "https://tap-plugins.sourceforge.net/ladspa.html";
license = licenses.gpl3;
maintainers = [ maintainers.fps ];
};

View file

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Extended module player";
homepage = "http://xmp.sourceforge.net/";
homepage = "https://xmp.sourceforge.net/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};

View file

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
synths) with user interfaces, permitting them to be hosted
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;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];

View file

@ -2,11 +2,11 @@
let
pname = "youtube-music";
version = "1.18.0";
version = "1.19.0";
src = fetchurl {
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; };

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
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";
license = licenses.gpl2Plus;
maintainers = [ maintainers.magnetophon ];

View file

@ -23,7 +23,6 @@
, withWallet ? true
}:
with lib;
stdenv.mkDerivation rec {
pname = if withGui then "bitcoin-knots" else "bitcoind-knots";
version = "23.0.knots20220529";
@ -35,24 +34,24 @@ stdenv.mkDerivation rec {
nativeBuildInputs =
[ autoreconfHook pkg-config ]
++ optionals stdenv.isLinux [ util-linux ]
++ optionals stdenv.isDarwin [ hexdump ]
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ optionals withGui [ wrapQtAppsHook ];
++ lib.optionals stdenv.isLinux [ util-linux ]
++ lib.optionals stdenv.isDarwin [ hexdump ]
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ lib.optionals withGui [ wrapQtAppsHook ];
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
++ optionals withWallet [ db48 sqlite ]
++ optionals withGui [ qrencode qtbase qttools ];
++ lib.optionals withWallet [ db48 sqlite ]
++ lib.optionals withGui [ qrencode qtbase qttools ];
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--disable-bench"
] ++ optionals (!doCheck) [
] ++ lib.optionals (!doCheck) [
"--disable-tests"
"--disable-gui-tests"
] ++ optionals (!withWallet) [
] ++ lib.optionals (!withWallet) [
"--disable-wallet"
] ++ optionals withGui [
] ++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
@ -65,7 +64,7 @@ stdenv.mkDerivation rec {
[ "LC_ALL=en_US.UTF-8" ]
# 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
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;
@ -73,7 +72,7 @@ stdenv.mkDerivation rec {
smoke-test = nixosTests.bitcoind-knots;
};
meta = {
meta = with lib; {
description = "A derivative of Bitcoin Core with a collection of improvements";
homepage = "https://bitcoinknots.org/";
maintainers = with maintainers; [ prusnak mmahut ];

View file

@ -3,10 +3,8 @@
, withGui, wrapQtAppsHook ? null, qtbase ? null, qttools ? null
, Foundation, ApplicationServices, AppKit }:
with lib;
stdenv.mkDerivation rec {
pname = "bitcoin" + optionalString (!withGui) "d" + "-unlimited";
pname = "bitcoin" + lib.optionalString (!withGui) "d" + "-unlimited";
version = "1.10.0.0";
src = fetchFromGitLab {
@ -17,19 +15,19 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkg-config autoreconfHook python3 ]
++ optionals withGui [ wrapQtAppsHook qttools ];
++ lib.optionals withGui [ wrapQtAppsHook qttools ];
buildInputs = [ openssl db48 boost zlib
miniupnpc util-linux protobuf libevent ]
++ optionals withGui [ qtbase qttools qrencode ]
++ optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ];
++ lib.optionals withGui [ qtbase qttools qrencode ]
++ lib.optionals stdenv.isDarwin [ Foundation ApplicationServices AppKit ];
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"
];
enableParallelBuilding = true;
meta = {
meta = with lib; {
description = "Peer-to-peer electronic cash system (Unlimited client)";
longDescription= ''
Bitcoin is a free open source peer-to-peer electronic cash system that is

View file

@ -23,7 +23,6 @@
, withWallet ? true
}:
with lib;
let
desktop = fetchurl {
# c2e5f3e is the last commit when the debian/bitcoin-qt.desktop file was changed
@ -45,16 +44,16 @@ stdenv.mkDerivation rec {
nativeBuildInputs =
[ autoreconfHook pkg-config ]
++ optionals stdenv.isLinux [ util-linux ]
++ optionals stdenv.isDarwin [ hexdump ]
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ optionals withGui [ wrapQtAppsHook ];
++ lib.optionals stdenv.isLinux [ util-linux ]
++ lib.optionals stdenv.isDarwin [ hexdump ]
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ lib.optionals withGui [ wrapQtAppsHook ];
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
++ optionals withWallet [ db48 sqlite ]
++ optionals withGui [ qrencode qtbase qttools ];
++ lib.optionals withWallet [ db48 sqlite ]
++ lib.optionals withGui [ qrencode qtbase qttools ];
postInstall = optionalString withGui ''
postInstall = lib.optionalString withGui ''
install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
@ -63,12 +62,12 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--disable-bench"
] ++ optionals (!doCheck) [
] ++ lib.optionals (!doCheck) [
"--disable-tests"
"--disable-gui-tests"
] ++ optionals (!withWallet) [
] ++ lib.optionals (!withWallet) [
"--disable-wallet"
] ++ optionals withGui [
] ++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
@ -81,7 +80,7 @@ stdenv.mkDerivation rec {
[ "LC_ALL=en_US.UTF-8" ]
# 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
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;
@ -89,7 +88,7 @@ stdenv.mkDerivation rec {
smoke-test = nixosTests.bitcoind;
};
meta = {
meta = with lib; {
description = "Peer-to-peer electronic cash system";
longDescription = ''
Bitcoin is a free open source peer-to-peer electronic cash system that is

View file

@ -5,7 +5,6 @@
, openssl
}:
with lib;
stdenv.mkDerivation rec {
pname = "btcdeb";
version = "unstable-2022-04-03";
@ -20,7 +19,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ openssl ];
meta = {
meta = with lib; {
description = "Bitcoin Script Debugger";
homepage = "https://github.com/bitcoin-core/btcdeb";
license = licenses.mit;

View file

@ -15,13 +15,11 @@
, wrapQtAppsHook ? null
}:
with lib;
stdenv.mkDerivation rec {
pname = "digibyte";
version = "7.17.3";
name = pname + toString (optional (!withGui) "d") + "-" + version;
name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
src = fetchFromGitHub {
owner = "digibyte-core";
@ -34,7 +32,7 @@ stdenv.mkDerivation rec {
autoreconfHook
pkg-config
hexdump
] ++ optionals withGui [
] ++ lib.optionals withGui [
wrapQtAppsHook
];
@ -44,7 +42,7 @@ stdenv.mkDerivation rec {
libevent
db4
zeromq
] ++ optionals withGui [
] ++ lib.optionals withGui [
qtbase
qttools
protobuf
@ -54,12 +52,12 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
] ++ optionals withGui [
] ++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
meta = {
meta = with lib; {
description = "DigiByte (DGB) is a rapidly growing decentralized, global blockchain";
homepage = "https://digibyte.io/";
license = licenses.mit;

View file

@ -6,9 +6,8 @@
, withGui, withUpnp ? true, withUtils ? true, withWallet ? true
, withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }:
with lib;
stdenv.mkDerivation rec {
pname = "dogecoin" + optionalString (!withGui) "d";
pname = "dogecoin" + lib.optionalString (!withGui) "d";
version = "1.14.6";
src = fetchFromGitHub {
@ -18,32 +17,32 @@ stdenv.mkDerivation rec {
sha256 = "sha256-PmbmmA2Mq07dwB3cI7A9c/ewtu0I+sWvQT39Yekm/sU=";
};
preConfigure = optionalString withGui ''
export LRELEASE=${getDev qttools}/bin/lrelease
preConfigure = lib.optionalString withGui ''
export LRELEASE=${lib.getDev qttools}/bin/lrelease
'';
nativeBuildInputs = [ pkg-config autoreconfHook util-linux ]
++ optionals withGui [ wrapQtAppsHook qttools ];
++ lib.optionals withGui [ wrapQtAppsHook qttools ];
buildInputs = [ openssl protobuf boost zlib libevent ]
++ optionals withGui [ qtbase qrencode ]
++ optionals withUpnp [ miniupnpc ]
++ optionals withWallet [ db5 ]
++ optionals withZmq [ zeromq ]
++ optionals stdenv.isDarwin [ Cocoa ];
++ lib.optionals withGui [ qtbase qrencode ]
++ lib.optionals withUpnp [ miniupnpc ]
++ lib.optionals withWallet [ db5 ]
++ lib.optionals withZmq [ zeromq ]
++ lib.optionals stdenv.isDarwin [ Cocoa ];
configureFlags = [
"--with-incompatible-bdb"
"--with-boost-libdir=${boost.out}/lib"
] ++ optionals (!withGui) [ "--with-gui=no" ]
++ optionals (!withUpnp) [ "--without-miniupnpc" ]
++ optionals (!withUtils) [ "--without-utils" ]
++ optionals (!withWallet) [ "--disable-wallet" ]
++ optionals (!withZmq) [ "--disable-zmq" ];
] ++ lib.optionals (!withGui) [ "--with-gui=no" ]
++ lib.optionals (!withUpnp) [ "--without-miniupnpc" ]
++ lib.optionals (!withUtils) [ "--without-utils" ]
++ lib.optionals (!withWallet) [ "--disable-wallet" ]
++ lib.optionals (!withZmq) [ "--disable-zmq" ];
enableParallelBuilding = true;
meta = {
meta = with lib; {
description = "Wow, such coin, much shiba, very rich";
longDescription = ''
Dogecoin is a decentralized, peer-to-peer digital currency that

View file

@ -22,7 +22,6 @@
, withWallet ? true
}:
with lib;
stdenv.mkDerivation rec {
pname = if withGui then "elements" else "elementsd";
version = "22.0.2";
@ -36,24 +35,24 @@ stdenv.mkDerivation rec {
nativeBuildInputs =
[ autoreconfHook pkg-config ]
++ optionals stdenv.isLinux [ util-linux ]
++ optionals stdenv.isDarwin [ hexdump ]
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ optionals withGui [ wrapQtAppsHook ];
++ lib.optionals stdenv.isLinux [ util-linux ]
++ lib.optionals stdenv.isDarwin [ hexdump ]
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ lib.optionals withGui [ wrapQtAppsHook ];
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
++ optionals withWallet [ db48 sqlite ]
++ optionals withGui [ qrencode qtbase qttools ];
++ lib.optionals withWallet [ db48 sqlite ]
++ lib.optionals withGui [ qrencode qtbase qttools ];
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--disable-bench"
] ++ optionals (!doCheck) [
] ++ lib.optionals (!doCheck) [
"--disable-tests"
"--disable-gui-tests"
] ++ optionals (!withWallet) [
] ++ lib.optionals (!withWallet) [
"--disable-wallet"
] ++ optionals withGui [
] ++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
@ -70,11 +69,11 @@ stdenv.mkDerivation rec {
[ "LC_ALL=en_US.UTF-8" ]
# 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
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;
meta = {
meta = with lib; {
description = "Open Source implementation of advanced blockchain features extending the Bitcoin protocol";
longDescription= ''
The Elements blockchain platform is a collection of feature experiments and extensions to the

View file

@ -9,10 +9,8 @@
, fmt
}:
with lib;
mkDerivation rec {
pname = "litecoin" + optionalString (!withGui) "d";
pname = "litecoin" + lib.optionalString (!withGui) "d";
version = "0.21.2.1";
src = fetchFromGitHub {
@ -25,11 +23,11 @@ mkDerivation rec {
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ openssl db48 boost zlib zeromq fmt
miniupnpc glib protobuf util-linux libevent ]
++ optionals stdenv.isDarwin [ AppKit ]
++ optionals withGui [ qtbase qttools qrencode ];
++ lib.optionals stdenv.isDarwin [ AppKit ]
++ lib.optionals withGui [ qtbase qttools qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
++ optionals withGui [
++ lib.optionals withGui [
"--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ];
@ -40,7 +38,7 @@ mkDerivation rec {
./src/test/test_litecoin
'';
meta = {
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm";
longDescription= ''

View file

@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
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.";
homepage = "http://bitcoin.sipa.be/miniscript/";
homepage = "https://bitcoin.sipa.be/miniscript/";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ RaghavSood jb55 ];

View file

@ -14,8 +14,6 @@
, python3
}:
with lib;
stdenv.mkDerivation rec {
pname = "particl-core";
version = "23.0.3.0";
@ -33,7 +31,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--disable-bench"
"--with-boost-libdir=${boost.out}/lib"
] ++ optionals (!doCheck) [
] ++ lib.optionals (!doCheck) [
"--enable-tests=no"
];
@ -42,7 +40,7 @@ stdenv.mkDerivation rec {
preCheck = "patchShebangs test";
enableParallelBuilding = true;
meta = {
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
description = "Privacy-Focused Marketplace & Decentralized Application Platform";
longDescription = ''

View file

@ -16,13 +16,11 @@
, wrapQtAppsHook ? null
}:
with lib;
stdenv.mkDerivation rec {
pname = "vertcoin";
version = "0.18.0";
name = pname + toString (optional (!withGui) "d") + "-" + version;
name = pname + toString (lib.optional (!withGui) "d") + "-" + version;
src = fetchFromGitHub {
owner = pname + "-project";
@ -35,7 +33,7 @@ stdenv.mkDerivation rec {
autoreconfHook
pkg-config
hexdump
] ++ optionals withGui [
] ++ lib.optionals withGui [
wrapQtAppsHook
];
@ -46,7 +44,7 @@ stdenv.mkDerivation rec {
db4
zeromq
gmp
] ++ optionals withGui [
] ++ lib.optionals withGui [
qtbase
qttools
protobuf
@ -56,12 +54,12 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
] ++ optionals withGui [
] ++ lib.optionals withGui [
"--with-gui=qt5"
"--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";
homepage = "https://vertcoin.org/";
license = licenses.mit;

View file

@ -2,7 +2,6 @@
, readline, libsodium, rapidjson
}:
with lib;
stdenv.mkDerivation rec {
pname = "wownero";
version = "0.8.0.1";
@ -41,7 +40,7 @@ stdenv.mkDerivation rec {
"-DMANUAL_SUBMODULES=ON"
];
meta = {
meta = with lib; {
description = ''
A privacy-centric memecoin that was fairly launched on April 1, 2018 with
no pre-mine, stealth-mine or ICO

View file

@ -30,8 +30,6 @@
, yelp-tools
}:
with lib;
stdenv.mkDerivation rec {
pname = "lightdm";
version = "1.32.0";
@ -69,7 +67,7 @@ stdenv.mkDerivation rec {
libxklavier
pam
polkit
] ++ optional withQt5 qtbase;
] ++ lib.optional withQt5 qtbase;
patches = [
# Adds option to disable writing dmrc files
@ -96,7 +94,7 @@ stdenv.mkDerivation rec {
"--sysconfdir=/etc"
"--disable-tests"
"--disable-dmrc"
] ++ optional withQt5 "--enable-liblightdm-qt5";
] ++ lib.optional withQt5 "--enable-liblightdm-qt5";
installFlags = [
"sysconfdir=${placeholder "out"}/etc"
@ -120,7 +118,7 @@ stdenv.mkDerivation rec {
};
meta = {
meta = with lib; {
homepage = "https://github.com/canonical/lightdm";
description = "A cross-desktop display manager";
platforms = platforms.linux;

View file

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Ascii-art Editor Without A Name";
homepage = "http://aewan.sourceforge.net/";
homepage = "https://aewan.sourceforge.net/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
};

View file

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "bonzomatic";
version = "2022-02-05";
version = "2022-08-20";
src = fetchFromGitHub {
owner = "Gargaj";
repo = pname;
rev = version;
sha256 = "sha256-y0zNluIDxms+Lpg7yBiEJNNyxx5TLaSiWBKXjqXiVJg=";
sha256 = "sha256-AaUMefxQd00O+MAH4OLoyQIXZCRQQbt2ucgt7pVvN24=";
};
nativeBuildInputs = [ cmake makeWrapper ];

Some files were not shown because too many files have changed in this diff Show more