diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 0c06c59f378..f3ac8ad96b7 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -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
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 706952b208d..a50a8a507de 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -48,6 +48,15 @@ In addition to writing properly formatted commit messages, it's important to inc
For package version upgrades and such a one-line commit message is usually sufficient.
+## Backporting changes
+
+To [backport a change into a release branch](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches):
+
+1. Take note of the commit in which the change was introduced into `master`.
+2. Check out the target _release branch_, e.g. `release-19.09`. Do not use a _channel branch_ like `nixos-19.09` or `nixpkgs-19.09`.
+3. Use `git cherry-pick -x `.
+4. Open your backport PR. Make sure to select the release branch (e.g. `release-19.09`) as the target branch of the PR, and link to the PR in which the original change was made to `master`.
+
## Reviewing contributions
See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions).
diff --git a/doc/builders/images/appimagetools.xml b/doc/builders/images/appimagetools.xml
index 37e4251cda2..0767a509a43 100644
--- a/doc/builders/images/appimagetools.xml
+++ b/doc/builders/images/appimagetools.xml
@@ -80,7 +80,7 @@ appimageTools.wrapType2 { # or wrapType1
src specifies the AppImage file to extract.
-
+ extraPkgs allows you to pass a function to include additional packages inside the FHS environment your AppImage is going to run in. There are a few ways to learn which dependencies an application needs:
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md
index bbcf82f7ed6..9b6de47c8e8 100644
--- a/doc/languages-frameworks/python.section.md
+++ b/doc/languages-frameworks/python.section.md
@@ -1029,36 +1029,43 @@ If you want to create a Python environment for development, then the recommended
method is to use `nix-shell`, either with or without the `python.buildEnv`
function.
-### How to consume python modules using pip in a virtualenv like I am used to on other Operating Systems ?
+### How to consume python modules using pip in a virtual environment like I am used to on other Operating Systems?
-This is an example of a `default.nix` for a `nix-shell`, which allows to consume a `virtualenv` environment,
+While this approach is not very idiomatic from Nix perspective, it can still be useful when dealing with pre-existing
+projects or in situations where it's not feasible or desired to write derivations for all required dependencies.
+
+This is an example of a `default.nix` for a `nix-shell`, which allows to consume a virtual environment created by `venv`,
and install python modules through `pip` the traditional way.
Create this `default.nix` file, together with a `requirements.txt` and simply execute `nix-shell`.
```nix
-with import {};
+with import { };
let
- pythonPackages = python27Packages;
-in
-
-stdenv.mkDerivation {
+ pythonPackages = python3Packages;
+in pkgs.mkShell rec {
name = "impurePythonEnv";
-
- src = null;
-
+ venvDir = "./.venv";
buildInputs = [
- # these packages are required for virtualenv and pip to work:
- #
- pythonPackages.virtualenv
- pythonPackages.pip
+ # A python interpreter including the 'venv' module is required to bootstrap
+ # the environment.
+ pythonPackages.python
+
+ # This execute some shell code to initialize a venv in $venvDir before
+ # dropping into the shell
+ pythonPackages.venvShellHook
+
+ # Those are dependencies that we would like to use from nixpkgs, which will
+ # add them to PYTHONPATH and thus make them accessible from within the venv.
+ pythonPackages.numpy
+ pythonPackages.requests
+
# the following packages are related to the dependencies of your python
# project.
# In this particular example the python modules listed in the
# requirements.txt require the following packages to be installed locally
# in order to compile any binary extensions they may require.
- #
taglib
openssl
git
@@ -1068,11 +1075,47 @@ stdenv.mkDerivation {
zlib
];
+ # Now we can execute any commands within the virtual environment
+ postShellHook = ''
+ pip install -r requirements.txt
+ '';
+
+}
+```
+
+In case the supplied venvShellHook is insufficient, or when python 2 support is needed,
+you can define your own shell hook and adapt to your needs like in the following example:
+
+```nix
+with import { };
+
+let
+ venvDir = "./.venv";
+in pkgs.mkShell rec {
+ name = "impurePythonEnv";
+ buildInputs = [
+ python3Packages.python
+ python3Packages.virtualenv
+ ...
+ ];
+
+ # This is very close to how venvShellHook is implemented, but
+ # adapted to use 'virtualenv'
shellHook = ''
- # set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s)
- virtualenv --python=${pythonPackages.python.interpreter} --no-setuptools venv
- export PATH=$PWD/venv/bin:$PATH
+
+ if [ -d "${venvDir}" ]; then
+ echo "Skipping venv creation, '${venvDir}' already exists"
+ else
+ echo "Creating new venv environment in path: '${venvDir}'"
+ ${pythonPackages.python.interpreter} -m venv "${venvDir}"
+ fi
+
+ # Under some circumstances it might be necessary to add your virtual
+ # environment to PYTHONPATH, which you can do here too;
+ # PYTHONPATH=$PWD/${venvDir}/${python.sitePackages}/:$PYTHONPATH
+
+ source "${venvDir}/bin/activate"
pip install -r requirements.txt
'';
}
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md
index 0edf03ad26a..3332dff1eb0 100644
--- a/doc/languages-frameworks/rust.section.md
+++ b/doc/languages-frameworks/rust.section.md
@@ -16,12 +16,6 @@ cargo
into the `environment.systemPackages` or bring them into
scope with `nix-shell -p rustc cargo`.
-> If you are using NixOS and you want to use rust without a nix expression you
-> probably want to add the following in your `configuration.nix` to build
-> crates with C dependencies.
->
-> environment.systemPackages = [binutils gcc gnumake openssl pkgconfig]
-
For daily builds (beta and nightly) use either rustup from
nixpkgs or use the [Rust nightlies
overlay](#using-the-rust-nightlies-overlay).
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index 086c3d746fc..32994432d53 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -60,7 +60,7 @@ rec {
[ { name = head attrPath; value = setAttrByPath (tail attrPath) value; } ];
- /* Like `getAttrPath' without a default value. If it doesn't find the
+ /* Like `attrByPath' without a default value. If it doesn't find the
path it will throw.
Example:
diff --git a/lib/cli.nix b/lib/cli.nix
index f47625d2f53..c96d4dbb043 100644
--- a/lib/cli.nix
+++ b/lib/cli.nix
@@ -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.
+ `toGNUCommandLine` returns a list of nix strings.
+ `toGNUCommandLineShell` returns an escaped shell string.
+
Example:
- encodeGNUCommandLine
- { }
- { data = builtins.toJSON { id = 0; };
+ 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"
+ ]
- 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'"
+ 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);
diff --git a/lib/default.nix b/lib/default.nix
index 5abafe1b2ac..d2fe018aa6a 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -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
@@ -101,7 +103,7 @@ let
inherit (sources) pathType pathIsDirectory cleanSourceFilter
cleanSource sourceByRegex sourceFilesBySuffices
commitIdFromGitRepo cleanSourceWith pathHasContext
- canCleanSource pathIsRegularFile;
+ canCleanSource pathIsRegularFile pathIsGitRepo;
inherit (modules) evalModules unifyModuleSyntax
applyIfFunction mergeModules
mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
@@ -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
diff --git a/lib/generators.nix b/lib/generators.nix
index a71654bec6c..a64e94bd5cb 100644
--- a/lib/generators.nix
+++ b/lib/generators.nix
@@ -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);
diff --git a/lib/licenses.nix b/lib/licenses.nix
index 986b7fa1fdd..e2f94e565ce 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -536,11 +536,6 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
fullName = "University of Illinois/NCSA Open Source License";
};
- notion_lgpl = {
- url = "https://raw.githubusercontent.com/raboof/notion/master/LICENSE";
- fullName = "Notion modified LGPL";
- };
-
nposl3 = spdx {
spdxId = "NPOSL-3.0";
fullName = "Non-Profit Open Software License 3.0";
diff --git a/lib/modules.nix b/lib/modules.nix
index e2315290ff0..2b1faf4f0c2 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -764,12 +764,15 @@ rec {
fromOpt = getAttrFromPath from options;
toOf = attrByPath to
(abort "Renaming error: option `${showOption to}' does not exist.");
+ toType = let opt = attrByPath to {} options; in opt.type or null;
in
{
options = setAttrByPath from (mkOption {
inherit visible;
description = "Alias of .";
apply = x: use (toOf config);
+ } // optionalAttrs (toType != null) {
+ type = toType;
});
config = mkMerge [
{
diff --git a/lib/sources.nix b/lib/sources.nix
index 0fd172c42b7..05519c3e392 100644
--- a/lib/sources.nix
+++ b/lib/sources.nix
@@ -105,6 +105,7 @@ rec {
in type == "directory" || lib.any (ext: lib.hasSuffix ext base) exts;
in cleanSourceWith { inherit filter; src = path; };
+ pathIsGitRepo = path: (builtins.tryEval (commitIdFromGitRepo path)).success;
# Get the commit id of a git repo
# Example: commitIdFromGitRepo
@@ -113,6 +114,10 @@ rec {
with builtins;
let fileName = toString path + "/" + file;
packedRefsName = toString path + "/packed-refs";
+ absolutePath = base: path:
+ if lib.hasPrefix "/" path
+ then path
+ else toString (/. + "${base}/${path}");
in if pathIsRegularFile path
# Resolve git worktrees. See gitrepository-layout(5)
then
@@ -120,13 +125,11 @@ rec {
in if m == null
then throw ("File contains no gitdir reference: " + path)
else
- let gitDir = lib.head m;
+ let gitDir = absolutePath (dirOf path) (lib.head m);
commonDir' = if pathIsRegularFile "${gitDir}/commondir"
then lib.fileContents "${gitDir}/commondir"
else gitDir;
- commonDir = if lib.hasPrefix "/" commonDir'
- then commonDir'
- else toString (/. + "${gitDir}/${commonDir'}");
+ commonDir = absolutePath gitDir commonDir';
refFile = lib.removePrefix "${commonDir}/" "${gitDir}/${file}";
in readCommitFromFile refFile commonDir
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index e47b48b5017..59ed1e507e2 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -441,24 +441,40 @@ runTests {
expected = "«foo»";
};
- testRenderOptions = {
- expr =
- encodeGNUCommandLine
- { }
- { data = builtins.toJSON { id = 0; };
- X = "PUT";
+# CLI
- retry = 3;
+ 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;
+ };
- retry-delay = null;
+ expected = [
+ "-X" "PUT"
+ "--data" "{\"id\":0}"
+ "--retry" "3"
+ "--url" "https://example.com/foo"
+ "--url" "https://example.com/bar"
+ "--verbose"
+ ];
+ };
- url = [ "https://example.com/foo" "https://example.com/bar" ];
-
- silent = false;
-
- 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'";
};
diff --git a/lib/trivial.nix b/lib/trivial.nix
index 940ec1a3d59..a281cd70fb0 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -191,7 +191,7 @@ rec {
let
revisionFile = "${toString ./..}/.git-revision";
gitRepo = "${toString ./..}/.git";
- in if builtins.pathExists gitRepo
+ in if lib.pathIsGitRepo gitRepo
then lib.commitIdFromGitRepo gitRepo
else if lib.pathExists revisionFile then lib.fileContents revisionFile
else default;
diff --git a/lib/types.nix b/lib/types.nix
index d8a5db0c89f..6fd6de7e1fd 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -406,7 +406,7 @@ rec {
In file ${def.file}
a list is being assigned to the option config.${option}.
This will soon be an error as type loaOf is deprecated.
- See https://git.io/fj2zm for more information.
+ See https://github.com/NixOS/nixpkgs/pull/63103 for more information.
Do
${option} =
{ ${set}${more}}
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index bdeed800890..91c24e285c1 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -40,12 +40,6 @@
See `./scripts/check-maintainer-github-handles.sh` for an example on how to work with this data.
*/
{
- "00-matt" = {
- name = "Matt Smith";
- email = "matt@offtopica.uk";
- github = "00-matt";
- githubId = 48835712;
- };
"0x4A6F" = {
email = "0x4A6F@shackspace.de";
name = "Joachim Ernst";
@@ -517,6 +511,12 @@
githubId = 5327697;
name = "Anatolii Prylutskyi";
};
+ antoinerg = {
+ email = "roygobeil.antoine@gmail.com";
+ github = "antoinerg";
+ githubId = 301546;
+ name = "Antoine Roy-Gobeil";
+ };
anton-dessiatov = {
email = "anton.dessiatov@gmail.com";
github = "anton-dessiatov";
@@ -594,6 +594,12 @@
githubId = 1296771;
name = "Anders Riutta";
};
+ arnoldfarkas = {
+ email = "arnold.farkas@gmail.com";
+ github = "arnoldfarkas";
+ githubId = 59696216;
+ name = "Arnold Farkas";
+ };
arobyn = {
email = "shados@shados.net";
github = "shados";
@@ -951,6 +957,12 @@
githubId = 5718007;
name = "Bastian Köcher";
};
+ blanky0230 = {
+ email = "blanky0230@gmail.com";
+ github = "blanky0230";
+ githubId = 5700358;
+ name = "Thomas Blank";
+ };
blitz = {
email = "js@alien8.de";
github = "blitz";
@@ -1919,6 +1931,12 @@
fingerprint = "5DD7 C6F6 0630 F08E DAE7 4711 1525 585D 1B43 C62A";
}];
};
+ dwarfmaster = {
+ email = "nixpkgs@dwarfmaster.net";
+ github = "dwarfmaster";
+ githubId = 2025623;
+ name = "Luc Chabassier";
+ };
dxf = {
email = "dingxiangfei2009@gmail.com";
github = "dingxiangfei2009";
@@ -2393,6 +2411,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";
@@ -3480,6 +3504,12 @@
github = "jorsn";
githubId = 4646725;
};
+ jpas = {
+ name = "Jarrod Pas";
+ email = "jarrod@jarrodpas.com";
+ github = "jpas";
+ githubId = 5689724;
+ };
jpdoyle = {
email = "joethedoyle@gmail.com";
github = "jpdoyle";
@@ -3510,6 +3540,16 @@
githubId = 4611077;
name = "Raymond Gauthier";
};
+ jtcoolen = {
+ email = "jtcoolen@pm.me";
+ name = "Julien Coolen";
+ github = "jtcoolen";
+ githubId = 54635632;
+ keys = [{
+ longkeyid = "rsa4096/0x19642151C218F6F5";
+ fingerprint = "4C68 56EE DFDA 20FB 77E8 9169 1964 2151 C218 F6F5";
+ }];
+ };
jtobin = {
email = "jared@jtobin.io";
github = "jtobin";
@@ -3796,6 +3836,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";
@@ -3844,6 +3890,12 @@
githubId = 449813;
name = "Roman Kuznetsov";
};
+ kwohlfahrt = {
+ email = "kai.wohlfahrt@gmail.com";
+ github = "kwohlfahrt";
+ githubId = 2422454;
+ name = "Kai Wohlfahrt";
+ };
kylesferrazza = {
name = "Kyle Sferrazza";
email = "kyle.sferrazza@gmail.com";
@@ -4153,12 +4205,6 @@
github = "ltavard";
name = "Laure Tavard";
};
- lucas8 = {
- email = "luc.linux@mailoo.org";
- github = "lucas8";
- githubId = 2025623;
- name = "Luc Chabassier";
- };
lucus16 = {
email = "lars.jellema@gmail.com";
github = "Lucus16";
@@ -5409,6 +5455,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";
@@ -6153,6 +6205,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";
@@ -6260,6 +6322,12 @@
github = "scubed2";
name = "Sterling Stein";
};
+ sdier = {
+ email = "scott@dier.name";
+ github = "sdier";
+ githubId = 11613056;
+ name = "Scott Dier";
+ };
sdll = {
email = "sasha.delly@gmail.com";
github = "sdll";
@@ -7834,6 +7902,12 @@
githubId = 1069303;
name = "Kim Simmons";
};
+ zowoq = {
+ email = "59103226+zowoq@users.noreply.github.com";
+ github = "zowoq";
+ githubId = 59103226;
+ name = "zowoq";
+ };
zraexy = {
email = "zraexy@gmail.com";
github = "zraexy";
diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index 526a928438d..01e3150ede1 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -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,6 +44,7 @@ luadbi-mysql,,,,,
luadbi-postgresql,,,,,
luadbi-sqlite3,,,,,
luadoc,,,,,
+luaepnf,,,,,
luaevent,,,,,
luaexpat,,,1.3.0-1,,arobyn flosse
luaffi,,http://luarocks.org/dev,,,
@@ -50,6 +52,7 @@ 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,,,,,
diff --git a/maintainers/scripts/update-luarocks-packages b/maintainers/scripts/update-luarocks-packages
index 1a31d71086f..5c42080745e 100755
--- a/maintainers/scripts/update-luarocks-packages
+++ b/maintainers/scripts/update-luarocks-packages
@@ -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=$?
diff --git a/nixos/doc/manual/configuration/declarative-packages.xml b/nixos/doc/manual/configuration/declarative-packages.xml
index 5fb3bcb9f8f..cd84d1951d2 100644
--- a/nixos/doc/manual/configuration/declarative-packages.xml
+++ b/nixos/doc/manual/configuration/declarative-packages.xml
@@ -19,6 +19,12 @@
nixos-rebuild switch.
+
+
+ Some packages require additional global configuration such as D-Bus or systemd service registration so adding them to might not be sufficient. You are advised to check the list of options whether a NixOS module for the package does not exist.
+
+
+
You can get a list of the available packages as follows:
diff --git a/nixos/doc/manual/configuration/luks-file-systems.xml b/nixos/doc/manual/configuration/luks-file-systems.xml
index 8a2b107e0ee..d3007843d68 100644
--- a/nixos/doc/manual/configuration/luks-file-systems.xml
+++ b/nixos/doc/manual/configuration/luks-file-systems.xml
@@ -37,4 +37,38 @@ Enter passphrase for /dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d: ***
on an encrypted partition, it is necessary to add the following grub option:
= true;
+
+ FIDO2
+
+
+ NixOS also supports unlocking your LUKS-Encrypted file system using a FIDO2 compatible token. In the following example, we will create a new FIDO2 credential
+ and add it as a new key to our existing device /dev/sda2:
+
+
+# export FIDO2_LABEL="/dev/sda2 @ $HOSTNAME"
+# fido2luks credential "$FIDO2_LABEL"
+f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7
+
+# fido2luks -i add-key /dev/sda2 f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7
+Password:
+Password (again):
+Old password:
+Old password (again):
+Added to key to device /dev/sda2, slot: 2
+
+
+ To ensure that this file system is decrypted using the FIDO2 compatible key, add the following to configuration.nix:
+
+boot.initrd.luks.fido2Support = true;
+boot.initrd.luks.devices."/dev/sda2".fido2.credential = "f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7";
+
+
+ You can also use the FIDO2 passwordless setup, but for security reasons, you might want to enable it only when your device is PIN protected, such as Trezor.
+
+
+boot.initrd.luks.devices."/dev/sda2".fido2.passwordLess = true;
+
+
+
+
diff --git a/nixos/doc/manual/development/releases.xml b/nixos/doc/manual/development/releases.xml
index 9371af9984d..a22a0a3707b 100755
--- a/nixos/doc/manual/development/releases.xml
+++ b/nixos/doc/manual/development/releases.xml
@@ -187,7 +187,7 @@
- Update "Chapter 4. Upgrading NixOS" section of the manual to match
+ Update "Chapter 4. Upgrading NixOS" section of the manual to match
new stable release version.
@@ -236,6 +236,10 @@
introduced to their role, making it easier to pass on knowledge and
experience.
+
+ Release managers for the current NixOS release are tracked by GitHub team
+ @NixOS/nixos-release-managers.
+
A release manager's role and responsibilities are:
diff --git a/nixos/doc/manual/man-nixos-install.xml b/nixos/doc/manual/man-nixos-install.xml
index 0752c397182..9255ce763ef 100644
--- a/nixos/doc/manual/man-nixos-install.xml
+++ b/nixos/doc/manual/man-nixos-install.xml
@@ -210,7 +210,7 @@
The closure must be an appropriately configured NixOS system, with boot
loader and partition configuration that fits the target host. Such a
closure is typically obtained with a command such as nix-build
- -I nixos-config=./configuration.nix '<nixos>' -A system
+ -I nixos-config=./configuration.nix '<nixpkgs/nixos>' -A system
--no-out-link
diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml
index 51f91268eff..af91d72fb8f 100644
--- a/nixos/doc/manual/release-notes/rl-2003.xml
+++ b/nixos/doc/manual/release-notes/rl-2003.xml
@@ -168,6 +168,12 @@ services.xserver.displayManager.defaultSession = "xfce+icewm";
SDDM, GDM, or using the startx module which uses Xinitrc.
+
+
+ The Way Cooler wayland compositor has been removed, as the project has been officially canceled.
+ There are no more way-cooler attribute and programs.way-cooler options.
+
+
The BEAM package set has been deleted. You will only find there the different interpreters.
@@ -401,6 +407,44 @@ users.users.me =
the type to either path (submodule ...).
+
+
+ The Buildkite Agent
+ module and corresponding packages have been updated to 3.x.
+ While doing so, the following options have been changed:
+
+
+
+
+ services.buildkite-agent.meta-data has been renamed to
+ services.buildkite-agent.tags,
+ to match upstreams naming for 3.x.
+ Its type has also changed - it now accepts an attrset of strings.
+
+
+
+
+ Theservices.buildkite-agent.openssh.publicKeyPath option
+ has been removed, as it's not necessary to deploy public keys to clone private
+ repositories.
+
+
+
+
+ services.buildkite-agent.openssh.privateKeyPath
+ has been renamed to
+ buildkite-agent.privateSshKeyPath,
+ as the whole openssh now only contained that single option.
+
+
+
+
+ services.buildkite-agent.shell
+ has been introduced, allowing to specify a custom shell to be used.
+
+
+
+
@@ -441,6 +485,12 @@ users.users.me =
now uses the short rather than full version string.
+
+
+ It is now possible to unlock LUKS-Encrypted file systems using a FIDO2 token
+ via .
+
+
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index c2cbedc5e3e..75f80df53f2 100644
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -84,7 +84,7 @@ CHAR_TO_KEY = {
# Forward references
nr_tests: int
-nr_succeeded: int
+failed_tests: list
log: "Logger"
machines: "List[Machine]"
@@ -221,7 +221,7 @@ class Machine:
return path
self.state_dir = create_dir("vm-state-{}".format(self.name))
- self.shared_dir = create_dir("{}/xchg".format(self.state_dir))
+ self.shared_dir = create_dir("shared-xchg")
self.booted = False
self.connected = False
@@ -395,7 +395,7 @@ class Machine:
status_code_pattern = re.compile(r"(.*)\|\!EOF\s+(\d+)")
while True:
- chunk = self.shell.recv(4096).decode()
+ chunk = self.shell.recv(4096).decode(errors="ignore")
match = status_code_pattern.match(chunk)
if match:
output += match[1]
@@ -576,7 +576,7 @@ class Machine:
vm_src = pathlib.Path(source)
with tempfile.TemporaryDirectory(dir=self.shared_dir) as shared_td:
shared_temp = pathlib.Path(shared_td)
- vm_shared_temp = pathlib.Path("/tmp/xchg") / shared_temp.name
+ vm_shared_temp = pathlib.Path("/tmp/shared") / shared_temp.name
vm_intermediate = vm_shared_temp / vm_src.name
intermediate = shared_temp / vm_src.name
# Copy the file to the shared directory inside VM
@@ -842,23 +842,31 @@ def run_tests() -> None:
machine.execute("sync")
if nr_tests != 0:
+ nr_succeeded = nr_tests - len(failed_tests)
eprint("{} out of {} tests succeeded".format(nr_succeeded, nr_tests))
- if nr_tests > nr_succeeded:
+ if len(failed_tests) > 0:
+ eprint(
+ "The following tests have failed:\n - {}".format(
+ "\n - ".join(failed_tests)
+ )
+ )
sys.exit(1)
@contextmanager
def subtest(name: str) -> Iterator[None]:
global nr_tests
- global nr_succeeded
+ global failed_tests
with log.nested(name):
nr_tests += 1
try:
yield
- nr_succeeded += 1
return True
except Exception as e:
+ failed_tests.append(
+ 'Test "{}" failed with error: "{}"'.format(name, str(e))
+ )
log.log("error: {}".format(str(e)))
return False
@@ -880,7 +888,7 @@ if __name__ == "__main__":
exec("\n".join(machine_eval))
nr_tests = 0
- nr_succeeded = 0
+ failed_tests = []
@atexit.register
def clean_up() -> None:
diff --git a/nixos/lib/testing/jquery-ui.nix b/nixos/lib/testing/jquery-ui.nix
index e65107a3c2f..abd59da2d28 100644
--- a/nixos/lib/testing/jquery-ui.nix
+++ b/nixos/lib/testing/jquery-ui.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
name = "jquery-ui-1.11.4";
src = fetchurl {
- url = "http://jqueryui.com/resources/download/${name}.zip";
+ url = "https://jqueryui.com/resources/download/${name}.zip";
sha256 = "0ciyaj1acg08g8hpzqx6whayq206fvf4whksz2pjgxlv207lqgjh";
};
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
'';
meta = {
- homepage = http://jqueryui.com/;
+ homepage = https://jqueryui.com/;
description = "A library of JavaScript widgets and effects";
platforms = stdenv.lib.platforms.all;
};
diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix
index 89dc5008df5..28cddea8b79 100644
--- a/nixos/modules/hardware/opengl.nix
+++ b/nixos/modules/hardware/opengl.nix
@@ -43,11 +43,11 @@ in
description = ''
Whether to enable OpenGL drivers. This is needed to enable
OpenGL support in X11 systems, as well as for Wayland compositors
- like sway, way-cooler and Weston. It is enabled by default
+ like sway and Weston. It is enabled by default
by the corresponding modules, so you do not usually have to
set it yourself, only if there is no module for your wayland
- compositor of choice. See services.xserver.enable,
- programs.sway.enable, and programs.way-cooler.enable.
+ compositor of choice. See services.xserver.enable and
+ programs.sway.enable.
'';
type = types.bool;
default = false;
diff --git a/nixos/modules/hardware/tuxedo-keyboard.nix b/nixos/modules/hardware/tuxedo-keyboard.nix
new file mode 100644
index 00000000000..898eed24493
--- /dev/null
+++ b/nixos/modules/hardware/tuxedo-keyboard.nix
@@ -0,0 +1,35 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.hardware.tuxedo-keyboard;
+ tuxedo-keyboard = config.boot.kernelPackages.tuxedo-keyboard;
+in
+ {
+ options.hardware.tuxedo-keyboard = {
+ enable = mkEnableOption ''
+ Enables the tuxedo-keyboard driver.
+
+ To configure the driver, pass the options to the configuration.
+ There are several parameters you can change. It's best to check at the source code description which options are supported.
+ You can find all the supported parameters at:
+
+ In order to use the custom lighting with the maximumg brightness and a color of 0xff0a0a one would put pass like this:
+
+
+ boot.kernelParams = [
+ "tuxedo_keyboard.mode=0"
+ "tuxedo_keyboard.brightness=255"
+ "tuxedo_keyboard.color_left=0xff0a0a"
+ ];
+
+ '';
+ };
+
+ config = mkIf cfg.enable
+ {
+ boot.kernelModules = ["tuxedo_keyboard"];
+ boot.extraModulePackages = [ tuxedo-keyboard ];
+ };
+ }
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde-new-kernel.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5-new-kernel.nix
similarity index 55%
rename from nixos/modules/installer/cd-dvd/installation-cd-graphical-kde-new-kernel.nix
rename to nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5-new-kernel.nix
index 3336d512cfd..d98325a99ac 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde-new-kernel.nix
+++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5-new-kernel.nix
@@ -1,7 +1,7 @@
{ pkgs, ... }:
{
- imports = [ ./installation-cd-graphical-kde.nix ];
+ imports = [ ./installation-cd-graphical-plasma5.nix ];
boot.kernelPackages = pkgs.linuxPackages_latest;
}
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
similarity index 100%
rename from nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
rename to nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh
index c53dc1000c4..61b4af11027 100644
--- a/nixos/modules/installer/tools/nixos-rebuild.sh
+++ b/nixos/modules/installer/tools/nixos-rebuild.sh
@@ -22,7 +22,7 @@ repair=
profile=/nix/var/nix/profiles/system
buildHost=
targetHost=
-maybeSudo=
+maybeSudo=()
while [ "$#" -gt 0 ]; do
i="$1"; shift 1
@@ -92,7 +92,7 @@ while [ "$#" -gt 0 ]; do
;;
--use-remote-sudo)
# note the trailing space
- maybeSudo="sudo "
+ maybeSudo=(sudo --)
shift 1
;;
*)
@@ -102,6 +102,10 @@ while [ "$#" -gt 0 ]; do
esac
done
+if [ -n "$SUDO_USER" ]; then
+ maybeSudo=(sudo --)
+fi
+
if [ -z "$buildHost" -a -n "$targetHost" ]; then
buildHost="$targetHost"
fi
@@ -116,17 +120,17 @@ buildHostCmd() {
if [ -z "$buildHost" ]; then
"$@"
elif [ -n "$remoteNix" ]; then
- ssh $SSHOPTS "$buildHost" env PATH="$remoteNix:$PATH" "$maybeSudo$@"
+ ssh $SSHOPTS "$buildHost" env PATH="$remoteNix:$PATH" "${maybeSudo[@]}" "$@"
else
- ssh $SSHOPTS "$buildHost" "$maybeSudo$@"
+ ssh $SSHOPTS "$buildHost" "${maybeSudo[@]}" "$@"
fi
}
targetHostCmd() {
if [ -z "$targetHost" ]; then
- "$@"
+ "${maybeSudo[@]}" "$@"
else
- ssh $SSHOPTS "$targetHost" "$maybeSudo$@"
+ ssh $SSHOPTS "$targetHost" "${maybeSudo[@]}" "$@"
fi
}
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix
index ddbd3963cc5..8a85035ceb7 100644
--- a/nixos/modules/misc/version.nix
+++ b/nixos/modules/misc/version.nix
@@ -6,6 +6,7 @@ let
cfg = config.system.nixos;
gitRepo = "${toString pkgs.path}/.git";
+ gitRepoValid = lib.pathIsGitRepo gitRepo;
gitCommitId = lib.substring 0 7 (commitIdFromGitRepo gitRepo);
in
@@ -91,8 +92,8 @@ in
# These defaults are set here rather than up there so that
# changing them would not rebuild the manual
version = mkDefault (cfg.release + cfg.versionSuffix);
- revision = mkIf (pathExists gitRepo) (mkDefault gitCommitId);
- versionSuffix = mkIf (pathExists gitRepo) (mkDefault (".git." + gitCommitId));
+ revision = mkIf gitRepoValid (mkDefault gitCommitId);
+ versionSuffix = mkIf gitRepoValid (mkDefault (".git." + gitCommitId));
};
# Generate /etc/os-release. See
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index a48434641b0..53b10ec39ef 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -62,6 +62,7 @@
./hardware/printers.nix
./hardware/raid/hpsa.nix
./hardware/steam-hardware.nix
+ ./hardware/tuxedo-keyboard.nix
./hardware/usb-wwan.nix
./hardware/onlykey.nix
./hardware/video/amdgpu.nix
@@ -127,6 +128,7 @@
./programs/java.nix
./programs/kbdlight.nix
./programs/less.nix
+ ./programs/liboping.nix
./programs/light.nix
./programs/mosh.nix
./programs/mininet.nix
@@ -152,13 +154,13 @@
./programs/system-config-printer.nix
./programs/thefuck.nix
./programs/tmux.nix
+ ./programs/traceroute.nix
./programs/tsm-client.nix
./programs/udevil.nix
./programs/usbtop.nix
./programs/venus.nix
./programs/vim.nix
./programs/wavemon.nix
- ./programs/way-cooler.nix
./programs/waybar.nix
./programs/wireshark.nix
./programs/x2goserver.nix
@@ -577,6 +579,7 @@
./services/networking/connman.nix
./services/networking/consul.nix
./services/networking/coredns.nix
+ ./services/networking/corerad.nix
./services/networking/coturn.nix
./services/networking/dante.nix
./services/networking/ddclient.nix
@@ -803,6 +806,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
@@ -870,7 +874,6 @@
./services/x11/display-managers/xpra.nix
./services/x11/fractalart.nix
./services/x11/hardware/libinput.nix
- ./services/x11/hardware/multitouch.nix
./services/x11/hardware/synaptics.nix
./services/x11/hardware/wacom.nix
./services/x11/hardware/digimend.nix
diff --git a/nixos/modules/programs/gnupg.nix b/nixos/modules/programs/gnupg.nix
index 2d262d90657..7a3cb588ee7 100644
--- a/nixos/modules/programs/gnupg.nix
+++ b/nixos/modules/programs/gnupg.nix
@@ -96,7 +96,7 @@ in
# This overrides the systemd user unit shipped with the gnupg package
systemd.user.services.gpg-agent = mkIf (cfg.agent.pinentryFlavor != null) {
serviceConfig.ExecStart = [ "" ''
- ${pkgs.gnupg}/bin/gpg-agent --supervised \
+ ${cfg.package}/bin/gpg-agent --supervised \
--pinentry-program ${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry
'' ];
};
diff --git a/nixos/modules/programs/liboping.nix b/nixos/modules/programs/liboping.nix
new file mode 100644
index 00000000000..4e4c235ccde
--- /dev/null
+++ b/nixos/modules/programs/liboping.nix
@@ -0,0 +1,22 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.programs.liboping;
+in {
+ options.programs.liboping = {
+ enable = mkEnableOption "liboping";
+ };
+ config = mkIf cfg.enable {
+ environment.systemPackages = with pkgs; [ liboping ];
+ security.wrappers = mkMerge (map (
+ exec: {
+ "${exec}" = {
+ source = "${pkgs.liboping}/bin/${exec}";
+ capabilities = "cap_net_raw+p";
+ };
+ }
+ ) [ "oping" "noping" ]);
+ };
+}
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
index 33e252be45f..7e646f8737d 100644
--- a/nixos/modules/programs/sway.nix
+++ b/nixos/modules/programs/sway.nix
@@ -87,7 +87,8 @@ in {
type = with types; listOf package;
default = with pkgs; [
swaylock swayidle
- xwayland rxvt_unicode dmenu
+ xwayland alacritty dmenu
+ rxvt_unicode # For backward compatibility (old default terminal)
];
defaultText = literalExample ''
with pkgs; [ swaylock swayidle xwayland rxvt_unicode dmenu ];
diff --git a/nixos/modules/programs/traceroute.nix b/nixos/modules/programs/traceroute.nix
new file mode 100644
index 00000000000..4eb0be3f0e0
--- /dev/null
+++ b/nixos/modules/programs/traceroute.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.programs.traceroute;
+in {
+ options = {
+ programs.traceroute = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to configure a setcap wrapper for traceroute.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ security.wrappers.traceroute = {
+ source = "${pkgs.traceroute}/bin/traceroute";
+ capabilities = "cap_net_raw+p";
+ };
+ };
+}
diff --git a/nixos/modules/programs/way-cooler.nix b/nixos/modules/programs/way-cooler.nix
deleted file mode 100644
index f27bd42bd76..00000000000
--- a/nixos/modules/programs/way-cooler.nix
+++ /dev/null
@@ -1,78 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-with lib;
-
-let
- cfg = config.programs.way-cooler;
- way-cooler = pkgs.way-cooler;
-
- wcWrapped = pkgs.writeShellScriptBin "way-cooler" ''
- ${cfg.extraSessionCommands}
- exec ${pkgs.dbus}/bin/dbus-run-session ${way-cooler}/bin/way-cooler
- '';
- wcJoined = pkgs.symlinkJoin {
- name = "way-cooler-wrapped";
- paths = [ wcWrapped way-cooler ];
- };
- configFile = readFile "${way-cooler}/etc/way-cooler/init.lua";
- spawnBar = ''
- util.program.spawn_at_startup("lemonbar");
- '';
-in
-{
- options.programs.way-cooler = {
- enable = mkEnableOption "way-cooler";
-
- extraSessionCommands = mkOption {
- default = "";
- type = types.lines;
- example = ''
- export XKB_DEFAULT_LAYOUT=us,de
- export XKB_DEFAULT_VARIANT=,nodeadkeys
- export XKB_DEFAULT_OPTIONS=grp:caps_toggle,
- '';
- description = ''
- Shell commands executed just before way-cooler is started.
- '';
- };
-
- extraPackages = mkOption {
- type = with types; listOf package;
- default = with pkgs; [
- westonLite xwayland dmenu
- ];
- example = literalExample ''
- with pkgs; [
- westonLite xwayland dmenu
- ]
- '';
- description = ''
- Extra packages to be installed system wide.
- '';
- };
-
- enableBar = mkOption {
- type = types.bool;
- default = true;
- description = ''
- Whether to enable an unofficial bar.
- '';
- };
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = [ wcJoined ] ++ cfg.extraPackages;
-
- security.pam.services.wc-lock = {};
- environment.etc."way-cooler/init.lua".text = ''
- ${configFile}
- ${optionalString cfg.enableBar spawnBar}
- '';
-
- hardware.opengl.enable = mkDefault true;
- fonts.enableDefaultFonts = mkDefault true;
- programs.dconf.enable = mkDefault true;
- };
-
- meta.maintainers = with maintainers; [ gnidorah ];
-}
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 7109ab5a109..26de8a18d92 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -27,6 +27,13 @@ with lib;
(mkRemovedOptionModule [ "services.osquery" ] "The osquery module has been removed")
(mkRemovedOptionModule [ "services.fourStore" ] "The fourStore module has been removed")
(mkRemovedOptionModule [ "services.fourStoreEndpoint" ] "The fourStoreEndpoint module has been removed")
+ (mkRemovedOptionModule [ "programs" "way-cooler" ] ("way-cooler is abandoned by its author: " +
+ "https://way-cooler.org/blog/2020/01/09/way-cooler-post-mortem.html"))
+ (mkRemovedOptionModule [ "services" "xserver" "multitouch" ] ''
+ services.xserver.multitouch (which uses xf86_input_mtrack) has been removed
+ as the underlying package isn't being maintained. Working alternatives are
+ libinput and synaptics.
+ '')
# Do NOT add any option renames here, see top of the file
];
diff --git a/nixos/modules/services/amqp/rabbitmq.nix b/nixos/modules/services/amqp/rabbitmq.nix
index 697732426cc..f80d6b3f1ba 100644
--- a/nixos/modules/services/amqp/rabbitmq.nix
+++ b/nixos/modules/services/amqp/rabbitmq.nix
@@ -98,8 +98,8 @@ in {
will be merged into these options by RabbitMQ at runtime to
form the final configuration.
- See http://www.rabbitmq.com/configure.html#config-items
- For the distinct formats, see http://www.rabbitmq.com/configure.html#config-file-formats
+ See https://www.rabbitmq.com/configure.html#config-items
+ For the distinct formats, see https://www.rabbitmq.com/configure.html#config-file-formats
'';
};
@@ -116,8 +116,8 @@ in {
The contents of this option will be merged into the configItems
by RabbitMQ at runtime to form the final configuration.
- See the second table on http://www.rabbitmq.com/configure.html#config-items
- For the distinct formats, see http://www.rabbitmq.com/configure.html#config-file-formats
+ See the second table on https://www.rabbitmq.com/configure.html#config-items
+ For the distinct formats, see https://www.rabbitmq.com/configure.html#config-file-formats
'';
};
@@ -165,7 +165,10 @@ in {
after = [ "network.target" "epmd.socket" ];
wants = [ "network.target" "epmd.socket" ];
- path = [ cfg.package pkgs.procps ];
+ path = [
+ cfg.package
+ pkgs.coreutils # mkdir/chown/chmod for preStart
+ ];
environment = {
RABBITMQ_MNESIA_BASE = "${cfg.dataDir}/mnesia";
diff --git a/nixos/modules/services/cluster/kubernetes/pki.nix b/nixos/modules/services/cluster/kubernetes/pki.nix
index 733479e24c9..4275563f1a3 100644
--- a/nixos/modules/services/cluster/kubernetes/pki.nix
+++ b/nixos/modules/services/cluster/kubernetes/pki.nix
@@ -20,6 +20,7 @@ let
size = 2048;
};
CN = top.masterAddress;
+ hosts = cfg.cfsslAPIExtraSANs;
});
cfsslAPITokenBaseName = "apitoken.secret";
@@ -66,6 +67,15 @@ in
type = bool;
};
+ cfsslAPIExtraSANs = mkOption {
+ description = ''
+ Extra x509 Subject Alternative Names to be added to the cfssl API webserver TLS cert.
+ '';
+ default = [];
+ example = [ "subdomain.example.com" ];
+ type = listOf str;
+ };
+
genCfsslAPIToken = mkOption {
description = ''
Whether to automatically generate cfssl API-token secret,
diff --git a/nixos/modules/services/continuous-integration/buildkite-agent.nix b/nixos/modules/services/continuous-integration/buildkite-agent.nix
index 32f361454bc..58bce654941 100644
--- a/nixos/modules/services/continuous-integration/buildkite-agent.nix
+++ b/nixos/modules/services/continuous-integration/buildkite-agent.nix
@@ -50,8 +50,8 @@ in
};
runtimePackages = mkOption {
- default = [ pkgs.bash pkgs.nix ];
- defaultText = "[ pkgs.bash pkgs.nix ]";
+ default = [ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ];
+ defaultText = "[ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ]";
description = "Add programs to the buildkite-agent environment";
type = types.listOf types.package;
};
@@ -74,13 +74,12 @@ in
'';
};
- meta-data = mkOption {
- type = types.str;
- default = "";
- example = "queue=default,docker=true,ruby2=true";
+ tags = mkOption {
+ type = types.attrsOf types.str;
+ default = {};
+ example = { queue = "default"; docker = "true"; ruby2 ="true"; };
description = ''
- Meta data for the agent. This is a comma-separated list of
- key=value pairs.
+ Tags for the agent.
'';
};
@@ -93,26 +92,20 @@ in
'';
};
- openssh =
- { privateKeyPath = mkOption {
- type = types.path;
- description = ''
- Private agent key.
+ privateSshKeyPath = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ ## maximum care is taken so that secrets (ssh keys and the CI token)
+ ## don't end up in the Nix store.
+ apply = final: if final == null then null else toString final;
- A run-time path to the key file, which is supposed to be provisioned
- outside of Nix store.
- '';
- };
- publicKeyPath = mkOption {
- type = types.path;
- description = ''
- Public agent key.
+ description = ''
+ OpenSSH private key
- A run-time path to the key file, which is supposed to be provisioned
- outside of Nix store.
- '';
- };
- };
+ A run-time path to the key file, which is supposed to be provisioned
+ outside of Nix store.
+ '';
+ };
hooks = mkHookOptions [
{ name = "checkout";
@@ -181,18 +174,26 @@ in
instead.
'';
};
+
+ shell = mkOption {
+ type = types.str;
+ default = "${pkgs.bash}/bin/bash -e -c";
+ description = ''
+ Command that buildkite-agent 3 will execute when it spawns a shell.
+ '';
+ };
};
};
config = mkIf config.services.buildkite-agent.enable {
- users.users.buildkite-agent =
- { name = "buildkite-agent";
- home = cfg.dataDir;
- createHome = true;
- description = "Buildkite agent user";
- extraGroups = [ "keys" ];
- isSystemUser = true;
- };
+ users.users.buildkite-agent = {
+ name = "buildkite-agent";
+ home = cfg.dataDir;
+ createHome = true;
+ description = "Buildkite agent user";
+ extraGroups = [ "keys" ];
+ isSystemUser = true;
+ };
environment.systemPackages = [ cfg.package ];
@@ -210,17 +211,18 @@ in
## don't end up in the Nix store.
preStart = let
sshDir = "${cfg.dataDir}/.ssh";
+ tagStr = lib.concatStringsSep "," (lib.mapAttrsToList (name: value: "${name}=${value}") cfg.tags);
in
- ''
+ optionalString (cfg.privateSshKeyPath != null) ''
mkdir -m 0700 -p "${sshDir}"
- cp -f "${toString cfg.openssh.privateKeyPath}" "${sshDir}/id_rsa"
- cp -f "${toString cfg.openssh.publicKeyPath}" "${sshDir}/id_rsa.pub"
- chmod 600 "${sshDir}"/id_rsa*
-
+ cp -f "${toString cfg.privateSshKeyPath}" "${sshDir}/id_rsa"
+ chmod 600 "${sshDir}"/id_rsa
+ '' + ''
cat > "${cfg.dataDir}/buildkite-agent.cfg" <The name org.a11y.Bus was not provided by any .service files.
'';
};
diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix
index 36dda619ad0..0bb0eaedad5 100644
--- a/nixos/modules/services/mail/roundcube.nix
+++ b/nixos/modules/services/mail/roundcube.nix
@@ -5,6 +5,8 @@ with lib;
let
cfg = config.services.roundcube;
fpm = config.services.phpfpm.pools.roundcube;
+ localDB = cfg.database.host == "localhost";
+ user = cfg.database.username;
in
{
options.services.roundcube = {
@@ -44,7 +46,10 @@ in
username = mkOption {
type = types.str;
default = "roundcube";
- description = "Username for the postgresql connection";
+ description = ''
+ Username for the postgresql connection.
+ If database.host is set to localhost, a unix user and group of the same name will be created as well.
+ '';
};
host = mkOption {
type = types.str;
@@ -58,7 +63,12 @@ in
};
password = mkOption {
type = types.str;
- description = "Password for the postgresql connection";
+ description = "Password for the postgresql connection. Do not use: the password will be stored world readable in the store; use passwordFile instead.";
+ default = "";
+ };
+ passwordFile = mkOption {
+ type = types.str;
+ description = "Password file for the postgresql connection. Must be readable by user nginx. Ignored if database.host is set to localhost, as peer authentication will be used.";
};
dbname = mkOption {
type = types.str;
@@ -83,14 +93,22 @@ in
};
config = mkIf cfg.enable {
+ # backward compatibility: if password is set but not passwordFile, make one.
+ services.roundcube.database.passwordFile = mkIf (!localDB && cfg.database.password != "") (mkDefault ("${pkgs.writeText "roundcube-password" cfg.database.password}"));
+ warnings = lib.optional (!localDB && cfg.database.password != "") "services.roundcube.database.password is deprecated and insecure; use services.roundcube.database.passwordFile instead";
+
environment.etc."roundcube/config.inc.php".text = ''
/var/lib/roundcube/des_key;
+ # we need to log out everyone in case change the des_key
+ # from the default when upgrading from nixos 19.09
+ ${psql} <<< 'TRUNCATE TABLE session;'
fi
${pkgs.php}/bin/php ${cfg.package}/bin/update.sh
'';
- serviceConfig.Type = "oneshot";
+ serviceConfig = {
+ Type = "oneshot";
+ StateDirectory = "roundcube";
+ User = if localDB then user else "nginx";
+ # so that the des_key is not world readable
+ StateDirectoryMode = "0700";
+ };
}
];
};
diff --git a/nixos/modules/services/monitoring/prometheus/alertmanager.nix b/nixos/modules/services/monitoring/prometheus/alertmanager.nix
index 9af6b1d94f3..4534d150885 100644
--- a/nixos/modules/services/monitoring/prometheus/alertmanager.nix
+++ b/nixos/modules/services/monitoring/prometheus/alertmanager.nix
@@ -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:
+ $ENVIRONMENT ''${VARIABLE}
+ '';
+ };
};
};
@@ -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 " +
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix b/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix
index f40819e826b..d50564717ea 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix
+++ b/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix
@@ -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}")}
'';
};
diff --git a/nixos/modules/services/networking/bitlbee.nix b/nixos/modules/services/networking/bitlbee.nix
index 54fe70f7ccc..01a16698384 100644
--- a/nixos/modules/services/networking/bitlbee.nix
+++ b/nixos/modules/services/networking/bitlbee.nix
@@ -168,8 +168,7 @@ in
createHome = true;
};
- users.groups = singleton {
- name = "bitlbee";
+ users.groups.bitlbee = {
gid = config.ids.gids.bitlbee;
};
diff --git a/nixos/modules/services/networking/corerad.nix b/nixos/modules/services/networking/corerad.nix
new file mode 100644
index 00000000000..1a2c4aec665
--- /dev/null
+++ b/nixos/modules/services/networking/corerad.nix
@@ -0,0 +1,46 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.corerad;
+in {
+ meta = {
+ maintainers = with maintainers; [ mdlayher ];
+ };
+
+ options.services.corerad = {
+ enable = mkEnableOption "CoreRAD IPv6 NDP RA daemon";
+
+ configFile = mkOption {
+ type = types.path;
+ example = literalExample "\"\${pkgs.corerad}/etc/corerad/corerad.toml\"";
+ description = "Path to CoreRAD TOML configuration file.";
+ };
+
+ package = mkOption {
+ default = pkgs.corerad;
+ defaultText = literalExample "pkgs.corerad";
+ type = types.package;
+ description = "CoreRAD package to use.";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services.corerad = {
+ description = "CoreRAD IPv6 NDP RA daemon";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ LimitNPROC = 512;
+ LimitNOFILE = 1048576;
+ CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_RAW";
+ AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_RAW";
+ NoNewPrivileges = true;
+ DynamicUser = true;
+ ExecStart = "${getBin cfg.package}/bin/corerad -c=${cfg.configFile}";
+ Restart = "on-failure";
+ };
+ };
+ };
+}
diff --git a/nixos/modules/services/networking/knot.nix b/nixos/modules/services/networking/knot.nix
index 1cc1dd3f2f6..47364ecb846 100644
--- a/nixos/modules/services/networking/knot.nix
+++ b/nixos/modules/services/networking/knot.nix
@@ -56,6 +56,7 @@ in {
package = mkOption {
type = types.package;
default = pkgs.knot-dns;
+ defaultText = "pkgs.knot-dns";
description = ''
Which Knot DNS package to use
'';
@@ -92,4 +93,3 @@ in {
environment.systemPackages = [ knot-cli-wrappers ];
};
}
-
diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix
index 5eb50a13ca9..bb941e93e15 100644
--- a/nixos/modules/services/networking/kresd.nix
+++ b/nixos/modules/services/networking/kresd.nix
@@ -5,12 +5,15 @@ with lib;
let
cfg = config.services.kresd;
- package = pkgs.knot-resolver;
+ configFile = pkgs.writeText "kresd.conf" ''
+ ${optionalString (cfg.listenDoH != []) "modules.load('http')"}
+ ${cfg.extraConfig};
+ '';
- configFile = pkgs.writeText "kresd.conf" cfg.extraConfig;
-in
-
-{
+ package = pkgs.knot-resolver.override {
+ extraFeatures = cfg.listenDoH != [];
+ };
+in {
meta.maintainers = [ maintainers.vcunat /* upstream developer */ ];
imports = [
@@ -67,6 +70,15 @@ in
For detailed syntax see ListenStream in man systemd.socket.
'';
};
+ listenDoH = mkOption {
+ type = with types; listOf str;
+ default = [];
+ example = [ "198.51.100.1:443" "[2001:db8::1]:443" "443" ];
+ description = ''
+ Addresses and ports on which kresd should provide DNS over HTTPS (see RFC 7858).
+ For detailed syntax see ListenStream in man systemd.socket.
+ '';
+ };
# TODO: perhaps options for more common stuff like cache size or forwarding
};
@@ -104,6 +116,18 @@ in
};
};
+ systemd.sockets.kresd-doh = mkIf (cfg.listenDoH != []) rec {
+ wantedBy = [ "sockets.target" ];
+ before = wantedBy;
+ partOf = [ "kresd.socket" ];
+ listenStreams = cfg.listenDoH;
+ socketConfig = {
+ FileDescriptorName = "doh";
+ FreeBind = true;
+ Service = "kresd.service";
+ };
+ };
+
systemd.sockets.kresd-control = rec {
wantedBy = [ "sockets.target" ];
before = wantedBy;
diff --git a/nixos/modules/services/networking/matterbridge.nix b/nixos/modules/services/networking/matterbridge.nix
index bad35133459..b8b4f37c84a 100644
--- a/nixos/modules/services/networking/matterbridge.nix
+++ b/nixos/modules/services/networking/matterbridge.nix
@@ -111,7 +111,7 @@ in
serviceConfig = {
User = cfg.user;
Group = cfg.group;
- ExecStart = "${pkgs.matterbridge.bin}/bin/matterbridge -conf ${matterbridgeConfToml}";
+ ExecStart = "${pkgs.matterbridge}/bin/matterbridge -conf ${matterbridgeConfToml}";
Restart = "always";
RestartSec = "10";
};
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix
index 47b10e408c0..5b3eb6f04b4 100644
--- a/nixos/modules/services/networking/syncthing.nix
+++ b/nixos/modules/services/networking/syncthing.nix
@@ -484,6 +484,24 @@ in {
-gui-address=${cfg.guiAddress} \
-home=${cfg.configDir}
'';
+ MemoryDenyWriteExecute = true;
+ NoNewPrivileges = true;
+ PrivateDevices = true;
+ PrivateMounts = true;
+ PrivateTmp = true;
+ PrivateUsers = true;
+ ProtectControlGroups = true;
+ ProtectHostname = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ RestrictSUIDSGID = true;
+ CapabilityBoundingSet = [
+ "~CAP_SYS_PTRACE" "~CAP_SYS_ADMIN"
+ "~CAP_SETGID" "~CAP_SETUID" "~CAP_SETPCAP"
+ "~CAP_SYS_TIME" "~CAP_KILL"
+ ];
};
};
syncthing-init = mkIf (
diff --git a/nixos/modules/services/networking/zerotierone.nix b/nixos/modules/services/networking/zerotierone.nix
index 764af3846fe..069e15a909b 100644
--- a/nixos/modules/services/networking/zerotierone.nix
+++ b/nixos/modules/services/networking/zerotierone.nix
@@ -38,10 +38,13 @@ in
config = mkIf cfg.enable {
systemd.services.zerotierone = {
description = "ZeroTierOne";
- path = [ cfg.package ];
- bindsTo = [ "network-online.target" ];
- after = [ "network-online.target" ];
+
wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ wants = [ "network-online.target" ];
+
+ path = [ cfg.package ];
+
preStart = ''
mkdir -p /var/lib/zerotier-one/networks.d
chmod 700 /var/lib/zerotier-one
@@ -53,6 +56,7 @@ in
ExecStart = "${cfg.package}/bin/zerotier-one -p${toString cfg.port}";
Restart = "always";
KillMode = "process";
+ TimeoutStopSec = 5;
};
};
diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix
index b2176225493..a8615a20a1c 100644
--- a/nixos/modules/services/search/solr.nix
+++ b/nixos/modules/services/search/solr.nix
@@ -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
- system.stateVersion < 19.09 and version 8.x
- otherwise.
- '';
+ description = "Which Solr package to use.";
};
port = mkOption {
diff --git a/nixos/modules/services/security/sshguard.nix b/nixos/modules/services/security/sshguard.nix
index 4a174564dd2..e7a9cefdef3 100644
--- a/nixos/modules/services/security/sshguard.nix
+++ b/nixos/modules/services/security/sshguard.nix
@@ -92,8 +92,11 @@ in {
"-o cat"
"-n1"
] ++ (map (name: "-t ${escapeShellArg name}") cfg.services));
+ backend = if config.networking.nftables.enable
+ then "sshg-fw-nft-sets"
+ else "sshg-fw-ipset";
in ''
- BACKEND="${pkgs.sshguard}/libexec/sshg-fw-ipset"
+ BACKEND="${pkgs.sshguard}/libexec/${backend}"
LOGREADER="LANG=C ${pkgs.systemd}/bin/journalctl ${args}"
'';
@@ -104,7 +107,9 @@ in {
after = [ "network.target" ];
partOf = optional config.networking.firewall.enable "firewall.service";
- path = with pkgs; [ iptables ipset iproute systemd ];
+ path = with pkgs; if config.networking.nftables.enable
+ then [ nftables iproute systemd ]
+ else [ iptables ipset iproute systemd ];
# The sshguard ipsets must exist before we invoke
# iptables. sshguard creates the ipsets after startup if
@@ -112,14 +117,14 @@ in {
# the iptables rules because postStart races with the creation
# of the ipsets. So instead, we create both the ipsets and
# firewall rules before sshguard starts.
- preStart = ''
+ preStart = optionalString config.networking.firewall.enable ''
${pkgs.ipset}/bin/ipset -quiet create -exist sshguard4 hash:net family inet
${pkgs.ipset}/bin/ipset -quiet create -exist sshguard6 hash:net family inet6
${pkgs.iptables}/bin/iptables -I INPUT -m set --match-set sshguard4 src -j DROP
${pkgs.iptables}/bin/ip6tables -I INPUT -m set --match-set sshguard6 src -j DROP
'';
- postStop = ''
+ postStop = optionalString config.networking.firewall.enable ''
${pkgs.iptables}/bin/iptables -D INPUT -m set --match-set sshguard4 src -j DROP
${pkgs.iptables}/bin/ip6tables -D INPUT -m set --match-set sshguard6 src -j DROP
${pkgs.ipset}/bin/ipset -quiet destroy sshguard4
diff --git a/nixos/modules/services/security/vault.nix b/nixos/modules/services/security/vault.nix
index b0ab8fadcbe..6a8a3a93327 100644
--- a/nixos/modules/services/security/vault.nix
+++ b/nixos/modules/services/security/vault.nix
@@ -135,6 +135,7 @@ in
User = "vault";
Group = "vault";
ExecStart = "${cfg.package}/bin/vault server -config ${configFile}";
+ ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID";
PrivateDevices = true;
PrivateTmp = true;
ProtectSystem = "full";
diff --git a/nixos/modules/services/web-apps/dokuwiki.nix b/nixos/modules/services/web-apps/dokuwiki.nix
new file mode 100644
index 00000000000..07af7aa0dfe
--- /dev/null
+++ b/nixos/modules/services/web-apps/dokuwiki.nix
@@ -0,0 +1,272 @@
+{ config, lib, pkgs, ... }:
+
+let
+
+ inherit (lib) mkEnableOption mkForce mkIf mkMerge mkOption optionalAttrs recursiveUpdate types;
+
+ cfg = config.services.dokuwiki;
+
+ user = config.services.nginx.user;
+ group = config.services.nginx.group;
+
+ dokuwikiAclAuthConfig = pkgs.writeText "acl.auth.php" ''
+ # acl.auth.php
+ #
+ #
+ # Access Control Lists
+ #
+ ${toString cfg.acl}
+ '';
+
+ dokuwikiLocalConfig = pkgs.writeText "local.php" ''
+
+ Mutually exclusive with services.dokuwiki.aclFile
+ Set this to a value other than null to take precedence over aclFile option.
+ '';
+ };
+
+ aclFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ Location of the dokuwiki acl rules. Mutually exclusive with services.dokuwiki.acl
+ Mutually exclusive with services.dokuwiki.acl which is preferred.
+ Consult documentation for further instructions.
+ Example:
+ '';
+ };
+
+ aclUse = mkOption {
+ type = types.bool;
+ default = true;
+ description = ''
+ Necessary for users to log in into the system.
+ Also limits anonymous users. When disabled,
+ everyone is able to create and edit content.
+ '';
+ };
+
+ pluginsConfig = mkOption {
+ type = types.lines;
+ default = ''
+ $plugins['authad'] = 0;
+ $plugins['authldap'] = 0;
+ $plugins['authmysql'] = 0;
+ $plugins['authpgsql'] = 0;
+ '';
+ description = ''
+ List of the dokuwiki (un)loaded plugins.
+ '';
+ };
+
+ superUser = mkOption {
+ type = types.nullOr types.str;
+ default = "@admin";
+ description = ''
+ You can set either a username, a list of usernames (“admin1,admin2”),
+ or the name of a group by prepending an @ char to the groupname
+ Consult documentation for further instructions.
+ '';
+ };
+
+ usersFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ Location of the dokuwiki users file. List of users. Format:
+ login:passwordhash:Real Name:email:groups,comma,separated
+ Create passwordHash easily by using:$ mkpasswd -5 password `pwgen 8 1`
+ Example:
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = types.nullOr types.lines;
+ default = null;
+ example = ''
+ $conf['title'] = 'My Wiki';
+ $conf['userewrite'] = 1;
+ '';
+ description = ''
+ DokuWiki configuration. Refer to
+
+ for details on supported values.
+ '';
+ };
+
+ poolConfig = mkOption {
+ type = with types; attrsOf (oneOf [ str int bool ]);
+ default = {
+ "pm" = "dynamic";
+ "pm.max_children" = 32;
+ "pm.start_servers" = 2;
+ "pm.min_spare_servers" = 2;
+ "pm.max_spare_servers" = 4;
+ "pm.max_requests" = 500;
+ };
+ description = ''
+ Options for the dokuwiki PHP pool. See the documentation on php-fpm.conf
+ for details on configuration directives.
+ '';
+ };
+
+ nginx = mkOption {
+ type = types.submodule (
+ recursiveUpdate
+ (import ../web-servers/nginx/vhost-options.nix { inherit config lib; })
+ {
+ # Enable encryption by default,
+ options.forceSSL.default = true;
+ options.enableACME.default = true;
+ }
+ );
+ default = {forceSSL = true; enableACME = true;};
+ example = {
+ serverAliases = [
+ "wiki.\${config.networking.domain}"
+ ];
+ enableACME = false;
+ };
+ description = ''
+ With this option, you can customize the nginx virtualHost which already has sensible defaults for DokuWiki.
+ '';
+ };
+ };
+
+ # implementation
+
+ config = mkIf cfg.enable {
+
+ warnings = mkIf (cfg.superUser == null) ["Not setting services.dokuwiki.superUser will impair your ability to administer DokuWiki"];
+
+ assertions = [
+ {
+ assertion = cfg.aclUse -> (cfg.acl != null || cfg.aclFile != null);
+ message = "Either services.dokuwiki.acl or services.dokuwiki.aclFile is mandatory when aclUse is true";
+ }
+ {
+ assertion = cfg.usersFile != null -> cfg.aclUse != false;
+ message = "services.dokuwiki.aclUse must be true when usersFile is not null";
+ }
+ ];
+
+ services.phpfpm.pools.dokuwiki = {
+ inherit user;
+ inherit group;
+ phpEnv = {
+ DOKUWIKI_LOCAL_CONFIG = "${dokuwikiLocalConfig}";
+ DOKUWIKI_PLUGINS_LOCAL_CONFIG = "${dokuwikiPluginsLocalConfig}";
+ } //optionalAttrs (cfg.usersFile != null) {
+ DOKUWIKI_USERS_AUTH_CONFIG = "${cfg.usersFile}";
+ } //optionalAttrs (cfg.aclUse) {
+ DOKUWIKI_ACL_AUTH_CONFIG = if (cfg.acl != null) then "${dokuwikiAclAuthConfig}" else "${toString cfg.aclFile}";
+ };
+
+ settings = {
+ "listen.mode" = "0660";
+ "listen.owner" = user;
+ "listen.group" = group;
+ } // cfg.poolConfig;
+ };
+
+ services.nginx = {
+ enable = true;
+
+ virtualHosts = {
+ ${cfg.hostName} = mkMerge [ cfg.nginx {
+ root = mkForce "${pkgs.dokuwiki}/share/dokuwiki/";
+ extraConfig = "fastcgi_param HTTPS on;";
+
+ locations."~ /(conf/|bin/|inc/|install.php)" = {
+ extraConfig = "deny all;";
+ };
+
+ locations."~ ^/data/" = {
+ root = "${cfg.stateDir}";
+ extraConfig = "internal;";
+ };
+
+ locations."~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg)$" = {
+ extraConfig = "expires 365d;";
+ };
+
+ locations."/" = {
+ priority = 1;
+ index = "doku.php";
+ extraConfig = ''try_files $uri $uri/ @dokuwiki;'';
+ };
+
+ locations."@dokuwiki" = {
+ extraConfig = ''
+ # rewrites "doku.php/" out of the URLs if you set the userwrite setting to .htaccess in dokuwiki config page
+ rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
+ rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
+ rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
+ rewrite ^/(.*) /doku.php?id=$1&$args last;
+ '';
+ };
+
+ locations."~ \.php$" = {
+ extraConfig = ''
+ try_files $uri $uri/ /doku.php;
+ include ${pkgs.nginx}/conf/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param REDIRECT_STATUS 200;
+ fastcgi_pass unix:${config.services.phpfpm.pools.dokuwiki.socket};
+ fastcgi_param HTTPS on;
+ '';
+ };
+ }];
+ };
+
+ };
+
+ systemd.tmpfiles.rules = [
+ "d ${cfg.stateDir}/attic 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/cache 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/index 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/locks 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/media 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/media_attic 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/media_meta 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/meta 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/pages 0750 ${user} ${group} - -"
+ "d ${cfg.stateDir}/tmp 0750 ${user} ${group} - -"
+ ];
+
+ };
+}
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index 4460f89ec5c..fd17e4b54f0 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -629,6 +629,9 @@ in
environment.systemPackages = [httpd];
+ # required for "apachectl configtest"
+ environment.etc."httpd/httpd.conf".source = httpdConf;
+
services.httpd.phpOptions =
''
; Needed for PHP's mail() function.
diff --git a/nixos/modules/services/web-servers/nginx/gitweb.nix b/nixos/modules/services/web-servers/nginx/gitweb.nix
index 272fd148018..f7fb07bb797 100644
--- a/nixos/modules/services/web-servers/nginx/gitweb.nix
+++ b/nixos/modules/services/web-servers/nginx/gitweb.nix
@@ -3,8 +3,9 @@
with lib;
let
- cfg = config.services.gitweb;
- package = pkgs.gitweb.override (optionalAttrs cfg.gitwebTheme {
+ cfg = config.services.nginx.gitweb;
+ gitwebConfig = config.services.gitweb;
+ package = pkgs.gitweb.override (optionalAttrs gitwebConfig.gitwebTheme {
gitwebTheme = true;
});
@@ -17,13 +18,45 @@ in
default = false;
type = types.bool;
description = ''
- If true, enable gitweb in nginx. Access it at http://yourserver/gitweb
+ If true, enable gitweb in nginx.
+ '';
+ };
+
+ location = mkOption {
+ default = "/gitweb";
+ type = types.str;
+ description = ''
+ Location to serve gitweb on.
+ '';
+ };
+
+ user = mkOption {
+ default = "nginx";
+ type = types.str;
+ description = ''
+ Existing user that the CGI process will belong to. (Default almost surely will do.)
+ '';
+ };
+
+ group = mkOption {
+ default = "nginx";
+ type = types.str;
+ description = ''
+ Group that the CGI process will belong to. (Set to config.services.gitolite.group if you are using gitolite.)
+ '';
+ };
+
+ virtualHost = mkOption {
+ default = "_";
+ type = types.str;
+ description = ''
+ VirtualHost to serve gitweb on. Default is catch-all.
'';
};
};
- config = mkIf config.services.nginx.gitweb.enable {
+ config = mkIf cfg.enable {
systemd.services.gitweb = {
description = "GitWeb service";
@@ -32,22 +65,22 @@ in
FCGI_SOCKET_PATH = "/run/gitweb/gitweb.sock";
};
serviceConfig = {
- User = "nginx";
- Group = "nginx";
+ User = cfg.user;
+ Group = cfg.group;
RuntimeDirectory = [ "gitweb" ];
};
wantedBy = [ "multi-user.target" ];
};
services.nginx = {
- virtualHosts.default = {
- locations."/gitweb/static/" = {
+ virtualHosts.${cfg.virtualHost} = {
+ locations."${cfg.location}/static/" = {
alias = "${package}/static/";
};
- locations."/gitweb/" = {
+ locations."${cfg.location}/" = {
extraConfig = ''
include ${pkgs.nginx}/conf/fastcgi_params;
- fastcgi_param GITWEB_CONFIG ${cfg.gitwebConfigFile};
+ fastcgi_param GITWEB_CONFIG ${gitwebConfig.gitwebConfigFile};
fastcgi_pass unix:/run/gitweb/gitweb.sock;
'';
};
diff --git a/nixos/modules/services/web-servers/unit/default.nix b/nixos/modules/services/web-servers/unit/default.nix
index 2303dfa9540..f8a18954fc9 100644
--- a/nixos/modules/services/web-servers/unit/default.nix
+++ b/nixos/modules/services/web-servers/unit/default.nix
@@ -111,7 +111,7 @@ in {
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" "CAP_SETGID" "CAP_SETUID" ];
# Security
NoNewPrivileges = true;
- # Sanboxing
+ # Sandboxing
ProtectSystem = "full";
ProtectHome = true;
RuntimeDirectory = "unit";
@@ -130,8 +130,10 @@ in {
};
users.users = optionalAttrs (cfg.user == "unit") {
- unit.group = cfg.group;
- isSystemUser = true;
+ unit = {
+ group = cfg.group;
+ isSystemUser = true;
+ };
};
users.groups = optionalAttrs (cfg.group == "unit") {
diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index 6d9bd284bc7..ba9906072b3 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -144,7 +144,7 @@ in
services.gnome3.core-shell.enable = true;
services.gnome3.core-utilities.enable = mkDefault true;
- services.xserver.displayManager.sessionPackages = [ pkgs.gnome3.gnome-session ];
+ services.xserver.displayManager.sessionPackages = [ pkgs.gnome3.gnome-session.sessions ];
environment.extraInit = ''
${concatMapStrings (p: ''
@@ -249,11 +249,17 @@ in
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
services.telepathy.enable = mkDefault true;
- systemd.packages = with pkgs.gnome3; [ vino gnome-session ];
+ systemd.packages = with pkgs.gnome3; [
+ gnome-session
+ gnome-shell
+ vino
+ ];
services.avahi.enable = mkDefault true;
- xdg.portal.extraPortals = [ pkgs.gnome3.gnome-shell ];
+ xdg.portal.extraPortals = [
+ pkgs.gnome3.gnome-shell
+ ];
services.geoclue2.enable = mkDefault true;
services.geoclue2.enableDemoAgent = false; # GNOME has its own geoclue agent
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index a08b1947f65..21f59074f3a 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -127,14 +127,9 @@ in
"/share/gtksourceview-4.0"
];
- services.xserver.desktopManager.session = [{
- name = "xfce";
- bgSupport = true;
- start = ''
- ${pkgs.runtimeShell} ${pkgs.xfce.xfce4-session.xinitrc} &
- waitPID=$!
- '';
- }];
+ services.xserver.displayManager.sessionPackages = [
+ pkgs.xfce.xfce4-session
+ ];
services.xserver.updateDbusEnvironment = true;
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix
index 2f8c8cc9013..325023f4121 100644
--- a/nixos/modules/services/x11/display-managers/gdm.nix
+++ b/nixos/modules/services/x11/display-managers/gdm.nix
@@ -174,6 +174,10 @@ in
"f /run/gdm/.config/gnome-initial-setup-done 0711 gdm gdm - yes"
];
+ # Otherwise GDM will not be able to start correctly and display Wayland sessions
+ systemd.packages = with pkgs.gnome3; [ gnome-session gnome-shell ];
+ environment.systemPackages = [ pkgs.gnome3.adwaita-icon-theme ];
+
systemd.services.display-manager.wants = [
# Because sd_login_monitor_new requires /run/systemd/machines
"systemd-machined.service"
diff --git a/nixos/modules/services/x11/hardware/multitouch.nix b/nixos/modules/services/x11/hardware/multitouch.nix
deleted file mode 100644
index c03bb3b494f..00000000000
--- a/nixos/modules/services/x11/hardware/multitouch.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
-let cfg = config.services.xserver.multitouch;
- disabledTapConfig = ''
- Option "MaxTapTime" "0"
- Option "MaxTapMove" "0"
- Option "TapButton1" "0"
- Option "TapButton2" "0"
- Option "TapButton3" "0"
- '';
-in {
-
- options = {
-
- services.xserver.multitouch = {
-
- enable = mkOption {
- default = false;
- description = "Whether to enable multitouch touchpad support.";
- };
-
- invertScroll = mkOption {
- default = false;
- type = types.bool;
- description = "Whether to invert scrolling direction à la OSX Lion";
- };
-
- ignorePalm = mkOption {
- default = false;
- type = types.bool;
- description = "Whether to ignore touches detected as being the palm (i.e when typing)";
- };
-
- tapButtons = mkOption {
- type = types.bool;
- default = true;
- description = "Whether to enable tap buttons.";
- };
-
- buttonsMap = mkOption {
- type = types.listOf types.int;
- default = [3 2 0];
- example = [1 3 2];
- description = "Remap touchpad buttons.";
- apply = map toString;
- };
-
- additionalOptions = mkOption {
- type = types.str;
- default = "";
- example = ''
- Option "ScaleDistance" "50"
- Option "RotateDistance" "60"
- '';
- description = ''
- Additional options for mtrack touchpad driver.
- '';
- };
-
- };
-
- };
-
- config = mkIf cfg.enable {
-
- services.xserver.modules = [ pkgs.xf86_input_mtrack ];
-
- services.xserver.config =
- ''
- # Automatically enable the multitouch driver
- Section "InputClass"
- MatchIsTouchpad "on"
- Identifier "Touchpads"
- Driver "mtrack"
- Option "IgnorePalm" "${boolToString cfg.ignorePalm}"
- Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}"
- Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}"
- Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}"
- ${optionalString (!cfg.tapButtons) disabledTapConfig}
- ${optionalString cfg.invertScroll ''
- Option "ScrollUpButton" "5"
- Option "ScrollDownButton" "4"
- Option "ScrollLeftButton" "7"
- Option "ScrollRightButton" "6"
- ''}
- ${cfg.additionalOptions}
- EndSection
- '';
-
- };
-
-}
diff --git a/nixos/modules/services/x11/unclutter.nix b/nixos/modules/services/x11/unclutter.nix
index 2478aaabb79..c0868604a68 100644
--- a/nixos/modules/services/x11/unclutter.nix
+++ b/nixos/modules/services/x11/unclutter.nix
@@ -32,7 +32,7 @@ in {
default = 1;
};
- threeshold = mkOption {
+ threshold = mkOption {
description = "Minimum number of pixels considered cursor movement";
type = types.int;
default = 1;
@@ -72,6 +72,11 @@ in {
};
};
+ imports = [
+ (mkRenamedOptionModule [ "services" "unclutter" "threeshold" ]
+ [ "services" "unclutter" "threshold" ])
+ ];
+
meta.maintainers = with lib.maintainers; [ rnhmjoj ];
}
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix
index ddfd1af4a31..495d77dfd49 100644
--- a/nixos/modules/system/activation/activation-script.nix
+++ b/nixos/modules/system/activation/activation-script.nix
@@ -162,6 +162,16 @@ in
/usr/bin/env.
'';
};
+
+ environment.ld-linux = mkOption {
+ default = false;
+ type = types.bool;
+ visible = false;
+ description = ''
+ Install symlink to ld-linux(8) system-wide to allow running unmodified ELF binaries.
+ It might be useful to run games or executables distributed inside jar files.
+ '';
+ };
};
@@ -195,9 +205,30 @@ in
''
else ''
rm -f /usr/bin/env
- rmdir --ignore-fail-on-non-empty /usr/bin /usr
+ rmdir -p /usr/bin || true
'';
+ system.activationScripts.ld-linux =
+ concatStrings (
+ mapAttrsToList
+ (target: source:
+ if config.environment.ld-linux then ''
+ mkdir -m 0755 -p $(dirname ${target})
+ ln -sfn ${escapeShellArg source} ${target}.tmp
+ mv -f ${target}.tmp ${target} # atomically replace
+ '' else ''
+ rm -f ${target}
+ rmdir $(dirname ${target}) || true
+ '')
+ {
+ "i686-linux" ."/lib/ld-linux.so.2" = "${pkgs.glibc.out}/lib/ld-linux.so.2";
+ "x86_64-linux" ."/lib/ld-linux.so.2" = "${pkgs.pkgsi686Linux.glibc.out}/lib/ld-linux.so.2";
+ "x86_64-linux" ."/lib64/ld-linux-x86-64.so.2" = "${pkgs.glibc.out}/lib64/ld-linux-x86-64.so.2";
+ "aarch64-linux"."/lib/ld-linux-aarch64.so.1" = "${pkgs.glibc.out}/lib/ld-linux-aarch64.so.1";
+ "armv7l-linux" ."/lib/ld-linux-armhf.so.3" = "${pkgs.glibc.out}/lib/ld-linux-armhf.so.3";
+ }.${pkgs.stdenv.system} or {}
+ );
+
system.activationScripts.specialfs =
''
specialMount() {
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix
index 0bb8396a44f..31f1e22cda3 100644
--- a/nixos/modules/system/boot/luksroot.nix
+++ b/nixos/modules/system/boot/luksroot.nix
@@ -4,6 +4,7 @@ with lib;
let
luks = config.boot.initrd.luks;
+ kernelPackages = config.boot.kernelPackages;
commonFunctions = ''
die() {
@@ -139,7 +140,7 @@ let
umount /crypt-ramfs 2>/dev/null
'';
- openCommand = name': { name, device, header, keyFile, keyFileSize, keyFileOffset, allowDiscards, yubikey, gpgCard, fallbackToPassword, ... }: assert name' == name;
+ openCommand = name': { name, device, header, keyFile, keyFileSize, keyFileOffset, allowDiscards, yubikey, gpgCard, fido2, fallbackToPassword, ... }: assert name' == name;
let
csopen = "cryptsetup luksOpen ${device} ${name} ${optionalString allowDiscards "--allow-discards"} ${optionalString (header != null) "--header=${header}"}";
cschange = "cryptsetup luksChangeKey ${device} ${optionalString (header != null) "--header=${header}"}";
@@ -387,7 +388,31 @@ let
}
''}
- ${if (luks.yubikeySupport && (yubikey != null)) || (luks.gpgSupport && (gpgCard != null)) then ''
+ ${optionalString (luks.fido2Support && (fido2.credential != null)) ''
+
+ open_with_hardware() {
+ local passsphrase
+
+ ${if fido2.passwordLess then ''
+ export passphrase=""
+ '' else ''
+ read -rsp "FIDO2 salt for ${device}: " passphrase
+ echo
+ ''}
+ ${optionalString (lib.versionOlder kernelPackages.kernel.version "5.4") ''
+ echo "On systems with Linux Kernel < 5.4, it might take a while to initialize the CRNG, you might want to use linuxPackages_latest."
+ echo "Please move your mouse to create needed randomness."
+ ''}
+ echo "Waiting for your FIDO2 device..."
+ fido2luks -i open ${device} ${name} ${fido2.credential} --await-dev ${toString fido2.gracePeriod} --salt string:$passphrase
+ if [ $? -ne 0 ]; then
+ echo "No FIDO2 key found, falling back to normal open procedure"
+ open_normally
+ fi
+ }
+ ''}
+
+ ${if (luks.yubikeySupport && (yubikey != null)) || (luks.gpgSupport && (gpgCard != null)) || (luks.fido2Support && (fido2.credential != null)) then ''
open_with_hardware
'' else ''
open_normally
@@ -608,6 +633,31 @@ in
});
};
+ fido2 = {
+ credential = mkOption {
+ default = null;
+ example = "f1d00200d8dc783f7fb1e10ace8da27f8312d72692abfca2f7e4960a73f48e82e1f7571f6ebfcee9fb434f9886ccc8fcc52a6614d8d2";
+ type = types.str;
+ description = "The FIDO2 credential ID.";
+ };
+
+ gracePeriod = mkOption {
+ default = 10;
+ type = types.int;
+ description = "Time in seconds to wait for the FIDO2 key.";
+ };
+
+ passwordLess = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Defines whatever to use an empty string as a default salt.
+
+ Enable only when your device is PIN protected, such as Trezor.
+ '';
+ };
+ };
+
yubikey = mkOption {
default = null;
description = ''
@@ -706,6 +756,15 @@ in
and a Yubikey to work with this feature.
'';
};
+
+ boot.initrd.luks.fido2Support = mkOption {
+ default = false;
+ type = types.bool;
+ description = ''
+ Enables support for authenticating with FIDO2 devices.
+ '';
+ };
+
};
config = mkIf (luks.devices != {} || luks.forceLuksSupportInInitrd) {
@@ -714,6 +773,14 @@ in
[ { assertion = !(luks.gpgSupport && luks.yubikeySupport);
message = "Yubikey and GPG Card may not be used at the same time.";
}
+
+ { assertion = !(luks.gpgSupport && luks.fido2Support);
+ message = "FIDO2 and GPG Card may not be used at the same time.";
+ }
+
+ { assertion = !(luks.fido2Support && luks.yubikeySupport);
+ message = "FIDO2 and Yubikey may not be used at the same time.";
+ }
];
# actually, sbp2 driver is the one enabling the DMA attack, but this needs to be tested
@@ -753,6 +820,11 @@ in
chmod +x $out/bin/openssl-wrap
''}
+ ${optionalString luks.fido2Support ''
+ copy_bin_and_libs ${pkgs.fido2luks}/bin/fido2luks
+ ''}
+
+
${optionalString luks.gpgSupport ''
copy_bin_and_libs ${pkgs.gnupg}/bin/gpg
copy_bin_and_libs ${pkgs.gnupg}/bin/gpg-agent
@@ -783,6 +855,9 @@ in
$out/bin/gpg-agent --version
$out/bin/scdaemon --version
''}
+ ${optionalString luks.fido2Support ''
+ $out/bin/fido2luks --version
+ ''}
'';
boot.initrd.preFailCommands = postCommands;
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 3e289a63139..56a9d6b1138 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -49,7 +49,7 @@ let
(assertValueOneOf "Kind" [
"bond" "bridge" "dummy" "gre" "gretap" "ip6gre" "ip6tnl" "ip6gretap" "ipip"
"ipvlan" "macvlan" "macvtap" "sit" "tap" "tun" "veth" "vlan" "vti" "vti6"
- "vxlan" "geneve" "vrf" "vcan" "vxcan" "wireguard" "netdevsim"
+ "vxlan" "geneve" "vrf" "vcan" "vxcan" "wireguard" "netdevsim" "xfrm"
])
(assertByteFormat "MTUBytes")
(assertMacAddress "MACAddress")
@@ -172,6 +172,14 @@ let
(assertValueOneOf "AllSlavesActive" boolValues)
];
+ checkXfrm = checkUnitConfig "Xfrm" [
+ (assertOnlyFields [
+ "InterfaceId" "Independent"
+ ])
+ (assertRange "InterfaceId" 1 4294967295)
+ (assertValueOneOf "Independent" boolValues)
+ ];
+
checkNetwork = checkUnitConfig "Network" [
(assertOnlyFields [
"Description" "DHCP" "DHCPServer" "LinkLocalAddressing" "IPv4LLRoute"
@@ -182,7 +190,7 @@ let
"IPv6HopLimit" "IPv4ProxyARP" "IPv6ProxyNDP" "IPv6ProxyNDPAddress"
"IPv6PrefixDelegation" "IPv6MTUBytes" "Bridge" "Bond" "VRF" "VLAN"
"IPVLAN" "MACVLAN" "VXLAN" "Tunnel" "ActiveSlave" "PrimarySlave"
- "ConfigureWithoutCarrier"
+ "ConfigureWithoutCarrier" "Xfrm"
])
# Note: For DHCP the values both, none, v4, v6 are deprecated
(assertValueOneOf "DHCP" ["yes" "no" "ipv4" "ipv6" "both" "none" "v4" "v6"])
@@ -477,6 +485,18 @@ let
'';
};
+ xfrmConfig = mkOption {
+ default = {};
+ example = { InterfaceId = 1; };
+ type = types.addCheck (types.attrsOf unitOption) checkXfrm;
+ description = ''
+ Each attribute in this set specifies an option in the
+ [Xfrm] section of the unit. See
+ systemd.netdev
+ 5 for details.
+ '';
+ };
+
};
addressOptions = {
@@ -712,6 +732,16 @@ let
'';
};
+ xfrm = mkOption {
+ default = [ ];
+ type = types.listOf types.str;
+ description = ''
+ A list of xfrm interfaces to be added to the network section of the
+ unit. See systemd.network
+ 5 for details.
+ '';
+ };
+
addresses = mkOption {
default = [ ];
type = with types; listOf (submodule addressOptions);
@@ -809,6 +839,11 @@ let
[Bond]
${attrsToSection def.bondConfig}
+ ''}
+ ${optionalString (def.xfrmConfig != { }) ''
+ [Xfrm]
+ ${attrsToSection def.xfrmConfig}
+
''}
${optionalString (def.wireguardConfig != { }) ''
[WireGuard]
@@ -847,6 +882,7 @@ let
${concatStringsSep "\n" (map (s: "MACVLAN=${s}") def.macvlan)}
${concatStringsSep "\n" (map (s: "VXLAN=${s}") def.vxlan)}
${concatStringsSep "\n" (map (s: "Tunnel=${s}") def.tunnel)}
+ ${concatStringsSep "\n" (map (s: "Xfrm=${s}") def.xfrm)}
${optionalString (def.dhcpConfig != { }) ''
[DHCP]
diff --git a/nixos/modules/system/boot/systemd-lib.nix b/nixos/modules/system/boot/systemd-lib.nix
index 28ad4f121bb..fd1a5b9f62c 100644
--- a/nixos/modules/system/boot/systemd-lib.nix
+++ b/nixos/modules/system/boot/systemd-lib.nix
@@ -147,7 +147,13 @@ in rec {
done
# Symlink all units provided listed in systemd.packages.
- for i in ${toString cfg.packages}; do
+ packages="${toString cfg.packages}"
+
+ # Filter duplicate directories
+ declare -A unique_packages
+ for k in $packages ; do unique_packages[$k]=1 ; done
+
+ for i in ''${!unique_packages[@]}; do
for fn in $i/etc/systemd/${type}/* $i/lib/systemd/${type}/*; do
if ! [[ "$fn" =~ .wants$ ]]; then
if [[ -d "$fn" ]]; then
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index c438bb216e7..941df5797c6 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -869,11 +869,15 @@ in
"sysctl.d/50-coredump.conf".source = "${systemd}/example/sysctl.d/50-coredump.conf";
"sysctl.d/50-default.conf".source = "${systemd}/example/sysctl.d/50-default.conf";
+ "tmpfiles.d/home.conf".source = "${systemd}/example/tmpfiles.d/home.conf";
"tmpfiles.d/journal-nocow.conf".source = "${systemd}/example/tmpfiles.d/journal-nocow.conf";
+ "tmpfiles.d/portables.conf".source = "${systemd}/example/tmpfiles.d/portables.conf";
"tmpfiles.d/static-nodes-permissions.conf".source = "${systemd}/example/tmpfiles.d/static-nodes-permissions.conf";
"tmpfiles.d/systemd.conf".source = "${systemd}/example/tmpfiles.d/systemd.conf";
+ "tmpfiles.d/systemd-nologin.conf".source = "${systemd}/example/tmpfiles.d/systemd-nologin.conf";
"tmpfiles.d/systemd-nspawn.conf".source = "${systemd}/example/tmpfiles.d/systemd-nspawn.conf";
"tmpfiles.d/systemd-tmp.conf".source = "${systemd}/example/tmpfiles.d/systemd-tmp.conf";
+ "tmpfiles.d/tmp.conf".source = "${systemd}/example/tmpfiles.d/tmp.conf";
"tmpfiles.d/var.conf".source = "${systemd}/example/tmpfiles.d/var.conf";
"tmpfiles.d/x11.conf".source = "${systemd}/example/tmpfiles.d/x11.conf";
diff --git a/nixos/modules/virtualisation/amazon-init.nix b/nixos/modules/virtualisation/amazon-init.nix
index 8032b2c6d7c..8c12e0e49bf 100644
--- a/nixos/modules/virtualisation/amazon-init.nix
+++ b/nixos/modules/virtualisation/amazon-init.nix
@@ -7,8 +7,8 @@ let
echo "attempting to fetch configuration from EC2 user data..."
export HOME=/root
- export PATH=${pkgs.lib.makeBinPath [ config.nix.package pkgs.systemd pkgs.gnugrep pkgs.gnused config.system.build.nixos-rebuild]}:$PATH
- export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
+ export PATH=${pkgs.lib.makeBinPath [ config.nix.package pkgs.systemd pkgs.gnugrep pkgs.git pkgs.gnutar pkgs.gzip pkgs.gnused config.system.build.nixos-rebuild]}:$PATH
+ export NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
userData=/etc/ec2-metadata/user-data
@@ -18,9 +18,9 @@ let
# that as the channel.
if sed '/^\(#\|SSH_HOST_.*\)/d' < "$userData" | grep -q '\S'; then
channels="$(grep '^###' "$userData" | sed 's|###\s*||')"
- printf "%s" "$channels" | while read channel; do
+ while IFS= read -r channel; do
echo "writing channel: $channel"
- done
+ done < <(printf "%s\n" "$channels")
if [[ -n "$channels" ]]; then
printf "%s" "$channels" > /root/.nix-channels
@@ -48,7 +48,7 @@ in {
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
requires = [ "network-online.target" ];
-
+
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
@@ -58,4 +58,3 @@ in {
};
};
}
-
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
index ca9c6f9a7f9..b46731863ca 100644
--- a/nixos/release-combined.nix
+++ b/nixos/release-combined.nix
@@ -54,7 +54,7 @@ in rec {
(all nixos.dummy)
(all nixos.manual)
- nixos.iso_graphical.x86_64-linux or []
+ nixos.iso_plasma5.x86_64-linux or []
nixos.iso_minimal.aarch64-linux or []
nixos.iso_minimal.i686-linux or []
nixos.iso_minimal.x86_64-linux or []
diff --git a/nixos/release.nix b/nixos/release.nix
index f40b5fa9bd7..512ba714397 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -149,9 +149,9 @@ in rec {
inherit system;
});
- iso_graphical = forMatchingSystems [ "x86_64-linux" ] (system: makeIso {
- module = ./modules/installer/cd-dvd/installation-cd-graphical-kde.nix;
- type = "graphical";
+ iso_plasma5 = forMatchingSystems [ "x86_64-linux" ] (system: makeIso {
+ module = ./modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix;
+ type = "plasma5";
inherit system;
});
@@ -209,7 +209,8 @@ in rec {
hydraJob ((import lib/eval-config.nix {
inherit system;
modules =
- [ versionModule
+ [ configuration
+ versionModule
./maintainers/scripts/ec2/amazon-image.nix
];
}).config.system.build.amazonImage)
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 67dfd931d4b..8c11464f9d6 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -33,6 +33,7 @@ in
bind = handleTest ./bind.nix {};
bittorrent = handleTest ./bittorrent.nix {};
#blivet = handleTest ./blivet.nix {}; # broken since 2017-07024
+ buildkite-agent = handleTest ./buildkite-agent.nix {};
boot = handleTestOn ["x86_64-linux"] ./boot.nix {}; # syslinux is unsupported on aarch64
boot-stage1 = handleTest ./boot-stage1.nix {};
borgbackup = handleTest ./borgbackup.nix {};
@@ -61,6 +62,7 @@ in
containers-portforward = handleTest ./containers-portforward.nix {};
containers-restart_networking = handleTest ./containers-restart_networking.nix {};
containers-tmpfs = handleTest ./containers-tmpfs.nix {};
+ corerad = handleTest ./corerad.nix {};
couchdb = handleTest ./couchdb.nix {};
deluge = handleTest ./deluge.nix {};
dhparams = handleTest ./dhparams.nix {};
@@ -73,6 +75,7 @@ in
docker-tools = handleTestOn ["x86_64-linux"] ./docker-tools.nix {};
docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {};
documize = handleTest ./documize.nix {};
+ dokuwiki = handleTest ./dokuwiki.nix {};
dovecot = handleTest ./dovecot.nix {};
# ec2-config doesn't work in a sandbox as the simulated ec2 instance needs network access
#ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {};
diff --git a/nixos/tests/buildkite-agent.nix b/nixos/tests/buildkite-agent.nix
new file mode 100644
index 00000000000..3c824c9aedf
--- /dev/null
+++ b/nixos/tests/buildkite-agent.nix
@@ -0,0 +1,36 @@
+import ./make-test-python.nix ({ pkgs, ... }:
+
+{
+ name = "buildkite-agent";
+ meta = with pkgs.stdenv.lib.maintainers; {
+ maintainers = [ flokli ];
+ };
+
+ nodes = {
+ node1 = { pkgs, ... }: {
+ services.buildkite-agent = {
+ enable = true;
+ privateSshKeyPath = (import ./ssh-keys.nix pkgs).snakeOilPrivateKey;
+ tokenPath = (pkgs.writeText "my-token" "5678");
+ };
+ };
+ # don't configure ssh key, run as a separate user
+ node2 = { pkgs, ...}: {
+ services.buildkite-agent = {
+ enable = true;
+ tokenPath = (pkgs.writeText "my-token" "1234");
+ };
+ };
+ };
+
+ testScript = ''
+ start_all()
+ # we can't wait on the unit to start up, as we obviously can't connect to buildkite,
+ # but we can look whether files are set up correctly
+
+ node1.wait_for_file("/var/lib/buildkite-agent/buildkite-agent.cfg")
+ node1.wait_for_file("/var/lib/buildkite-agent/.ssh/id_rsa")
+
+ node2.wait_for_file("/var/lib/buildkite-agent/buildkite-agent.cfg")
+ '';
+})
diff --git a/nixos/tests/certmgr.nix b/nixos/tests/certmgr.nix
index cb69f35e862..ef32f54400e 100644
--- a/nixos/tests/certmgr.nix
+++ b/nixos/tests/certmgr.nix
@@ -9,8 +9,8 @@ let
inherit action;
authority = {
file = {
- group = "nobody";
- owner = "nobody";
+ group = "nginx";
+ owner = "nginx";
path = "/tmp/${host}-ca.pem";
};
label = "www_ca";
@@ -18,14 +18,14 @@ let
remote = "localhost:8888";
};
certificate = {
- group = "nobody";
- owner = "nobody";
+ group = "nginx";
+ owner = "nginx";
path = "/tmp/${host}-cert.pem";
};
private_key = {
- group = "nobody";
+ group = "nginx";
mode = "0600";
- owner = "nobody";
+ owner = "nginx";
path = "/tmp/${host}-key.pem";
};
request = {
diff --git a/nixos/tests/common/ec2.nix b/nixos/tests/common/ec2.nix
index 1e69b63191a..ba087bb6009 100644
--- a/nixos/tests/common/ec2.nix
+++ b/nixos/tests/common/ec2.nix
@@ -25,7 +25,7 @@ with pkgs.lib;
my $imageDir = ($ENV{'TMPDIR'} // "/tmp") . "/vm-state-machine";
mkdir $imageDir, 0700;
my $diskImage = "$imageDir/machine.qcow2";
- system("qemu-img create -f qcow2 -o backing_file=${image}/nixos.qcow2 $diskImage") == 0 or die;
+ system("qemu-img create -f qcow2 -o backing_file=${image} $diskImage") == 0 or die;
system("qemu-img resize $diskImage 10G") == 0 or die;
# Note: we use net=169.0.0.0/8 rather than
@@ -35,7 +35,7 @@ with pkgs.lib;
# again when it deletes link-local addresses.) Ideally we'd
# turn off the DHCP server, but qemu does not have an option
# to do that.
- my $startCommand = "qemu-kvm -m 768";
+ my $startCommand = "qemu-kvm -m 1024";
$startCommand .= " -device virtio-net-pci,netdev=vlan0";
$startCommand .= " -netdev 'user,id=vlan0,net=169.0.0.0/8,guestfwd=tcp:169.254.169.254:80-cmd:${pkgs.micro-httpd}/bin/micro_httpd ${metaData}'";
$startCommand .= " -drive file=$diskImage,if=virtio,werror=report";
diff --git a/nixos/tests/corerad.nix b/nixos/tests/corerad.nix
new file mode 100644
index 00000000000..950c9abc899
--- /dev/null
+++ b/nixos/tests/corerad.nix
@@ -0,0 +1,70 @@
+import ./make-test-python.nix (
+ {
+ nodes = {
+ router = {config, pkgs, ...}: {
+ config = {
+ # This machines simulates a router with IPv6 forwarding and a static IPv6 address.
+ boot.kernel.sysctl = {
+ "net.ipv6.conf.all.forwarding" = true;
+ };
+ networking.interfaces.eth1 = {
+ ipv6.addresses = [ { address = "fd00:dead:beef:dead::1"; prefixLength = 64; } ];
+ };
+ services.corerad = {
+ enable = true;
+ # Serve router advertisements to the client machine with prefix information matching
+ # any IPv6 /64 prefixes configured on this interface.
+ configFile = pkgs.writeText "corerad.toml" ''
+ [[interfaces]]
+ name = "eth1"
+ send_advertisements = true
+ [[interfaces.prefix]]
+ prefix = "::/64"
+ '';
+ };
+ };
+ };
+ client = {config, pkgs, ...}: {
+ # Use IPv6 SLAAC from router advertisements, and install rdisc6 so we can
+ # trigger one immediately.
+ config = {
+ boot.kernel.sysctl = {
+ "net.ipv6.conf.all.autoconf" = true;
+ };
+ environment.systemPackages = with pkgs; [
+ ndisc6
+ ];
+ };
+ };
+ };
+
+ testScript = ''
+ start_all()
+
+ with subtest("Wait for CoreRAD and network ready"):
+ # Ensure networking is online and CoreRAD is ready.
+ router.wait_for_unit("network-online.target")
+ client.wait_for_unit("network-online.target")
+ router.wait_for_unit("corerad.service")
+
+ # Ensure the client can reach the router.
+ client.wait_until_succeeds("ping -c 1 fd00:dead:beef:dead::1")
+
+ with subtest("Verify SLAAC on client"):
+ # Trigger a router solicitation and verify a SLAAC address is assigned from
+ # the prefix configured on the router.
+ client.wait_until_succeeds("rdisc6 -1 -r 10 eth1")
+ client.wait_until_succeeds(
+ "ip -6 addr show dev eth1 | grep -q 'fd00:dead:beef:dead:'"
+ )
+
+ addrs = client.succeed("ip -6 addr show dev eth1")
+
+ assert (
+ "fd00:dead:beef:dead:" in addrs
+ ), "SLAAC prefix was not found in client addresses after router advertisement"
+ assert (
+ "/64 scope global temporary" in addrs
+ ), "SLAAC temporary address was not configured on client after router advertisement"
+ '';
+ })
diff --git a/nixos/tests/dokuwiki.nix b/nixos/tests/dokuwiki.nix
new file mode 100644
index 00000000000..38bde10f47e
--- /dev/null
+++ b/nixos/tests/dokuwiki.nix
@@ -0,0 +1,29 @@
+import ./make-test-python.nix ({ lib, ... }:
+
+with lib;
+
+{
+ name = "dokuwiki";
+ meta.maintainers = with maintainers; [ maintainers."1000101" ];
+
+ nodes.machine =
+ { pkgs, ... }:
+ { services.dokuwiki = {
+ enable = true;
+ acl = " ";
+ superUser = null;
+ nginx = {
+ forceSSL = false;
+ enableACME = false;
+ };
+ };
+ };
+
+ testScript = ''
+ machine.start()
+ machine.wait_for_unit("phpfpm-dokuwiki.service")
+ machine.wait_for_unit("nginx.service")
+ machine.wait_for_open_port(80)
+ machine.succeed("curl -sSfL http://localhost/ | grep 'DokuWiki'")
+ '';
+})
diff --git a/nixos/tests/ec2.nix b/nixos/tests/ec2.nix
index c649ce852da..6aeeb17ba31 100644
--- a/nixos/tests/ec2.nix
+++ b/nixos/tests/ec2.nix
@@ -9,7 +9,7 @@ with pkgs.lib;
with import common/ec2.nix { inherit makeTest pkgs; };
let
- image =
+ imageCfg =
(import ../lib/eval-config.nix {
inherit system;
modules = [
@@ -26,20 +26,32 @@ let
'';
# Needed by nixos-rebuild due to the lack of network
- # access. Mostly copied from
- # modules/profiles/installation-device.nix.
+ # access. Determined by trial and error.
system.extraDependencies =
- with pkgs; [
- stdenv busybox perlPackages.ArchiveCpio unionfs-fuse mkinitcpio-nfs-utils
+ with pkgs; (
+ [
+ # Needed for a nixos-rebuild.
+ busybox
+ stdenv
+ stdenvNoCC
+ mkinitcpio-nfs-utils
+ unionfs-fuse
+ cloud-utils
+ desktop-file-utils
+ texinfo
+ libxslt.bin
+ xorg.lndir
- # These are used in the configure-from-userdata tests for EC2. Httpd and valgrind are requested
- # directly by the configuration we set, and libxslt.bin is used indirectly as a build dependency
- # of the derivation for dbus configuration files.
- apacheHttpd valgrind.doc libxslt.bin
- ];
+ # These are used in the configure-from-userdata tests
+ # for EC2. Httpd and valgrind are requested by the
+ # configuration.
+ apacheHttpd apacheHttpd.doc apacheHttpd.man valgrind.doc
+ ]
+ );
}
];
- }).config.system.build.amazonImage;
+ }).config;
+ image = "${imageCfg.system.build.amazonImage}/${imageCfg.amazonImage.name}.vhd";
sshKeys = import ./ssh-keys.nix pkgs;
snakeOilPrivateKey = sshKeys.snakeOilPrivateKey.text;
@@ -110,16 +122,23 @@ in {
text = "whoa";
};
+ networking.hostName = "ec2-test-vm"; # required by services.httpd
+
services.httpd = {
enable = true;
adminAddr = "test@example.org";
- virtualHosts.localhost.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
+ virtualHosts.localhost.documentRoot = "''${pkgs.valgrind.doc}/share/doc/valgrind/html";
};
networking.firewall.allowedTCPPorts = [ 80 ];
}
'';
script = ''
$machine->start;
+
+ # amazon-init must succeed. if it fails, make the test fail
+ # immediately instead of timing out in waitForFile.
+ $machine->waitForUnit('amazon-init.service');
+
$machine->waitForFile("/etc/testFile");
$machine->succeed("cat /etc/testFile | grep -q 'whoa'");
diff --git a/nixos/tests/elk.nix b/nixos/tests/elk.nix
index 80db0967d40..d3dc6dde135 100644
--- a/nixos/tests/elk.nix
+++ b/nixos/tests/elk.nix
@@ -10,8 +10,7 @@ let
esUrl = "http://localhost:9200";
mkElkTest = name : elk :
- let elasticsearchGe7 = builtins.compareVersions elk.elasticsearch.version "7" >= 0;
- in import ./make-test-python.nix ({
+ import ./make-test-python.nix ({
inherit name;
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco offline basvandijk ];
@@ -91,8 +90,7 @@ let
};
elasticsearch-curator = {
- # The current version of curator (5.6) doesn't support elasticsearch >= 7.0.0.
- enable = !elasticsearchGe7;
+ enable = true;
actionYAML = ''
---
actions:
@@ -173,7 +171,7 @@ let
one.wait_until_succeeds(
total_hits("Supercalifragilisticexpialidocious") + " | grep -v 0"
)
- '' + pkgs.lib.optionalString (!elasticsearchGe7) ''
+
with subtest("Elasticsearch-curator works"):
one.systemctl("stop logstash")
one.systemctl("start elasticsearch-curator")
diff --git a/nixos/tests/limesurvey.nix b/nixos/tests/limesurvey.nix
index ad66ada106b..7228fcb8331 100644
--- a/nixos/tests/limesurvey.nix
+++ b/nixos/tests/limesurvey.nix
@@ -1,21 +1,26 @@
-import ./make-test.nix ({ pkgs, ... }: {
+import ./make-test-python.nix ({ pkgs, ... }: {
name = "limesurvey";
meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ];
- machine =
- { ... }:
- { services.limesurvey.enable = true;
- services.limesurvey.virtualHost.hostName = "example.local";
- services.limesurvey.virtualHost.adminAddr = "root@example.local";
-
- # limesurvey won't work without a dot in the hostname
- networking.hosts."127.0.0.1" = [ "example.local" ];
+ machine = { ... }: {
+ services.limesurvey = {
+ enable = true;
+ virtualHost = {
+ hostName = "example.local";
+ adminAddr = "root@example.local";
+ };
};
- testScript = ''
- startAll;
+ # limesurvey won't work without a dot in the hostname
+ networking.hosts."127.0.0.1" = [ "example.local" ];
+ };
- $machine->waitForUnit('phpfpm-limesurvey.service');
- $machine->succeed('curl http://example.local/') =~ /The following surveys are available/ or die;
+ testScript = ''
+ start_all()
+
+ machine.wait_for_unit("phpfpm-limesurvey.service")
+ assert "The following surveys are available" in machine.succeed(
+ "curl http://example.local/"
+ )
'';
})
diff --git a/nixos/tests/openstack-image.nix b/nixos/tests/openstack-image.nix
index d0225016ab7..8a21dd1b599 100644
--- a/nixos/tests/openstack-image.nix
+++ b/nixos/tests/openstack-image.nix
@@ -17,7 +17,7 @@ let
../modules/testing/test-instrumentation.nix
../modules/profiles/qemu-guest.nix
];
- }).config.system.build.openstackImage;
+ }).config.system.build.openstackImage + "/nixos.qcow2";
sshKeys = import ./ssh-keys.nix pkgs;
snakeOilPrivateKey = sshKeys.snakeOilPrivateKey.text;
diff --git a/nixos/tests/proxy.nix b/nixos/tests/proxy.nix
index 3859d429c21..6a14a9af59a 100644
--- a/nixos/tests/proxy.nix
+++ b/nixos/tests/proxy.nix
@@ -1,97 +1,90 @@
-import ./make-test.nix ({ pkgs, ...} :
+import ./make-test-python.nix ({ pkgs, ...} :
let
-
- backend =
- { pkgs, ... }:
-
- { services.httpd.enable = true;
- services.httpd.adminAddr = "foo@example.org";
- services.httpd.virtualHosts.localhost.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
- networking.firewall.allowedTCPPorts = [ 80 ];
+ backend = { pkgs, ... }: {
+ services.httpd = {
+ enable = true;
+ adminAddr = "foo@example.org";
+ virtualHosts.localhost.documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
};
-
-in
-
-{
+ networking.firewall.allowedTCPPorts = [ 80 ];
+ };
+in {
name = "proxy";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco ];
};
- nodes =
- { proxy =
- { nodes, ... }:
+ nodes = {
+ proxy = { nodes, ... }: {
+ services.httpd = {
+ enable = true;
+ adminAddr = "bar@example.org";
+ extraModules = [ "proxy_balancer" "lbmethod_byrequests" ];
+ extraConfig = ''
+ ExtendedStatus on
+ '';
+ virtualHosts.localhost = {
+ extraConfig = ''
+
+ Require all granted
+ SetHandler server-status
+
- { services.httpd.enable = true;
- services.httpd.adminAddr = "bar@example.org";
- services.httpd.extraModules = [ "proxy_balancer" "lbmethod_byrequests" ];
- services.httpd.extraConfig = ''
- ExtendedStatus on
+
+ Require all granted
+ BalancerMember http://${nodes.backend1.config.networking.hostName} retry=0
+ BalancerMember http://${nodes.backend2.config.networking.hostName} retry=0
+
+
+ ProxyStatus full
+ ProxyPass /server-status !
+ ProxyPass / balancer://cluster/
+ ProxyPassReverse / balancer://cluster/
+
+ # For testing; don't want to wait forever for dead backend servers.
+ ProxyTimeout 5
'';
- services.httpd.virtualHosts.localhost = {
- extraConfig = ''
-
- Require all granted
- SetHandler server-status
-
-
-
- Require all granted
- BalancerMember http://${nodes.backend1.config.networking.hostName} retry=0
- BalancerMember http://${nodes.backend2.config.networking.hostName} retry=0
-
-
- ProxyStatus full
- ProxyPass /server-status !
- ProxyPass / balancer://cluster/
- ProxyPassReverse / balancer://cluster/
-
- # For testing; don't want to wait forever for dead backend servers.
- ProxyTimeout 5
- '';
- };
-
- networking.firewall.allowedTCPPorts = [ 80 ];
};
-
- backend1 = backend;
- backend2 = backend;
-
- client = { ... }: { };
+ };
+ networking.firewall.allowedTCPPorts = [ 80 ];
};
- testScript =
- ''
- startAll;
+ backend1 = backend;
+ backend2 = backend;
- $proxy->waitForUnit("httpd");
- $backend1->waitForUnit("httpd");
- $backend2->waitForUnit("httpd");
- $client->waitForUnit("network.target");
+ client = { ... }: { };
+ };
- # With the back-ends up, the proxy should work.
- $client->succeed("curl --fail http://proxy/");
+ testScript = ''
+ start_all()
- $client->succeed("curl --fail http://proxy/server-status");
+ proxy.wait_for_unit("httpd")
+ backend1.wait_for_unit("httpd")
+ backend2.wait_for_unit("httpd")
+ client.wait_for_unit("network.target")
- # Block the first back-end.
- $backend1->block;
+ # With the back-ends up, the proxy should work.
+ client.succeed("curl --fail http://proxy/")
- # The proxy should still work.
- $client->succeed("curl --fail http://proxy/");
+ client.succeed("curl --fail http://proxy/server-status")
- $client->succeed("curl --fail http://proxy/");
+ # Block the first back-end.
+ backend1.block()
- # Block the second back-end.
- $backend2->block;
+ # The proxy should still work.
+ client.succeed("curl --fail http://proxy/")
+ client.succeed("curl --fail http://proxy/")
- # Now the proxy should fail as well.
- $client->fail("curl --fail http://proxy/");
+ # Block the second back-end.
+ backend2.block()
- # But if the second back-end comes back, the proxy should start
- # working again.
- $backend2->unblock;
- $client->succeed("curl --fail http://proxy/");
- '';
+ # Now the proxy should fail as well.
+ client.fail("curl --fail http://proxy/")
+
+ # But if the second back-end comes back, the proxy should start
+ # working again.
+ backend2.unblock()
+ client.succeed("curl --fail http://proxy/")
+ '';
})
diff --git a/nixos/tests/solr.nix b/nixos/tests/solr.nix
index 2108e851bc5..23e1a960fb3 100644
--- a/nixos/tests/solr.nix
+++ b/nixos/tests/solr.nix
@@ -1,65 +1,48 @@
-{ system ? builtins.currentSystem,
- config ? {},
- pkgs ? import ../.. { inherit system config; }
-}:
+import ./make-test.nix ({ pkgs, ... }:
-with import ../lib/testing.nix { inherit system pkgs; };
-with pkgs.lib;
-
-let
- solrTest = package: makeTest {
- machine =
- { config, pkgs, ... }:
- {
- # Ensure the virtual machine has enough memory for Solr to avoid the following error:
- #
- # OpenJDK 64-Bit Server VM warning:
- # INFO: os::commit_memory(0x00000000e8000000, 402653184, 0)
- # failed; error='Cannot allocate memory' (errno=12)
- #
- # There is insufficient memory for the Java Runtime Environment to continue.
- # Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory.
- virtualisation.memorySize = 2000;
-
- services.solr.enable = true;
- services.solr.package = package;
- };
-
- testScript = ''
- startAll;
-
- $machine->waitForUnit('solr.service');
- $machine->waitForOpenPort('8983');
- $machine->succeed('curl --fail http://localhost:8983/solr/');
-
- # adapted from pkgs.solr/examples/films/README.txt
- $machine->succeed('sudo -u solr solr create -c films');
- $machine->succeed(q(curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{
- "add-field" : {
- "name":"name",
- "type":"text_general",
- "multiValued":false,
- "stored":true
- },
- "add-field" : {
- "name":"initial_release_date",
- "type":"pdate",
- "stored":true
- }
- }')) =~ /"status":0/ or die;
- $machine->succeed('sudo -u solr post -c films ${pkgs.solr}/example/films/films.json');
- $machine->succeed('curl http://localhost:8983/solr/films/query?q=name:batman') =~ /"name":"Batman Begins"/ or die;
- '';
- };
-in
{
- solr_7 = solrTest pkgs.solr_7 // {
- name = "solr_7";
- meta.maintainers = [ lib.maintainers.aanderse ];
- };
+ name = "solr";
+ meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ];
- solr_8 = solrTest pkgs.solr_8 // {
- name = "solr_8";
- meta.maintainers = [ lib.maintainers.aanderse ];
- };
-}
+ machine =
+ { config, pkgs, ... }:
+ {
+ # Ensure the virtual machine has enough memory for Solr to avoid the following error:
+ #
+ # OpenJDK 64-Bit Server VM warning:
+ # INFO: os::commit_memory(0x00000000e8000000, 402653184, 0)
+ # failed; error='Cannot allocate memory' (errno=12)
+ #
+ # There is insufficient memory for the Java Runtime Environment to continue.
+ # Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory.
+ virtualisation.memorySize = 2000;
+
+ services.solr.enable = true;
+ };
+
+ testScript = ''
+ startAll;
+
+ $machine->waitForUnit('solr.service');
+ $machine->waitForOpenPort('8983');
+ $machine->succeed('curl --fail http://localhost:8983/solr/');
+
+ # adapted from pkgs.solr/examples/films/README.txt
+ $machine->succeed('sudo -u solr solr create -c films');
+ $machine->succeed(q(curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{
+ "add-field" : {
+ "name":"name",
+ "type":"text_general",
+ "multiValued":false,
+ "stored":true
+ },
+ "add-field" : {
+ "name":"initial_release_date",
+ "type":"pdate",
+ "stored":true
+ }
+ }')) =~ /"status":0/ or die;
+ $machine->succeed('sudo -u solr post -c films ${pkgs.solr}/example/films/films.json');
+ $machine->succeed('curl http://localhost:8983/solr/films/query?q=name:batman') =~ /"name":"Batman Begins"/ or die;
+ '';
+})
diff --git a/pkgs/applications/accessibility/dasher/default.nix b/pkgs/applications/accessibility/dasher/default.nix
new file mode 100644
index 00000000000..9e8084e7a87
--- /dev/null
+++ b/pkgs/applications/accessibility/dasher/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, lib, fetchFromGitHub
+, autoreconfHook, pkgconfig, wrapGAppsHook
+, glib, gtk3, expat, gnome-doc-utils, which
+, at-spi2-core, dbus
+, libxslt, libxml2
+, speechSupport ? true, speechd ? null
+}:
+
+assert speechSupport -> speechd != null;
+
+stdenv.mkDerivation {
+ pname = "dasher";
+ version = "2018-04-03";
+
+ src = fetchFromGitHub {
+ owner = "dasher-project";
+ repo = "dasher";
+ rev = "9ab12462e51d17a38c0ddc7f7ffe1cb5fe83b627";
+ sha256 = "1r9xn966nx3pv2bidd6i3pxmprvlw6insnsb38zabmac609h9d9s";
+ };
+
+ prePatch = ''
+ # tries to invoke git for something, probably fetching the ref
+ echo "true" > build-aux/mkversion
+ '';
+
+ configureFlags = lib.optional (!speechSupport) "--disable-speech";
+
+ nativeBuildInputs = [
+ autoreconfHook
+ wrapGAppsHook
+ pkgconfig
+ # doc generation
+ gnome-doc-utils
+ which
+ libxslt libxml2
+ ];
+
+ buildInputs = [
+ glib
+ gtk3
+ expat
+ # at-spi2 needs dbus to be recognized by pkg-config
+ at-spi2-core dbus
+ ] ++ lib.optional speechSupport speechd;
+
+ meta = {
+ homepage = http://www.inference.org.uk/dasher/;
+ description = "Information-efficient text-entry interface, driven by natural continuous pointing gestures";
+ license = lib.licenses.gpl2;
+ maintainers = [ lib.maintainers.Profpatsch ];
+ platforms = lib.platforms.all;
+ };
+
+}
diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix
index 0cff19819c0..64ee40e038c 100644
--- a/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix
@@ -2,18 +2,16 @@
bitwig-studio1.overrideAttrs (oldAttrs: rec {
name = "bitwig-studio-${version}";
- version = "3.1.1";
+ version = "3.1.2";
src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
- sha256 = "1mgyyl1mr8hmzn3qdmg77km6sk58hyd0gsqr9jksh0a8p6hj24pk";
+ sha256 = "07djn52lz43ls6fa4k1ncz3m1nc5zv2j93hwyavnr66r0hlqy7l9";
};
buildInputs = oldAttrs.buildInputs ++ [ xorg.libXtst ];
- runtimeDependencies = [
- pulseaudio
- ];
+ runtimeDependencies = [ pulseaudio ];
installPhase = ''
${oldAttrs.installPhase}
diff --git a/pkgs/applications/audio/bshapr/default.nix b/pkgs/applications/audio/bshapr/default.nix
index 732a8cf1ce2..88a671495c3 100644
--- a/pkgs/applications/audio/bshapr/default.nix
+++ b/pkgs/applications/audio/bshapr/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "BShapr";
- version = "0.6";
+ version = "0.7";
src = fetchFromGitHub {
owner = "sjaehn";
repo = pname;
rev = "v${version}";
- sha256 = "0mi8f0svq1h9cmmxyskcazr5x2q4dls3j9jc6ahi5rlk7i0bpa74";
+ sha256 = "1422xay28jkmqlj5y4vhb57kljy6ysvxh20cxpfxm980m8n54gq5";
};
nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/audio/bslizr/default.nix b/pkgs/applications/audio/bslizr/default.nix
index 3273d7de68c..97a9d60ec27 100644
--- a/pkgs/applications/audio/bslizr/default.nix
+++ b/pkgs/applications/audio/bslizr/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "BSlizr";
- version = "1.2.2";
+ version = "1.2.4";
src = fetchFromGitHub {
owner = "sjaehn";
repo = pname;
rev = "${version}";
- sha256 = "0q92ygz17iiriwzqylmaxd5ml2bhqy3n6c3f7g71n4hn9z3bl3s1";
+ sha256 = "0gyczxhd1jch7lwz3y1nrbpc0dycw9cc5i144rpif6b9gd2y1h1j";
};
nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix
index 0d2858713eb..53d5330fb74 100644
--- a/pkgs/applications/audio/distrho/default.nix
+++ b/pkgs/applications/audio/distrho/default.nix
@@ -9,13 +9,13 @@ let
else "linux";
in stdenv.mkDerivation rec {
pname = "distrho-ports";
- version = "2018-04-16";
+ version = "unstable-2019-10-09";
src = fetchFromGitHub {
owner = "DISTRHO";
repo = "DISTRHO-Ports";
- rev = version;
- sha256 = "0l4zwl4mli8jzch32a1fh7c88r9q17xnkxsdw17ds5hadnxlk12v";
+ rev = "7e62235e809e59770d0d91d2c48c3f50ce7c027a";
+ sha256 = "10hpsjcmk0cgcsic9r1wxyja9x6q9wb8w8254dlrnzyswl54r1f8";
};
configurePhase = ''
diff --git a/pkgs/applications/audio/ecasound/default.nix b/pkgs/applications/audio/ecasound/default.nix
index 6c9cd628a51..c17f6b745b3 100644
--- a/pkgs/applications/audio/ecasound/default.nix
+++ b/pkgs/applications/audio/ecasound/default.nix
@@ -15,11 +15,11 @@
stdenv.mkDerivation rec {
pname = "ecasound";
- version = "2.9.2";
+ version = "2.9.3";
src = fetchurl {
url = "https://ecasound.seul.org/download/ecasound-${version}.tar.gz";
- sha256 = "15rcs28fq2wfvfs66p5na7adq88b55qszbhshpizgdbyqzgr2jf1";
+ sha256 = "1m7njfjdb7sqf0lhgc4swihgdr4snkg8v02wcly08wb5ar2fr2s6";
};
buildInputs = [ alsaLib audiofile libjack2 liblo liboil libsamplerate libsndfile lilv lv2 ];
diff --git a/pkgs/applications/audio/giada/default.nix b/pkgs/applications/audio/giada/default.nix
index 8907011c16f..eff1d6411a1 100644
--- a/pkgs/applications/audio/giada/default.nix
+++ b/pkgs/applications/audio/giada/default.nix
@@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "giada";
- version = "0.16.0";
+ version = "0.16.1";
src = fetchFromGitHub {
owner = "monocasual";
repo = pname;
rev = "v${version}";
- sha256 = "1lbxqa4kwzjdd79whrjgh8li453z4ckkjx4s4qzmrv7aqa2xmfsf";
+ sha256 = "0b3lhjs6myml5r5saky15523sbc3qr43r9rh047vhsiafmqdvfq1";
};
configureFlags = [ "--target=linux" ];
diff --git a/pkgs/applications/audio/guitarix/default.nix b/pkgs/applications/audio/guitarix/default.nix
index 91f4b1dcdfe..ca552882ba4 100644
--- a/pkgs/applications/audio/guitarix/default.nix
+++ b/pkgs/applications/audio/guitarix/default.nix
@@ -12,11 +12,11 @@ in
stdenv.mkDerivation rec {
pname = "guitarix";
- version = "0.38.1";
+ version = "0.39.0";
src = fetchurl {
url = "mirror://sourceforge/guitarix/guitarix2-${version}.tar.xz";
- sha256 = "0bw7xnrx062nwb1bfj9x660h7069ncmz77szcs8icpqxrvhs7z80";
+ sha256 = "1nn80m1qagfhvv69za60f0w6ck87vmk77qmqarj7fbr8avwg63s9";
};
nativeBuildInputs = [ gettext intltool wrapGAppsHook pkgconfig python2 wafHook ];
diff --git a/pkgs/applications/audio/ingen/default.nix b/pkgs/applications/audio/ingen/default.nix
index 1e249b51fb7..9d3fb6aae40 100644
--- a/pkgs/applications/audio/ingen/default.nix
+++ b/pkgs/applications/audio/ingen/default.nix
@@ -1,23 +1,24 @@
{ stdenv, fetchgit, boost, ganv, glibmm, gtkmm2, libjack2, lilv
-, lv2Unstable, makeWrapper, pkgconfig, python, raul, rdflib, serd, sord, sratom
+, lv2, makeWrapper, pkgconfig, python, raul, rdflib, serd, sord, sratom
, wafHook
, suil
}:
stdenv.mkDerivation rec {
- name = "ingen-unstable-${rev}";
- rev = "2017-07-22";
+ pname = "ingen";
+ version = "unstable-2019-12-09";
+ name = "${pname}-${version}";
src = fetchgit {
- url = "https://git.drobilla.net/cgit.cgi/ingen.git";
- rev = "cc4a4db33f4d126a07a4a498e053c5fb9a883be3";
- sha256 = "1gmwmml486r9zq4w65v91mfaz36af9zzyjkmi74m8qmh67ffqn3w";
+ url = "https://gitlab.com/drobilla/ingen.git";
+ rev = "e32f32a360f2bf8f017ea347b6d1e568c0beaf68";
+ sha256 = "0wjn2i3j7jb0bmxymg079xpk4iplb91q0xqqnvnpvyldrr7gawlb";
deepClone = true;
};
nativeBuildInputs = [ pkgconfig wafHook ];
buildInputs = [
- boost ganv glibmm gtkmm2 libjack2 lilv lv2Unstable makeWrapper
+ boost ganv glibmm gtkmm2 libjack2 lilv lv2 makeWrapper
python raul serd sord sratom suil
];
@@ -38,7 +39,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "A modular audio processing system using JACK and LV2 or LADSPA plugins";
homepage = http://drobilla.net/software/ingen;
- license = licenses.gpl3;
+ license = licenses.agpl3Plus;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
diff --git a/pkgs/applications/audio/jalv/default.nix b/pkgs/applications/audio/jalv/default.nix
index a40d5101b34..51ec102dbfd 100644
--- a/pkgs/applications/audio/jalv/default.nix
+++ b/pkgs/applications/audio/jalv/default.nix
@@ -1,18 +1,18 @@
-{ stdenv, fetchurl, gtk2, libjack2, lilv, lv2, pkgconfig, python
+{ stdenv, fetchurl, gtk3, libjack2, lilv, lv2, pkgconfig, python
, serd, sord , sratom, suil, wafHook }:
stdenv.mkDerivation rec {
pname = "jalv";
- version = "1.6.2";
+ version = "1.6.4";
src = fetchurl {
url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
- sha256 = "13al2hb9s3m7jgbg051x704bmzmcg4wb56cfh8z588kiyh0mxpaa";
+ sha256 = "1wwfn7yzbs37s2rdlfjgks63svd5g14yyzd2gdl7h0z12qncwsy2";
};
nativeBuildInputs = [ pkgconfig wafHook ];
buildInputs = [
- gtk2 libjack2 lilv lv2 python serd sord sratom suil
+ gtk3 libjack2 lilv lv2 python serd sord sratom suil
];
meta = with stdenv.lib; {
diff --git a/pkgs/applications/audio/noise-repellent/default.nix b/pkgs/applications/audio/noise-repellent/default.nix
index 146e13f34de..bc5b35396e2 100644
--- a/pkgs/applications/audio/noise-repellent/default.nix
+++ b/pkgs/applications/audio/noise-repellent/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "noise-repellent";
- version = "unstable-2018-12-29";
+ version = "0.1.5";
src = fetchFromGitHub {
owner = "lucianodato";
repo = pname;
- rev = "9efdd0b41ec184a792087c87cbf5382f455e33ec";
- sha256 = "0pn9cxapfvb5l62q86bchyfll1290vi0rhrzarb1jpc4ix7kz53c";
+ rev = version;
+ sha256 = "0hb89x9i2knzan46q4nwscf5zmnb2nwf4w13xl2c0y1mx1ls1mwl";
fetchSubmodules = true;
};
diff --git a/pkgs/applications/audio/qmmp/default.nix b/pkgs/applications/audio/qmmp/default.nix
index 801d32189bf..a941ea485b7 100644
--- a/pkgs/applications/audio/qmmp/default.nix
+++ b/pkgs/applications/audio/qmmp/default.nix
@@ -29,11 +29,11 @@
# handle that.
mkDerivation rec {
- name = "qmmp-1.3.5";
+ name = "qmmp-1.3.6";
src = fetchurl {
url = "http://qmmp.ylsoftware.com/files/${name}.tar.bz2";
- sha256 = "0h7kcqzhfvk610937pwrhizcdgd4n7ncl1vayv6sj3va1x7pv6xm";
+ sha256 = "0dihy6v6j1cfx4qgwgajdn8rx6nf8x5srk8yjki9xh1mlcaanhp8";
};
nativeBuildInputs = [ cmake pkgconfig ];
diff --git a/pkgs/applications/audio/rofi-mpd/default.nix b/pkgs/applications/audio/rofi-mpd/default.nix
index 9def4a292f6..97c737675ad 100644
--- a/pkgs/applications/audio/rofi-mpd/default.nix
+++ b/pkgs/applications/audio/rofi-mpd/default.nix
@@ -2,16 +2,16 @@
python3Packages.buildPythonApplication rec {
pname = "rofi-mpd";
- version = "1.1.0";
+ version = "2.0.1";
src = fetchFromGitHub {
owner = "JakeStanger";
repo = "Rofi_MPD";
rev = "v${version}";
- sha256 = "0pdra1idgas3yl9z9v7b002igwg2c1mv0yw2ffb8rsbx88x4gbai";
+ sha256 = "12zzx0m2nwyzxzzqgzq30a27k015kcw4ylvs7cyalf5gf6sg27kl";
};
- propagatedBuildInputs = with python3Packages; [ mutagen mpd2 ];
+ propagatedBuildInputs = with python3Packages; [ mutagen mpd2 toml appdirs ];
# upstream doesn't contain a test suite
doCheck = false;
diff --git a/pkgs/applications/audio/rosegarden/default.nix b/pkgs/applications/audio/rosegarden/default.nix
index 7c4cefb6ba4..8d8e3e1b6c0 100644
--- a/pkgs/applications/audio/rosegarden/default.nix
+++ b/pkgs/applications/audio/rosegarden/default.nix
@@ -1,14 +1,14 @@
{ stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools, wrapQtAppsHook
-, dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2
+, dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2, alsaLib
, liblo, liblrdf, libsamplerate, libsndfile, lirc ? null, qtbase }:
stdenv.mkDerivation (rec {
- version = "19.06";
+ version = "19.12";
pname = "rosegarden";
src = fetchurl {
url = "mirror://sourceforge/rosegarden/${pname}-${version}.tar.bz2";
- sha256 = "169qb58v2s8va59hzkih8nqb2aipsqlrbfs8q39ywqa8w5d60gcc";
+ sha256 = "1qcaxc6hdzva7kwxxhgl95437fagjbxzv4mihsgpr7y9qk08ppw1";
};
patchPhase = ''
@@ -30,6 +30,7 @@ stdenv.mkDerivation (rec {
libsndfile
lirc
qtbase
+ alsaLib
];
enableParallelBuilding = true;
diff --git a/pkgs/applications/audio/sfizz/default.nix b/pkgs/applications/audio/sfizz/default.nix
new file mode 100644
index 00000000000..d785d378065
--- /dev/null
+++ b/pkgs/applications/audio/sfizz/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub , cmake, libjack2, libsndfile }:
+
+stdenv.mkDerivation rec {
+ pname = "sfizz";
+ version = "unstable-2020-01-24";
+
+ src = fetchFromGitHub {
+ owner = "sfztools";
+ repo = pname;
+ rev = "b9c332777853cb35faeeda2ff4bf34ea7121ffb9";
+ sha256 = "0wzgwpcwal5a7ifrm1hx8y6vx832qixk9ilp8wkjnsdxj6i88p2c";
+ fetchSubmodules = true;
+ };
+
+ nativeBuildInputs = [ cmake ];
+
+ buildInputs = [ libjack2 libsndfile ];
+
+ cmakeFlags = [
+ "-DCMAKE_BUILD_TYPE=Release"
+ "-DSFIZZ_TESTS=ON"
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/sfztools/sfizz";
+ description = "SFZ jack client and LV2 plugin";
+ license = licenses.bsd2;
+ maintainers = [ maintainers.magnetophon ];
+ platforms = platforms.all;
+ badPlatforms = platforms.darwin;
+ };
+}
diff --git a/pkgs/applications/audio/sonic-visualiser/default.nix b/pkgs/applications/audio/sonic-visualiser/default.nix
index 501d097f29f..6164c1cfe93 100644
--- a/pkgs/applications/audio/sonic-visualiser/default.nix
+++ b/pkgs/applications/audio/sonic-visualiser/default.nix
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "View and analyse contents of music audio files";
- homepage = http://www.sonicvisualiser.org/;
+ homepage = https://www.sonicvisualiser.org/;
license = licenses.gpl2Plus;
maintainers = [ maintainers.goibhniu maintainers.marcweber ];
platforms = platforms.linux;
diff --git a/pkgs/applications/audio/spotify-tui/default.nix b/pkgs/applications/audio/spotify-tui/default.nix
index 973062ecb75..6f8fc541ad7 100644
--- a/pkgs/applications/audio/spotify-tui/default.nix
+++ b/pkgs/applications/audio/spotify-tui/default.nix
@@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "spotify-tui";
- version = "0.11.0";
+ version = "0.12.0";
src = fetchFromGitHub {
owner = "Rigellute";
repo = "spotify-tui";
rev = "v${version}";
- sha256 = "1pshwn486msn418dilk57rl9471aas0dif765nx1p9xgkrjpb7wa";
+ sha256 = "18ja0a7s6lhz6y8fmpmabv95zkcfazj0qc0dsd9dblfzzjhvmw39";
};
- cargoSha256 = "0020igycgikkbd649hv6xlpn13dij4g7yc43fic9z710p6nsxqaq";
+ cargoSha256 = "1364z9jz3mnba3pii5h7imqlwlvbp146pcd5q8w61lsmdr2iyha2";
nativeBuildInputs = [ pkgconfig ] ++ stdenv.lib.optionals stdenv.isLinux [ python3 ];
buildInputs = [ openssl ]
diff --git a/pkgs/applications/audio/spotifyd/default.nix b/pkgs/applications/audio/spotifyd/default.nix
index b8063811030..30cedfa8bb8 100644
--- a/pkgs/applications/audio/spotifyd/default.nix
+++ b/pkgs/applications/audio/spotifyd/default.nix
@@ -6,16 +6,16 @@
rustPlatform.buildRustPackage rec {
pname = "spotifyd";
- version = "0.2.23";
+ version = "0.2.24";
src = fetchFromGitHub {
owner = "Spotifyd";
repo = "spotifyd";
rev = "v${version}";
- sha256 = "0xxr21avgr4pvlr5vgb68jmad5xy5kqvaxfzh0qn1jpiax7y3avm";
+ sha256 = "08i0zm7kgprixqjpgaxk7xid1njgj6lmi896jf9fsjqzdzlblqk8";
};
- cargoSha256 = "1ykmn7zzwn9my96bbxwkparab5lck1zzdkpafil2mmrjyvyi40da";
+ cargoSha256 = "0kl8xl2qhzf8wb25ajw59frgym62lkg7p72d8z0xmkqjjcg2nyib";
cargoBuildFlags = [
"--no-default-features"
diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix
index 07e7bb84c56..ad5685f71b0 100644
--- a/pkgs/applications/audio/strawberry/default.nix
+++ b/pkgs/applications/audio/strawberry/default.nix
@@ -35,13 +35,13 @@
mkDerivation rec {
pname = "strawberry";
- version = "0.6.7";
+ version = "0.6.8";
src = fetchFromGitHub {
owner = "jonaski";
repo = pname;
rev = version;
- sha256 = "14bw4hmysrbl4havz03s3wl8bv76380wddf5zzrjvfjjpwn333r6";
+ sha256 = "0jc1m1855dg3f1i1p744c5s42ssmjs61znw4cf28ifamw1nbr1r5";
};
buildInputs = [
diff --git a/pkgs/applications/audio/string-machine/default.nix b/pkgs/applications/audio/string-machine/default.nix
new file mode 100644
index 00000000000..67053baa35f
--- /dev/null
+++ b/pkgs/applications/audio/string-machine/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, boost, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+ pname = "string-machine";
+ version = "unstable-2020-01-20";
+
+ src = fetchFromGitHub {
+ owner = "jpcima";
+ repo = pname;
+ rev = "188082dd0beb9a3c341035604841c53675fe66c4";
+ sha256 = "0l9xrzp3f0hk6h320qh250a0n1nbd6qhjmab21sjmrlb4ngy672v";
+ fetchSubmodules = true;
+ };
+
+ postPatch = ''
+ patchShebangs ./dpf/utils/generate-ttl.sh
+ '';
+
+ nativeBuildInputs = [ pkg-config ];
+
+ buildInputs = [
+ boost cairo lv2
+ ];
+
+ makeFlags = [
+ "PREFIX=$(out)"
+ ];
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/jpcima/string-machine";
+ description = "Digital model of electronic string ensemble instrument";
+ maintainers = [ maintainers.magnetophon ];
+ platforms = intersectLists platforms.linux platforms.x86;
+ license = licenses.boost;
+ };
+}
diff --git a/pkgs/applications/audio/vcv-rack/default.nix b/pkgs/applications/audio/vcv-rack/default.nix
index 11daabbf810..21aa27fa5bc 100644
--- a/pkgs/applications/audio/vcv-rack/default.nix
+++ b/pkgs/applications/audio/vcv-rack/default.nix
@@ -93,7 +93,7 @@ with stdenv.lib; stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "Open-source virtual modular synthesizer";
- homepage = http://vcvrack.com/;
+ homepage = https://vcvrack.com/;
# The source is BSD-3 licensed, some of the art is CC-BY-NC 4.0 or under a
# no-derivatives clause
license = with licenses; [ bsd3 cc-by-nc-40 unfreeRedistributable ];
diff --git a/pkgs/applications/audio/vkeybd/default.nix b/pkgs/applications/audio/vkeybd/default.nix
index 485edaa1ff2..3f77a657472 100644
--- a/pkgs/applications/audio/vkeybd/default.nix
+++ b/pkgs/applications/audio/vkeybd/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "Virtual MIDI keyboard";
- homepage = http://www.alsa-project.org/~tiwai/alsa.html;
+ homepage = https://www.alsa-project.org/~tiwai/alsa.html;
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
diff --git a/pkgs/applications/blockchains/bitcoin.nix b/pkgs/applications/blockchains/bitcoin.nix
index 2fa8ea6467c..c1143f898e2 100644
--- a/pkgs/applications/blockchains/bitcoin.nix
+++ b/pkgs/applications/blockchains/bitcoin.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck
+{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck, hexdump
, zlib, miniupnpc, qtbase ? null, qttools ? null, wrapQtAppsHook ? null, utillinux, python3, qrencode, libevent
, withGui }:
@@ -31,6 +31,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs =
[ pkgconfig autoreconfHook ]
+ ++ optional stdenv.isDarwin hexdump
++ optional withGui wrapQtAppsHook;
buildInputs = [ openssl db48 boost zlib zeromq
miniupnpc libevent]
@@ -75,7 +76,6 @@ in stdenv.mkDerivation rec {
homepage = http://www.bitcoin.org/;
maintainers = with maintainers; [ roconnor AndersonTorres ];
license = licenses.mit;
- # bitcoin needs hexdump to build, which doesn't seem to build on darwin at the moment.
- platforms = platforms.linux;
+ platforms = platforms.unix;
};
}
diff --git a/pkgs/applications/blockchains/dero.nix b/pkgs/applications/blockchains/dero.nix
index 0ab63bb5395..8aa693d2871 100644
--- a/pkgs/applications/blockchains/dero.nix
+++ b/pkgs/applications/blockchains/dero.nix
@@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "dero";
- version = "0.11.6";
+ version = "0.11.7";
src = fetchFromGitHub {
owner = "deroproject";
repo = "dero";
rev = "v${version}";
- sha256 = "0jc5rh2ra4wra04dwv9sydid5ij5930s38mhzq3qkdjyza1ahmsr";
+ sha256 = "1v8b9wbmqbpyf4jpc0v276qzk3hc5fpddcmwvv5k5yfi30nmbh5c";
};
nativeBuildInputs = [ cmake pkgconfig ];
diff --git a/pkgs/applications/blockchains/digibyte.nix b/pkgs/applications/blockchains/digibyte.nix
new file mode 100644
index 00000000000..0d0fc081a11
--- /dev/null
+++ b/pkgs/applications/blockchains/digibyte.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, fetchFromGitHub
+, openssl
+, boost
+, libevent
+, autoreconfHook
+, db4
+, pkgconfig
+, protobuf
+, hexdump
+, zeromq
+, withGui
+, qtbase ? null
+, qttools ? null
+, wrapQtAppsHook ? null
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+ pname = "digibyte";
+ version = "7.17.2";
+
+ name = pname + toString (optional (!withGui) "d") + "-" + version;
+
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "04czj7mx3wpbx4832npk686p9pg5zb6qwlcvnmvqf31hm5qylbxj";
+ };
+
+ nativeBuildInputs = [
+ autoreconfHook
+ pkgconfig
+ hexdump
+ ] ++ optionals withGui [
+ wrapQtAppsHook
+ ];
+
+ buildInputs = [
+ openssl
+ boost
+ libevent
+ db4
+ zeromq
+ ] ++ optionals withGui [
+ qtbase
+ qttools
+ protobuf
+ ];
+
+ enableParallelBuilding = true;
+
+ configureFlags = [
+ "--with-boost-libdir=${boost.out}/lib"
+ ] ++ optionals withGui [
+ "--with-gui=qt5"
+ "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
+ ];
+
+ meta = {
+ description = "DigiByte (DGB) is a rapidly growing decentralized, global blockchain";
+ homepage = "https://digibyte.io/";
+ license = licenses.mit;
+ maintainers = [ maintainers.mmahut ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/blockchains/litecoin.nix b/pkgs/applications/blockchains/litecoin.nix
index 33ac2be1832..403c559ee2f 100644
--- a/pkgs/applications/blockchains/litecoin.nix
+++ b/pkgs/applications/blockchains/litecoin.nix
@@ -11,13 +11,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version;
- version = "0.16.3";
+ version = "0.17.1";
src = fetchFromGitHub {
owner = "litecoin-project";
repo = "litecoin";
rev = "v${version}";
- sha256 = "0vc184qfdkjky1qffa7309k6973k4197bkzwcmffc9r5sdfhrhkp";
+ sha256 = "08a0ghs4aa9m3qv3ppydyshfibykdwxk07i1vcqvg0ycqisdpb7y";
};
nativeBuildInputs = [ pkgconfig autoreconfHook ];
diff --git a/pkgs/applications/blockchains/vertcoin.nix b/pkgs/applications/blockchains/vertcoin.nix
new file mode 100644
index 00000000000..1b8b0376331
--- /dev/null
+++ b/pkgs/applications/blockchains/vertcoin.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, fetchFromGitHub
+, openssl
+, boost
+, libevent
+, autoreconfHook
+, db4
+, pkgconfig
+, protobuf
+, hexdump
+, zeromq
+, withGui
+, qtbase ? null
+, qttools ? null
+, wrapQtAppsHook ? null
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+ pname = "vertcoin";
+ version = "0.14.0";
+
+ name = pname + toString (optional (!withGui) "d") + "-" + version;
+
+ src = fetchFromGitHub {
+ owner = pname + "-project";
+ repo = pname + "-core";
+ rev = version;
+ sha256 = "00vnmrhn5mad58dyiz8rxgsrn0663ii6fdbcqm20mv1l313k4882";
+ };
+
+ nativeBuildInputs = [
+ autoreconfHook
+ pkgconfig
+ hexdump
+ ] ++ optionals withGui [
+ wrapQtAppsHook
+ ];
+
+ buildInputs = [
+ openssl
+ boost
+ libevent
+ db4
+ zeromq
+ ] ++ optionals withGui [
+ qtbase
+ qttools
+ protobuf
+ ];
+
+ enableParallelBuilding = true;
+
+ configureFlags = [
+ "--with-boost-libdir=${boost.out}/lib"
+ ] ++ optionals withGui [
+ "--with-gui=qt5"
+ "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
+ ];
+
+ meta = {
+ description = "A digital currency with mining decentralisation and ASIC resistance as a key focus";
+ homepage = "https://vertcoin.org/";
+ license = licenses.mit;
+ maintainers = [ maintainers.mmahut ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/blockchains/wasabiwallet/default.nix b/pkgs/applications/blockchains/wasabiwallet/default.nix
index 9599dc9407c..6b9630fa6b7 100644
--- a/pkgs/applications/blockchains/wasabiwallet/default.nix
+++ b/pkgs/applications/blockchains/wasabiwallet/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeDesktopItem, openssl, xorg, curl, fontconfig, krb5, zlib, dotnet-sdk }:
+{ stdenv, fetchurl, makeDesktopItem, openssl, xorg, curl, fontconfig, krb5, zlib, dotnet-netcore }:
stdenv.mkDerivation rec {
pname = "wasabiwallet";
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
cd $out/opt/${pname}
for i in $(find . -type f -name '*.so') wassabee
do
- patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ openssl stdenv.cc.cc.lib xorg.libX11 curl fontconfig.lib krb5 zlib dotnet-sdk ]} $i
+ patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ openssl stdenv.cc.cc.lib xorg.libX11 curl fontconfig.lib krb5 zlib dotnet-netcore ]} $i
done
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" wassabee
ln -s $out/opt/${pname}/wassabee $out/bin/${pname}
diff --git a/pkgs/applications/blockchains/wownero.nix b/pkgs/applications/blockchains/wownero.nix
index 8b25e098b2f..eb813a36125 100644
--- a/pkgs/applications/blockchains/wownero.nix
+++ b/pkgs/applications/blockchains/wownero.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
signatures using different participants for the same tx outputs on
opposing forks.
'';
- homepage = http://wownero.org/;
+ homepage = https://wownero.org/;
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ fuwa ];
diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix
index 219c13f241c..4bea9188579 100644
--- a/pkgs/applications/editors/android-studio/default.nix
+++ b/pkgs/applications/editors/android-studio/default.nix
@@ -18,9 +18,9 @@ let
sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q";
};
latestVersion = { # canary & dev
- version = "4.0.0.8"; # "Android Studio 4.0 Canary 8"
- build = "193.6107147";
- sha256Hash = "0bdibjp52jjlyh0966p9657xxmz1z7vi262v6ss4ywpb7gpaj9qq";
+ version = "4.0.0.9"; # "Android Studio 4.0 Canary 9"
+ build = "193.6137316";
+ sha256Hash = "1cgxyqp85z5x2jnjh1qabn2cfiziiwvfr6iggzb531dlhllyfyqw";
};
in {
# Attributes are named by their corresponding release channels
diff --git a/pkgs/applications/editors/bviplus/default.nix b/pkgs/applications/editors/bviplus/default.nix
index 7d70ad14b5d..5fab7fe9da6 100644
--- a/pkgs/applications/editors/bviplus/default.nix
+++ b/pkgs/applications/editors/bviplus/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "bviplus";
- version = "0.9.4";
+ version = "1.0";
src = fetchurl {
url = "mirror://sourceforge/project/bviplus/bviplus/${version}/bviplus-${version}.tgz";
- sha256 = "10x6fbn8v6i0y0m40ja30pwpyqksnn8k2vqd290vxxlvlhzah4zb";
+ sha256 = "08q2fdyiirabbsp5qpn3v8jxp4gd85l776w6gqvrbjwqa29a8arg";
};
buildInputs = [
diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix
index 364d432f1e3..87c32c30e19 100644
--- a/pkgs/applications/editors/eclipse/plugins.nix
+++ b/pkgs/applications/editors/eclipse/plugins.nix
@@ -259,7 +259,7 @@ rec {
src = fetchzip {
stripRoot = false;
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/tools/cdt/releases/9.10/${name}/${name}.zip";
- sha256 = "0rjm91j0h1aq9lq4sdwgp9b2yp4w9lr13n82z32dw3gz3nby1mvi";
+ sha256 = "11nbrcvgbg9l3cmp3v3y8y0vldzcf6qlpp185a6dzabdcij6gz5m";
};
meta = with stdenv.lib; {
@@ -479,7 +479,7 @@ rec {
src = fetchzip {
stripRoot = false;
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.14-201912100610/org.eclipse.jdt-4.14.zip;
- sha256 = "16c5v59mkb0cyfhf2475ds1ajma65bhqfxjr6v59hianqxq9h9la";
+ sha256 = "1c2a23qviv58xljpq3yb37ra8cqw7jh52hmzqlg1nij2sdxb6hm5";
};
meta = with stdenv.lib; {
diff --git a/pkgs/applications/editors/emacs-modes/org-generated.nix b/pkgs/applications/editors/emacs-modes/org-generated.nix
index 8d70794a754..302f5adcfb1 100644
--- a/pkgs/applications/editors/emacs-modes/org-generated.nix
+++ b/pkgs/applications/editors/emacs-modes/org-generated.nix
@@ -6,7 +6,7 @@
ename = "org";
version = "20191203";
src = fetchurl {
- url = "http://orgmode.org/elpa/org-20191203.tar";
+ url = "https://orgmode.org/elpa/org-20191203.tar";
sha256 = "1fcgiswjnqmfzx3xkmlqyyhc4a8ms07vdsv7nkizgxqdh9hwfm2q";
};
packageRequires = [];
@@ -21,7 +21,7 @@
ename = "org-plus-contrib";
version = "20191203";
src = fetchurl {
- url = "http://orgmode.org/elpa/org-plus-contrib-20191203.tar";
+ url = "https://orgmode.org/elpa/org-plus-contrib-20191203.tar";
sha256 = "1kvw95492acb7gqn8gxbp1vg4fyw80w43yvflxnfxdf6jnnw2wah";
};
packageRequires = [];
diff --git a/pkgs/applications/editors/emacs-modes/org-mac-link/default.nix b/pkgs/applications/editors/emacs-modes/org-mac-link/default.nix
index 241ec3b42c9..4d8f40074bd 100644
--- a/pkgs/applications/editors/emacs-modes/org-mac-link/default.nix
+++ b/pkgs/applications/editors/emacs-modes/org-mac-link/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
meta = {
description = "Insert org-mode links to items selected in various Mac apps";
- homepage = http://orgmode.org/worg/org-contrib/org-mac-link.html;
+ homepage = https://orgmode.org/worg/org-contrib/org-mac-link.html;
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.all;
};
diff --git a/pkgs/applications/editors/focuswriter/default.nix b/pkgs/applications/editors/focuswriter/default.nix
index b08e3b5fa23..ccda1b4d4cb 100644
--- a/pkgs/applications/editors/focuswriter/default.nix
+++ b/pkgs/applications/editors/focuswriter/default.nix
@@ -2,11 +2,11 @@
mkDerivation rec {
pname = "focuswriter";
- version = "1.7.3";
+ version = "1.7.4";
src = fetchurl {
url = "https://gottcode.org/focuswriter/focuswriter-${version}-src.tar.bz2";
- sha256 = "155wf7z1g2yx6fb41w29kcb0m2rhnk9ci5yw882yy86s4x20b1jq";
+ sha256 = "1fli85p9d58gsg2kwmncqdcw1nmx062kddbrhr50mnsn04dc4j3g";
};
nativeBuildInputs = [ pkgconfig qmake qttools ];
diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix
index 3286e342744..83dff4a4f29 100644
--- a/pkgs/applications/editors/jetbrains/default.nix
+++ b/pkgs/applications/editors/jetbrains/default.nix
@@ -250,12 +250,12 @@ in
clion = buildClion rec {
name = "clion-${version}";
- version = "2019.3.2"; /* updated by script */
+ version = "2019.3.3"; /* updated by script */
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz";
- sha256 = "0aksix22cbbxny68650qxjbbm1fmgbsnp97qix5kl5nx4y4yvlii"; /* updated by script */
+ sha256 = "1dvnb6mb8xgrgqzqxm2zirwm77w4pci6ibwsdh6wqpnzpqksh4iw"; /* updated by script */
};
wmClass = "jetbrains-clion";
update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml
@@ -263,12 +263,12 @@ in
datagrip = buildDataGrip rec {
name = "datagrip-${version}";
- version = "2019.3.1"; /* updated by script */
+ version = "2019.3.2"; /* updated by script */
description = "Your Swiss Army Knife for Databases and SQL";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/datagrip/${name}.tar.gz";
- sha256 = "1h7va6x625kxc2i22mnya64b1kb4vl5xgjxrv3lqwz725q5hkrxa"; /* updated by script */
+ sha256 = "1aypzs5q9zgggxbpaxfd8r5ds0ck31lb00csn62npndqxa3bj7z5"; /* updated by script */
};
wmClass = "jetbrains-datagrip";
update-channel = "DataGrip RELEASE";
@@ -289,12 +289,12 @@ in
idea-community = buildIdea rec {
name = "idea-community-${version}";
- version = "2019.3.1"; /* updated by script */
+ version = "2019.3.2"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
- sha256 = "0285jdh350dalvk76ajy57mi1yg1g905cnfhcjlb465bsxaw0z5n"; /* updated by script */
+ sha256 = "09vicd2czag07f2f7dy0mmcvz5kryv659m32zm9rlsr4nai1i3y3"; /* updated by script */
};
wmClass = "jetbrains-idea-ce";
update-channel = "IntelliJ IDEA RELEASE";
@@ -302,12 +302,12 @@ in
idea-ultimate = buildIdea rec {
name = "idea-ultimate-${version}";
- version = "2019.3.1"; /* updated by script */
+ version = "2019.3.2"; /* updated by script */
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz";
- sha256 = "0rb726nh2c7zxnpjcf6fyrpl29y9wgr6qhpb6hjxia2gzxab9jz0"; /* updated by script */
+ sha256 = "09lgdd7gkx94warjc7wah9w7s9lj81law8clavjjyjas8bhhf1hz"; /* updated by script */
};
wmClass = "jetbrains-idea";
update-channel = "IntelliJ IDEA RELEASE";
@@ -315,12 +315,12 @@ in
phpstorm = buildPhpStorm rec {
name = "phpstorm-${version}";
- version = "2019.3.1"; /* updated by script */
+ version = "2019.3.2"; /* updated by script */
description = "Professional IDE for Web and PHP developers";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
- sha256 = "170ppd0inn3s1yxd5ybspzgx2il78838z900fpg2pznq2hi0rn2h"; /* updated by script */
+ sha256 = "02qnkcri49chbbpx2f338cfs5w2kg1l7zfn6fa7qrla82zpjsqlm"; /* updated by script */
};
wmClass = "jetbrains-phpstorm";
update-channel = "PhpStorm RELEASE";
@@ -328,12 +328,12 @@ in
pycharm-community = buildPycharm rec {
name = "pycharm-community-${version}";
- version = "2019.3.1"; /* updated by script */
+ version = "2019.3.2"; /* updated by script */
description = "PyCharm Community Edition";
license = stdenv.lib.licenses.asl20;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
- sha256 = "1cph2v7gaxikrvvdaz7ihk17qgdzrn86jamik9fijb8sjli3695v"; /* updated by script */
+ sha256 = "06dzqjsq6jqgv8askzskm0bllzm9i8rzmhkjsv4na2phvdxf6qi2"; /* updated by script */
};
wmClass = "jetbrains-pycharm-ce";
update-channel = "PyCharm RELEASE";
@@ -341,12 +341,12 @@ in
pycharm-professional = buildPycharm rec {
name = "pycharm-professional-${version}";
- version = "2019.3.1"; /* updated by script */
+ version = "2019.3.2"; /* updated by script */
description = "PyCharm Professional Edition";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/python/${name}.tar.gz";
- sha256 = "1bjijwc5f1is2920b497d395ckswhpxilmxaljb6pjwq4a2k8yzx"; /* updated by script */
+ sha256 = "1zp64pnzz2jy232g8fgkqmn34afbhbkkhgyb9z1v1qfb533p39ig"; /* updated by script */
};
wmClass = "jetbrains-pycharm";
update-channel = "PyCharm RELEASE";
@@ -380,12 +380,12 @@ in
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
- version = "2019.3.1"; /* updated by script */
+ version = "2019.3.2"; /* updated by script */
description = "Professional IDE for Web and JavaScript development";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
- sha256 = "0qjqd1a44mdlpvv3l4sx2n5clirwxialzh6s2dlb0dibx8zvnckp"; /* updated by script */
+ sha256 = "0mbfkwjqg2d1mkka0vajx41nv4f07y1w7chk6ii7sylaj7ypzi13"; /* updated by script */
};
wmClass = "jetbrains-webstorm";
update-channel = "WebStorm RELEASE";
diff --git a/pkgs/applications/editors/kakoune/default.nix b/pkgs/applications/editors/kakoune/default.nix
index a6580581f85..8cb70af40e0 100644
--- a/pkgs/applications/editors/kakoune/default.nix
+++ b/pkgs/applications/editors/kakoune/default.nix
@@ -4,12 +4,12 @@ with stdenv.lib;
stdenv.mkDerivation rec {
pname = "kakoune-unwrapped";
- version = "2019.12.10";
+ version = "2020.01.16";
src = fetchFromGitHub {
repo = "kakoune";
owner = "mawww";
rev = "v${version}";
- sha256 = "0cb3ndlczxvxnzb91s4idxx0cy30mnrc4znsbjpnch68fvpm0x2f";
+ sha256 = "16v6z1nzj54j19fraxhb18jdby4zfs1br91gxpg9s2s4nsk0km0b";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ncurses asciidoc docbook_xsl libxslt ];
diff --git a/pkgs/applications/editors/quartus-prime/default.nix b/pkgs/applications/editors/quartus-prime/default.nix
new file mode 100644
index 00000000000..6a6ea80ca45
--- /dev/null
+++ b/pkgs/applications/editors/quartus-prime/default.nix
@@ -0,0 +1,119 @@
+{ buildFHSUserEnv, makeDesktopItem, stdenv, lib, requireFile, unstick, cycloneVSupport ? true }:
+
+let
+ quartus = stdenv.mkDerivation rec {
+ version = "19.1.0.670";
+ pname = "quartus-prime-lite";
+
+ src = let
+ require = {name, sha256}: requireFile {
+ inherit name sha256;
+ url = "${meta.homepage}/${lib.versions.majorMinor version}/?edition=lite&platform=linux";
+ };
+ in map require ([{
+ name = "QuartusLiteSetup-${version}-linux.run";
+ sha256 = "15vxvqxqdk29ahlw3lkm1nzxyhzy4626wb9s5f2h6sjgq64r8m7f";
+ } {
+ name = "ModelSimSetup-${version}-linux.run";
+ sha256 = "0j1vfr91jclv88nam2plx68arxmz4g50sqb840i60wqd5b0l3y6r";
+ }] ++ lib.optional cycloneVSupport {
+ name = "cyclonev-${version}.qdz";
+ sha256 = "0bqxpvjgph0y6slk0jq75mcqzglmqkm0jsx10y9xz5llm6zxzqab";
+ });
+
+ nativeBuildInputs = [ unstick ];
+
+ buildCommand = let
+ installers = lib.sublist 0 2 src;
+ components = lib.sublist 2 ((lib.length src) - 2) src;
+ copyInstaller = installer: ''
+ # `$(cat $NIX_CC/nix-support/dynamic-linker) $src[0]` often segfaults, so cp + patchelf
+ cp ${installer} $TEMP/${installer.name}
+ chmod u+w,+x $TEMP/${installer.name}
+ patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $TEMP/${installer.name}
+ '';
+ copyComponent = component: "cp ${component} $TEMP/${component.name}";
+ # leaves enabled: quartus, modelsim_ase, devinfo
+ disabledComponents = [
+ "quartus_help"
+ "quartus_update"
+ "modelsim_ae"
+ # Devices
+ "arria_lite"
+ "cyclone"
+ "cyclone10lp"
+ "max"
+ "max10"
+ ] ++ lib.optional (!cycloneVSupport) "cyclonev";
+ in ''
+ ${lib.concatMapStringsSep "\n" copyInstaller installers}
+ ${lib.concatMapStringsSep "\n" copyComponent components}
+
+ unstick $TEMP/${(builtins.head installers).name} \
+ --disable-components ${lib.concatStringsSep "," disabledComponents} \
+ --mode unattended --installdir $out --accept_eula 1
+
+ # This patch is from https://wiki.archlinux.org/index.php/Altera_Design_Software
+ patch --force --strip 0 --directory $out < ${./vsim.patch}
+
+ rm -r $out/uninstall $out/logs
+ '';
+
+ meta = {
+ homepage = "https://fpgasoftware.intel.com";
+ description = "FPGA design and simulation software";
+ license = lib.licenses.unfree;
+ platforms = lib.platforms.linux;
+ maintainers = with lib.maintainers; [ kwohlfahrt ];
+ };
+ };
+
+ desktopItem = makeDesktopItem {
+ name = quartus.name;
+ exec = "quartus";
+ icon = "quartus";
+ desktopName = "Quartus";
+ genericName = "Quartus FPGA IDE";
+ categories = "Development;";
+ };
+
+# I think modelsim_ase/linux/vlm checksums itself, so use FHSUserEnv instead of `patchelf`
+in buildFHSUserEnv {
+ name = "quartus-prime-lite";
+
+ targetPkgs = pkgs: with pkgs; [
+ # quartus requirements
+ glib
+ xorg.libICE
+ xorg.libSM
+ zlib
+ # qsys requirements
+ xorg.libXtst
+ xorg.libXi
+ ];
+ multiPkgs = pkgs: with pkgs; let
+ # This seems ugly - can we override `libpng = libpng12` for all `pkgs`?
+ freetype = pkgs.freetype.override { libpng = libpng12; };
+ fontconfig = pkgs.fontconfig.override { inherit freetype; };
+ libXft = pkgs.xorg.libXft.override { inherit freetype fontconfig; };
+ in [
+ # modelsim requirements
+ libxml2
+ ncurses5
+ unixODBC
+ libXft
+ # common requirements
+ freetype
+ fontconfig
+ xorg.libX11
+ xorg.libXext
+ xorg.libXrender
+ ];
+
+ extraInstallCommands = ''
+ mkdir -p $out/share/applications
+ cp ${desktopItem}/share/applications/* $out/share/applications
+ '';
+
+ runScript = "${quartus}/quartus/bin/quartus";
+}
diff --git a/pkgs/applications/editors/quartus-prime/vsim.patch b/pkgs/applications/editors/quartus-prime/vsim.patch
new file mode 100644
index 00000000000..36dc41b7ef1
--- /dev/null
+++ b/pkgs/applications/editors/quartus-prime/vsim.patch
@@ -0,0 +1,11 @@
+--- modelsim_ase/vco 1970-01-01 01:00:01.000000000 +0100
++++ modelsim_ase/vco 1970-01-01 01:00:01.000000000 +0100
+@@ -207,7 +207,7 @@
+ 2.[5-9]*) vco="linux" ;;
+ 2.[1-9][0-9]*) vco="linux" ;;
+ 3.[0-9]*) vco="linux" ;;
+- *) vco="linux_rh60" ;;
++ *) vco="linux" ;;
+ esac
+ if [ ! -x "$dir/$vco/vsim" ]; then
+ if [ -x "$dir/linuxle/vsim" ]; then
diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix
index 13b7f4db0c5..372d9508174 100644
--- a/pkgs/applications/editors/texstudio/default.nix
+++ b/pkgs/applications/editors/texstudio/default.nix
@@ -3,13 +3,13 @@
mkDerivation rec {
pname = "texstudio";
- version = "2.12.16";
+ version = "2.12.20";
src = fetchFromGitHub {
owner = "${pname}-org";
repo = pname;
rev = version;
- sha256 = "0ck65fvz6mzfpqdb1ndgyvgxdnslrwhdr1swgck4gaghcrgbg3gq";
+ sha256 = "0hywx2knqdrslzmm4if476ryf4ma0aw5j8kdp6lyrz2jx7az2gqa";
};
nativeBuildInputs = [ qmake wrapQtAppsHook pkgconfig ];
@@ -20,10 +20,10 @@ mkDerivation rec {
meta = with lib; {
description = "TeX and LaTeX editor";
longDescription=''
- Fork of TeXMaker, this editor is a full fledged IDE for
- LaTeX editing with completion, structure viewer, preview,
- spell checking and support of any compilation chain.
- '';
+ Fork of TeXMaker, this editor is a full fledged IDE for
+ LaTeX editing with completion, structure viewer, preview,
+ spell checking and support of any compilation chain.
+ '';
homepage = http://texstudio.sourceforge.net;
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" ];
diff --git a/pkgs/applications/editors/tiled/default.nix b/pkgs/applications/editors/tiled/default.nix
index e66530aaf76..aa6fc0a7d24 100644
--- a/pkgs/applications/editors/tiled/default.nix
+++ b/pkgs/applications/editors/tiled/default.nix
@@ -3,13 +3,13 @@
mkDerivation rec {
pname = "tiled";
- version = "1.3.1";
+ version = "1.3.2";
src = fetchFromGitHub {
owner = "bjorn";
repo = pname;
rev = "v${version}";
- sha256 = "1vhg8m1b7ccccrzlp0pyf3qskgvlf6sn1w956zsczmndrixbli9a";
+ sha256 = "1jfr9ngsbkn9j3yvy3mnx0llfwmk39dj8kfiy9fawkhw0v4bzjbd";
};
nativeBuildInputs = [ pkgconfig qmake ];
diff --git a/pkgs/applications/editors/uberwriter/default.nix b/pkgs/applications/editors/uberwriter/default.nix
new file mode 100644
index 00000000000..ac3fb920da0
--- /dev/null
+++ b/pkgs/applications/editors/uberwriter/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchFromGitHub, meson, ninja, cmake
+, wrapGAppsHook, pkgconfig, desktop-file-utils
+, appstream-glib, pythonPackages, glib, gobject-introspection
+, gtk3, webkitgtk, glib-networking, gnome3, gspell, texlive
+, haskellPackages}:
+
+let
+ pythonEnv = pythonPackages.python.withPackages(p: with p;
+ [ regex setuptools python-Levenshtein pyenchant pygobject3 pycairo pypandoc ]);
+ texliveDist = texlive.combined.scheme-medium;
+
+in stdenv.mkDerivation rec {
+ pname = "uberwriter";
+ version = "unstable-2019-11-29";
+
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = "7606a55389f8516d9fed7927fa50ff8822ee9e38";
+ sha256 = "0ky001vs9nfvqf05h4q7fl0n8vsgim59z22i66a8sw6bqipv62sg";
+ };
+
+ nativeBuildInputs = [ meson ninja cmake pkgconfig desktop-file-utils
+ appstream-glib wrapGAppsHook ];
+
+ buildInputs = [ glib pythonEnv gobject-introspection gtk3
+ gnome3.adwaita-icon-theme webkitgtk gspell texliveDist
+ glib-networking ];
+
+ postPatch = ''
+ patchShebangs --build build-aux/meson_post_install.py
+
+ substituteInPlace uberwriter/config.py --replace "/usr/share/uberwriter" "$out/share/uberwriter"
+
+ # get rid of unused distributed dependencies
+ rm -r uberwriter/{pylocales,pressagio}
+ '';
+
+ preFixup = ''
+ gappsWrapperArgs+=(
+ --prefix PYTHONPATH : "$out/lib/python${pythonEnv.pythonVersion}/site-packages/"
+ --prefix PATH : "${texliveDist}/bin"
+ --prefix PATH : "${haskellPackages.pandoc-citeproc}/bin"
+ )
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://uberwriter.github.io/uberwriter/;
+ description = "A distraction free Markdown editor for GNU/Linux";
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.sternenseemann ];
+ };
+}
diff --git a/pkgs/applications/graphics/apngasm/2.nix b/pkgs/applications/graphics/apngasm/2.nix
new file mode 100644
index 00000000000..166bc135c19
--- /dev/null
+++ b/pkgs/applications/graphics/apngasm/2.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchzip, libpng, zlib, zopfli }:
+
+stdenv.mkDerivation rec {
+ pname = "apngasm";
+ version = "2.91";
+
+ src = fetchzip {
+ url = "mirror://sourceforge/${pname}/${pname}-${version}-src.zip";
+ stripRoot = false;
+ sha256 = "0qhljqql159xkn1l83vz0q8wvzr7rjz4jnhiy0zn36pgvacg0zn1";
+ };
+
+ buildInputs = [ libpng zlib zopfli ];
+
+ postPatch = ''
+ rm -rf libpng zlib zopfli
+ '';
+
+ NIX_CFLAGS_LINK = "-lzopfli";
+
+ installPhase = ''
+ install -Dt $out/bin apngasm
+ '';
+
+ enableParallelBuilding = true;
+
+ meta = with stdenv.lib; {
+ description = "Create highly optimized Animated PNG files from PNG/TGA images";
+ homepage = "http://apngasm.sourceforge.net/";
+ license = licenses.zlib;
+ maintainers = with maintainers; [ orivej ];
+ platforms = platforms.linux;
+ };
+
+}
diff --git a/pkgs/applications/graphics/apngasm/default.nix b/pkgs/applications/graphics/apngasm/default.nix
new file mode 100644
index 00000000000..8d50696efcb
--- /dev/null
+++ b/pkgs/applications/graphics/apngasm/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, cmake, boost, libpng, zlib }:
+
+stdenv.mkDerivation rec {
+ pname = "apngasm";
+ version = "3.1.9";
+
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = "d50bfb0cf14c376f4cfb94eb91c61d795a76b715"; # not tagged, but in debian/changelog
+ sha256 = "0pk0r8x1950pm6j3d5wgryvy3ldm7a9gl59jmnwnjmg1sf9mzf97";
+ };
+
+ nativeBuildInputs = [ cmake ];
+
+ buildInputs = [ boost libpng zlib ];
+
+ meta = with stdenv.lib; {
+ description = "Create an APNG from multiple PNG files";
+ homepage = "https://github.com/apngasm/apngasm";
+ license = licenses.zlib;
+ maintainers = with maintainers; [ orivej ];
+ platforms = platforms.linux;
+ };
+
+}
diff --git a/pkgs/applications/graphics/avocode/default.nix b/pkgs/applications/graphics/avocode/default.nix
index 3595908f143..f15804038e7 100644
--- a/pkgs/applications/graphics/avocode/default.nix
+++ b/pkgs/applications/graphics/avocode/default.nix
@@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "avocode";
- version = "4.2.1";
+ version = "4.2.2";
src = fetchurl {
url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
- sha256 = "06g12gqri1sgfklla6jfpi7wm2qjazakcjs2w2rhrphnl50r6ca7";
+ sha256 = "0f4cmai2d1x7wbqllxp9na6gxgqfxqav8n4g9azyvm6ymd8zjnx8";
};
libPath = stdenv.lib.makeLibraryPath (with xorg; [
diff --git a/pkgs/applications/graphics/drawio/default.nix b/pkgs/applications/graphics/drawio/default.nix
index c71e95b21af..c81ad47db84 100644
--- a/pkgs/applications/graphics/drawio/default.nix
+++ b/pkgs/applications/graphics/drawio/default.nix
@@ -11,11 +11,11 @@
stdenv.mkDerivation rec {
pname = "drawio";
- version = "12.4.2";
+ version = "12.5.3";
src = fetchurl {
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
- sha256 = "1mngn90cn9hixa0xkhk7mb02gjp480wnipjy2jzkq8kwpai1gm1m";
+ sha256 = "048lksq2akkyi5jg1fiz455n2nv6w58kv8xb9y41qms5dshpww2q";
};
nativeBuildInputs = [
diff --git a/pkgs/applications/graphics/fluxus/default.nix b/pkgs/applications/graphics/fluxus/default.nix
new file mode 100644
index 00000000000..a8094071101
--- /dev/null
+++ b/pkgs/applications/graphics/fluxus/default.nix
@@ -0,0 +1,96 @@
+{ stdenv
+, fetchFromGitLab
+, alsaLib
+, bzip2
+, fftw
+, freeglut
+, freetype
+, glew
+, libjack2
+, libGL
+, libGLU
+, libjpeg
+, liblo
+, libpng
+, libsndfile
+, libtiff
+, ode
+, openal
+, openssl
+, racket
+, scons
+, zlib
+}:
+let
+ libs = [
+ alsaLib
+ bzip2
+ fftw
+ freeglut
+ freetype
+ glew
+ libjack2
+ libGL
+ libGLU
+ libjpeg
+ liblo
+ libpng
+ libsndfile
+ libtiff
+ ode
+ openal
+ openssl
+ zlib
+ ];
+in
+stdenv.mkDerivation rec {
+ pname = "fluxus";
+ version = "0.19";
+ src = fetchFromGitLab {
+ owner = "nebogeo";
+ repo = "fluxus";
+ rev = "ba9aee218dd4a9cfab914ad78bdb6d59e9a37400";
+ hash = "sha256:0mwghpgq4n1khwlmgscirhmcdhi6x00c08q4idi2zcqz961bbs28";
+ };
+
+ buildInputs = [
+ alsaLib
+ fftw
+ freeglut.dev
+ freetype
+ glew
+ libjack2
+ libjpeg.dev
+ liblo
+ libsndfile.dev
+ libtiff.dev
+ ode
+ openal
+ openssl.dev
+ racket
+ ];
+ nativeBuildInputs = [ scons ];
+
+ patches = [ ./fix-build.patch ];
+ sconsFlags = [
+ "RacketPrefix=${racket}"
+ "RacketInclude=${racket}/include/racket"
+ "RacketLib=${racket}/lib/racket"
+ "LIBPATH=${stdenv.lib.makeLibraryPath libs}"
+ "DESTDIR=build"
+ ];
+ configurePhase = ''
+ sconsFlags+=" Prefix=$out"
+ '';
+ installPhase = ''
+ mkdir -p $out
+ cp -r build$out/* $out/
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Livecoding environment for 3D graphics, sound, and games";
+ license = licenses.gpl2;
+ homepage = http://www.pawfal.org/fluxus/;
+ maintainers = [ maintainers.brainrape ];
+ };
+}
diff --git a/pkgs/applications/graphics/fluxus/fix-build.patch b/pkgs/applications/graphics/fluxus/fix-build.patch
new file mode 100644
index 00000000000..7810dd59e35
--- /dev/null
+++ b/pkgs/applications/graphics/fluxus/fix-build.patch
@@ -0,0 +1,16 @@
+diff --git a/SConstruct b/SConstruct
+index 32cb644..0b3a208 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -225,6 +225,11 @@ if env['PLATFORM'] == 'posix':
+ ["asound", "alsa/asoundlib.h"],
+ ["openal", "AL/al.h"]]
+
++env.Append(ENV={'PATH': ' ' + os.environ['PATH'], })
++env.Append(LIBPATH=ARGUMENTS.get('LIBPATH', '').split(':'))
++env.Append(CCFLAGS=' ' + os.environ.get('NIX_CFLAGS_COMPILE',''))
++env.Append(CCFLAGS=' -DNULL=0')
++
+ ################################################################################
+ # Make sure we have these libraries availible
+
diff --git a/pkgs/applications/graphics/gthumb/default.nix b/pkgs/applications/graphics/gthumb/default.nix
index f0057f3a1a8..b51db1e945f 100644
--- a/pkgs/applications/graphics/gthumb/default.nix
+++ b/pkgs/applications/graphics/gthumb/default.nix
@@ -33,11 +33,11 @@
stdenv.mkDerivation rec {
pname = "gthumb";
- version = "3.8.2";
+ version = "3.8.3";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
- sha256 = "15wqks35ks5dm7zj046dfd45vvrilan2ayfy2sxiprv7q74cip2q";
+ sha256 = "1a0gss9cjcwayrcpkam5kc1giwbfy38jgqxvh33in9gfq9dgrygg";
};
nativeBuildInputs = [
diff --git a/pkgs/applications/graphics/imgp/default.nix b/pkgs/applications/graphics/imgp/default.nix
new file mode 100644
index 00000000000..80420202c05
--- /dev/null
+++ b/pkgs/applications/graphics/imgp/default.nix
@@ -0,0 +1,38 @@
+{ lib, fetchFromGitHub, buildPythonApplication, pillow, imgp }:
+
+buildPythonApplication rec {
+ pname = "imgp";
+ version = "2.7";
+
+ src = fetchFromGitHub {
+ owner = "jarun";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "13r4fn3dd0nyidfhrr7zzpls5ifbyqdwxhyvpkqr8ahchws7wfc6";
+ };
+
+ propagatedBuildInputs = [ pillow ];
+
+ installFlags = [
+ "DESTDIR=$(out)"
+ "PREFIX="
+ ];
+
+ postInstall = ''
+ install -Dm555 auto-completion/bash/imgp-completion.bash $out/share/bash-completion/completions/imgp.bash
+ install -Dm555 auto-completion/fish/imgp.fish -t $out/share/fish/vendor_completions.d
+ install -Dm555 auto-completion/zsh/_imgp -t $out/share/zsh/site-functions
+ '';
+
+ checkPhase = ''
+ $out/bin/imgp --help
+ '';
+
+ meta = with lib; {
+ description = "High-performance CLI batch image resizer & rotator";
+ homepage = "https://github.com/jarun/imgp";
+ license = licenses.gpl3;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ sikmir ];
+ };
+}
diff --git a/pkgs/applications/graphics/imlibsetroot/default.nix b/pkgs/applications/graphics/imlibsetroot/default.nix
index 49868bbd831..8ca4d71bb56 100644
--- a/pkgs/applications/graphics/imlibsetroot/default.nix
+++ b/pkgs/applications/graphics/imlibsetroot/default.nix
@@ -24,6 +24,6 @@ stdenv.mkDerivation {
homepage = http://robotmonkeys.net/2010/03/30/imlibsetroot/;
license = licenses.gpl2;
platforms = platforms.linux;
- maintainers = with maintainers; [ lucas8 ];
+ maintainers = with maintainers; [ dwarfmaster ];
};
}
diff --git a/pkgs/applications/graphics/krop/default.nix b/pkgs/applications/graphics/krop/default.nix
index c4c889cdba5..401e5f6fc57 100644
--- a/pkgs/applications/graphics/krop/default.nix
+++ b/pkgs/applications/graphics/krop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python3Packages, libsForQt5, ghostscript }:
+{ stdenv, fetchFromGitHub, python3Packages, libsForQt5, ghostscript, qt5}:
python3Packages.buildPythonApplication rec {
pname = "krop";
@@ -19,6 +19,11 @@ python3Packages.buildPythonApplication rec {
ghostscript
];
+ nativeBuildInputs = [ qt5.wrapQtAppsHook ];
+ makeWrapperArgs = [
+ "\${qtWrapperArgs[@]}"
+ ];
+
# Disable checks because of interference with older Qt versions // xcb
doCheck = false;
diff --git a/pkgs/applications/graphics/qview/default.nix b/pkgs/applications/graphics/qview/default.nix
index 0595ab2963c..8df6ce4f80b 100644
--- a/pkgs/applications/graphics/qview/default.nix
+++ b/pkgs/applications/graphics/qview/default.nix
@@ -1,12 +1,12 @@
{stdenv, fetchFromGitHub, qmake}:
stdenv.mkDerivation rec {
pname = "qview";
- version = "2.0";
+ version = "3.0";
src = fetchFromGitHub {
owner = "jurplel";
repo = "qView";
rev = version;
- sha256 = "1s29hz44rb5dwzq8d4i4bfg77dr0v3ywpvidpa6xzg7hnnv3mhi5";
+ sha256 = "15a91bs3wcqhgf76wzigbn10hayg628j84pq4j2vaxar94ak0vk7";
};
nativeBuildInputs = [ qmake ];
patchPhase = ''
diff --git a/pkgs/applications/graphics/rapid-photo-downloader/default.nix b/pkgs/applications/graphics/rapid-photo-downloader/default.nix
index 2e12e18a5a5..ed8ef35a7e5 100644
--- a/pkgs/applications/graphics/rapid-photo-downloader/default.nix
+++ b/pkgs/applications/graphics/rapid-photo-downloader/default.nix
@@ -80,7 +80,7 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
meta = with stdenv.lib; {
description = "Photo and video importer for cameras, phones, and memory cards";
- homepage = http://www.damonlynch.net/rapid/;
+ homepage = https://www.damonlynch.net/rapid/;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ jfrankenau ];
diff --git a/pkgs/applications/graphics/renderdoc/default.nix b/pkgs/applications/graphics/renderdoc/default.nix
index 426985d312c..843801011f7 100644
--- a/pkgs/applications/graphics/renderdoc/default.nix
+++ b/pkgs/applications/graphics/renderdoc/default.nix
@@ -13,14 +13,14 @@ let
pythonPackages = python3Packages;
in
mkDerivation rec {
- version = "1.5";
+ version = "1.6";
pname = "renderdoc";
src = fetchFromGitHub {
owner = "baldurk";
repo = "renderdoc";
rev = "v${version}";
- sha256 = "0a05f6qfq90wrf4fixchp9knx4nhqhwjxl02n03a7k56xzxxnlci";
+ sha256 = "0b2f9m5azzvcjbmxkwcl1d7jvvp720b81zwn19rrskznfcc2r1i8";
};
buildInputs = [
diff --git a/pkgs/applications/graphics/runwayml/default.nix b/pkgs/applications/graphics/runwayml/default.nix
index 839a87214e6..c3f747837e0 100644
--- a/pkgs/applications/graphics/runwayml/default.nix
+++ b/pkgs/applications/graphics/runwayml/default.nix
@@ -6,12 +6,12 @@
let
pname = "runwayml";
- version = "0.10.11";
+ version = "0.10.20";
name = "${pname}-${version}";
src = fetchurl {
url = "https://runway-releases.s3.amazonaws.com/Runway%20${version}.AppImage";
- sha256 = "0f3icgpwj1sk9bkycqw65c8bhrzzpw5yzacw52siv4j1gl4casnl";
+ sha256 = "1wi94xi8nrwfc4v2j1crlmwr0nxg95ffp5h4hxd84crvya8ibxgz";
name="${pname}-${version}.AppImage";
};
diff --git a/pkgs/applications/graphics/sane/backends/default.nix b/pkgs/applications/graphics/sane/backends/default.nix
index 4245acf716d..6aba42d33e6 100644
--- a/pkgs/applications/graphics/sane/backends/default.nix
+++ b/pkgs/applications/graphics/sane/backends/default.nix
@@ -1,11 +1,10 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
- version = "1.0.27";
+ version = "1.0.28";
+
src = fetchurl {
- sha256 = "1j9nbqspaj0rlgalafb5z6r606k0i22kz0rcpd744p176yzlfdr9";
- urls = [
- "https://alioth-archive.debian.org/releases/sane/sane-backends/${version}/sane-backends-${version}.tar.gz"
- ];
+ url = "https://gitlab.com/sane-project/backends/uploads/9e718daff347826f4cfe21126c8d5091/sane-backends-${version}.tar.gz";
+ sha256 = "00yy8q9hqdf0zjxxl4d8njr9zf0hhi3a9ib23ikc2anqf8zhy9ii";
};
})
diff --git a/pkgs/applications/graphics/sane/backends/generic.nix b/pkgs/applications/graphics/sane/backends/generic.nix
index 0e8a5f34f6c..d3e8b417017 100644
--- a/pkgs/applications/graphics/sane/backends/generic.nix
+++ b/pkgs/applications/graphics/sane/backends/generic.nix
@@ -1,6 +1,6 @@
{ stdenv
-, avahi, libjpeg, libusb1, libv4l, net-snmp, libpng
, gettext, pkgconfig
+, avahi, libgphoto2, libieee1284, libjpeg, libpng, libtiff, libusb1, libv4l, net-snmp
# List of { src name backend } attibute sets - see installFirmware below:
, extraFirmware ? []
@@ -19,14 +19,29 @@ stdenv.mkDerivation {
outputs = [ "out" "doc" "man" ];
+ nativeBuildInputs = [
+ gettext
+ pkgconfig
+ ];
+
+ buildInputs = [
+ avahi
+ libgphoto2
+ libieee1284
+ libjpeg
+ libpng
+ libtiff
+ libusb1
+ libv4l
+ net-snmp
+ ];
+
+ enableParallelBuilding = true;
+
configureFlags = []
++ stdenv.lib.optional (avahi != null) "--enable-avahi"
- ++ stdenv.lib.optional (libusb1 != null) "--enable-libusb_1_0"
- ;
-
- buildInputs = [ avahi libusb1 libv4l net-snmp libpng ];
- nativeBuildInputs = [ gettext pkgconfig ];
- enableParallelBuilding = true;
+ ++ stdenv.lib.optional (libusb1 != null) "--with-usb"
+ ;
postInstall = let
@@ -71,7 +86,7 @@ stdenv.mkDerivation {
video- and still-cameras, frame-grabbers, etc. For a list of supported
scanners, see http://www.sane-project.org/sane-backends.html.
'';
- homepage = http://www.sane-project.org/;
+ homepage = "http://www.sane-project.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ peti ];
diff --git a/pkgs/applications/graphics/shutter/default.nix b/pkgs/applications/graphics/shutter/default.nix
index 957692b4ba1..dd41ee4c3f8 100644
--- a/pkgs/applications/graphics/shutter/default.nix
+++ b/pkgs/applications/graphics/shutter/default.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation {
meta = with stdenv.lib; {
description = "Screenshot and annotation tool";
- homepage = http://shutter-project.org/;
+ homepage = https://shutter-project.org/;
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = [ maintainers.bjornfor ];
diff --git a/pkgs/applications/graphics/sxiv/default.nix b/pkgs/applications/graphics/sxiv/default.nix
index 99c151f8c80..f5429958328 100644
--- a/pkgs/applications/graphics/sxiv/default.nix
+++ b/pkgs/applications/graphics/sxiv/default.nix
@@ -4,28 +4,24 @@ with stdenv.lib;
stdenv.mkDerivation rec {
pname = "sxiv";
- version = "25";
+ version = "26";
src = fetchFromGitHub {
owner = "muennich";
repo = pname;
rev = "v${version}";
- sha256 = "13s1lfar142hq1j7xld0ri616p4bqs57b17yr4d0b9a9w7liz4hp";
+ sha256 = "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f";
};
- postUnpack = ''
- substituteInPlace $sourceRoot/Makefile \
- --replace /usr/local $out
- '';
-
configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
buildInputs = [ libXft imlib2 giflib libexif ];
+ makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
postInstall = ''
- mkdir -p $out/share/applications/
- cp -v sxiv.desktop $out/share/applications/
+ install -Dt $out/share/applications sxiv.desktop
'';
meta = {
diff --git a/pkgs/applications/graphics/tesseract/tesseract4.nix b/pkgs/applications/graphics/tesseract/tesseract4.nix
index 548f58a50fb..95896337720 100644
--- a/pkgs/applications/graphics/tesseract/tesseract4.nix
+++ b/pkgs/applications/graphics/tesseract/tesseract4.nix
@@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "tesseract";
- version = "4.1.0";
+ version = "4.1.1";
src = fetchFromGitHub {
owner = "tesseract-ocr";
repo = "tesseract";
rev = version;
- sha256 = "06i7abxy2ifmdx1fak81cx0kns85n8hvp0339jk6242fhshibljx";
+ sha256 = "1ca27zbjpx35nxh9fha410z3jskwyj06i5hqiqdc08s2d7kdivwn";
};
enableParallelBuilding = true;
diff --git a/pkgs/applications/kde/default.nix b/pkgs/applications/kde/default.nix
index 0bfa850cb26..3c45b05e9e8 100644
--- a/pkgs/applications/kde/default.nix
+++ b/pkgs/applications/kde/default.nix
@@ -121,6 +121,7 @@ let
kio-extras = callPackage ./kio-extras.nix {};
kldap = callPackage ./kldap.nix {};
kleopatra = callPackage ./kleopatra.nix {};
+ kmahjongg = callPackage ./kmahjongg.nix {};
kmail = callPackage ./kmail.nix {};
kmail-account-wizard = callPackage ./kmail-account-wizard.nix {};
kmailtransport = callPackage ./kmailtransport.nix {};
@@ -160,6 +161,7 @@ let
libkgapi = callPackage ./libkgapi.nix {};
libkipi = callPackage ./libkipi.nix {};
libkleo = callPackage ./libkleo.nix {};
+ libkmahjongg = callPackage ./libkmahjongg.nix {};
libkomparediff2 = callPackage ./libkomparediff2.nix {};
libksane = callPackage ./libksane.nix {};
libksieve = callPackage ./libksieve.nix {};
diff --git a/pkgs/applications/kde/kmahjongg.nix b/pkgs/applications/kde/kmahjongg.nix
new file mode 100644
index 00000000000..b51d0d147e2
--- /dev/null
+++ b/pkgs/applications/kde/kmahjongg.nix
@@ -0,0 +1,19 @@
+{ lib
+, mkDerivation
+, extra-cmake-modules
+, kdoctools
+, kdeclarative
+, knewstuff
+, libkdegames
+, libkmahjongg
+}:
+
+mkDerivation {
+ name = "kmahjongg";
+ nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+ buildInputs = [ kdeclarative libkmahjongg knewstuff libkdegames ];
+ meta = {
+ license = with lib.licenses; [ gpl2 ];
+ maintainers = with lib.maintainers; [ genesis ];
+ };
+}
diff --git a/pkgs/applications/kde/libkmahjongg.nix b/pkgs/applications/kde/libkmahjongg.nix
new file mode 100644
index 00000000000..4b7b8538290
--- /dev/null
+++ b/pkgs/applications/kde/libkmahjongg.nix
@@ -0,0 +1,18 @@
+{
+ mkDerivation, lib, kdepimTeam,
+ extra-cmake-modules, kdoctools,
+ kcompletion, kconfig, kconfigwidgets, kcoreaddons, ki18n,
+ kwidgetsaddons
+}:
+
+mkDerivation {
+ name = "libkmahjongg";
+ meta = {
+ license = with lib.licenses; [ gpl2 ];
+ maintainers = with lib.maintainers; [ genesis ];
+ };
+ nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+ buildInputs = [ kcompletion kconfig kconfigwidgets kcoreaddons ki18n
+ kwidgetsaddons ];
+ outputs = [ "out" "dev" ];
+}
diff --git a/pkgs/applications/misc/bashSnippets/default.nix b/pkgs/applications/misc/bashSnippets/default.nix
index b0af34ec760..0976e7625bc 100644
--- a/pkgs/applications/misc/bashSnippets/default.nix
+++ b/pkgs/applications/misc/bashSnippets/default.nix
@@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper
, curl, python, bind, iproute, bc, gitMinimal }:
let
- version = "1.17.3";
+ version = "1.23.0";
deps = lib.makeBinPath [
curl
python
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
owner = "alexanderepstein";
repo = "Bash-Snippets";
rev = "v${version}";
- sha256 = "1xdjk8bjh7l6h7gdqrra1dh4wdq89wmd0jsirsvqa3bmcsb2wz1r";
+ sha256 = "044nxgd3ic2qr6hgq5nymn3dyf5i4s8mv5z4az6jvwlrjnvbg8cp";
};
buildInputs = [ makeWrapper ];
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 9701db3c0b7..fd86f21dff0 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -1,7 +1,27 @@
-{ lib, mkDerivation, fetchurl, poppler_utils, pkgconfig, libpng
-, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
-, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
-, xdg_utils, makeDesktopItem, removeReferencesTo
+{ lib
+, mkDerivation
+, fetchurl
+, poppler_utils
+, pkgconfig
+, libpng
+, imagemagick
+, libjpeg
+, fontconfig
+, podofo
+, qtbase
+, qmake
+, icu
+, sqlite
+, hunspell
+, hyphen
+, unrarSupport ? false
+, chmlib
+, python2Packages
+, libusb1
+, libmtp
+, xdg_utils
+, makeDesktopItem
+, removeReferencesTo
}:
let
@@ -10,11 +30,11 @@ let
in
mkDerivation rec {
pname = "calibre";
- version = "3.48.0";
+ version = "4.8.0";
src = fetchurl {
url = "https://download.calibre-ebook.com/${version}/${pname}-${version}.tar.xz";
- sha256 = "034m89h7j2088p324i1kya33dfldmqyynjxk3w98xiqkz7q2hi82";
+ sha256 = "1lk44qh3hzqhpz2b00iik7cgjg4xm36qjh2pxflkjnbk691gbpqk";
};
patches = [
@@ -44,17 +64,49 @@ mkDerivation rec {
CALIBRE_PY3_PORT = builtins.toString pypkgs.isPy3k;
buildInputs = [
- poppler_utils libpng imagemagick libjpeg
- fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
- ] ++ (with pypkgs; [
- apsw cssselect css-parser dateutil dnspython feedparser html5-parser lxml markdown netifaces pillow
- python pyqt5_with_qtwebkit sip
- regex msgpack beautifulsoup4 html2text
- # the following are distributed with calibre, but we use upstream instead
- odfpy
- ]) ++ lib.optionals (!pypkgs.isPy3k) (with pypkgs; [
- mechanize
- ]);
+ poppler_utils
+ libpng
+ imagemagick
+ libjpeg
+ fontconfig
+ podofo
+ qtbase
+ chmlib
+ icu
+ hunspell
+ hyphen
+ sqlite
+ libusb1
+ libmtp
+ xdg_utils
+ ] ++ (
+ with pypkgs; [
+ apsw
+ cssselect
+ css-parser
+ dateutil
+ dnspython
+ feedparser
+ html5-parser
+ lxml
+ markdown
+ netifaces
+ pillow
+ python
+ pyqt5_with_qtwebkit
+ sip
+ regex
+ msgpack
+ beautifulsoup4
+ html2text
+ # the following are distributed with calibre, but we use upstream instead
+ odfpy
+ ]
+ ) ++ lib.optionals (!pypkgs.isPy3k) (
+ with pypkgs; [
+ mechanize
+ ]
+ );
installPhase = ''
runHook preInstall
diff --git a/pkgs/applications/misc/cbatticon/default.nix b/pkgs/applications/misc/cbatticon/default.nix
index d6680c61eb9..ac2948c2d6e 100644
--- a/pkgs/applications/misc/cbatticon/default.nix
+++ b/pkgs/applications/misc/cbatticon/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, gettext, glib, gtk3, libnotify }:
+{ stdenv, fetchFromGitHub, pkgconfig, gettext, glib, gtk3, libnotify, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "cbatticon";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0ivm2dzhsa9ir25ry418r2qg2llby9j7a6m3arbvq5c3kaj8m9jr";
};
- nativeBuildInputs = [ pkgconfig gettext ];
+ nativeBuildInputs = [ pkgconfig gettext wrapGAppsHook ];
buildInputs = [ glib gtk3 libnotify ];
diff --git a/pkgs/applications/misc/dbeaver/default.nix b/pkgs/applications/misc/dbeaver/default.nix
index d0011eee9c1..f6236a301db 100644
--- a/pkgs/applications/misc/dbeaver/default.nix
+++ b/pkgs/applications/misc/dbeaver/default.nix
@@ -7,7 +7,7 @@
stdenv.mkDerivation rec {
pname = "dbeaver-ce";
- version = "6.3.2";
+ version = "6.3.3";
desktopItem = makeDesktopItem {
name = "dbeaver";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
- sha256 = "0yr79p4vdg6s6c8sry6qnf2ifjcjdapn0sff2crsnz331rsh27sm";
+ sha256 = "08rf7igfzh5g40bapsj0f424jxfx62y97syr3fxmqv3ik7iav9k4";
};
installPhase = ''
diff --git a/pkgs/applications/misc/diff-pdf/default.nix b/pkgs/applications/misc/diff-pdf/default.nix
index af47afcc601..83116da4df0 100644
--- a/pkgs/applications/misc/diff-pdf/default.nix
+++ b/pkgs/applications/misc/diff-pdf/default.nix
@@ -9,13 +9,13 @@ let
in
stdenv.mkDerivation rec {
pname = "diff-pdf";
- version = "0.3";
+ version = "0.4.1";
src = fetchFromGitHub {
owner = "vslavik";
repo = "diff-pdf";
rev = "v${version}";
- sha256 = "0vzvyjpk6m89zs6j1dq85f93n2b1i6akn2g0z9qhagjd2pds920i";
+ sha256 = "1y5ji4c4m69vzs0z051fkhfdrjnyxb6kzac5flhdkfb2hgp1jnxl";
};
nativeBuildInputs = [ autoconf automake pkgconfig ];
diff --git a/pkgs/applications/misc/elogind/default.nix b/pkgs/applications/misc/elogind/default.nix
index 3d71d9855d0..9565e7213dc 100644
--- a/pkgs/applications/misc/elogind/default.nix
+++ b/pkgs/applications/misc/elogind/default.nix
@@ -29,13 +29,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
pname = "elogind";
- version = "241.4";
+ version = "243.4";
src = fetchFromGitHub {
owner = "elogind";
repo = pname;
rev = "v${version}";
- sha256 = "13nd0chackqclgvw43910k4pkw2q773dh6wq9s5f3d97ibnik48k";
+ sha256 = "141frvgyk4fafcxsix94qc0d9ffrwksld8lqq4hq6xsgjlvv0mrs";
};
nativeBuildInputs = [
diff --git a/pkgs/applications/misc/foxtrotgps/default.nix b/pkgs/applications/misc/foxtrotgps/default.nix
new file mode 100644
index 00000000000..dc3f1922c21
--- /dev/null
+++ b/pkgs/applications/misc/foxtrotgps/default.nix
@@ -0,0 +1,40 @@
+{ fetchurl, stdenv, pkg-config, wrapGAppsHook, curl, gnome2, gpsd, gtk2
+, intltool, libexif, python3Packages, sqlite }:
+
+stdenv.mkDerivation rec {
+ pname = "foxtrotgps";
+ version = "1.2.2";
+
+ src = fetchurl {
+ url = "https://www.foxtrotgps.org/releases/foxtrotgps-${version}.tar.xz";
+ sha256 = "0grn35j5kwc286dxx18fv32qa330xmalqliwy6zirxmj6dffvrkg";
+ };
+
+ nativeBuildInputs = [ pkg-config wrapGAppsHook ];
+
+ buildInputs = [
+ curl.dev
+ gnome2.libglade.dev
+ gpsd
+ gtk2.dev
+ intltool
+ libexif
+ sqlite.dev
+ (python3Packages.python.withPackages (pythonPackages: with python3Packages;
+ [ beautifulsoup4 feedparser sqlalchemy ]))
+ ];
+
+ meta = with stdenv.lib; {
+ description = "GPS/GIS application optimized for small screens";
+ longDescription = ''
+ An easy to use, free & open-source GPS/GIS application that works well on
+ small screens, and is especially suited to touch input. It spun off of
+ tangoGPS in 2010 with a focus on cooperation and fostering community
+ innovation.
+ '';
+ homepage = "https://www.foxtrotgps.org/";
+ license = licenses.gpl2;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ wucke13 ];
+ };
+}
diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix
index 6bfb4907807..45bca7d3fbf 100644
--- a/pkgs/applications/misc/girara/default.nix
+++ b/pkgs/applications/misc/girara/default.nix
@@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "girara";
- version = "0.3.3";
+ version = "0.3.4";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "https://git.pwmt.org/pwmt/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
- sha256 = "13vr62kkkqs2xsrmsn114n6c6084ix1qyjksczqsc3s2y3bdsmj4";
+ sha256 = "08zdsr4zwi49facsl5596l0g1xqqv2jk3sqk841gkxwawcggim44";
};
nativeBuildInputs = [ meson ninja pkgconfig gettext check dbus xvfb_run ];
diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix
index 9a9edba512a..9a4e765a1d6 100644
--- a/pkgs/applications/misc/gpxsee/default.nix
+++ b/pkgs/applications/misc/gpxsee/default.nix
@@ -2,13 +2,13 @@
mkDerivation rec {
pname = "gpxsee";
- version = "7.18";
+ version = "7.19";
src = fetchFromGitHub {
owner = "tumic0";
repo = "GPXSee";
rev = version;
- sha256 = "1z3knfqfv0rwsq66adk0qngw1r500yvy4z259bygqkzbn2l5fcjk";
+ sha256 = "0mfmj0g6q6p2i6bd64ik1hq2l1ddqxnc6i9m30dnfl4v1zyvlc38";
};
nativeBuildInputs = [ qmake ];
diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix
index 957f0f7f68b..8b908f1f9cf 100644
--- a/pkgs/applications/misc/ikiwiki/default.nix
+++ b/pkgs/applications/misc/ikiwiki/default.nix
@@ -19,7 +19,7 @@ assert mercurialSupport -> (mercurial != null);
let
name = "ikiwiki";
- version = "3.20170111";
+ version = "3.20190228";
lib = stdenv.lib;
in
@@ -27,8 +27,8 @@ stdenv.mkDerivation {
name = "${name}-${version}";
src = fetchurl {
- url = "mirror://debian/pool/main/i/ikiwiki/${name}_${version}.tar.xz";
- sha256 = "00d7yzv426fvqbhvzyafddv7fa6b4j2647b0wi371wd5yjj9j3sz";
+ url = "mirror://debian/pool/main/i/ikiwiki/${name}_${version}.orig.tar.xz";
+ sha256 = "17pyblaqhkb61lxl63bzndiffism8k859p54k3k4sghclq6lsynh";
};
buildInputs = [ which ]
@@ -44,7 +44,11 @@ stdenv.mkDerivation {
++ lib.optionals subversionSupport [subversion]
++ lib.optionals mercurialSupport [mercurial];
- patchPhase = ''
+ # A few markdown tests fail, but this is expected when using Text::Markdown
+ # instead of Text::Markdown::Discount.
+ patches = [ ./remove-markdown-tests.patch ];
+
+ postPatch = ''
sed -i s@/usr/bin/perl@${perlPackages.perl}/bin/perl@ pm_filter mdwn2man
sed -i s@/etc/ikiwiki@$out/etc@ Makefile.PL
sed -i /ENV{PATH}/d ikiwiki.in
@@ -83,6 +87,5 @@ stdenv.mkDerivation {
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.peti ];
- broken = true; # https://ikiwiki.info/bugs/imagemagick_6.9.8_test_suite_failure/
};
}
diff --git a/pkgs/applications/misc/ikiwiki/remove-markdown-tests.patch b/pkgs/applications/misc/ikiwiki/remove-markdown-tests.patch
new file mode 100644
index 00000000000..c981857a248
--- /dev/null
+++ b/pkgs/applications/misc/ikiwiki/remove-markdown-tests.patch
@@ -0,0 +1,37 @@
+diff --git a/t/mdwn.t b/t/mdwn.t
+index ca3180139..d64750403 100755
+--- a/t/mdwn.t
++++ b/t/mdwn.t
+@@ -16,32 +16,17 @@ is(IkiWiki::htmlize("foo", "foo", "mdwn",
+ "C. S. Lewis wrote books\n"),
+ "
C. S. Lewis wrote books
\n", "alphalist off by default");
+
+-$config{mdwn_alpha_lists} = 1;
+-like(IkiWiki::htmlize("foo", "foo", "mdwn",
+- "A. One\n".
+- "B. Two\n"),
+- qr{A. One\sB. Two
\n}, "alphalist can be disabled");
+
+-like(IkiWiki::htmlize("foo", "foo", "mdwn",
+- "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
+- qr{
This works\^1}, "footnotes can be disabled");
+
+-$config{mdwn_footnotes} = 1;
+-like(IkiWiki::htmlize("foo", "foo", "mdwn",
+- "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
+- qr{