Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 62d86db57290
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5e9d926fa3fe
Choose a head ref

Commits on Nov 25, 2019

  1. Copy the full SHA
    bf38db9 View commit details

Commits on Dec 24, 2019

  1. tautulli: 2.1.38 -> 2.1.39

    r-ryantm committed Dec 24, 2019
    Copy the full SHA
    a0d1a7f View commit details

Commits on Jan 1, 2020

  1. cascadia-code: add variants

    marsam committed Jan 1, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    marsam Mario Rodas
    Copy the full SHA
    f55358f View commit details

Commits on Jan 6, 2020

  1. pkgs/misc/cups/drivers: add brother mfcl3770cdw

    This adds the printer driver for the Brother MFCL3770CDW.
    It combines the cups-wrapper and the driver in one file which allows
    sharing common variables and making it less error-prone than the other
    Brother drivers in repository.
    
    I volunteer for maintaining this one as long as I've got the model
    around.
    steveej committed Jan 6, 2020
    Copy the full SHA
    64b2dc8 View commit details

Commits on Jan 7, 2020

  1. Copy the full SHA
    141aa22 View commit details

Commits on Jan 8, 2020

  1. Copy the full SHA
    b8fa6dd View commit details

Commits on Jan 12, 2020

  1. Copy the full SHA
    f0baa13 View commit details

Commits on Jan 15, 2020

  1. Copy the full SHA
    26165d9 View commit details

Commits on Jan 17, 2020

  1. snabb: 2018.01.2 -> 2019.11

    r-ryantm committed Jan 17, 2020
    Copy the full SHA
    153934a View commit details
  2. Copy the full SHA
    354bcfe View commit details

Commits on Jan 18, 2020

  1. solr: drop 7.x series

    aanderse committed Jan 18, 2020
    Copy the full SHA
    acd9e87 View commit details
  2. solr: specify NixOS test

    aanderse committed Jan 18, 2020
    Copy the full SHA
    19185c5 View commit details
  3. solr: 8.4.0 -> 8.4.1

    aanderse committed Jan 18, 2020
    Copy the full SHA
    1093736 View commit details

Commits on Jan 19, 2020

  1. motion: 4.2.2 -> 4.3.0

    veprbl committed Jan 19, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    veprbl Dmitry Kalinkin
    Copy the full SHA
    115e7e5 View commit details

Commits on Jan 21, 2020

  1. Copy the full SHA
    62af780 View commit details
  2. vertcoin: init at 0.14.0

    mmahut committed Jan 21, 2020
    Copy the full SHA
    099a5ae View commit details
  3. digibyte: init at 7.17.2

    mmahut committed Jan 21, 2020
    Copy the full SHA
    d43fb5a View commit details
  4. guitarix: 0.38.1 -> 0.39.0

    r-ryantm committed Jan 21, 2020
    Copy the full SHA
    6d0b9e2 View commit details
  5. libieee1284: init at 0.2.11

    romildo committed Jan 21, 2020
    Copy the full SHA
    1dfb57f View commit details
  6. groovy: 2.5.8 -> 2.5.9

    r-ryantm committed Jan 21, 2020
    Copy the full SHA
    48ba125 View commit details
  7. cargo-about: init at 0.1.1

    evanjs committed Jan 21, 2020
    Copy the full SHA
    ac6524d View commit details
  8. jython: 2.7.1 -> 2.7.2b2

    r-ryantm committed Jan 21, 2020
    Copy the full SHA
    8f8c833 View commit details
  9. morph: add openssh to PATH

    Jan Hrnko committed Jan 21, 2020
    Copy the full SHA
    7ccb1db View commit details
  10. homebank: 5.2.8 -> 5.3.1

    r-ryantm committed Jan 21, 2020
    Copy the full SHA
    b5b28ec View commit details
  11. libjpeg_original: 9c -> 9d

    r-ryantm committed Jan 21, 2020
    Copy the full SHA
    beb1b9f View commit details
  12. languagetool: 4.7 -> 4.8

    r-ryantm committed Jan 21, 2020
    Copy the full SHA
    be5c936 View commit details
  13. pypi2nix: 2.0.3 -> 2.0.4

    seppeljordan committed Jan 21, 2020
    Copy the full SHA
    5de2bff View commit details
  14. libpst: 0.6.72 -> 0.6.74

    r-ryantm committed Jan 21, 2020
    Copy the full SHA
    51b26d4 View commit details

Commits on Jan 22, 2020

  1. Copy the full SHA
    9bc0693 View commit details
  2. pdsh: 2.33 -> 2.34

    r-ryantm committed Jan 22, 2020
    Copy the full SHA
    cc72671 View commit details
  3. Copy the full SHA
    c9c3b9d View commit details
  4. Copy the full SHA
    4dc3337 View commit details
  5. Copy the full SHA
    07b977d View commit details

Commits on Jan 23, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    yorickvP Yorick
    Copy the full SHA
    23d5d9b View commit details
  2. lib/cli: unexport symbols & sort with generators

    lib/cli is very similar to generators, so it should follow largely the
    same interface. Similar to how generators isn’t exported, we should
    also namespace cli by default (plus “cli” is only three characters to
    type).
    Profpatsch committed Jan 23, 2020
    Copy the full SHA
    88a7f65 View commit details
  3. lib/cli: encodeGNUCommandLine -> toGNUCommandLineShell

    The semantic difference between `encode` and `to` is not apparent.
    Users are likely to confuse both functions (which leads to unexpected
    error messages about the wrong types). Like in `generators.nix`, all
    functions should be prefixed by `to`.
    
    Furthermore, converting to a string depends on the target context. In
    this case, it’s a POSIX shell, so we should name it that (compare
    `escapeShellArg` in `strings.nix`).
    
    We can later add versions that escape for embedding in e.g. python
    scripts or similar.
    Profpatsch committed Jan 23, 2020
    Copy the full SHA
    582354d View commit details
  4. Copy the full SHA
    6841f40 View commit details
  5. Copy the full SHA
    b2654c2 View commit details
  6. lib/cli: rename renderX options to mkX

    Mirrors the naming scheme in `generators.nix`, for consistency.
    
    Also rename `key` to `k` and value to `v` to aid readability to the
    code structure.
    Profpatsch committed Jan 23, 2020
    Copy the full SHA
    e71e1be View commit details
  7. lib/generators: floats are not supported in mkValueStringDefault

    They are cut off after a few decimal places; we cannot in good faith
    define a default string representation with that.
    Profpatsch committed Jan 23, 2020
    Copy the full SHA
    18520b7 View commit details
  8. lib/cli: mkKey -> mkOptionName, use generators.mkValueStringDefault

    Let’s call them by what they are, option names.
    
    `generators.mkValueStringDefault` is a better value string renderer
    than plain `toString`.
    
    Also add docs to all options.
    Profpatsch committed Jan 23, 2020
    Copy the full SHA
    7228a3c View commit details
  9. maintainers: add kraem

    kraem committed Jan 23, 2020

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    89f80c0 View commit details
  10. frama-c: 19.1 -> 20.0

    yrashk committed Jan 23, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    yrashk Yurii Rashkovskii
    Copy the full SHA
    8c54c82 View commit details
  11. rar2fs: init at 1.28.0

    kraem authored and primeos committed Jan 23, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    04bf042 View commit details
  12. unrar: Install all C++ header files into the "dev" output

    This is e.g. required for the rar2fs build [0], which needs at least
    version.hpp, rar.hpp, dllext.hpp, dll.hpp, and headers5.hpp.
    
    At least Gentoo does this as well [1] but most other distributions only
    install dll.hpp or no header files at all.
    
    [0]: NixOS/nixpkgs#78189
    [1]: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-arch/unrar/unrar-5.8.5.ebuild
    primeos committed Jan 23, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    983f39c View commit details

Commits on Jan 24, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    jabranham Alex Branham
    Copy the full SHA
    e206c37 View commit details
  2. Copy the full SHA
    30c2ac9 View commit details
  3. nixos/dokuwiki: init module at 2018-04-22b

    Jan Hrnko committed Jan 24, 2020
    Copy the full SHA
    8bab2de View commit details
  4. zfs: 0.8.2 -> 0.8.3

    sjau committed Jan 24, 2020
    Copy the full SHA
    88de34b View commit details
  5. mill: 0.5.6 -> 0.6.0

    scalavision committed Jan 24, 2020
    Copy the full SHA
    de193e1 View commit details
Showing with 6,012 additions and 4,005 deletions.
  1. +2 −0 .github/CODEOWNERS
  2. +60 −33 lib/cli.nix
  3. +4 −3 lib/default.nix
  4. +3 −0 lib/generators.nix
  5. +31 −15 lib/tests/misc.nix
  6. +28 −0 maintainers/maintainer-list.nix
  7. +5 −1 maintainers/scripts/luarocks-packages.csv
  8. +1 −1 maintainers/scripts/update-luarocks-packages
  9. +1 −0 nixos/modules/module-list.nix
  10. +19 −2 nixos/modules/services/monitoring/prometheus/alertmanager.nix
  11. +1 −1 nixos/modules/services/monitoring/prometheus/exporters/postfix.nix
  12. +2 −10 nixos/modules/services/search/solr.nix
  13. +1 −0 nixos/modules/services/security/vault.nix
  14. +272 −0 nixos/modules/services/web-apps/dokuwiki.nix
  15. +3 −8 nixos/modules/services/x11/desktop-managers/xfce.nix
  16. +1 −0 nixos/tests/all-tests.nix
  17. +29 −0 nixos/tests/dokuwiki.nix
  18. +42 −59 nixos/tests/solr.nix
  19. +2 −2 pkgs/applications/audio/guitarix/default.nix
  20. +32 −0 pkgs/applications/audio/sfizz/default.nix
  21. +3 −3 pkgs/applications/blockchains/bitcoin.nix
  22. +69 −0 pkgs/applications/blockchains/digibyte.nix
  23. +2 −2 pkgs/applications/blockchains/litecoin.nix
  24. +69 −0 pkgs/applications/blockchains/vertcoin.nix
  25. +1 −1 pkgs/applications/editors/eclipse/plugins.nix
  26. +2 −2 pkgs/applications/editors/tiled/default.nix
  27. +96 −0 pkgs/applications/graphics/fluxus/default.nix
  28. +16 −0 pkgs/applications/graphics/fluxus/fix-build.patch
  29. +4 −5 pkgs/applications/graphics/sane/backends/default.nix
  30. +23 −8 pkgs/applications/graphics/sane/backends/generic.nix
  31. +2 −2 pkgs/applications/misc/diff-pdf/default.nix
  32. +2 −2 pkgs/applications/misc/elogind/default.nix
  33. +9 −9 pkgs/applications/networking/browsers/chromium/upstream-info.nix
  34. +2 −2 pkgs/applications/networking/browsers/opera/default.nix
  35. +2 −2 pkgs/applications/networking/flexget/default.nix
  36. +14 −5 pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
  37. +2 −2 pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
  38. +245 −245 pkgs/applications/networking/mailreaders/thunderbird-bin/release_sources.nix
  39. +2 −2 pkgs/applications/networking/mailreaders/thunderbird/default.nix
  40. +2 −2 pkgs/applications/networking/mumble/default.nix
  41. +2 −2 pkgs/applications/office/homebank/default.nix
  42. +24 −19 pkgs/applications/science/chemistry/pymol/default.nix
  43. +2 −2 pkgs/applications/science/math/qalculate-gtk/default.nix
  44. +3 −3 pkgs/applications/video/motion/default.nix
  45. +14 −9 pkgs/applications/video/obs-studio/wlrobs.nix
  46. +4 −3 pkgs/applications/window-managers/weston/default.nix
  47. +33 −12 pkgs/data/fonts/cascadia-code/default.nix
  48. +7 −7 pkgs/data/fonts/jetbrains-mono/default.nix
  49. +2 −2 pkgs/data/misc/hackage/default.nix
  50. +19 −3 pkgs/desktops/xfce/core/xfce4-session/default.nix
  51. +39 −0 pkgs/development/compilers/gavrasm/default.nix
  52. +2 −2 pkgs/development/compilers/openjdk/11.nix
  53. +2 −2 pkgs/development/compilers/purescript/psc-package/default.nix
  54. +2 −2 pkgs/development/compilers/tinygo/default.nix
  55. +28 −5 pkgs/development/haskell-modules/configuration-common.nix
  56. +3 −4 pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
  57. +50 −44 pkgs/development/haskell-modules/configuration-hackage2nix.yaml
  58. +1,803 −1,198 pkgs/development/haskell-modules/hackage-packages.nix
  59. +2 −2 pkgs/development/interpreters/groovy/default.nix
  60. +2 −2 pkgs/development/interpreters/jython/default.nix
  61. +2 −2 pkgs/development/libraries/intel-gmmlib/default.nix
  62. +2 −2 pkgs/development/libraries/libasr/default.nix
  63. +38 −0 pkgs/development/libraries/libieee1284/default.nix
  64. +3 −3 pkgs/development/libraries/libjpeg/default.nix
  65. +2 −2 pkgs/development/libraries/libpst/default.nix
  66. +3 −3 pkgs/development/libraries/libqalculate/default.nix
  67. +5 −1 pkgs/development/libraries/range-v3/default.nix
  68. +2 −2 pkgs/development/libraries/yder/default.nix
  69. +90 −25 pkgs/development/lua-modules/generated-packages.nix
  70. +28 −0 pkgs/development/ocaml-modules/dum/default.nix
  71. +2 −0 pkgs/development/python-modules/altair/default.nix
  72. +1 −0 pkgs/development/python-modules/apache-airflow/default.nix
  73. +43 −0 pkgs/development/python-modules/aria2p/default.nix
  74. +2 −2 pkgs/development/python-modules/asdf/default.nix
  75. +24 −5 pkgs/development/python-modules/llfuse/default.nix
  76. +3 −3 pkgs/development/python-modules/loguru/default.nix
  77. +2 −2 pkgs/development/python-modules/pytesseract/default.nix
  78. +3 −2 pkgs/development/python-modules/python-telegram-bot/default.nix
  79. +9 −0 pkgs/development/python-modules/zodb/default.nix
  80. +7 −7 pkgs/development/r-modules/bioc-packages.nix
  81. +1,753 −1,715 pkgs/development/r-modules/cran-packages.nix
  82. +0 −23 pkgs/development/r-modules/default.nix
  83. +3 −11 pkgs/development/tools/analysis/flow/default.nix
  84. +3 −3 pkgs/development/tools/analysis/frama-c/default.nix
  85. +2 −2 pkgs/development/tools/analysis/snowman/default.nix
  86. +2 −2 pkgs/development/tools/build-managers/mill/default.nix
  87. +2 −2 pkgs/development/tools/build-managers/sbt/default.nix
  88. +3 −3 pkgs/development/tools/misc/luarocks/luarocks-nix.nix
  89. +3 −3 pkgs/development/tools/profiling/heaptrack/default.nix
  90. +2 −2 pkgs/development/tools/pypi2nix/default.nix
  91. +2 −2 pkgs/development/tools/rust/cargo-xbuild/default.nix
  92. +2 −2 pkgs/development/tools/scalafmt/default.nix
  93. +45 −0 pkgs/development/tools/swiftformat/default.nix
  94. +3 −3 pkgs/games/mindustry/default.nix
  95. +4 −3 pkgs/games/minecraft/default.nix
  96. +38 −0 pkgs/games/pentobi/default.nix
  97. +2 −2 pkgs/misc/arm-trusted-firmware/default.nix
  98. +88 −0 pkgs/misc/cups/drivers/brother/mfcl3770cdw/default.nix
  99. +83 −72 pkgs/misc/vim-plugins/generated.nix
  100. +2 −1 pkgs/misc/vim-plugins/vim-plugin-names
  101. +2 −2 pkgs/os-specific/linux/kernel/linux-5.4.nix
  102. +3 −3 pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
  103. +20 −4 pkgs/os-specific/linux/zfs/default.nix
  104. +0 −3 pkgs/servers/dns/knot-resolver/default.nix
  105. +0 −35 pkgs/servers/search/solr/8.x.nix
  106. +9 −5 pkgs/servers/search/solr/default.nix
  107. +2 −2 pkgs/servers/tautulli/default.nix
  108. +30 −1 pkgs/servers/web-apps/dokuwiki/default.nix
  109. +3 −3 pkgs/servers/x11/xorg/default.nix
  110. +1 −1 pkgs/servers/x11/xorg/tarballs.list
  111. +21 −0 pkgs/tools/X11/xmousepasteblock/default.nix
  112. +4 −4 pkgs/tools/admin/nomachine-client/default.nix
  113. +4 −1 pkgs/tools/archivers/unrar/default.nix
  114. +2 −2 pkgs/tools/audio/video2midi/default.nix
  115. +2 −2 pkgs/tools/backup/borg/default.nix
  116. +39 −0 pkgs/tools/filesystems/rar2fs/default.nix
  117. +2 −2 pkgs/tools/misc/direnv/default.nix
  118. +32 −68 pkgs/tools/misc/execline/default.nix
  119. +7 −0 pkgs/tools/misc/execline/execlineb-wrapper.c
  120. +2 −2 pkgs/tools/misc/plantuml/default.nix
  121. +2 −2 pkgs/tools/misc/termtosvg/default.nix
  122. +3 −3 pkgs/tools/misc/vector/default.nix
  123. +2 −2 pkgs/tools/misc/youtube-dl/default.nix
  124. +2 −2 pkgs/tools/misc/z-lua/default.nix
  125. +2 −2 pkgs/tools/networking/bandwhich/default.nix
  126. +3 −3 pkgs/tools/networking/burpsuite/default.nix
  127. +2 −2 pkgs/tools/networking/dnscrypt-proxy/2.x/default.nix
  128. +1 −1 pkgs/tools/networking/dsniff/default.nix
  129. +242 −169 pkgs/tools/networking/httplz/cargo-lock.patch
  130. +3 −3 pkgs/tools/networking/httplz/default.nix
  131. +2 −2 pkgs/tools/networking/pdsh/default.nix
  132. +2 −2 pkgs/tools/networking/snabb/default.nix
  133. +22 −0 pkgs/tools/package-management/cargo-about/default.nix
  134. +3 −1 pkgs/tools/package-management/morph/default.nix
  135. +31 −0 pkgs/tools/security/enum4linux/default.nix
  136. +2 −2 pkgs/tools/text/languagetool/default.nix
  137. +1 −1 pkgs/tools/text/unoconv/default.nix
  138. +36 −4 pkgs/top-level/all-packages.nix
  139. +2 −0 pkgs/top-level/ocaml-packages.nix
  140. +2 −0 pkgs/top-level/python-packages.nix
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -14,7 +14,9 @@
/lib @edolstra @nbp @infinisil
/lib/systems @nbp @ericson2314 @matthewbauer
/lib/generators.nix @edolstra @nbp @Profpatsch
/lib/cli.nix @edolstra @nbp @Profpatsch
/lib/debug.nix @edolstra @nbp @Profpatsch
/lib/asserts.nix @edolstra @nbp @Profpatsch

# Nixpkgs Internals
/default.nix @nbp
93 changes: 60 additions & 33 deletions lib/cli.nix
Original file line number Diff line number Diff line change
@@ -6,50 +6,77 @@ rec {
This helps protect against malformed command lines and also to reduce
boilerplate related to command-line construction for simple use cases.
Example:
encodeGNUCommandLine
{ }
{ data = builtins.toJSON { id = 0; };
X = "PUT";
retry = 3;
`toGNUCommandLine` returns a list of nix strings.
`toGNUCommandLineShell` returns an escaped shell string.
retry-delay = null;
url = [ "https://example.com/foo" "https://example.com/bar" ];
silent = false;
Example:
cli.toGNUCommandLine {} {
data = builtins.toJSON { id = 0; };
X = "PUT";
retry = 3;
retry-delay = null;
url = [ "https://example.com/foo" "https://example.com/bar" ];
silent = false;
verbose = true;
}
=> [
"-X" "PUT"
"--data" "{\"id\":0}"
"--retry" "3"
"--url" "https://example.com/foo"
"--url" "https://example.com/bar"
"--verbose"
]
verbose = true;
};
=> "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'"
cli.toGNUCommandLineShell {} {
data = builtins.toJSON { id = 0; };
X = "PUT";
retry = 3;
retry-delay = null;
url = [ "https://example.com/foo" "https://example.com/bar" ];
silent = false;
verbose = true;
}
=> "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'";
*/
encodeGNUCommandLine =
toGNUCommandLineShell =
options: attrs: lib.escapeShellArgs (toGNUCommandLine options attrs);

toGNUCommandLine =
{ renderKey ?
key: if builtins.stringLength key == 1 then "-${key}" else "--${key}"
toGNUCommandLine = {
# how to string-format the option name;
# by default one character is a short option (`-`),
# more than one characters a long option (`--`).
mkOptionName ?
k: if builtins.stringLength k == 1
then "-${k}"
else "--${k}",

, renderOption ?
key: value:
if value == null
then []
else [ (renderKey key) (builtins.toString value) ]
# how to format a boolean value to a command list;
# by default it’s a flag option
# (only the option name if true, left out completely if false).
mkBool ? k: v: lib.optional v (mkOptionName k),

, renderBool ? key: value: lib.optional value (renderKey key)
# how to format a list value to a command list;
# by default the option name is repeated for each value
# and `mkOption` is applied to the values themselves.
mkList ? k: v: lib.concatMap (mkOption k) v,

, renderList ? key: value: lib.concatMap (renderOption key) value
# how to format any remaining value to a command list;
# on the toplevel, booleans and lists are handled by `mkBool` and `mkList`,
# though they can still appear as values of a list.
# By default, everything is printed verbatim and complex types
# are forbidden (lists, attrsets, functions). `null` values are omitted.
mkOption ?
k: v: if v == null
then []
else [ (mkOptionName k) (lib.generators.mkValueStringDefault {} v) ]
}:
options:
let
render = key: value:
if builtins.isBool value
then renderBool key value
else if builtins.isList value
then renderList key value
else renderOption key value;
render = k: v:
if builtins.isBool v then mkBool k v
else if builtins.isList v then mkList k v
else mkOption k v;

in
builtins.concatLists (lib.mapAttrsToList render options);
7 changes: 4 additions & 3 deletions lib/default.nix
Original file line number Diff line number Diff line change
@@ -37,11 +37,13 @@ let
licenses = callLibs ./licenses.nix;
systems = callLibs ./systems;

# serialization
cli = callLibs ./cli.nix;
generators = callLibs ./generators.nix;

# misc
asserts = callLibs ./asserts.nix;
cli = callLibs ./cli.nix;
debug = callLibs ./debug.nix;
generators = callLibs ./generators.nix;
misc = callLibs ./deprecated.nix;

# domain-specific
@@ -121,7 +123,6 @@ let
isOptionType mkOptionType;
inherit (asserts)
assertMsg assertOneOf;
inherit (cli) encodeGNUCommandLine toGNUCommandLine;
inherit (debug) addErrorContextToAttrs traceIf traceVal traceValFn
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal
3 changes: 3 additions & 0 deletions lib/generators.nix
Original file line number Diff line number Diff line change
@@ -46,7 +46,10 @@ rec {
else if isList v then err "lists" v
# same as for lists, might want to replace
else if isAttrs v then err "attrsets" v
# functions can’t be printed of course
else if isFunction v then err "functions" v
# let’s not talk about floats. There is no sensible `toString` for them.
else if isFloat v then err "floats" v
else err "this value is" (toString v);


46 changes: 31 additions & 15 deletions lib/tests/misc.nix
Original file line number Diff line number Diff line change
@@ -441,24 +441,40 @@ runTests {
expected = "«foo»";
};

testRenderOptions = {
expr =
encodeGNUCommandLine
{ }
{ data = builtins.toJSON { id = 0; };

X = "PUT";

retry = 3;

retry-delay = null;

url = [ "https://example.com/foo" "https://example.com/bar" ];
# CLI

testToGNUCommandLine = {
expr = cli.toGNUCommandLine {} {
data = builtins.toJSON { id = 0; };
X = "PUT";
retry = 3;
retry-delay = null;
url = [ "https://example.com/foo" "https://example.com/bar" ];
silent = false;
verbose = true;
};

silent = false;
expected = [
"-X" "PUT"
"--data" "{\"id\":0}"
"--retry" "3"
"--url" "https://example.com/foo"
"--url" "https://example.com/bar"
"--verbose"
];
};

verbose = true;
};
testToGNUCommandLineShell = {
expr = cli.toGNUCommandLineShell {} {
data = builtins.toJSON { id = 0; };
X = "PUT";
retry = 3;
retry-delay = null;
url = [ "https://example.com/foo" "https://example.com/bar" ];
silent = false;
verbose = true;
};

expected = "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'";
};
28 changes: 28 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -2405,6 +2405,12 @@
githubId = 415760;
name = "Jonas Höglund";
};
fishi0x01 = {
email = "fishi0x01@gmail.com";
github = "fishi0x01";
githubId = 10799507;
name = "Karl Fischer";
};
Flakebi = {
email = "flakebi@t-online.de";
github = "Flakebi";
@@ -3818,6 +3824,12 @@
githubId = 787421;
name = "Kevin Quick";
};
kraem = {
email = "me@kraem.xyz";
github = "kraem";
githubId = 26622971;
name = "Ronnie Ebrin";
};
kragniz = {
email = "louis@kragniz.eu";
github = "kragniz";
@@ -5431,6 +5443,12 @@
githubId = 3250809;
name = "Milan Pässler";
};
petercommand = {
email = "petercommand@gmail.com";
github = "petercommand";
githubId = 1260660;
name = "petercommand";
};
peterhoeg = {
email = "peter@hoeg.com";
github = "peterhoeg";
@@ -6175,6 +6193,16 @@
githubId = 6022042;
name = "Sam Parkinson";
};
samlich = {
email = "nixos@samli.ch";
github = "samlich";
githubId = 1349989;
name = "samlich";
keys = [{
longkeyid = "rsa4096/B1568953B1939F1C";
fingerprint = "AE8C 0836 FDF6 3FFC 9580 C588 B156 8953 B193 9F1C";
}];
};
samrose = {
email = "samuel.rose@gmail.com";
github = "samrose";
6 changes: 5 additions & 1 deletion maintainers/scripts/luarocks-packages.csv
Original file line number Diff line number Diff line change
@@ -11,13 +11,14 @@ compat53,,,,,vcunat
coxpcall,,,1.17.0-1,,
cqueues,,,,,vcunat
cyrussasl,,,,,vcunat
digestif,,http://luarocks.org/dev,,lua5_3,
digestif,,,,lua5_3,
dkjson,,,,,
fifo,,,,,
http,,,,,vcunat
inspect,,,,,
ldoc,,,,,
lgi,,,,,
linenoise,,,,,
ljsyscall,,,,lua5_1,lblasc
lpeg,,,,,vyp
lpeg_patterns,,,,,
@@ -43,13 +44,15 @@ luadbi-mysql,,,,,
luadbi-postgresql,,,,,
luadbi-sqlite3,,,,,
luadoc,,,,,
luaepnf,,,,,
luaevent,,,,,
luaexpat,,,1.3.0-1,,arobyn flosse
luaffi,,http://luarocks.org/dev,,,
luafilesystem,,,1.7.0-2,,flosse vcunat
lualogging,,,,,
luaossl,,,,lua5_1,vcunat
luaposix,,,,,vyp lblasc
luarepl,,,,,
luasec,,,,,flosse
luasocket,,,,,
luasql-sqlite3,,,,,vyp
@@ -72,3 +75,4 @@ std__debug,std._debug,,,,
std_normalize,std.normalize,,,,
stdlib,,,,,vyp
pulseaudio,,,,,doronbehar
vstruct,,,,,
2 changes: 1 addition & 1 deletion maintainers/scripts/update-luarocks-packages
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export LUAROCKS_CONFIG="$NIXPKGS_PATH/maintainers/scripts/luarocks-config.lua"

# 10 is a pretty arbitrary number of simultaneous jobs, but it is generally
# impolite to hit a webserver with *too* many simultaneous connections :)
PARALLEL_JOBS=10
PARALLEL_JOBS=1

exit_trap() {
local lc="$BASH_COMMAND" rc=$?
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -805,6 +805,7 @@
./services/web-apps/codimd.nix
./services/web-apps/cryptpad.nix
./services/web-apps/documize.nix
./services/web-apps/dokuwiki.nix
./services/web-apps/frab.nix
./services/web-apps/gotify-server.nix
./services/web-apps/icingaweb2/icingaweb2.nix
21 changes: 19 additions & 2 deletions nixos/modules/services/monitoring/prometheus/alertmanager.nix
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ let
in checkedConfig yml;

cmdlineArgs = cfg.extraFlags ++ [
"--config.file ${alertmanagerYml}"
"--config.file /tmp/alert-manager-substituted.yaml"
"--web.listen-address ${cfg.listenAddress}:${toString cfg.port}"
"--log.level ${cfg.logLevel}"
] ++ (optional (cfg.webExternalUrl != null)
@@ -127,6 +127,18 @@ in {
Extra commandline options when launching the Alertmanager.
'';
};

environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/root/alertmanager.env";
description = ''
File to load as environment file. Environment variables
from this file will be interpolated into the config file
using envsubst with this syntax:
<literal>$ENVIRONMENT ''${VARIABLE}</literal>
'';
};
};
};

@@ -144,9 +156,14 @@ in {
systemd.services.alertmanager = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
preStart = ''
${lib.getBin pkgs.envsubst}/bin/envsubst -o /tmp/alert-manager-substituted.yaml" \
-i ${alertmanagerYml}"
'';
serviceConfig = {
Restart = "always";
DynamicUser = true;
DynamicUser = true; # implies PrivateTmp
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
WorkingDirectory = "/tmp";
ExecStart = "${cfg.package}/bin/alertmanager" +
optionalString (length cmdlineArgs != 0) (" \\\n " +
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ in
then "--systemd.slice ${cfg.systemd.slice}"
else "--systemd.unit ${cfg.systemd.unit}")
++ optional (cfg.systemd.enable && (cfg.systemd.journalPath != null))
"--systemd.jounal_path ${cfg.systemd.journalPath}"
"--systemd.journal_path ${cfg.systemd.journalPath}"
++ optional (!cfg.systemd.enable) "--postfix.logfile_path ${cfg.logfilePath}")}
'';
};
12 changes: 2 additions & 10 deletions nixos/modules/services/search/solr.nix
Original file line number Diff line number Diff line change
@@ -13,19 +13,11 @@ in
services.solr = {
enable = mkEnableOption "Solr";

# default to the 8.x series not forcing major version upgrade of those on the 7.x series
package = mkOption {
type = types.package;
default = if versionAtLeast config.system.stateVersion "19.09"
then pkgs.solr_8
else pkgs.solr_7
;
default = pkgs.solr;
defaultText = "pkgs.solr";
description = ''
Which Solr package to use. This defaults to version 7.x if
<literal>system.stateVersion &lt; 19.09</literal> and version 8.x
otherwise.
'';
description = "Which Solr package to use.";
};

port = mkOption {
Loading