Merge master into staging-next
This commit is contained in:
+33
-9
@@ -227,11 +227,11 @@ rec {
|
||||
};
|
||||
|
||||
int = mkOptionType {
|
||||
name = "int";
|
||||
description = "signed integer";
|
||||
check = isInt;
|
||||
merge = mergeEqualOption;
|
||||
};
|
||||
name = "int";
|
||||
description = "signed integer";
|
||||
check = isInt;
|
||||
merge = mergeEqualOption;
|
||||
};
|
||||
|
||||
# Specialized subdomains of int
|
||||
ints =
|
||||
@@ -292,10 +292,34 @@ rec {
|
||||
port = ints.u16;
|
||||
|
||||
float = mkOptionType {
|
||||
name = "float";
|
||||
description = "floating point number";
|
||||
check = isFloat;
|
||||
merge = mergeEqualOption;
|
||||
name = "float";
|
||||
description = "floating point number";
|
||||
check = isFloat;
|
||||
merge = mergeEqualOption;
|
||||
};
|
||||
|
||||
number = either int float;
|
||||
|
||||
numbers = let
|
||||
betweenDesc = lowest: highest:
|
||||
"${builtins.toJSON lowest} and ${builtins.toJSON highest} (both inclusive)";
|
||||
in {
|
||||
between = lowest: highest:
|
||||
assert lib.assertMsg (lowest <= highest)
|
||||
"numbers.between: lowest must be smaller than highest";
|
||||
addCheck number (x: x >= lowest && x <= highest) // {
|
||||
name = "numberBetween";
|
||||
description = "integer or floating point number between ${betweenDesc lowest highest}";
|
||||
};
|
||||
|
||||
nonnegative = addCheck number (x: x >= 0) // {
|
||||
name = "numberNonnegative";
|
||||
description = "nonnegative integer or floating point number, meaning >=0";
|
||||
};
|
||||
positive = addCheck number (x: x > 0) // {
|
||||
name = "numberPositive";
|
||||
description = "positive integer or floating point number, meaning >0";
|
||||
};
|
||||
};
|
||||
|
||||
str = mkOptionType {
|
||||
|
||||
@@ -4,7 +4,7 @@ Option types are a way to put constraints on the values a module option
|
||||
can take. Types are also responsible of how values are merged in case of
|
||||
multiple value definitions.
|
||||
|
||||
## Basic Types {#sec-option-types-basic}
|
||||
## Basic types {#sec-option-types-basic}
|
||||
|
||||
Basic types are the simplest available types in the module system. Basic
|
||||
types include multiple string types that mainly differ in how definition
|
||||
@@ -25,6 +25,11 @@ merging is handled.
|
||||
: A top-level store path. This can be an attribute set pointing
|
||||
to a store path, like a derivation or a flake input.
|
||||
|
||||
`types.enum` *`l`*
|
||||
|
||||
: One element of the list *`l`*, e.g. `types.enum [ "left" "right" ]`.
|
||||
Multiple definitions cannot be merged.
|
||||
|
||||
`types.anything`
|
||||
|
||||
: A type that accepts any value and recursively merges attribute sets
|
||||
@@ -95,7 +100,7 @@ merging is handled.
|
||||
problems.
|
||||
:::
|
||||
|
||||
Integer-related types:
|
||||
### Numeric types {#sec-option-types-numeric}
|
||||
|
||||
`types.int`
|
||||
|
||||
@@ -118,6 +123,10 @@ Integer-related types:
|
||||
from 0 to 2^n−1 respectively (e.g. `0`
|
||||
to `255` for 8 bits).
|
||||
|
||||
`types.ints.between` *`lowest highest`*
|
||||
|
||||
: An integer between *`lowest`* and *`highest`* (both inclusive).
|
||||
|
||||
`types.ints.positive`
|
||||
|
||||
: A positive integer (that is > 0).
|
||||
@@ -127,12 +136,44 @@ Integer-related types:
|
||||
: A port number. This type is an alias to
|
||||
`types.ints.u16`.
|
||||
|
||||
String-related types:
|
||||
`types.float`
|
||||
|
||||
: A floating point number.
|
||||
|
||||
::: {.warning}
|
||||
Converting a floating point number to a string with `toString` or `toJSON`
|
||||
may result in [precision loss](https://github.com/NixOS/nix/issues/5733).
|
||||
:::
|
||||
|
||||
`types.number`
|
||||
|
||||
: Either a signed integer or a floating point number. No implicit conversion
|
||||
is done between the two types, and multiple equal definitions will only be
|
||||
merged if they have the same type.
|
||||
|
||||
`types.numbers.between` *`lowest highest`*
|
||||
|
||||
: An integer or floating point number between *`lowest`* and *`highest`* (both inclusive).
|
||||
|
||||
`types.numbers.nonnegative`
|
||||
|
||||
: A nonnegative integer or floating point number (that is >= 0).
|
||||
|
||||
`types.numbers.positive`
|
||||
|
||||
: A positive integer or floating point number (that is > 0).
|
||||
|
||||
### String types {#sec-option-types-string}
|
||||
|
||||
`types.str`
|
||||
|
||||
: A string. Multiple definitions cannot be merged.
|
||||
|
||||
`types.separatedString` *`sep`*
|
||||
|
||||
: A string. Multiple definitions are concatenated with *`sep`*, e.g.
|
||||
`types.separatedString "|"`.
|
||||
|
||||
`types.lines`
|
||||
|
||||
: A string. Multiple definitions are concatenated with a new line
|
||||
@@ -144,7 +185,7 @@ String-related types:
|
||||
|
||||
`types.envVar`
|
||||
|
||||
: A string. Multiple definitions are concatenated with a collon `":"`.
|
||||
: A string. Multiple definitions are concatenated with a colon `":"`.
|
||||
|
||||
`types.strMatching`
|
||||
|
||||
@@ -152,24 +193,9 @@ String-related types:
|
||||
definitions cannot be merged. The regular expression is processed
|
||||
using `builtins.match`.
|
||||
|
||||
## Value Types {#sec-option-types-value}
|
||||
## Submodule types {#sec-option-types-submodule}
|
||||
|
||||
Value types are types that take a value parameter.
|
||||
|
||||
`types.enum` *`l`*
|
||||
|
||||
: One element of the list *`l`*, e.g. `types.enum [ "left" "right" ]`.
|
||||
Multiple definitions cannot be merged.
|
||||
|
||||
`types.separatedString` *`sep`*
|
||||
|
||||
: A string with a custom separator *`sep`*, e.g.
|
||||
`types.separatedString "|"`.
|
||||
|
||||
`types.ints.between` *`lowest highest`*
|
||||
|
||||
: An integer between *`lowest`* and *`highest`* (both inclusive). Useful
|
||||
for creating types like `types.port`.
|
||||
Submodules are detailed in [Submodule](#section-option-types-submodule).
|
||||
|
||||
`types.submodule` *`o`*
|
||||
|
||||
@@ -178,7 +204,6 @@ Value types are types that take a value parameter.
|
||||
value. Submodules are used in composed types to create modular
|
||||
options. This is equivalent to
|
||||
`types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }`.
|
||||
Submodules are detailed in [Submodule](#section-option-types-submodule).
|
||||
|
||||
`types.submoduleWith` { *`modules`*, *`specialArgs`* ? {}, *`shorthandOnlyDefinesConfig`* ? false }
|
||||
|
||||
@@ -239,7 +264,7 @@ Value types are types that take a value parameter.
|
||||
more convenient and discoverable than expecting the module user to
|
||||
type-merge with the `attrsOf submodule` option.
|
||||
|
||||
## Composed Types {#sec-option-types-composed}
|
||||
## Composed types {#sec-option-types-composed}
|
||||
|
||||
Composed types are types that take a type as parameter. `listOf
|
||||
int` and `either int str` are examples of composed types.
|
||||
@@ -496,7 +521,7 @@ Types are mainly characterized by their `check` and `merge` functions.
|
||||
of strings, and `defs` the list of defined values as a list. It is
|
||||
possible to override a type merge function for custom needs.
|
||||
|
||||
## Custom Types {#sec-option-types-custom}
|
||||
## Custom types {#sec-option-types-custom}
|
||||
|
||||
Custom types can be created with the `mkOptionType` function. As type
|
||||
creation includes some more complex topics such as submodule handling,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
in case of multiple value definitions.
|
||||
</para>
|
||||
<section xml:id="sec-option-types-basic">
|
||||
<title>Basic Types</title>
|
||||
<title>Basic types</title>
|
||||
<para>
|
||||
Basic types are the simplest available types in the module system.
|
||||
Basic types include multiple string types that mainly differ in
|
||||
@@ -49,6 +49,20 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.enum</literal>
|
||||
<emphasis><literal>l</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
One element of the list
|
||||
<emphasis><literal>l</literal></emphasis>, e.g.
|
||||
<literal>types.enum [ "left" "right" ]</literal>.
|
||||
Multiple definitions cannot be merged.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.anything</literal>
|
||||
@@ -150,186 +164,241 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
Integer-related types:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.int</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A signed integer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.{s8, s16, s32}</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Signed integers with a fixed length (8, 16 or 32 bits). They
|
||||
go from −2^n/2 to 2^n/2−1 respectively (e.g.
|
||||
<literal>−128</literal> to <literal>127</literal> for 8
|
||||
bits).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.unsigned</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
An unsigned integer (that is >= 0).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.{u8, u16, u32}</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Unsigned integers with a fixed length (8, 16 or 32 bits).
|
||||
They go from 0 to 2^n−1 respectively (e.g.
|
||||
<literal>0</literal> to <literal>255</literal> for 8 bits).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.positive</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A positive integer (that is > 0).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.port</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A port number. This type is an alias to
|
||||
<literal>types.ints.u16</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
String-related types:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.str</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions cannot be merged.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.lines</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions are concatenated with a new
|
||||
line <literal>"\n"</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.commas</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions are concatenated with a comma
|
||||
<literal>","</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.envVar</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions are concatenated with a
|
||||
collon <literal>":"</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.strMatching</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string matching a specific regular expression. Multiple
|
||||
definitions cannot be merged. The regular expression is
|
||||
processed using <literal>builtins.match</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<section xml:id="sec-option-types-numeric">
|
||||
<title>Numeric types</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.int</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A signed integer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.{s8, s16, s32}</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Signed integers with a fixed length (8, 16 or 32 bits).
|
||||
They go from −2^n/2 to 2^n/2−1 respectively (e.g.
|
||||
<literal>−128</literal> to <literal>127</literal> for 8
|
||||
bits).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.unsigned</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
An unsigned integer (that is >= 0).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.{u8, u16, u32}</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Unsigned integers with a fixed length (8, 16 or 32 bits).
|
||||
They go from 0 to 2^n−1 respectively (e.g.
|
||||
<literal>0</literal> to <literal>255</literal> for 8
|
||||
bits).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.between</literal>
|
||||
<emphasis><literal>lowest highest</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
An integer between
|
||||
<emphasis><literal>lowest</literal></emphasis> and
|
||||
<emphasis><literal>highest</literal></emphasis> (both
|
||||
inclusive).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.positive</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A positive integer (that is > 0).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.port</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A port number. This type is an alias to
|
||||
<literal>types.ints.u16</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.float</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A floating point number.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
Converting a floating point number to a string with
|
||||
<literal>toString</literal> or <literal>toJSON</literal>
|
||||
may result in
|
||||
<link xlink:href="https://github.com/NixOS/nix/issues/5733">precision
|
||||
loss</link>.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.number</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Either a signed integer or a floating point number. No
|
||||
implicit conversion is done between the two types, and
|
||||
multiple equal definitions will only be merged if they
|
||||
have the same type.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.numbers.between</literal>
|
||||
<emphasis><literal>lowest highest</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
An integer or floating point number between
|
||||
<emphasis><literal>lowest</literal></emphasis> and
|
||||
<emphasis><literal>highest</literal></emphasis> (both
|
||||
inclusive).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.numbers.nonnegative</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A nonnegative integer or floating point number (that is
|
||||
>= 0).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.numbers.positive</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A positive integer or floating point number (that is >
|
||||
0).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
<section xml:id="sec-option-types-string">
|
||||
<title>String types</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.str</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions cannot be merged.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.separatedString</literal>
|
||||
<emphasis><literal>sep</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions are concatenated with
|
||||
<emphasis><literal>sep</literal></emphasis>, e.g.
|
||||
<literal>types.separatedString "|"</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.lines</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions are concatenated with a new
|
||||
line <literal>"\n"</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.commas</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions are concatenated with a
|
||||
comma <literal>","</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.envVar</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string. Multiple definitions are concatenated with a
|
||||
colon <literal>":"</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.strMatching</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string matching a specific regular expression. Multiple
|
||||
definitions cannot be merged. The regular expression is
|
||||
processed using <literal>builtins.match</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="sec-option-types-value">
|
||||
<title>Value Types</title>
|
||||
<section xml:id="sec-option-types-submodule">
|
||||
<title>Submodule types</title>
|
||||
<para>
|
||||
Value types are types that take a value parameter.
|
||||
Submodules are detailed in
|
||||
<link linkend="section-option-types-submodule">Submodule</link>.
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.enum</literal>
|
||||
<emphasis><literal>l</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
One element of the list
|
||||
<emphasis><literal>l</literal></emphasis>, e.g.
|
||||
<literal>types.enum [ "left" "right" ]</literal>.
|
||||
Multiple definitions cannot be merged.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.separatedString</literal>
|
||||
<emphasis><literal>sep</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string with a custom separator
|
||||
<emphasis><literal>sep</literal></emphasis>, e.g.
|
||||
<literal>types.separatedString "|"</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.ints.between</literal>
|
||||
<emphasis><literal>lowest highest</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
An integer between
|
||||
<emphasis><literal>lowest</literal></emphasis> and
|
||||
<emphasis><literal>highest</literal></emphasis> (both
|
||||
inclusive). Useful for creating types like
|
||||
<literal>types.port</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.submodule</literal>
|
||||
@@ -345,8 +414,6 @@
|
||||
in composed types to create modular options. This is
|
||||
equivalent to
|
||||
<literal>types.submoduleWith { modules = toList o; shorthandOnlyDefinesConfig = true; }</literal>.
|
||||
Submodules are detailed in
|
||||
<link linkend="section-option-types-submodule">Submodule</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -467,7 +534,7 @@
|
||||
</variablelist>
|
||||
</section>
|
||||
<section xml:id="sec-option-types-composed">
|
||||
<title>Composed Types</title>
|
||||
<title>Composed types</title>
|
||||
<para>
|
||||
Composed types are types that take a type as parameter.
|
||||
<literal>listOf int</literal> and
|
||||
@@ -850,7 +917,7 @@ nixThings = mkOption {
|
||||
</variablelist>
|
||||
</section>
|
||||
<section xml:id="sec-option-types-custom">
|
||||
<title>Custom Types</title>
|
||||
<title>Custom types</title>
|
||||
<para>
|
||||
Custom types can be created with the
|
||||
<literal>mkOptionType</literal> function. As type creation
|
||||
|
||||
@@ -26,7 +26,7 @@ with lib;
|
||||
|
||||
# Provide networkmanager for easy wireless configuration.
|
||||
networking.networkmanager.enable = true;
|
||||
networking.wireless.enable = mkForce false;
|
||||
networking.wireless.enable = mkImageMediaOverride false;
|
||||
|
||||
# KDE complains if power management is disabled (to be precise, if
|
||||
# there is no power management backend such as upower).
|
||||
|
||||
@@ -22,10 +22,10 @@ with lib;
|
||||
config = {
|
||||
|
||||
# Enable in installer, even if the minimal profile disables it.
|
||||
documentation.enable = mkForce true;
|
||||
documentation.enable = mkImageMediaOverride true;
|
||||
|
||||
# Show the manual.
|
||||
documentation.nixos.enable = mkForce true;
|
||||
documentation.nixos.enable = mkImageMediaOverride true;
|
||||
|
||||
# Use less privileged nixos user
|
||||
users.users.nixos = {
|
||||
@@ -41,7 +41,7 @@ with lib;
|
||||
# Allow passwordless sudo from nixos user
|
||||
security.sudo = {
|
||||
enable = mkDefault true;
|
||||
wheelNeedsPassword = mkForce false;
|
||||
wheelNeedsPassword = mkImageMediaOverride false;
|
||||
};
|
||||
|
||||
# Automatically log in at the virtual consoles.
|
||||
|
||||
@@ -43,8 +43,10 @@ in
|
||||
format = pkgs.formats.toml { };
|
||||
conf = format.generate "vector.toml" cfg.settings;
|
||||
validateConfig = file:
|
||||
pkgs.runCommand "validate-vector-conf" { } ''
|
||||
${pkgs.vector}/bin/vector validate --no-environment "${file}"
|
||||
pkgs.runCommand "validate-vector-conf" {
|
||||
nativeBuildInputs = [ pkgs.buildPackages.vector ];
|
||||
} ''
|
||||
vector validate --no-environment "${file}"
|
||||
ln -s "${file}" "$out"
|
||||
'';
|
||||
in
|
||||
|
||||
@@ -628,18 +628,18 @@ in {
|
||||
};
|
||||
allowedDomains = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
To limit access to authenticated users who are members of one or more groups,
|
||||
set allowedGroups to a comma- or space-separated list of group object IDs.
|
||||
You can find object IDs for a specific group on the Azure portal.
|
||||
Limits access to users who belong to specific domains.
|
||||
Separate domains with space or comma.
|
||||
'';
|
||||
default = "";
|
||||
type = types.str;
|
||||
};
|
||||
allowedGroups = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Limits access to users who belong to specific domains.
|
||||
Separate domains with space or comma.
|
||||
'';
|
||||
To limit access to authenticated users who are members of one or more groups,
|
||||
set allowedGroups to a comma- or space-separated list of group object IDs.
|
||||
You can find object IDs for a specific group on the Azure portal.
|
||||
'';
|
||||
default = "";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
@@ -325,11 +325,12 @@ in {
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = types.enum [ "sendreceive" "sendonly" "receiveonly" ];
|
||||
type = types.enum [ "sendreceive" "sendonly" "receiveonly" "receiveencrypted" ];
|
||||
default = "sendreceive";
|
||||
description = lib.mdDoc ''
|
||||
Whether to only send changes for this folder, only receive them
|
||||
or both.
|
||||
or both. `receiveencrypted` can be used for untrusted devices. See
|
||||
<https://docs.syncthing.net/users/untrusted.html> for reference.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -11,15 +11,6 @@ let
|
||||
addCheck (listOf x) (y: length y == 2)
|
||||
// { description = "pair of ${x.description}"; };
|
||||
|
||||
floatBetween = a: b: with types;
|
||||
let
|
||||
# toString prints floats with hardcoded high precision
|
||||
floatToString = f: builtins.toJSON f;
|
||||
in
|
||||
addCheck float (x: x <= b && x >= a)
|
||||
// { description = "a floating point number in " +
|
||||
"range [${floatToString a}, ${floatToString b}]"; };
|
||||
|
||||
mkDefaultAttrs = mapAttrs (n: v: mkDefault v);
|
||||
|
||||
# Basically a tinkered lib.generators.mkKeyValueDefault
|
||||
@@ -93,7 +84,7 @@ in {
|
||||
};
|
||||
|
||||
fadeSteps = mkOption {
|
||||
type = pairOf (floatBetween 0.01 1);
|
||||
type = pairOf (types.numbers.between 0.01 1);
|
||||
default = [ 0.028 0.03 ];
|
||||
example = [ 0.04 0.04 ];
|
||||
description = lib.mdDoc ''
|
||||
@@ -133,7 +124,7 @@ in {
|
||||
};
|
||||
|
||||
shadowOpacity = mkOption {
|
||||
type = floatBetween 0 1;
|
||||
type = types.numbers.between 0 1;
|
||||
default = 0.75;
|
||||
example = 0.8;
|
||||
description = lib.mdDoc ''
|
||||
@@ -156,7 +147,7 @@ in {
|
||||
};
|
||||
|
||||
activeOpacity = mkOption {
|
||||
type = floatBetween 0 1;
|
||||
type = types.numbers.between 0 1;
|
||||
default = 1.0;
|
||||
example = 0.8;
|
||||
description = lib.mdDoc ''
|
||||
@@ -165,7 +156,7 @@ in {
|
||||
};
|
||||
|
||||
inactiveOpacity = mkOption {
|
||||
type = floatBetween 0.1 1;
|
||||
type = types.numbers.between 0.1 1;
|
||||
default = 1.0;
|
||||
example = 0.8;
|
||||
description = lib.mdDoc ''
|
||||
@@ -174,7 +165,7 @@ in {
|
||||
};
|
||||
|
||||
menuOpacity = mkOption {
|
||||
type = floatBetween 0 1;
|
||||
type = types.numbers.between 0 1;
|
||||
default = 1.0;
|
||||
example = 0.8;
|
||||
description = lib.mdDoc ''
|
||||
|
||||
@@ -1411,7 +1411,7 @@ let
|
||||
|
||||
ipv6RoutePrefixes = mkOption {
|
||||
default = [];
|
||||
example = [ { Route = "fd00::/64"; LifetimeSec = 3600; } ];
|
||||
example = [ { ipv6RoutePrefixConfig = { Route = "fd00::/64"; LifetimeSec = 3600; }; } ];
|
||||
type = with types; listOf (submodule ipv6RoutePrefixOptions);
|
||||
description = ''
|
||||
A list of ipv6RoutePrefix sections to be added to the unit. See
|
||||
|
||||
@@ -1,40 +1,11 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config
|
||||
, alsa-lib, asio, avahi, boost17x, flac, libogg, libvorbis, soxr
|
||||
, aixlog, popl
|
||||
, pulseaudioSupport ? false, libpulseaudio
|
||||
, nixosTests }:
|
||||
|
||||
assert pulseaudioSupport -> libpulseaudio != null;
|
||||
|
||||
let
|
||||
|
||||
dependency = { name, version, sha256 }:
|
||||
stdenv.mkDerivation {
|
||||
name = "${name}-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "badaix";
|
||||
repo = name;
|
||||
rev = "v${version}";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
};
|
||||
|
||||
aixlog = dependency {
|
||||
name = "aixlog";
|
||||
version = "1.5.0";
|
||||
sha256 = "09mnkrans9zmwfxsiwgkm0rba66c11kg5zby9x3rjic34gnmw6ay";
|
||||
};
|
||||
|
||||
popl = dependency {
|
||||
name = "popl";
|
||||
version = "1.2.0";
|
||||
sha256 = "1z6z7fwffs3d9h56mc2m24d5gp4fc5bi8836zyfb276s6fjyfcai";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "snapcast";
|
||||
version = "0.26.0";
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "genact";
|
||||
version = "0.12.0";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "svenstaro";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ouDaOs72vivJBZVwcJhv4YoPKQOEBctUTqubvrpoBtI=";
|
||||
sha256 = "sha256-sKFI7r0mwmzKiHy9HmskS10M5v/jZj/VeO4F9ZQl2g0=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-csubycZaBUHPp8XJ1C+nWw7DzVGVJm38/Dgw41qUMYQ=";
|
||||
cargoSha256 = "sha256-79IC51xdkelgsRJF+rz9UOTfrJ/HS6PbkyxySe0Qk4Q=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A nonsense activity generator";
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "gnome-frog";
|
||||
version = "1.1.3";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TenderOwl";
|
||||
repo = "Frog";
|
||||
rev = version;
|
||||
sha256 = "sha256-yOjfiGJUU25zb/4WprPU59yDAMpttS3jREp1kB5mXUE=";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-AJ6pFtTM4ViZ9dB41wzHoPSHDdmu+SOzD5fkoAiRLzQ=";
|
||||
};
|
||||
|
||||
format = "other";
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "argocd-autopilot";
|
||||
version = "0.4.6";
|
||||
version = "0.4.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "argoproj-labs";
|
||||
repo = "argocd-autopilot";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-qlxs0dafmGbJdsBgFJGpaEkcKVyOoSeiQknqzJwUs8A=";
|
||||
sha256 = "sha256-aC3U9Qeahji3xSuJWuMlf2TzKEqPDAOuB52A4Om/fRU=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-ujDtfDL1VWe4XjTHD+pXMmMFp0AiuZcE+CKRkMsiv9Q=";
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "glooctl";
|
||||
version = "1.12.11";
|
||||
version = "1.12.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "solo-io";
|
||||
repo = "gloo";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-vG1FSBHXaJBJk9dC61yZK1Vkr8PyQ7Q4TVZWRIsDY3E=";
|
||||
hash = "sha256-aQUN1T6AH1TRj2pPkNFoS5Fmo3NPmmiEXFZfFeXtN1w=";
|
||||
};
|
||||
|
||||
subPackages = [ "projects/gloo/cli/cmd" ];
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
{ lib, stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchFromGitLab }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mafft";
|
||||
version = "7.505";
|
||||
version = "7.508";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://mafft.cbrc.jp/alignment/software/mafft-${version}-with-extensions-src.tgz";
|
||||
sha256 = "sha256-9Up4Zw/NmWAjO8w7PdNZ85WnHAztRae+HP6uGZUM5v8=";
|
||||
src = fetchFromGitLab {
|
||||
owner = "sysimm";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-XQllmTgLntCBUFJzV2HL4f4oMilcUVTRgcfeZBdD5c0=";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "ani-cli";
|
||||
version = "3.3";
|
||||
version = "3.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pystardust";
|
||||
repo = "ani-cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-khgErF/1DmqnXmTUvTYWuyUAos6aUghImgXp3NjOZEg=";
|
||||
sha256 = "sha256-Xb7MNL7YKbvyRR5ZppUfCYeYpjNAiJWNOjIFk5fUvpY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "v2ray-geoip";
|
||||
version = "202208180100";
|
||||
version = "202209080101";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "v2fly";
|
||||
repo = "geoip";
|
||||
rev = "005c33be4dd95339596ddd5ce792e8f97dd168a3";
|
||||
sha256 = "sha256-KvEmgtbelZOauE2WBTzJkwJkaUVW2x8ezgmTE+Gbwu8=";
|
||||
rev = "2e77e5d149f0a8f9c284333b206d0f017b0b66ef";
|
||||
sha256 = "sha256-vkWRBSwLpCqZWMlfwOyPWn2MF+/lG+VXnSrDCSR+dak=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "aixlog";
|
||||
version = "1.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "badaix";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Xhle7SODRZlHT3798mYIzBi1Mqjz8ai74/UnbVWetiY=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm644 $src/include/aixlog.hpp $out/include/aixlog.hpp
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Header-only C++ logging library";
|
||||
homepage = "https://github.com/badaix/aixlog";
|
||||
changelog = "https://github.com/badaix/aixlog/releases/tag/${src.rev}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ azahi ];
|
||||
};
|
||||
}
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cpp-utilities";
|
||||
version = "5.18.0";
|
||||
version = "5.19.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Martchus";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-i/ihEPJHyWzRywzpXhYpauA8lL51yjoiWod8Nc/6gV0=";
|
||||
sha256 = "sha256-sygt30x5S2n24ONMBRzNyLZcnl4hM4tUFpX/Yx6ZSMM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, gflags, perl }:
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, gflags, gtest, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glog";
|
||||
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ gtest ];
|
||||
|
||||
propagatedBuildInputs = [ gflags ];
|
||||
|
||||
cmakeFlags = [
|
||||
@@ -25,6 +27,17 @@ stdenv.mkDerivation rec {
|
||||
enableParallelChecking = false;
|
||||
checkInputs = [ perl ];
|
||||
|
||||
GTEST_FILTER =
|
||||
let
|
||||
filteredTests = lib.optionals stdenv.hostPlatform.isMusl [
|
||||
"Symbolize.SymbolizeStackConsumption"
|
||||
"Symbolize.SymbolizeWithDemanglingStackConsumption"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isStatic [
|
||||
"LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled"
|
||||
];
|
||||
in
|
||||
lib.optionalString doCheck "-${builtins.concatStringsSep ":" filteredTests}";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/google/glog";
|
||||
license = licenses.bsd3;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "popl";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "badaix";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-AkqFRPK0tVdalL+iyMou0LIUkPkFnYYdSqwEbFbgzqI=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm644 $src/include/popl.hpp $out/include/popl.hpp
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Header-only C++ program options parser library";
|
||||
homepage = "https://github.com/badaix/popl";
|
||||
changelog = "https://github.com/badaix/popl/releases/tag/${src.rev}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ azahi ];
|
||||
};
|
||||
}
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rapidfuzz-cpp";
|
||||
version = "1.2.0";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "maxbachmann";
|
||||
repo = "rapidfuzz-cpp";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-S92ookWpQ4OW53oYXPiCokUchI+47CILDR5RXxPJbmU=";
|
||||
hash = "sha256-LhMubYSq5EO4Pup+mVPQpcXwur/bPz+NZ1CcyqDt6lM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "casbin";
|
||||
version = "1.17.0";
|
||||
version = "1.17.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||
owner = pname;
|
||||
repo = "pycasbin";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-fBMhrA4zL4XPjQ63AGc5jf585ZpHTBumPievDNfCw7o=";
|
||||
hash = "sha256-uh5XPhLoCnJtVnEDG+/oQvneEL1KLMWfAx+RXH/GCyE=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ignite";
|
||||
version = "0.4.9";
|
||||
version = "0.4.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pytorch";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-KBEoMV9lwlEra4DiGDLgPb85+HrnK4Qiy3XYDa9hO3s=";
|
||||
sha256 = "sha256-mMiEVenDBNmeXMrDSZamUpnSm+4BQEgfK89zxIaFMio=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook matplotlib mock pytest-xdist torchvision ];
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "itemloaders";
|
||||
version = "1.0.5";
|
||||
version = "1.0.6";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@@ -19,8 +19,8 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "scrapy";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ueq1Rsuae+wz4eFc1O7luBVR4XWGbefpDr124H6j56g=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-ZzpWIJNDve6SvLDb+QUDVSXUfJabFuRwtyBeCUasUgY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mne-python";
|
||||
version = "1.1.0";
|
||||
version = "1.1.1";
|
||||
|
||||
# PyPI dist insufficient to run tests
|
||||
src = fetchFromGitHub {
|
||||
owner = "mne-tools";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-p4brwO6uERM2vJdkJ34GdeAKk07QeVEmQrZMPcDjI2I=";
|
||||
sha256 = "sha256-VM7sKcQeAeK20r4/jehhGlvBSHhYwA2SgsNL5Oa/Hug=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pymetno";
|
||||
version = "0.9.0";
|
||||
version = "0.10.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Danielhiversen";
|
||||
repo = "PyMetno";
|
||||
rev = version;
|
||||
sha256 = "sha256-2LNDFQObGqxrzswnqbmvCGLxEI0j+cIdv8o+RZM/7sM=";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-Do9RQS4gE2BapQtKQsnMzJ8EJzzxkCBA5r3z1zHXIsA=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "bazelisk";
|
||||
version = "1.13.2";
|
||||
version = "1.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bazelbuild";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-/6px3S03HJ5W03phGzJTzZ0ROcfA9eKXP+xfBrix1DM=";
|
||||
sha256 = "sha256-y3DVU2xHYZGUqf+kXhBDpTHACloqOXiMFY9bWU/QfOg=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-JJdFecRjPVmpYjDmz+ZBDmyT3Vj41An3BXvI2JzisIg=";
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
nixosTests }:
|
||||
buildGoModule rec {
|
||||
pname = "buildkite-agent";
|
||||
version = "3.38.0";
|
||||
version = "3.39.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "buildkite";
|
||||
repo = "agent";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-W93yvdyfk6niSZ/usiOp6Yb8tFgEuC3UmJI6zDEHsFY=";
|
||||
sha256 = "sha256-wEi14Iax155S2tr+Qxa3figXPDKKIdFcwDYv/nsLScQ=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-n+n+Fank/L8mVCB7ulVXJkpJpr65ELirtBqScot2ANM=";
|
||||
vendorSha256 = "sha256-RD8BXwzrqHwgxdjpL++a9pIvzD9rfSTqguRVh+CbbnE=";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bootstrap/shell/shell.go --replace /bin/bash ${bash}/bin/bash
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "ddosify";
|
||||
version = "0.8.2";
|
||||
version = "0.8.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-GvRooRsSLny+KZcro/rmagp4QAt4U52THiqTWqdvhK8=";
|
||||
sha256 = "sha256-Mv56NpzDBsqzHwUkqL6d828E3hVrNT9FXLL6IqWJYeQ=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-mq82KNa01gHvW+RUREra+ysaJ1YWIwX0v/uYMxmFN4M=";
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gopls";
|
||||
version = "0.9.4";
|
||||
version = "0.9.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "tools";
|
||||
rev = "gopls/v${version}";
|
||||
sha256 = "sha256-4bhKNMhC8kLRpS5DR6tLF7MgDX4LDeSKoeXcPYC2ywE=";
|
||||
sha256 = "sha256-kDO7Sxz2pqZZBG2eGAWyh9UTAoYLzkAn86qh9LdepoU=";
|
||||
};
|
||||
|
||||
modRoot = "gopls";
|
||||
vendorSha256 = "sha256-r7XM7VX0VzFlUqrtvaQaiUXXiD1Vz4C3hmxRMonORAw=";
|
||||
vendorSha256 = "sha256-ny+gD3ZXp6ZncWJtpW9fprYojQBkIUL+FEKp/7K5rrU=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
||||
@@ -1,22 +1,33 @@
|
||||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, openssl, pkg-config, libiconv, curl }:
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, libgit2
|
||||
, openssl
|
||||
, stdenv
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-generate";
|
||||
version = "0.14.0";
|
||||
version = "0.16.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ashleygwilliams";
|
||||
owner = "cargo-generate";
|
||||
repo = "cargo-generate";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-OYYGOB1NfNnOl8bd8KozgMCyW4Gb39LoFtD80DPzpdw=";
|
||||
sha256 = "sha256-qL5ZbLimpsi/7yuhubHF3/tAouE/5zCWRx4nZG841cU=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-qmRKjPhPLpzVVuTHuoo0iTlX3BnT2Udo1kFXvA3zNQE=";
|
||||
# patch Cargo.toml to not vendor libgit2 and openssl
|
||||
cargoPatches = [ ./no-vendor.patch ];
|
||||
|
||||
cargoSha256 = "sha256-OB3rjJNxkUKRQPsWRvCniNPfYBgLFV4yXO7dnVvL7wo=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security libiconv curl ];
|
||||
buildInputs = [ libgit2 openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d) USER=nixbld
|
||||
@@ -32,8 +43,9 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
meta = with lib; {
|
||||
description = "cargo, make me a project";
|
||||
homepage = "https://github.com/ashleygwilliams/cargo-generate";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
homepage = "https://github.com/cargo-generate/cargo-generate";
|
||||
changelog = "https://github.com/cargo-generate/cargo-generate/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ figsoda turbomack ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -10,7 +10,7 @@ include = ["src/**/*", "LICENSE-*", "*.md"]
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.2", features = ["derive", "std"], default-features = false }
|
||||
-git2 = { version = "0.14", features = ["ssh", "https", "vendored-libgit2", "vendored-openssl"], default-features = false }
|
||||
+git2 = { version = "0.14", features = ["ssh", "https"], default-features = false }
|
||||
console = "0.15"
|
||||
dialoguer = "0.10"
|
||||
dirs = "4.0"
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-public-api";
|
||||
version = "0.18.0";
|
||||
version = "0.19.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-h5eLJyrk5n2lSSeAT6YHDALay7CsN/xApl3j0s3pIjc=";
|
||||
sha256 = "sha256-gtqPt59jA4NhbaE9ij45oFEaAJ+l984lWEjloQtBSSE=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-1zt3q04LPER+Kvp6EQHziWzYeckFYO9MmPRlHto2Juo=";
|
||||
cargoSha256 = "sha256-j0bsuu+A5oCf+0pFM4PAQ3oqq9POc5rrzt5UR0RDnAw=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "yq-go";
|
||||
version = "4.27.3";
|
||||
version = "4.27.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mikefarah";
|
||||
repo = "yq";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-JEIKkiqVkzSXyZBAcZASHkn8MKoFZe52vKqrdJ4kX+I=";
|
||||
sha256 = "sha256-ZUrpmGNrLJuslcHXWERxNQBfUYutXaCSq13ajFy+D28=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-yv/qft4KpGi4xDfaQoylq1TanATUz5wd3a6RBlILG+s=";
|
||||
vendorSha256 = "sha256-4J/Qz5JN8UUdwa3/Io2/o4Y01eFK9zOcNAZkndzI178=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "valum";
|
||||
version = "0.3.17";
|
||||
version = "0.3.18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "valum-framework";
|
||||
repo = "valum";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-GpzFtr6MueHGHA6BEc24oGSfjxyHxIlL52cq+0gmBAI=";
|
||||
sha256 = "sha256-baAv83YiX8HdBm/t++ktB7pmTVlt4aWZ5xnsAs/NrTI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config ];
|
||||
|
||||
@@ -523,12 +523,12 @@ in rec {
|
||||
tmux-fzf = mkTmuxPlugin {
|
||||
pluginName = "tmux-fzf";
|
||||
rtpFilePath = "main.tmux";
|
||||
version = "unstable-2021-10-20";
|
||||
version = "unstable-2022-08-02";
|
||||
src = fetchFromGitHub {
|
||||
owner = "sainnhe";
|
||||
repo = "tmux-fzf";
|
||||
rev = "1801dd525b39154745ea668fb6916035023949e3";
|
||||
sha256 = "e929Jqletmobp3WAR1tPU3pJuYTYVynxc5CvB80gig8=";
|
||||
rev = "3e261309ad367c3fe56c0ef14af00078684b1035";
|
||||
sha256 = "13wlcq3f7944v74lcnfbmabcy2c0ca83ya21s3qn3j0lw3wqj6vj";
|
||||
};
|
||||
postInstall = ''
|
||||
find $target -type f -print0 | xargs -0 sed -i -e 's|fzf |${pkgs.fzf}/bin/fzf |g'
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "nginx_exporter";
|
||||
version = "0.10.0";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nginxinc";
|
||||
repo = "nginx-prometheus-exporter";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-k9sbMIn5N3EJ7ZlfmD9pRV6lfywnKyFvpxC/pGGgNTA=";
|
||||
sha256 = "sha256-glKjScJoJnFEm7Z9LAVF51haeyHB3wQ946U8RzJXs3k=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-SaaHbn97cb/d8symyrBYLzK+5ukVLfGrFiRIz+tKPhw=";
|
||||
vendorSha256 = "sha256-YyMySHnrjBHm3hRNJDwWBs86Ih4S5DONYuwlQ3FBjkA=";
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "piping-server-rust";
|
||||
version = "0.14.0";
|
||||
version = "0.14.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nwtgck";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ON3/GaDwQ9DtApRZuYClZWzFhmiLi988jIBvl0DgYSM=";
|
||||
sha256 = "sha256-QgOrKAPLphvIMqcOrbYuo4ra65IV8dK5+6tyh+YyyP4=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-rc3VTJllDu4oIFcswCNUJejJHzC2PoJJV9EU5fOC7fQ=";
|
||||
cargoSha256 = "sha256-Nd+Frhospp6ERYFuxzEzKbkLAFqTv7Lp7MWwv09S+KA=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security ];
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "tailscale";
|
||||
version = "1.30.0";
|
||||
version = "1.30.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tailscale";
|
||||
repo = "tailscale";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-KruBCpJe6RhQYxNopj7ZZlZZy/UYtO1vQMvHxUgw0P8=";
|
||||
sha256 = "sha256-sR1DB8Hc/JkCFaoj9FRRJhTeUWWoGUee2kx0EreUbWE=";
|
||||
};
|
||||
vendorSha256 = "sha256-+7Cr7wmt4PheHJRAlyKhRd6QRIZBqrbVtn5I94h8lLo=";
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@ let
|
||||
in
|
||||
py.pkgs.buildPythonApplication rec {
|
||||
pname = "netbox";
|
||||
version = "3.3.0";
|
||||
version = "3.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "netbox-community";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-tdl3A5l8CDNdVpNMKHg31QJoQSdr1v0COTcX33Sh7nc=";
|
||||
sha256 = "sha256-G7d9CG7mxdtdShWOdbbcWTVD3qrTKjh7j3MX/cTJbPw=";
|
||||
};
|
||||
|
||||
format = "other";
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "carapace";
|
||||
version = "0.8.10";
|
||||
version = "0.15.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rsteube";
|
||||
repo = "${pname}-bin";
|
||||
rev = "v${version}";
|
||||
sha256 = "0j60fvrmjm4440gj9hib2ar386zxcblw7yifigsnchr7p3i2187n";
|
||||
sha256 = "sha256-3ZWYEfssGq6fBoHrDsp6yvkB9TLF+heELEIbZ1TN2lI=";
|
||||
};
|
||||
|
||||
vendorSha256 = "1s1sws79cyz1rl63wayzf7yhb04x29a4a1mkifqnl4cc2pv806jf";
|
||||
vendorSha256 = "sha256-OrbVqCgsVX5b5knN6IdlJBWeGfg2fh09a2xe5+2EGEs=";
|
||||
|
||||
subPackages = [ "./cmd/carapace" ];
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
in
|
||||
optionalString (conf != null) "cp ${configFile} config.h";
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
makeFlags = [ "CC:=$(CC)" "PREFIX=$(out)" ];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "boulder";
|
||||
version = "2022-08-29";
|
||||
version = "2022-09-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "letsencrypt";
|
||||
@@ -19,7 +19,7 @@ buildGoModule rec {
|
||||
git rev-parse --short=8 HEAD 2>/dev/null >$out/COMMIT
|
||||
find "$out" -name .git -print0 | xargs -0 rm -rf
|
||||
'';
|
||||
hash = "sha256-DiO7sOcTd8aOld4Pqd0D7yTPrRh/Mhg25I63Vb/gHhM=";
|
||||
hash = "sha256-BteHJAjIMPckbNIxgZCSSZV2iUc/yKVd0Px+S9ZwwUI=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "argyllcms";
|
||||
version = "2.3.0";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchzip {
|
||||
# Kind of flacky URL, it was reaturning 406 and inconsistent binaries for a
|
||||
# while on me. It might be good to find a mirror
|
||||
url = "https://www.argyllcms.com/Argyll_V${version}_src.zip";
|
||||
sha256 = "sha256-UNjCcqJgbRSox55OP3pLdKFHY0NPLHEq3nwqvxWre7U=";
|
||||
sha256 = "sha256-XWsubjdD1tg0o7x/aoAalemAChehWkwh4fkP2WRvhAw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ jam unzip ];
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "hyperfine";
|
||||
version = "1.14.0";
|
||||
version = "1.15.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-3DDgh/0iD1LJEPjicLtHcs9PMso/Wv+3vlkWfdJlpIM=";
|
||||
sha256 = "sha256-JJ4sEwe2fXOGlofJ9SkXEllMCMhn7MSJ+H3aAF0F0zk=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-VkB6KJUi5PACpjrK/OJ5tmroJJVnDxhZAQzSWkrtuCU=";
|
||||
cargoSha256 = "sha256-3xOh51rUnQcUfQ+asurbfNYTb5dWQO5YY/AbGRV+26w=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
@@ -1212,6 +1212,8 @@ with pkgs;
|
||||
|
||||
airwindows-lv2 = callPackage ../applications/audio/airwindows-lv2 { };
|
||||
|
||||
aixlog = callPackage ../development/libraries/aixlog { };
|
||||
|
||||
aj-snapshot = callPackage ../applications/audio/aj-snapshot { };
|
||||
|
||||
ajour = callPackage ../tools/games/ajour {
|
||||
@@ -1908,6 +1910,8 @@ with pkgs;
|
||||
|
||||
pikchr = callPackage ../tools/graphics/pikchr { };
|
||||
|
||||
popl = callPackage ../development/libraries/popl { };
|
||||
|
||||
popsicle = callPackage ../tools/misc/popsicle { };
|
||||
|
||||
terminal-colors = callPackage ../applications/misc/terminal-colors { };
|
||||
@@ -23535,10 +23539,7 @@ with pkgs;
|
||||
};
|
||||
prometheus-nextcloud-exporter = callPackage ../servers/monitoring/prometheus/nextcloud-exporter.nix { };
|
||||
prometheus-nginx-exporter = callPackage ../servers/monitoring/prometheus/nginx-exporter.nix { };
|
||||
prometheus-nginxlog-exporter = callPackage ../servers/monitoring/prometheus/nginxlog-exporter.nix {
|
||||
# pinned due to build failure or vendoring problems. When unpinning double check with: nix-build -A $name.go-modules --rebuild
|
||||
buildGoModule = buildGo117Module;
|
||||
};
|
||||
prometheus-nginxlog-exporter = callPackage ../servers/monitoring/prometheus/nginxlog-exporter.nix { };
|
||||
prometheus-node-exporter = callPackage ../servers/monitoring/prometheus/node-exporter.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation IOKit;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user