mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
Merge staging-next into staging
This commit is contained in:
commit
7dba683656
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@ result-*
|
||||
|
||||
.DS_Store
|
||||
.mypy_cache
|
||||
__pycache__
|
||||
|
||||
/pkgs/development/libraries/qt-5/*/tmp/
|
||||
/pkgs/desktops/kde-5/*/tmp/
|
||||
|
@ -43,7 +43,6 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://github.com/BurntSushi/ripgrep";
|
||||
license = licenses.unlicense;
|
||||
maintainers = [ maintainers.tailhook ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
@ -254,7 +254,7 @@ let f(h, h + 1, i) = i + h
|
||||
|
||||
<variablelist>
|
||||
<title>Variables specifying dependencies</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsBuildBuild">
|
||||
<term>
|
||||
<varname>depsBuildBuild</varname>
|
||||
</term>
|
||||
@ -267,7 +267,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-nativeBuildInputs">
|
||||
<term>
|
||||
<varname>nativeBuildInputs</varname>
|
||||
</term>
|
||||
@ -280,7 +280,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsBuildTarget">
|
||||
<term>
|
||||
<varname>depsBuildTarget</varname>
|
||||
</term>
|
||||
@ -296,7 +296,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsHostHost">
|
||||
<term>
|
||||
<varname>depsHostHost</varname>
|
||||
</term>
|
||||
@ -306,7 +306,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-buildInputs">
|
||||
<term>
|
||||
<varname>buildInputs</varname>
|
||||
</term>
|
||||
@ -319,7 +319,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsTargetTarget">
|
||||
<term>
|
||||
<varname>depsTargetTarget</varname>
|
||||
</term>
|
||||
@ -329,7 +329,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsBuildBuildPropagated">
|
||||
<term>
|
||||
<varname>depsBuildBuildPropagated</varname>
|
||||
</term>
|
||||
@ -339,7 +339,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-propagatedNativeBuildInputs">
|
||||
<term>
|
||||
<varname>propagatedNativeBuildInputs</varname>
|
||||
</term>
|
||||
@ -349,7 +349,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsBuildTargetPropagated">
|
||||
<term>
|
||||
<varname>depsBuildTargetPropagated</varname>
|
||||
</term>
|
||||
@ -359,7 +359,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsHostHostPropagated">
|
||||
<term>
|
||||
<varname>depsHostHostPropagated</varname>
|
||||
</term>
|
||||
@ -369,7 +369,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-propagatedBuildInputs">
|
||||
<term>
|
||||
<varname>propagatedBuildInputs</varname>
|
||||
</term>
|
||||
@ -379,7 +379,7 @@ let f(h, h + 1, i) = i + h
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-depsTargetTargetPropagated">
|
||||
<term>
|
||||
<varname>depsTargetTargetPropagated</varname>
|
||||
</term>
|
||||
@ -396,7 +396,7 @@ let f(h, h + 1, i) = i + h
|
||||
|
||||
<variablelist>
|
||||
<title>Variables affecting <literal>stdenv</literal> initialisation</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-NIX_DEBUG">
|
||||
<term>
|
||||
<varname>NIX_DEBUG</varname>
|
||||
</term>
|
||||
@ -410,7 +410,7 @@ let f(h, h + 1, i) = i + h
|
||||
|
||||
<variablelist>
|
||||
<title>Attributes affecting build properties</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-enableParallelBuilding">
|
||||
<term>
|
||||
<varname>enableParallelBuilding</varname>
|
||||
</term>
|
||||
@ -427,7 +427,7 @@ let f(h, h + 1, i) = i + h
|
||||
|
||||
<variablelist>
|
||||
<title>Special variables</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-passthru">
|
||||
<term>
|
||||
<varname>passthru</varname>
|
||||
</term>
|
||||
@ -504,7 +504,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
There are a number of variables that control what phases are executed and in what order:
|
||||
<variablelist>
|
||||
<title>Variables affecting phase control</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-phases">
|
||||
<term>
|
||||
<varname>phases</varname>
|
||||
</term>
|
||||
@ -517,7 +517,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-prePhases">
|
||||
<term>
|
||||
<varname>prePhases</varname>
|
||||
</term>
|
||||
@ -527,7 +527,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preConfigurePhases">
|
||||
<term>
|
||||
<varname>preConfigurePhases</varname>
|
||||
</term>
|
||||
@ -537,7 +537,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preBuildPhases">
|
||||
<term>
|
||||
<varname>preBuildPhases</varname>
|
||||
</term>
|
||||
@ -547,7 +547,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preInstallPhases">
|
||||
<term>
|
||||
<varname>preInstallPhases</varname>
|
||||
</term>
|
||||
@ -557,7 +557,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preFixupPhases">
|
||||
<term>
|
||||
<varname>preFixupPhases</varname>
|
||||
</term>
|
||||
@ -567,7 +567,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preDistPhases">
|
||||
<term>
|
||||
<varname>preDistPhases</varname>
|
||||
</term>
|
||||
@ -577,7 +577,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postPhases">
|
||||
<term>
|
||||
<varname>postPhases</varname>
|
||||
</term>
|
||||
@ -635,7 +635,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the unpack phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-src">
|
||||
<term>
|
||||
<varname>srcs</varname> / <varname>src</varname>
|
||||
</term>
|
||||
@ -645,7 +645,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-sourceRoot">
|
||||
<term>
|
||||
<varname>sourceRoot</varname>
|
||||
</term>
|
||||
@ -655,7 +655,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-setSourceRoot">
|
||||
<term>
|
||||
<varname>setSourceRoot</varname>
|
||||
</term>
|
||||
@ -665,7 +665,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preUnpack">
|
||||
<term>
|
||||
<varname>preUnpack</varname>
|
||||
</term>
|
||||
@ -675,7 +675,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postUnpack">
|
||||
<term>
|
||||
<varname>postUnpack</varname>
|
||||
</term>
|
||||
@ -685,7 +685,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontUnpack">
|
||||
<term>
|
||||
<varname>dontUnpack</varname>
|
||||
</term>
|
||||
@ -695,7 +695,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontMakeSourcesWritable">
|
||||
<term>
|
||||
<varname>dontMakeSourcesWritable</varname>
|
||||
</term>
|
||||
@ -705,7 +705,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-unpackCmd">
|
||||
<term>
|
||||
<varname>unpackCmd</varname>
|
||||
</term>
|
||||
@ -727,7 +727,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the patch phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontPatch">
|
||||
<term>
|
||||
<varname>dontPatch</varname>
|
||||
</term>
|
||||
@ -737,7 +737,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-patches">
|
||||
<term>
|
||||
<varname>patches</varname>
|
||||
</term>
|
||||
@ -747,7 +747,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-patchFlags">
|
||||
<term>
|
||||
<varname>patchFlags</varname>
|
||||
</term>
|
||||
@ -757,7 +757,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-prePatch">
|
||||
<term>
|
||||
<varname>prePatch</varname>
|
||||
</term>
|
||||
@ -767,7 +767,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postPatch">
|
||||
<term>
|
||||
<varname>postPatch</varname>
|
||||
</term>
|
||||
@ -789,7 +789,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the configure phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-configureScript">
|
||||
<term>
|
||||
<varname>configureScript</varname>
|
||||
</term>
|
||||
@ -799,7 +799,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-configureFlags">
|
||||
<term>
|
||||
<varname>configureFlags</varname>
|
||||
</term>
|
||||
@ -809,7 +809,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontConfigure">
|
||||
<term>
|
||||
<varname>dontConfigure</varname>
|
||||
</term>
|
||||
@ -819,7 +819,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-configureFlagsArray">
|
||||
<term>
|
||||
<varname>configureFlagsArray</varname>
|
||||
</term>
|
||||
@ -829,7 +829,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontAddPrefix">
|
||||
<term>
|
||||
<varname>dontAddPrefix</varname>
|
||||
</term>
|
||||
@ -839,7 +839,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-prefix">
|
||||
<term>
|
||||
<varname>prefix</varname>
|
||||
</term>
|
||||
@ -849,7 +849,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-prefixKey">
|
||||
<term>
|
||||
<varname>prefixKey</varname>
|
||||
</term>
|
||||
@ -859,7 +859,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontAddDisableDepTrack">
|
||||
<term>
|
||||
<varname>dontAddDisableDepTrack</varname>
|
||||
</term>
|
||||
@ -869,7 +869,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontFixLibtool">
|
||||
<term>
|
||||
<varname>dontFixLibtool</varname>
|
||||
</term>
|
||||
@ -885,7 +885,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontDisableStatic">
|
||||
<term>
|
||||
<varname>dontDisableStatic</varname>
|
||||
</term>
|
||||
@ -898,7 +898,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-configurePlatforms">
|
||||
<term>
|
||||
<varname>configurePlatforms</varname>
|
||||
</term>
|
||||
@ -913,7 +913,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preConfigure">
|
||||
<term>
|
||||
<varname>preConfigure</varname>
|
||||
</term>
|
||||
@ -923,7 +923,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postConfigure">
|
||||
<term>
|
||||
<varname>postConfigure</varname>
|
||||
</term>
|
||||
@ -945,7 +945,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the build phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontBuild">
|
||||
<term>
|
||||
<varname>dontBuild</varname>
|
||||
</term>
|
||||
@ -955,7 +955,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-makefile">
|
||||
<term>
|
||||
<varname>makefile</varname>
|
||||
</term>
|
||||
@ -965,7 +965,7 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-makeFlags">
|
||||
<term>
|
||||
<varname>makeFlags</varname>
|
||||
</term>
|
||||
@ -983,7 +983,7 @@ makeFlags = [ "PREFIX=$(out)" ];
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-makeFlagsArray">
|
||||
<term>
|
||||
<varname>makeFlagsArray</varname>
|
||||
</term>
|
||||
@ -999,7 +999,7 @@ preBuild = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-buildFlags">
|
||||
<term>
|
||||
<varname>buildFlags</varname> / <varname>buildFlagsArray</varname>
|
||||
</term>
|
||||
@ -1009,7 +1009,7 @@ preBuild = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preBuild">
|
||||
<term>
|
||||
<varname>preBuild</varname>
|
||||
</term>
|
||||
@ -1019,7 +1019,7 @@ preBuild = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postBuild">
|
||||
<term>
|
||||
<varname>postBuild</varname>
|
||||
</term>
|
||||
@ -1049,7 +1049,7 @@ preBuild = ''
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the check phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-doCheck">
|
||||
<term>
|
||||
<varname>doCheck</varname>
|
||||
</term>
|
||||
@ -1067,11 +1067,11 @@ preBuild = ''
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
See the build phase for details.
|
||||
See the <link xlink:href="#var-stdenv-makeFlags">build phase</link> for details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-checkTarget">
|
||||
<term>
|
||||
<varname>checkTarget</varname>
|
||||
</term>
|
||||
@ -1081,7 +1081,7 @@ preBuild = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-checkFlags">
|
||||
<term>
|
||||
<varname>checkFlags</varname> / <varname>checkFlagsArray</varname>
|
||||
</term>
|
||||
@ -1091,7 +1091,7 @@ preBuild = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-checkInputs">
|
||||
<term>
|
||||
<varname>checkInputs</varname>
|
||||
</term>
|
||||
@ -1101,7 +1101,7 @@ preBuild = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preCheck">
|
||||
<term>
|
||||
<varname>preCheck</varname>
|
||||
</term>
|
||||
@ -1111,7 +1111,7 @@ preBuild = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postCheck">
|
||||
<term>
|
||||
<varname>postCheck</varname>
|
||||
</term>
|
||||
@ -1133,7 +1133,7 @@ preBuild = ''
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the install phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontInstall">
|
||||
<term>
|
||||
<varname>dontInstall</varname>
|
||||
</term>
|
||||
@ -1149,11 +1149,11 @@ preBuild = ''
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
See the build phase for details.
|
||||
See the <link xlink:href="#var-stdenv-makeFlags">build phase</link> for details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-installTargets">
|
||||
<term>
|
||||
<varname>installTargets</varname>
|
||||
</term>
|
||||
@ -1165,7 +1165,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-installFlags">
|
||||
<term>
|
||||
<varname>installFlags</varname> / <varname>installFlagsArray</varname>
|
||||
</term>
|
||||
@ -1175,7 +1175,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preInstall">
|
||||
<term>
|
||||
<varname>preInstall</varname>
|
||||
</term>
|
||||
@ -1185,7 +1185,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postInstall">
|
||||
<term>
|
||||
<varname>postInstall</varname>
|
||||
</term>
|
||||
@ -1229,7 +1229,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the fixup phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontFixup">
|
||||
<term>
|
||||
<varname>dontFixup</varname>
|
||||
</term>
|
||||
@ -1239,7 +1239,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontStrip">
|
||||
<term>
|
||||
<varname>dontStrip</varname>
|
||||
</term>
|
||||
@ -1249,7 +1249,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontStripHost">
|
||||
<term>
|
||||
<varname>dontStripHost</varname>
|
||||
</term>
|
||||
@ -1259,7 +1259,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontStripTarget">
|
||||
<term>
|
||||
<varname>dontStripTarget</varname>
|
||||
</term>
|
||||
@ -1269,7 +1269,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontMoveSbin">
|
||||
<term>
|
||||
<varname>dontMoveSbin</varname>
|
||||
</term>
|
||||
@ -1279,7 +1279,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-stripAllList">
|
||||
<term>
|
||||
<varname>stripAllList</varname>
|
||||
</term>
|
||||
@ -1289,7 +1289,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-stripAllFlags">
|
||||
<term>
|
||||
<varname>stripAllFlags</varname>
|
||||
</term>
|
||||
@ -1299,7 +1299,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-stripDebugList">
|
||||
<term>
|
||||
<varname>stripDebugList</varname>
|
||||
</term>
|
||||
@ -1309,7 +1309,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-stripDebugFlags">
|
||||
<term>
|
||||
<varname>stripDebugFlags</varname>
|
||||
</term>
|
||||
@ -1319,7 +1319,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontPatchELF">
|
||||
<term>
|
||||
<varname>dontPatchELF</varname>
|
||||
</term>
|
||||
@ -1329,7 +1329,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontPatchShebangs">
|
||||
<term>
|
||||
<varname>dontPatchShebangs</varname>
|
||||
</term>
|
||||
@ -1339,7 +1339,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontPruneLibtoolFiles">
|
||||
<term>
|
||||
<varname>dontPruneLibtoolFiles</varname>
|
||||
</term>
|
||||
@ -1349,7 +1349,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-forceShare">
|
||||
<term>
|
||||
<varname>forceShare</varname>
|
||||
</term>
|
||||
@ -1359,7 +1359,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-setupHook">
|
||||
<term>
|
||||
<varname>setupHook</varname>
|
||||
</term>
|
||||
@ -1370,7 +1370,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preFixup">
|
||||
<term>
|
||||
<varname>preFixup</varname>
|
||||
</term>
|
||||
@ -1380,7 +1380,7 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postFixup">
|
||||
<term>
|
||||
<varname>postFixup</varname>
|
||||
</term>
|
||||
@ -1419,7 +1419,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the installCheck phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-doInstallCheck">
|
||||
<term>
|
||||
<varname>doInstallCheck</varname>
|
||||
</term>
|
||||
@ -1431,7 +1431,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-installCheckTarget">
|
||||
<term>
|
||||
<varname>installCheckTarget</varname>
|
||||
</term>
|
||||
@ -1441,7 +1441,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-installCheckFlags">
|
||||
<term>
|
||||
<varname>installCheckFlags</varname> / <varname>installCheckFlagsArray</varname>
|
||||
</term>
|
||||
@ -1451,7 +1451,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-installCheckInputs">
|
||||
<term>
|
||||
<varname>installCheckInputs</varname>
|
||||
</term>
|
||||
@ -1461,7 +1461,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preInstallCheck">
|
||||
<term>
|
||||
<varname>preInstallCheck</varname>
|
||||
</term>
|
||||
@ -1471,7 +1471,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postInstallCheck">
|
||||
<term>
|
||||
<varname>postInstallCheck</varname>
|
||||
</term>
|
||||
@ -1493,7 +1493,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the distribution phase</title>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-distTarget">
|
||||
<term>
|
||||
<varname>distTarget</varname>
|
||||
</term>
|
||||
@ -1503,7 +1503,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-distFlags">
|
||||
<term>
|
||||
<varname>distFlags</varname> / <varname>distFlagsArray</varname>
|
||||
</term>
|
||||
@ -1513,7 +1513,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-tarballs">
|
||||
<term>
|
||||
<varname>tarballs</varname>
|
||||
</term>
|
||||
@ -1523,7 +1523,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-dontCopyDist">
|
||||
<term>
|
||||
<varname>dontCopyDist</varname>
|
||||
</term>
|
||||
@ -1533,7 +1533,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-preDist">
|
||||
<term>
|
||||
<varname>preDist</varname>
|
||||
</term>
|
||||
@ -1543,7 +1543,7 @@ set debug-file-directory ~/.nix-profile/lib/debug
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<varlistentry xml:id="var-stdenv-postDist">
|
||||
<term>
|
||||
<varname>postDist</varname>
|
||||
</term>
|
||||
|
149
lib/modules.nix
149
lib/modules.nix
@ -58,6 +58,23 @@ rec {
|
||||
default = check;
|
||||
description = "Whether to check whether all option definitions have matching declarations.";
|
||||
};
|
||||
|
||||
_module.freeformType = mkOption {
|
||||
# Disallow merging for now, but could be implemented nicely with a `types.optionType`
|
||||
type = types.nullOr (types.uniq types.attrs);
|
||||
internal = true;
|
||||
default = null;
|
||||
description = ''
|
||||
If set, merge all definitions that don't have an associated option
|
||||
together using this type. The result then gets combined with the
|
||||
values of all declared options to produce the final <literal>
|
||||
config</literal> value.
|
||||
|
||||
If this is <literal>null</literal>, definitions without an option
|
||||
will throw an error unless <option>_module.check</option> is
|
||||
turned off.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
@ -65,35 +82,44 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
collected = collectModules
|
||||
(specialArgs.modulesPath or "")
|
||||
(modules ++ [ internalModule ])
|
||||
({ inherit config options lib; } // specialArgs);
|
||||
merged =
|
||||
let collected = collectModules
|
||||
(specialArgs.modulesPath or "")
|
||||
(modules ++ [ internalModule ])
|
||||
({ inherit lib options config; } // specialArgs);
|
||||
in mergeModules prefix (reverseList collected);
|
||||
|
||||
options = mergeModules prefix (reverseList collected);
|
||||
options = merged.matchedOptions;
|
||||
|
||||
# Traverse options and extract the option values into the final
|
||||
# config set. At the same time, check whether all option
|
||||
# definitions have matching declarations.
|
||||
# !!! _module.check's value can't depend on any other config values
|
||||
# without an infinite recursion. One way around this is to make the
|
||||
# 'config' passed around to the modules be unconditionally unchecked,
|
||||
# and only do the check in 'result'.
|
||||
config = yieldConfig prefix options;
|
||||
yieldConfig = prefix: set:
|
||||
let res = removeAttrs (mapAttrs (n: v:
|
||||
if isOption v then v.value
|
||||
else yieldConfig (prefix ++ [n]) v) set) ["_definedNames"];
|
||||
in
|
||||
if options._module.check.value && set ? _definedNames then
|
||||
foldl' (res: m:
|
||||
foldl' (res: name:
|
||||
if set ? ${name} then res else throw "The option `${showOption (prefix ++ [name])}' defined in `${m.file}' does not exist.")
|
||||
res m.names)
|
||||
res set._definedNames
|
||||
else
|
||||
res;
|
||||
result = {
|
||||
config =
|
||||
let
|
||||
|
||||
# For definitions that have an associated option
|
||||
declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
|
||||
|
||||
# If freeformType is set, this is for definitions that don't have an associated option
|
||||
freeformConfig =
|
||||
let
|
||||
defs = map (def: {
|
||||
file = def.file;
|
||||
value = setAttrByPath def.prefix def.value;
|
||||
}) merged.unmatchedDefns;
|
||||
in if defs == [] then {}
|
||||
else declaredConfig._module.freeformType.merge prefix defs;
|
||||
|
||||
in if declaredConfig._module.freeformType == null then declaredConfig
|
||||
# Because all definitions that had an associated option ended in
|
||||
# declaredConfig, freeformConfig can only contain the non-option
|
||||
# paths, meaning recursiveUpdate will never override any value
|
||||
else recursiveUpdate freeformConfig declaredConfig;
|
||||
|
||||
checkUnmatched =
|
||||
if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
|
||||
let inherit (head merged.unmatchedDefns) file prefix;
|
||||
in throw "The option `${showOption prefix}' defined in `${file}' does not exist."
|
||||
else null;
|
||||
|
||||
result = builtins.seq checkUnmatched {
|
||||
inherit options;
|
||||
config = removeAttrs config [ "_module" ];
|
||||
inherit (config) _module;
|
||||
@ -174,12 +200,16 @@ rec {
|
||||
/* Massage a module into canonical form, that is, a set consisting
|
||||
of ‘options’, ‘config’ and ‘imports’ attributes. */
|
||||
unifyModuleSyntax = file: key: m:
|
||||
let addMeta = config: if m ? meta
|
||||
then mkMerge [ config { meta = m.meta; } ]
|
||||
else config;
|
||||
let
|
||||
addMeta = config: if m ? meta
|
||||
then mkMerge [ config { meta = m.meta; } ]
|
||||
else config;
|
||||
addFreeformType = config: if m ? freeformType
|
||||
then mkMerge [ config { _module.freeformType = m.freeformType; } ]
|
||||
else config;
|
||||
in
|
||||
if m ? config || m ? options then
|
||||
let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in
|
||||
let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta" "freeformType"]; in
|
||||
if badAttrs != {} then
|
||||
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: ${toString (attrNames badAttrs)}) into the explicit `config' attribute."
|
||||
else
|
||||
@ -188,7 +218,7 @@ rec {
|
||||
disabledModules = m.disabledModules or [];
|
||||
imports = m.imports or [];
|
||||
options = m.options or {};
|
||||
config = addMeta (m.config or {});
|
||||
config = addFreeformType (addMeta (m.config or {}));
|
||||
}
|
||||
else
|
||||
{ _file = m._file or file;
|
||||
@ -196,7 +226,7 @@ rec {
|
||||
disabledModules = m.disabledModules or [];
|
||||
imports = m.require or [] ++ m.imports or [];
|
||||
options = {};
|
||||
config = addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports"]);
|
||||
config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
|
||||
};
|
||||
|
||||
applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
|
||||
@ -233,7 +263,23 @@ rec {
|
||||
declarations in all modules, combining them into a single set.
|
||||
At the same time, for each option declaration, it will merge the
|
||||
corresponding option definitions in all machines, returning them
|
||||
in the ‘value’ attribute of each option. */
|
||||
in the ‘value’ attribute of each option.
|
||||
|
||||
This returns a set like
|
||||
{
|
||||
# A recursive set of options along with their final values
|
||||
matchedOptions = {
|
||||
foo = { _type = "option"; value = "option value of foo"; ... };
|
||||
bar.baz = { _type = "option"; value = "option value of bar.baz"; ... };
|
||||
...
|
||||
};
|
||||
# A list of definitions that weren't matched by any option
|
||||
unmatchedDefns = [
|
||||
{ file = "file.nix"; prefix = [ "qux" ]; value = "qux"; }
|
||||
...
|
||||
];
|
||||
}
|
||||
*/
|
||||
mergeModules = prefix: modules:
|
||||
mergeModules' prefix modules
|
||||
(concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
|
||||
@ -280,9 +326,9 @@ rec {
|
||||
defnsByName' = byName "config" (module: value:
|
||||
[{ inherit (module) file; inherit value; }]
|
||||
) configs;
|
||||
in
|
||||
(flip mapAttrs declsByName (name: decls:
|
||||
# We're descending into attribute ‘name’.
|
||||
|
||||
resultsByName = flip mapAttrs declsByName (name: decls:
|
||||
# We're descending into attribute ‘name’.
|
||||
let
|
||||
loc = prefix ++ [name];
|
||||
defns = defnsByName.${name} or [];
|
||||
@ -291,7 +337,10 @@ rec {
|
||||
in
|
||||
if nrOptions == length decls then
|
||||
let opt = fixupOptionType loc (mergeOptionDecls loc decls);
|
||||
in evalOptionValue loc opt defns'
|
||||
in {
|
||||
matchedOptions = evalOptionValue loc opt defns';
|
||||
unmatchedDefns = [];
|
||||
}
|
||||
else if nrOptions != 0 then
|
||||
let
|
||||
firstOption = findFirst (m: isOption m.options) "" decls;
|
||||
@ -299,9 +348,27 @@ rec {
|
||||
in
|
||||
throw "The option `${showOption loc}' in `${firstOption._file}' is a prefix of options in `${firstNonOption._file}'."
|
||||
else
|
||||
mergeModules' loc decls defns
|
||||
))
|
||||
// { _definedNames = map (m: { inherit (m) file; names = attrNames m.config; }) configs; };
|
||||
mergeModules' loc decls defns);
|
||||
|
||||
matchedOptions = mapAttrs (n: v: v.matchedOptions) resultsByName;
|
||||
|
||||
# an attrset 'name' => list of unmatched definitions for 'name'
|
||||
unmatchedDefnsByName =
|
||||
# Propagate all unmatched definitions from nested option sets
|
||||
mapAttrs (n: v: v.unmatchedDefns) resultsByName
|
||||
# Plus the definitions for the current prefix that don't have a matching option
|
||||
// removeAttrs defnsByName' (attrNames matchedOptions);
|
||||
in {
|
||||
inherit matchedOptions;
|
||||
|
||||
# Transforms unmatchedDefnsByName into a list of definitions
|
||||
unmatchedDefns = concatLists (mapAttrsToList (name: defs:
|
||||
map (def: def // {
|
||||
# Set this so we know when the definition first left unmatched territory
|
||||
prefix = [name] ++ (def.prefix or []);
|
||||
}) defs
|
||||
) unmatchedDefnsByName);
|
||||
};
|
||||
|
||||
/* Merge multiple option declarations into a single declaration. In
|
||||
general, there should be only one declaration of each option.
|
||||
|
@ -210,6 +210,29 @@ checkConfigOutput "empty" config.value.foo ./declare-lazyAttrsOf.nix ./attrsOf-c
|
||||
checkConfigError 'The option value .* in .* is not of type .*' \
|
||||
config.value ./declare-int-unsigned-value.nix ./define-value-list.nix ./define-value-int-positive.nix
|
||||
|
||||
## Freeform modules
|
||||
# Assigning without a declared option should work
|
||||
checkConfigOutput 24 config.value ./freeform-attrsOf.nix ./define-value-string.nix
|
||||
# No freeform assigments shouldn't make it error
|
||||
checkConfigOutput '{ }' config ./freeform-attrsOf.nix
|
||||
# but only if the type matches
|
||||
checkConfigError 'The option value .* in .* is not of type .*' config.value ./freeform-attrsOf.nix ./define-value-list.nix
|
||||
# and properties should be applied
|
||||
checkConfigOutput yes config.value ./freeform-attrsOf.nix ./define-value-string-properties.nix
|
||||
# Options should still be declarable, and be able to have a type that doesn't match the freeform type
|
||||
checkConfigOutput false config.enable ./freeform-attrsOf.nix ./define-value-string.nix ./declare-enable.nix
|
||||
checkConfigOutput 24 config.value ./freeform-attrsOf.nix ./define-value-string.nix ./declare-enable.nix
|
||||
# and this should work too with nested values
|
||||
checkConfigOutput false config.nest.foo ./freeform-attrsOf.nix ./freeform-nested.nix
|
||||
checkConfigOutput bar config.nest.bar ./freeform-attrsOf.nix ./freeform-nested.nix
|
||||
# Check whether a declared option can depend on an freeform-typed one
|
||||
checkConfigOutput null config.foo ./freeform-attrsOf.nix ./freeform-str-dep-unstr.nix
|
||||
checkConfigOutput 24 config.foo ./freeform-attrsOf.nix ./freeform-str-dep-unstr.nix ./define-value-string.nix
|
||||
# Check whether an freeform-typed value can depend on a declared option, this can only work with lazyAttrsOf
|
||||
checkConfigError 'infinite recursion encountered' config.foo ./freeform-attrsOf.nix ./freeform-unstr-dep-str.nix
|
||||
checkConfigError 'The option .* is used but not defined' config.foo ./freeform-lazyAttrsOf.nix ./freeform-unstr-dep-str.nix
|
||||
checkConfigOutput 24 config.foo ./freeform-lazyAttrsOf.nix ./freeform-unstr-dep-str.nix ./define-value-string.nix
|
||||
|
||||
cat <<EOF
|
||||
====== module tests ======
|
||||
$pass Pass
|
||||
|
12
lib/tests/modules/define-value-string-properties.nix
Normal file
12
lib/tests/modules/define-value-string-properties.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ lib, ... }: {
|
||||
|
||||
imports = [{
|
||||
value = lib.mkDefault "def";
|
||||
}];
|
||||
|
||||
value = lib.mkMerge [
|
||||
(lib.mkIf false "nope")
|
||||
"yes"
|
||||
];
|
||||
|
||||
}
|
3
lib/tests/modules/freeform-attrsOf.nix
Normal file
3
lib/tests/modules/freeform-attrsOf.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{ lib, ... }: {
|
||||
freeformType = with lib.types; attrsOf (either str (attrsOf str));
|
||||
}
|
3
lib/tests/modules/freeform-lazyAttrsOf.nix
Normal file
3
lib/tests/modules/freeform-lazyAttrsOf.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{ lib, ... }: {
|
||||
freeformType = with lib.types; lazyAttrsOf (either str (lazyAttrsOf str));
|
||||
}
|
7
lib/tests/modules/freeform-nested.nix
Normal file
7
lib/tests/modules/freeform-nested.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ lib, ... }: {
|
||||
options.nest.foo = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
config.nest.bar = "bar";
|
||||
}
|
8
lib/tests/modules/freeform-str-dep-unstr.nix
Normal file
8
lib/tests/modules/freeform-str-dep-unstr.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ lib, config, ... }: {
|
||||
options.foo = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
config.foo = lib.mkIf (config ? value) config.value;
|
||||
}
|
8
lib/tests/modules/freeform-unstr-dep-str.nix
Normal file
8
lib/tests/modules/freeform-unstr-dep-str.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ lib, config, ... }: {
|
||||
options.value = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
config.foo = lib.mkIf (config.value != null) config.value;
|
||||
}
|
@ -486,9 +486,15 @@ rec {
|
||||
else value
|
||||
) defs;
|
||||
|
||||
freeformType = (evalModules {
|
||||
inherit modules specialArgs;
|
||||
args.name = "‹name›";
|
||||
})._module.freeformType;
|
||||
|
||||
in
|
||||
mkOptionType rec {
|
||||
name = "submodule";
|
||||
description = freeformType.description or name;
|
||||
check = x: isAttrs x || isFunction x || path.check x;
|
||||
merge = loc: defs:
|
||||
(evalModules {
|
||||
|
@ -3042,12 +3042,6 @@
|
||||
githubId = 313929;
|
||||
name = "Gabriel Ebner";
|
||||
};
|
||||
geistesk = {
|
||||
email = "post@0x21.biz";
|
||||
github = "geistesk";
|
||||
githubId = 8402811;
|
||||
name = "Alvar Penning";
|
||||
};
|
||||
genesis = {
|
||||
email = "ronan@aimao.org";
|
||||
github = "bignaux";
|
||||
@ -3259,6 +3253,10 @@
|
||||
github = "haozeke";
|
||||
githubId = 4336207;
|
||||
name = "Rohit Goswami";
|
||||
keys = [{
|
||||
longkeyid = "rsa4096/0x9CCCE36402CB49A6";
|
||||
fingerprint = "74B1 F67D 8E43 A94A 7554 0768 9CCC E364 02CB 49A6";
|
||||
}];
|
||||
};
|
||||
haslersn = {
|
||||
email = "haslersn@fius.informatik.uni-stuttgart.de";
|
||||
@ -6202,6 +6200,16 @@
|
||||
fingerprint = "514B B966 B46E 3565 0508 86E8 0E6C A66E 5C55 7AA8";
|
||||
}];
|
||||
};
|
||||
oxzi = {
|
||||
email = "post@0x21.biz";
|
||||
github = "oxzi";
|
||||
githubId = 8402811;
|
||||
name = "Alvar Penning";
|
||||
keys = [{
|
||||
longkeyid = "rsa4096/0xF32A45637FA25E31";
|
||||
fingerprint = "EB14 4E67 E57D 27E2 B5A4 CD8C F32A 4563 7FA2 5E31";
|
||||
}];
|
||||
};
|
||||
oyren = {
|
||||
email = "m.scheuren@oyra.eu";
|
||||
github = "oyren";
|
||||
@ -7940,6 +7948,12 @@
|
||||
githubId = 332289;
|
||||
name = "Rafał Łasocha";
|
||||
};
|
||||
syberant = {
|
||||
email = "sybrand@neuralcoding.com";
|
||||
github = "syberant";
|
||||
githubId = 20063502;
|
||||
name = "Sybrand Aarnoutse";
|
||||
};
|
||||
symphorien = {
|
||||
email = "symphorien_nixpkgs@xlumurb.eu";
|
||||
github = "symphorien";
|
||||
@ -8402,6 +8416,12 @@
|
||||
githubId = 207457;
|
||||
name = "Matthieu Chevrier";
|
||||
};
|
||||
trepetti = {
|
||||
email = "trepetti@cs.columbia.edu";
|
||||
github = "trepetti";
|
||||
githubId = 25440339;
|
||||
name = "Tom Repetti";
|
||||
};
|
||||
trevorj = {
|
||||
email = "nix@trevor.joynson.io";
|
||||
github = "akatrevorjay";
|
||||
@ -8729,6 +8749,14 @@
|
||||
githubId = 13259982;
|
||||
name = "Vanessa McHale";
|
||||
};
|
||||
|
||||
voidless = {
|
||||
email = "julius.schmitt@yahoo.de";
|
||||
github = "voidIess";
|
||||
githubId = 45292658;
|
||||
name = "Julius Schmitt";
|
||||
};
|
||||
|
||||
volhovm = {
|
||||
email = "volhovm.cs@gmail.com";
|
||||
github = "volhovm";
|
||||
|
68
nixos/doc/manual/development/freeform-modules.xml
Normal file
68
nixos/doc/manual/development/freeform-modules.xml
Normal file
@ -0,0 +1,68 @@
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="sec-freeform-modules">
|
||||
<title>Freeform modules</title>
|
||||
<para>
|
||||
Freeform modules allow you to define values for option paths that have not been declared explicitly. This can be used to add attribute-specific types to what would otherwise have to be <literal>attrsOf</literal> options in order to accept all attribute names.
|
||||
</para>
|
||||
<para>
|
||||
This feature can be enabled by using the attribute <literal>freeformType</literal> to define a freeform type. By doing this, all assignments without an associated option will be merged using the freeform type and combined into the resulting <literal>config</literal> set. Since this feature nullifies name checking for entire option trees, it is only recommended for use in submodules.
|
||||
</para>
|
||||
<example xml:id="ex-freeform-module">
|
||||
<title>Freeform submodule</title>
|
||||
<para>
|
||||
The following shows a submodule assigning a freeform type that allows arbitrary attributes with <literal>str</literal> values below <literal>settings</literal>, but also declares an option for the <literal>settings.port</literal> attribute to have it type-checked and assign a default value. See <xref linkend="ex-settings-typed-attrs"/> for a more complete example.
|
||||
</para>
|
||||
<programlisting>
|
||||
{ lib, config, ... }: {
|
||||
|
||||
options.settings = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
|
||||
freeformType = with lib.types; attrsOf str;
|
||||
|
||||
# We want this attribute to be checked for the correct type
|
||||
options.port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
# Declaring the option also allows defining a default value
|
||||
default = 8080;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
<para>
|
||||
And the following shows what such a module then allows
|
||||
</para>
|
||||
<programlisting>
|
||||
{
|
||||
# Not a declared option, but the freeform type allows this
|
||||
settings.logLevel = "debug";
|
||||
|
||||
# Not allowed because the the freeform type only allows strings
|
||||
# settings.enable = true;
|
||||
|
||||
# Allowed because there is a port option declared
|
||||
settings.port = 80;
|
||||
|
||||
# Not allowed because the port option doesn't allow strings
|
||||
# settings.port = "443";
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
<note>
|
||||
<para>
|
||||
Freeform attributes cannot depend on other attributes of the same set without infinite recursion:
|
||||
<programlisting>
|
||||
{
|
||||
# This throws infinite recursion encountered
|
||||
settings.logLevel = lib.mkIf (config.settings.port == 80) "debug";
|
||||
}
|
||||
</programlisting>
|
||||
To prevent this, declare options for all attributes that need to depend on others. For above example this means to declare <literal>logLevel</literal> to be an option.
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
@ -137,7 +137,7 @@ in {
|
||||
description = ''
|
||||
Configuration for foo, see
|
||||
<link xlink:href="https://example.com/docs/foo"/>
|
||||
for supported values.
|
||||
for supported settings.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@ -167,13 +167,50 @@ in {
|
||||
|
||||
# We know that the `user` attribute exists because we set a default value
|
||||
# for it above, allowing us to use it without worries here
|
||||
users.users.${cfg.settings.user} = {}
|
||||
users.users.${cfg.settings.user} = {};
|
||||
|
||||
# ...
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
<section xml:id="sec-settings-attrs-options">
|
||||
<title>Option declarations for attributes</title>
|
||||
<para>
|
||||
Some <literal>settings</literal> attributes may deserve some extra care. They may need a different type, default or merging behavior, or they are essential options that should show their documentation in the manual. This can be done using <xref linkend='sec-freeform-modules'/>.
|
||||
<example xml:id="ex-settings-typed-attrs">
|
||||
<title>Declaring a type-checked <literal>settings</literal> attribute</title>
|
||||
<para>
|
||||
We extend above example using freeform modules to declare an option for the port, which will enforce it to be a valid integer and make it show up in the manual.
|
||||
</para>
|
||||
<programlisting>
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
|
||||
freeformType = settingsFormat.type;
|
||||
|
||||
# Declare an option for the port such that the type is checked and this option
|
||||
# is shown in the manual.
|
||||
options.port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8080;
|
||||
description = ''
|
||||
Which port this service should listen on.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for Foo, see
|
||||
<link xlink:href="https://example.com/docs/foo"/>
|
||||
for supported values.
|
||||
'';
|
||||
};
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
@ -183,5 +183,6 @@ in {
|
||||
<xi:include href="meta-attributes.xml" />
|
||||
<xi:include href="importing-modules.xml" />
|
||||
<xi:include href="replace-modules.xml" />
|
||||
<xi:include href="freeform-modules.xml" />
|
||||
<xi:include href="settings-options.xml" />
|
||||
</chapter>
|
||||
|
@ -63,8 +63,8 @@ in {
|
||||
fsType = "ext4";
|
||||
configFile = pkgs.writeText "configuration.nix"
|
||||
''
|
||||
{
|
||||
imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ];
|
||||
{ modulesPath, ... }: {
|
||||
imports = [ "''${modulesPath}/virtualisation/amazon-image.nix" ];
|
||||
${optionalString config.ec2.hvm ''
|
||||
ec2.hvm = true;
|
||||
''}
|
||||
|
@ -27,6 +27,7 @@ with lib;
|
||||
fonts.fontconfig.enable = false;
|
||||
|
||||
nixpkgs.overlays = singleton (const (super: {
|
||||
cairo = super.cairo.override { x11Support = false; };
|
||||
dbus = super.dbus.override { x11Support = false; };
|
||||
networkmanager-fortisslvpn = super.networkmanager-fortisslvpn.override { withGnome = false; };
|
||||
networkmanager-l2tp = super.networkmanager-l2tp.override { withGnome = false; };
|
||||
@ -35,6 +36,7 @@ with lib;
|
||||
networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
|
||||
networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; };
|
||||
gobject-introspection = super.gobject-introspection.override { x11Support = false; };
|
||||
qemu = super.qemu.override { gtkSupport = false; spiceSupport = false; sdlSupport = false; };
|
||||
}));
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! @shell@ -e
|
||||
#! @runtimeShell@ -e
|
||||
|
||||
# Shows the usage of this command to the user
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! @shell@
|
||||
#! @runtimeShell@
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! @shell@
|
||||
#! @runtimeShell@
|
||||
|
||||
set -e
|
||||
shopt -s nullglob
|
||||
|
@ -1,6 +1,6 @@
|
||||
#! @shell@
|
||||
#! @runtimeShell@
|
||||
|
||||
if [ -x "@shell@" ]; then export SHELL="@shell@"; fi;
|
||||
if [ -x "@runtimeShell@" ]; then export SHELL="@runtimeShell@"; fi;
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! @shell@
|
||||
#! @runtimeShell@
|
||||
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
|
@ -14,11 +14,13 @@ let
|
||||
nixos-build-vms = makeProg {
|
||||
name = "nixos-build-vms";
|
||||
src = ./nixos-build-vms/nixos-build-vms.sh;
|
||||
inherit (pkgs) runtimeShell;
|
||||
};
|
||||
|
||||
nixos-install = makeProg {
|
||||
name = "nixos-install";
|
||||
src = ./nixos-install.sh;
|
||||
inherit (pkgs) runtimeShell;
|
||||
nix = config.nix.package.out;
|
||||
path = makeBinPath [ nixos-enter ];
|
||||
};
|
||||
@ -28,6 +30,7 @@ let
|
||||
makeProg {
|
||||
name = "nixos-rebuild";
|
||||
src = ./nixos-rebuild.sh;
|
||||
inherit (pkgs) runtimeShell;
|
||||
nix = config.nix.package.out;
|
||||
nix_x86_64_linux = fallback.x86_64-linux;
|
||||
nix_i686_linux = fallback.i686-linux;
|
||||
@ -50,6 +53,7 @@ let
|
||||
nixos-version = makeProg {
|
||||
name = "nixos-version";
|
||||
src = ./nixos-version.sh;
|
||||
inherit (pkgs) runtimeShell;
|
||||
inherit (config.system.nixos) version codeName revision;
|
||||
inherit (config.system) configurationRevision;
|
||||
json = builtins.toJSON ({
|
||||
@ -64,6 +68,7 @@ let
|
||||
nixos-enter = makeProg {
|
||||
name = "nixos-enter";
|
||||
src = ./nixos-enter.sh;
|
||||
inherit (pkgs) runtimeShell;
|
||||
};
|
||||
|
||||
in
|
||||
|
@ -198,7 +198,7 @@ in
|
||||
bosun = 161;
|
||||
kubernetes = 162;
|
||||
peerflix = 163;
|
||||
chronos = 164;
|
||||
#chronos = 164; # removed 2020-08-15
|
||||
gitlab = 165;
|
||||
tox-bootstrapd = 166;
|
||||
cadvisor = 167;
|
||||
@ -247,7 +247,7 @@ in
|
||||
bepasty = 215;
|
||||
# pumpio = 216; # unused, removed 2018-02-24
|
||||
nm-openvpn = 217;
|
||||
mathics = 218;
|
||||
# mathics = 218; # unused, removed 2020-08-15
|
||||
ejabberd = 219;
|
||||
postsrsd = 220;
|
||||
opendkim = 221;
|
||||
|
@ -466,14 +466,11 @@
|
||||
./services/misc/leaps.nix
|
||||
./services/misc/lidarr.nix
|
||||
./services/misc/mame.nix
|
||||
./services/misc/mathics.nix
|
||||
./services/misc/matrix-appservice-discord.nix
|
||||
./services/misc/matrix-synapse.nix
|
||||
./services/misc/mautrix-telegram.nix
|
||||
./services/misc/mbpfan.nix
|
||||
./services/misc/mediatomb.nix
|
||||
./services/misc/mesos-master.nix
|
||||
./services/misc/mesos-slave.nix
|
||||
./services/misc/metabase.nix
|
||||
./services/misc/mwlib.nix
|
||||
./services/misc/nix-daemon.nix
|
||||
@ -786,10 +783,8 @@
|
||||
./services/networking/znc/default.nix
|
||||
./services/printing/cupsd.nix
|
||||
./services/scheduling/atd.nix
|
||||
./services/scheduling/chronos.nix
|
||||
./services/scheduling/cron.nix
|
||||
./services/scheduling/fcron.nix
|
||||
./services/scheduling/marathon.nix
|
||||
./services/search/elasticsearch.nix
|
||||
./services/search/elasticsearch-curator.nix
|
||||
./services/search/hound.nix
|
||||
|
@ -17,8 +17,11 @@ with lib;
|
||||
(mkAliasOptionModule [ "environment" "checkConfigurationOptions" ] [ "_module" "check" ])
|
||||
|
||||
# Completely removed modules
|
||||
(mkRemovedOptionModule [ "services" "chronos" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "firefox" "syncserver" "user" ] "")
|
||||
(mkRemovedOptionModule [ "services" "firefox" "syncserver" "group" ] "")
|
||||
(mkRemovedOptionModule [ "services" "marathon" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
|
||||
(mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed")
|
||||
@ -28,6 +31,7 @@ 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 [ "services" "mathics" ] "The Mathics 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" ] ''
|
||||
|
@ -160,8 +160,11 @@ in
|
||||
config = {
|
||||
|
||||
security.wrappers = {
|
||||
# These are mount related wrappers that require the +s permission.
|
||||
fusermount.source = "${pkgs.fuse}/bin/fusermount";
|
||||
fusermount3.source = "${pkgs.fuse3}/bin/fusermount3";
|
||||
mount.source = "${lib.getBin pkgs.utillinux}/bin/mount";
|
||||
umount.source = "${lib.getBin pkgs.utillinux}/bin/umount";
|
||||
};
|
||||
|
||||
boot.specialFileSystems.${parentWrapperDir} = {
|
||||
|
@ -15,26 +15,27 @@ let
|
||||
fi
|
||||
'';
|
||||
|
||||
desktopApplicationFile = pkgs.writeTextFile {
|
||||
name = "emacsclient.desktop";
|
||||
destination = "/share/applications/emacsclient.desktop";
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Name=Emacsclient
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Exec=emacseditor %F
|
||||
Icon=emacs
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Development;TextEditor;
|
||||
StartupWMClass=Emacs
|
||||
Keywords=Text;Editor;
|
||||
'';
|
||||
};
|
||||
desktopApplicationFile = pkgs.writeTextFile {
|
||||
name = "emacsclient.desktop";
|
||||
destination = "/share/applications/emacsclient.desktop";
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Name=Emacsclient
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Exec=emacseditor %F
|
||||
Icon=emacs
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Development;TextEditor;
|
||||
StartupWMClass=Emacs
|
||||
Keywords=Text;Editor;
|
||||
'';
|
||||
};
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
|
||||
options.services.emacs = {
|
||||
enable = mkOption {
|
||||
@ -86,10 +87,10 @@ in {
|
||||
description = "Emacs: the extensible, self-documenting text editor";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
Type = "forking";
|
||||
ExecStart = "${pkgs.bash}/bin/bash -c 'source ${config.system.build.setEnvironment}; exec ${cfg.package}/bin/emacs --daemon'";
|
||||
ExecStop = "${cfg.package}/bin/emacsclient --eval (kill-emacs)";
|
||||
Restart = "always";
|
||||
ExecStop = "${cfg.package}/bin/emacsclient --eval (kill-emacs)";
|
||||
Restart = "always";
|
||||
};
|
||||
} // optionalAttrs cfg.enable { wantedBy = [ "default.target" ]; };
|
||||
|
||||
|
@ -696,7 +696,6 @@ in {
|
||||
"L+ /run/gitlab/shell-config.yml - - - - ${pkgs.writeText "config.yml" (builtins.toJSON gitlabShellConfig)}"
|
||||
|
||||
"L+ ${cfg.statePath}/config/unicorn.rb - - - - ${./defaultUnicornConfig.rb}"
|
||||
"L+ ${cfg.statePath}/config/initializers/extra-gitlab.rb - - - - ${extraGitlabRb}"
|
||||
];
|
||||
|
||||
systemd.services.gitlab-sidekiq = {
|
||||
@ -816,6 +815,7 @@ in {
|
||||
rm -f ${cfg.statePath}/lib
|
||||
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
|
||||
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
|
||||
ln -sf ${extraGitlabRb} ${cfg.statePath}/config/initializers/extra-gitlab.rb
|
||||
|
||||
${cfg.packages.gitlab-shell}/bin/install
|
||||
|
||||
|
@ -1,54 +0,0 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.mathics;
|
||||
|
||||
in {
|
||||
options = {
|
||||
services.mathics = {
|
||||
enable = mkEnableOption "Mathics notebook service";
|
||||
|
||||
external = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Listen on all interfaces, rather than just localhost?";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 8000;
|
||||
description = "TCP port to listen on.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
users.users.mathics = {
|
||||
group = config.users.groups.mathics.name;
|
||||
description = "Mathics user";
|
||||
home = "/var/lib/mathics";
|
||||
createHome = true;
|
||||
uid = config.ids.uids.mathics;
|
||||
};
|
||||
|
||||
users.groups.mathics.gid = config.ids.gids.mathics;
|
||||
|
||||
systemd.services.mathics = {
|
||||
description = "Mathics notebook server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
User = config.users.users.mathics.name;
|
||||
Group = config.users.groups.mathics.name;
|
||||
ExecStart = concatStringsSep " " [
|
||||
"${pkgs.mathics}/bin/mathicsserver"
|
||||
"--port" (toString cfg.port)
|
||||
(if cfg.external then "--external" else "")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,125 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.mesos.master;
|
||||
|
||||
in {
|
||||
|
||||
options.services.mesos = {
|
||||
|
||||
master = {
|
||||
enable = mkOption {
|
||||
description = "Whether to enable the Mesos Master.";
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
ip = mkOption {
|
||||
description = "IP address to listen on.";
|
||||
default = "0.0.0.0";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
description = "Mesos Master port";
|
||||
default = 5050;
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
advertiseIp = mkOption {
|
||||
description = "IP address advertised to reach this master.";
|
||||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
|
||||
advertisePort = mkOption {
|
||||
description = "Port advertised to reach this Mesos master.";
|
||||
default = null;
|
||||
type = types.nullOr types.int;
|
||||
};
|
||||
|
||||
zk = mkOption {
|
||||
description = ''
|
||||
ZooKeeper URL (used for leader election amongst masters).
|
||||
May be one of:
|
||||
zk://host1:port1,host2:port2,.../mesos
|
||||
zk://username:password@host1:port1,host2:port2,.../mesos
|
||||
'';
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
workDir = mkOption {
|
||||
description = "The Mesos work directory.";
|
||||
default = "/var/lib/mesos/master";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
extraCmdLineOptions = mkOption {
|
||||
description = ''
|
||||
Extra command line options for Mesos Master.
|
||||
|
||||
See https://mesos.apache.org/documentation/latest/configuration/
|
||||
'';
|
||||
default = [ "" ];
|
||||
type = types.listOf types.str;
|
||||
example = [ "--credentials=VALUE" ];
|
||||
};
|
||||
|
||||
quorum = mkOption {
|
||||
description = ''
|
||||
The size of the quorum of replicas when using 'replicated_log' based
|
||||
registry. It is imperative to set this value to be a majority of
|
||||
masters i.e., quorum > (number of masters)/2.
|
||||
|
||||
If 0 will fall back to --registry=in_memory.
|
||||
'';
|
||||
default = 0;
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
logLevel = mkOption {
|
||||
description = ''
|
||||
The logging level used. Possible values:
|
||||
'INFO', 'WARNING', 'ERROR'
|
||||
'';
|
||||
default = "INFO";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.workDir}' 0700 - - - -"
|
||||
];
|
||||
systemd.services.mesos-master = {
|
||||
description = "Mesos Master";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.mesos}/bin/mesos-master \
|
||||
--ip=${cfg.ip} \
|
||||
--port=${toString cfg.port} \
|
||||
${optionalString (cfg.advertiseIp != null) "--advertise_ip=${cfg.advertiseIp}"} \
|
||||
${optionalString (cfg.advertisePort != null) "--advertise_port=${toString cfg.advertisePort}"} \
|
||||
${if cfg.quorum == 0
|
||||
then "--registry=in_memory"
|
||||
else "--zk=${cfg.zk} --registry=replicated_log --quorum=${toString cfg.quorum}"} \
|
||||
--work_dir=${cfg.workDir} \
|
||||
--logging_level=${cfg.logLevel} \
|
||||
${toString cfg.extraCmdLineOptions}
|
||||
'';
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,220 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.mesos.slave;
|
||||
|
||||
mkAttributes =
|
||||
attrs: concatStringsSep ";" (mapAttrsToList
|
||||
(k: v: "${k}:${v}")
|
||||
(filterAttrs (k: v: v != null) attrs));
|
||||
attribsArg = optionalString (cfg.attributes != {})
|
||||
"--attributes=${mkAttributes cfg.attributes}";
|
||||
|
||||
containerizersArg = concatStringsSep "," (
|
||||
lib.unique (
|
||||
cfg.containerizers ++ (optional cfg.withDocker "docker")
|
||||
)
|
||||
);
|
||||
|
||||
imageProvidersArg = concatStringsSep "," (
|
||||
lib.unique (
|
||||
cfg.imageProviders ++ (optional cfg.withDocker "docker")
|
||||
)
|
||||
);
|
||||
|
||||
isolationArg = concatStringsSep "," (
|
||||
lib.unique (
|
||||
cfg.isolation ++ (optionals cfg.withDocker [ "filesystem/linux" "docker/runtime"])
|
||||
)
|
||||
);
|
||||
|
||||
in {
|
||||
|
||||
options.services.mesos = {
|
||||
slave = {
|
||||
enable = mkOption {
|
||||
description = "Whether to enable the Mesos Slave.";
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
ip = mkOption {
|
||||
description = "IP address to listen on.";
|
||||
default = "0.0.0.0";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
description = "Port to listen on.";
|
||||
default = 5051;
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
advertiseIp = mkOption {
|
||||
description = "IP address advertised to reach this agent.";
|
||||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
|
||||
advertisePort = mkOption {
|
||||
description = "Port advertised to reach this agent.";
|
||||
default = null;
|
||||
type = types.nullOr types.int;
|
||||
};
|
||||
|
||||
containerizers = mkOption {
|
||||
description = ''
|
||||
List of containerizer implementations to compose in order to provide
|
||||
containerization. Available options are mesos and docker.
|
||||
The order the containerizers are specified is the order they are tried.
|
||||
'';
|
||||
default = [ "mesos" ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
imageProviders = mkOption {
|
||||
description = "List of supported image providers, e.g., APPC,DOCKER.";
|
||||
default = [ ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
imageProvisionerBackend = mkOption {
|
||||
description = ''
|
||||
Strategy for provisioning container rootfs from images,
|
||||
e.g., aufs, bind, copy, overlay.
|
||||
'';
|
||||
default = "copy";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
isolation = mkOption {
|
||||
description = ''
|
||||
Isolation mechanisms to use, e.g., posix/cpu,posix/mem, or
|
||||
cgroups/cpu,cgroups/mem, or network/port_mapping, or `gpu/nvidia` for nvidia
|
||||
specific gpu isolation.
|
||||
'';
|
||||
default = [ "posix/cpu" "posix/mem" ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
master = mkOption {
|
||||
description = ''
|
||||
May be one of:
|
||||
zk://host1:port1,host2:port2,.../path
|
||||
zk://username:password@host1:port1,host2:port2,.../path
|
||||
'';
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
withHadoop = mkOption {
|
||||
description = "Add the HADOOP_HOME to the slave.";
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
withDocker = mkOption {
|
||||
description = "Enable the docker containerizer.";
|
||||
default = config.virtualisation.docker.enable;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
dockerRegistry = mkOption {
|
||||
description = ''
|
||||
The default url for pulling Docker images.
|
||||
It could either be a Docker registry server url,
|
||||
or a local path in which Docker image archives are stored.
|
||||
'';
|
||||
default = null;
|
||||
type = types.nullOr (types.either types.str types.path);
|
||||
};
|
||||
|
||||
workDir = mkOption {
|
||||
description = "The Mesos work directory.";
|
||||
default = "/var/lib/mesos/slave";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
extraCmdLineOptions = mkOption {
|
||||
description = ''
|
||||
Extra command line options for Mesos Slave.
|
||||
|
||||
See https://mesos.apache.org/documentation/latest/configuration/
|
||||
'';
|
||||
default = [ "" ];
|
||||
type = types.listOf types.str;
|
||||
example = [ "--gc_delay=3days" ];
|
||||
};
|
||||
|
||||
logLevel = mkOption {
|
||||
description = ''
|
||||
The logging level used. Possible values:
|
||||
'INFO', 'WARNING', 'ERROR'
|
||||
'';
|
||||
default = "INFO";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
attributes = mkOption {
|
||||
description = ''
|
||||
Machine attributes for the slave instance.
|
||||
|
||||
Use caution when changing this; you may need to manually reset slave
|
||||
metadata before the slave can re-register.
|
||||
'';
|
||||
default = {};
|
||||
type = types.attrsOf types.str;
|
||||
example = { rack = "aa";
|
||||
host = "aabc123";
|
||||
os = "nixos"; };
|
||||
};
|
||||
|
||||
executorEnvironmentVariables = mkOption {
|
||||
description = ''
|
||||
The environment variables that should be passed to the executor, and thus subsequently task(s).
|
||||
'';
|
||||
default = {
|
||||
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
|
||||
};
|
||||
type = types.attrsOf types.str;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.workDir}' 0701 - - - -"
|
||||
];
|
||||
systemd.services.mesos-slave = {
|
||||
description = "Mesos Slave";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ] ++ optionals cfg.withDocker [ "docker.service" ] ;
|
||||
path = [ pkgs.runtimeShellPackage ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.mesos}/bin/mesos-slave \
|
||||
--containerizers=${containerizersArg} \
|
||||
--image_providers=${imageProvidersArg} \
|
||||
--image_provisioner_backend=${cfg.imageProvisionerBackend} \
|
||||
--isolation=${isolationArg} \
|
||||
--ip=${cfg.ip} \
|
||||
--port=${toString cfg.port} \
|
||||
${optionalString (cfg.advertiseIp != null) "--advertise_ip=${cfg.advertiseIp}"} \
|
||||
${optionalString (cfg.advertisePort != null) "--advertise_port=${toString cfg.advertisePort}"} \
|
||||
--master=${cfg.master} \
|
||||
--work_dir=${cfg.workDir} \
|
||||
--logging_level=${cfg.logLevel} \
|
||||
${attribsArg} \
|
||||
${optionalString cfg.withHadoop "--hadoop-home=${pkgs.hadoop}"} \
|
||||
${optionalString cfg.withDocker "--docker=${pkgs.docker}/libexec/docker/docker"} \
|
||||
${optionalString (cfg.dockerRegistry != null) "--docker_registry=${cfg.dockerRegistry}"} \
|
||||
--executor_environment_variables=${lib.escapeShellArg (builtins.toJSON cfg.executorEnvironmentVariables)} \
|
||||
${toString cfg.extraCmdLineOptions}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
@ -129,13 +129,17 @@ in {
|
||||
systemd.services."kresd@".serviceConfig = {
|
||||
ExecStart = "${package}/bin/kresd --noninteractive "
|
||||
+ "-c ${package}/lib/knot-resolver/distro-preconfig.lua -c ${configFile}";
|
||||
# Ensure correct ownership in case UID or GID changes.
|
||||
# Ensure /run/knot-resolver exists
|
||||
RuntimeDirectory = "knot-resolver";
|
||||
RuntimeDirectoryMode = "0770";
|
||||
# Ensure /var/lib/knot-resolver exists
|
||||
StateDirectory = "knot-resolver";
|
||||
StateDirectoryMode = "0770";
|
||||
# Ensure /var/cache/knot-resolver exists
|
||||
CacheDirectory = "knot-resolver";
|
||||
CacheDirectoryMode = "0750";
|
||||
CacheDirectoryMode = "0770";
|
||||
};
|
||||
|
||||
systemd.tmpfiles.packages = [ package ];
|
||||
|
||||
# Try cleaning up the previously default location of cache file.
|
||||
# Note that /var/cache/* should always be safe to remove.
|
||||
# TODO: remove later, probably between 20.09 and 21.03
|
||||
|
@ -1,54 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.chronos;
|
||||
|
||||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
options.services.chronos = {
|
||||
enable = mkOption {
|
||||
description = "Whether to enable graphite web frontend.";
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
httpPort = mkOption {
|
||||
description = "Chronos listening port";
|
||||
default = 4400;
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
master = mkOption {
|
||||
description = "Chronos mesos master zookeeper address";
|
||||
default = "zk://${head cfg.zookeeperHosts}/mesos";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
zookeeperHosts = mkOption {
|
||||
description = "Chronos mesos zookepper addresses";
|
||||
default = [ "localhost:2181" ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.chronos = {
|
||||
description = "Chronos Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "zookeeper.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.chronos}/bin/chronos --master ${cfg.master} --zk_hosts ${concatStringsSep "," cfg.zookeeperHosts} --http_port ${toString cfg.httpPort}";
|
||||
User = "chronos";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.chronos.uid = config.ids.uids.chronos;
|
||||
};
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.marathon;
|
||||
|
||||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
options.services.marathon = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable the marathon mesos framework.
|
||||
'';
|
||||
};
|
||||
|
||||
master = mkOption {
|
||||
type = types.str;
|
||||
default = "zk://${concatStringsSep "," cfg.zookeeperHosts}/mesos";
|
||||
example = "zk://1.2.3.4:2181,2.3.4.5:2181,3.4.5.6:2181/mesos";
|
||||
description = ''
|
||||
Mesos master address. See <link xlink:href="https://mesosphere.github.io/marathon/docs/"/> for details.
|
||||
'';
|
||||
};
|
||||
|
||||
zookeeperHosts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "localhost:2181" ];
|
||||
example = [ "1.2.3.4:2181" "2.3.4.5:2181" "3.4.5.6:2181" ];
|
||||
description = ''
|
||||
ZooKeeper hosts' addresses.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "marathon";
|
||||
example = "root";
|
||||
description = ''
|
||||
The user that the Marathon framework will be launched as. If the user doesn't exist it will be created.
|
||||
If you want to run apps that require root access or you want to launch apps using arbitrary users, that
|
||||
is using the `--mesos_user` flag then you need to change this to `root`.
|
||||
'';
|
||||
};
|
||||
|
||||
httpPort = mkOption {
|
||||
type = types.int;
|
||||
default = 8080;
|
||||
description = ''
|
||||
Marathon listening port for HTTP connections.
|
||||
'';
|
||||
};
|
||||
|
||||
extraCmdLineOptions = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "--https_port=8443" "--zk_timeout=10000" "--marathon_store_timeout=2000" ];
|
||||
description = ''
|
||||
Extra command line options to pass to Marathon.
|
||||
See <link xlink:href="https://mesosphere.github.io/marathon/docs/command-line-flags.html"/> for all possible flags.
|
||||
'';
|
||||
};
|
||||
|
||||
environment = mkOption {
|
||||
default = { };
|
||||
type = types.attrs;
|
||||
example = { JAVA_OPTS = "-Xmx512m"; MESOSPHERE_HTTP_CREDENTIALS = "username:password"; };
|
||||
description = ''
|
||||
Environment variables passed to Marathon.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.marathon = {
|
||||
description = "Marathon Service";
|
||||
environment = cfg.environment;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "zookeeper.service" "mesos-master.service" "mesos-slave.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.marathon}/bin/marathon --master ${cfg.master} --zk zk://${concatStringsSep "," cfg.zookeeperHosts}/marathon --http_port ${toString cfg.httpPort} ${concatStringsSep " " cfg.extraCmdLineOptions}";
|
||||
User = cfg.user;
|
||||
Restart = "always";
|
||||
RestartSec = "2";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.${cfg.user}.isSystemUser = true;
|
||||
};
|
||||
}
|
@ -47,8 +47,18 @@ let
|
||||
in {
|
||||
|
||||
imports = [
|
||||
( mkRemovedOptionModule [ "services" "nextcloud" "nginx" "enable" ]
|
||||
"The nextcloud module dropped support for other webservers than nginx.")
|
||||
(mkRemovedOptionModule [ "services" "nextcloud" "nginx" "enable" ] ''
|
||||
The nextcloud module supports `nginx` as reverse-proxy by default and doesn't
|
||||
support other reverse-proxies officially.
|
||||
|
||||
However it's possible to use an alternative reverse-proxy by
|
||||
|
||||
* disabling nginx
|
||||
* setting `listen.owner` & `listen.group` in the phpfpm-pool to a different value
|
||||
|
||||
Further details about this can be found in the `Nextcloud`-section of the NixOS-manual
|
||||
(which can be openend e.g. by running `nixos-help`).
|
||||
'')
|
||||
];
|
||||
|
||||
options.services.nextcloud = {
|
||||
@ -544,36 +554,40 @@ in {
|
||||
'';
|
||||
};
|
||||
"/" = {
|
||||
priority = 200;
|
||||
extraConfig = "rewrite ^ /index.php;";
|
||||
priority = 900;
|
||||
extraConfig = "try_files $uri $uri/ /index.php$request_uri;";
|
||||
};
|
||||
"~ ^/store-apps" = {
|
||||
priority = 201;
|
||||
extraConfig = "root ${cfg.home};";
|
||||
};
|
||||
"= /.well-known/carddav" = {
|
||||
"^~ /.well-known" = {
|
||||
priority = 210;
|
||||
extraConfig = "return 301 $scheme://$host/remote.php/dav;";
|
||||
extraConfig = ''
|
||||
location = /.well-known/carddav {
|
||||
return 301 $scheme://$host/remote.php/dav;
|
||||
}
|
||||
location = /.well-known/caldav {
|
||||
return 301 $scheme://$host/remote.php/dav;
|
||||
}
|
||||
try_files $uri $uri/ =404;
|
||||
'';
|
||||
};
|
||||
"= /.well-known/caldav" = {
|
||||
priority = 210;
|
||||
extraConfig = "return 301 $scheme://$host/remote.php/dav;";
|
||||
};
|
||||
"~ ^\\/(?:build|tests|config|lib|3rdparty|templates|data)\\/" = {
|
||||
priority = 300;
|
||||
extraConfig = "deny all;";
|
||||
};
|
||||
"~ ^\\/(?:\\.|autotest|occ|issue|indie|db_|console)" = {
|
||||
priority = 300;
|
||||
extraConfig = "deny all;";
|
||||
};
|
||||
"~ ^\\/(?:index|remote|public|cron|core/ajax\\/update|status|ocs\\/v[12]|updater\\/.+|ocs-provider\\/.+|ocm-provider\\/.+)\\.php(?:$|\\/)" = {
|
||||
"~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/)".extraConfig = ''
|
||||
return 404;
|
||||
'';
|
||||
"~ ^/(?:\\.|autotest|occ|issue|indie|db_|console)".extraConfig = ''
|
||||
return 404;
|
||||
'';
|
||||
"~ \\.php(?:$|/)" = {
|
||||
priority = 500;
|
||||
extraConfig = ''
|
||||
include ${config.services.nginx.package}/conf/fastcgi.conf;
|
||||
fastcgi_split_path_info ^(.+\.php)(\\/.*)$;
|
||||
fastcgi_split_path_info ^(.+?\.php)(\\/.*)$;
|
||||
set $path_info $fastcgi_path_info;
|
||||
try_files $fastcgi_script_name =404;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTPS ${if cfg.https then "on" else "off"};
|
||||
fastcgi_param modHeadersAvailable true;
|
||||
fastcgi_param front_controller_active true;
|
||||
@ -583,28 +597,24 @@ in {
|
||||
fastcgi_read_timeout 120s;
|
||||
'';
|
||||
};
|
||||
"~ \\.(?:css|js|svg|gif|map)$".extraConfig = ''
|
||||
try_files $uri /index.php$request_uri;
|
||||
expires 6M;
|
||||
access_log off;
|
||||
'';
|
||||
"~ \\.woff2?$".extraConfig = ''
|
||||
try_files $uri /index.php$request_uri;
|
||||
expires 7d;
|
||||
access_log off;
|
||||
'';
|
||||
"~ ^\\/(?:updater|ocs-provider|ocm-provider)(?:$|\\/)".extraConfig = ''
|
||||
try_files $uri/ =404;
|
||||
index index.php;
|
||||
'';
|
||||
"~ \\.(?:css|js|woff2?|svg|gif)$".extraConfig = ''
|
||||
try_files $uri /index.php$request_uri;
|
||||
add_header Cache-Control "public, max-age=15778463";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header X-Download-Options noopen;
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header X-Frame-Options sameorigin;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
access_log off;
|
||||
'';
|
||||
"~ \\.(?:png|html|ttf|ico|jpg|jpeg|bcmap|mp4|webm)$".extraConfig = ''
|
||||
try_files $uri /index.php$request_uri;
|
||||
access_log off;
|
||||
'';
|
||||
};
|
||||
extraConfig = ''
|
||||
index index.php index.html /index.php$request_uri;
|
||||
expires 1m;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
@ -613,8 +623,6 @@ in {
|
||||
add_header X-Frame-Options sameorigin;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
||||
error_page 403 /core/templates/403.php;
|
||||
error_page 404 /core/templates/404.php;
|
||||
client_max_body_size ${cfg.maxUploadSize};
|
||||
fastcgi_buffers 64 4K;
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
|
@ -123,6 +123,61 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="module-services-nextcloud-httpd">
|
||||
<title>Using an alternative webserver as reverse-proxy (e.g. <literal>httpd</literal>)</title>
|
||||
<para>
|
||||
By default, <package>nginx</package> is used as reverse-proxy for <package>nextcloud</package>.
|
||||
However, it's possible to use e.g. <package>httpd</package> by explicitly disabling
|
||||
<package>nginx</package> using <xref linkend="opt-services.nginx.enable" /> and fixing the
|
||||
settings <literal>listen.owner</literal> & <literal>listen.group</literal> in the
|
||||
<link linkend="opt-services.phpfpm.pools">corresponding <literal>phpfpm</literal> pool</link>.
|
||||
</para>
|
||||
<para>
|
||||
An exemplary configuration may look like this:
|
||||
<programlisting>{ config, lib, pkgs, ... }: {
|
||||
<link linkend="opt-services.nginx.enable">services.nginx.enable</link> = false;
|
||||
services.nextcloud = {
|
||||
<link linkend="opt-services.nextcloud.enable">enable</link> = true;
|
||||
<link linkend="opt-services.nextcloud.hostName">hostName</link> = "localhost";
|
||||
|
||||
/* further, required options */
|
||||
};
|
||||
<link linkend="opt-services.phpfpm.pools._name_.settings">services.phpfpm.pools.nextcloud.settings</link> = {
|
||||
"listen.owner" = config.services.httpd.user;
|
||||
"listen.group" = config.services.httpd.group;
|
||||
};
|
||||
services.httpd = {
|
||||
<link linkend="opt-services.httpd.enable">enable</link> = true;
|
||||
<link linkend="opt-services.httpd.adminAddr">adminAddr</link> = "webmaster@localhost";
|
||||
<link linkend="opt-services.httpd.extraModules">extraModules</link> = [ "proxy_fcgi" ];
|
||||
virtualHosts."localhost" = {
|
||||
<link linkend="opt-services.httpd.virtualHosts._name_.documentRoot">documentRoot</link> = config.services.nextcloud.package;
|
||||
<link linkend="opt-services.httpd.virtualHosts._name_.extraConfig">extraConfig</link> = ''
|
||||
<Directory "${config.services.nextcloud.package}">
|
||||
<FilesMatch "\.php$">
|
||||
<If "-f %{REQUEST_FILENAME}">
|
||||
SetHandler "proxy:unix:${config.services.phpfpm.pools.nextcloud.socket}|fcgi://localhost/"
|
||||
</If>
|
||||
</FilesMatch>
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.php$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.php [L]
|
||||
</IfModule>
|
||||
DirectoryIndex index.php
|
||||
Require all granted
|
||||
Options +FollowSymLinks
|
||||
</Directory>
|
||||
'';
|
||||
};
|
||||
};
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="module-services-nextcloud-maintainer-info">
|
||||
<title>Maintainer information</title>
|
||||
|
||||
|
@ -120,9 +120,12 @@ in {
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
PrivateUsers = false;
|
||||
ProtectHostname = true;
|
||||
ProtectClock = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectControlGroups = true;
|
||||
RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
|
||||
LockPersonality = true;
|
||||
|
@ -81,10 +81,6 @@ let
|
||||
"systemd-coredump.socket"
|
||||
"systemd-coredump@.service"
|
||||
|
||||
# SysV init compatibility.
|
||||
"systemd-initctl.socket"
|
||||
"systemd-initctl.service"
|
||||
|
||||
# Kernel module loading.
|
||||
"systemd-modules-load.service"
|
||||
"kmod-static-nodes.service"
|
||||
@ -1012,18 +1008,18 @@ 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".source = (pkgs.symlinkJoin {
|
||||
"tmpfiles.d".source = pkgs.symlinkJoin {
|
||||
name = "tmpfiles.d";
|
||||
paths = cfg.tmpfiles.packages;
|
||||
paths = map (p: p + "/lib/tmpfiles.d") cfg.tmpfiles.packages;
|
||||
postBuild = ''
|
||||
for i in $(cat $pathsPath); do
|
||||
(test -d $i/lib/tmpfiles.d && test $(ls $i/lib/tmpfiles.d/*.conf | wc -l) -ge 1) || (
|
||||
echo "ERROR: The path $i was passed to systemd.tmpfiles.packages but either does not contain the folder lib/tmpfiles.d or if it contains that folder, there are no files ending in .conf in it."
|
||||
(test -d "$i" && test $(ls "$i"/*.conf | wc -l) -ge 1) || (
|
||||
echo "ERROR: The path '$i' from systemd.tmpfiles.packages contains no *.conf files."
|
||||
exit 1
|
||||
)
|
||||
done
|
||||
'';
|
||||
}) + "/lib/tmpfiles.d";
|
||||
};
|
||||
|
||||
"systemd/system-generators" = { source = hooks "generators" cfg.generators; };
|
||||
"systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown; };
|
||||
|
@ -191,13 +191,14 @@ in
|
||||
};
|
||||
|
||||
requestEncryptionCredentials = mkOption {
|
||||
type = types.bool;
|
||||
type = types.either types.bool (types.listOf types.str);
|
||||
default = true;
|
||||
example = [ "tank" "data" ];
|
||||
description = ''
|
||||
Request encryption keys or passwords for all encrypted datasets on import.
|
||||
For root pools the encryption key can be supplied via both an
|
||||
interactive prompt (keylocation=prompt) and from a file
|
||||
(keylocation=file://).
|
||||
If true on import encryption keys or passwords for all encrypted datasets
|
||||
are requested. To only decrypt selected datasets supply a list of dataset
|
||||
names instead. For root pools the encryption key can be supplied via both
|
||||
an interactive prompt (keylocation=prompt) and from a file (keylocation=file://).
|
||||
'';
|
||||
};
|
||||
|
||||
@ -419,9 +420,13 @@ in
|
||||
fi
|
||||
poolImported "${pool}" || poolImport "${pool}" # Try one last time, e.g. to import a degraded pool.
|
||||
fi
|
||||
${lib.optionalString cfgZfs.requestEncryptionCredentials ''
|
||||
zfs load-key -a
|
||||
''}
|
||||
${if isBool cfgZfs.requestEncryptionCredentials
|
||||
then optionalString cfgZfs.requestEncryptionCredentials ''
|
||||
zfs load-key -a
|
||||
''
|
||||
else concatMapStrings (fs: ''
|
||||
zfs load-key ${fs}
|
||||
'') cfgZfs.requestEncryptionCredentials}
|
||||
'') rootPools));
|
||||
};
|
||||
|
||||
@ -517,9 +522,16 @@ in
|
||||
done
|
||||
poolImported "${pool}" || poolImport "${pool}" # Try one last time, e.g. to import a degraded pool.
|
||||
if poolImported "${pool}"; then
|
||||
${optionalString cfgZfs.requestEncryptionCredentials ''
|
||||
${optionalString (if isBool cfgZfs.requestEncryptionCredentials
|
||||
then cfgZfs.requestEncryptionCredentials
|
||||
else cfgZfs.requestEncryptionCredentials != []) ''
|
||||
${packages.zfsUser}/sbin/zfs list -rHo name,keylocation ${pool} | while IFS=$'\t' read ds kl; do
|
||||
(case "$kl" in
|
||||
(${optionalString (!isBool cfgZfs.requestEncryptionCredentials) ''
|
||||
if ! echo '${concatStringsSep "\n" cfgZfs.requestEncryptionCredentials}' | grep -qFx "$ds"; then
|
||||
continue
|
||||
fi
|
||||
''}
|
||||
case "$kl" in
|
||||
none )
|
||||
;;
|
||||
prompt )
|
||||
|
@ -55,7 +55,12 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; };
|
||||
systemd.services."serial-getty@hvc0".enable = false;
|
||||
|
||||
# Only use a serial console, no TTY.
|
||||
virtualisation.qemu.consoles = [ qemuSerialDevice ];
|
||||
# NOTE: optionalAttrs
|
||||
# test-instrumentation.nix appears to be used without qemu-vm.nix, so
|
||||
# we avoid defining consoles if not possible.
|
||||
# TODO: refactor such that test-instrumentation can import qemu-vm
|
||||
# or declare virtualisation.qemu.console option in a module that's always imported
|
||||
virtualisation = lib.optionalAttrs (options ? virtualisation.qemu.consoles) { qemu.consoles = [ qemuSerialDevice ]; };
|
||||
|
||||
boot.initrd.preDeviceCommands =
|
||||
''
|
||||
|
@ -195,12 +195,10 @@ in
|
||||
mailcatcher = handleTest ./mailcatcher.nix {};
|
||||
mariadb-galera-mariabackup = handleTest ./mysql/mariadb-galera-mariabackup.nix {};
|
||||
mariadb-galera-rsync = handleTest ./mysql/mariadb-galera-rsync.nix {};
|
||||
mathics = handleTest ./mathics.nix {};
|
||||
matomo = handleTest ./matomo.nix {};
|
||||
matrix-synapse = handleTest ./matrix-synapse.nix {};
|
||||
mediawiki = handleTest ./mediawiki.nix {};
|
||||
memcached = handleTest ./memcached.nix {};
|
||||
mesos = handleTest ./mesos.nix {};
|
||||
metabase = handleTest ./metabase.nix {};
|
||||
miniflux = handleTest ./miniflux.nix {};
|
||||
minio = handleTest ./minio.nix {};
|
||||
|
@ -1,20 +0,0 @@
|
||||
import ./make-test.nix ({ pkgs, ... }: {
|
||||
name = "mathics";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ benley ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
machine = { ... }: {
|
||||
services.mathics.enable = true;
|
||||
services.mathics.port = 8888;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$machine->waitForUnit("mathics.service");
|
||||
$machine->waitForOpenPort(8888);
|
||||
$machine->succeed("curl http://localhost:8888/");
|
||||
'';
|
||||
})
|
@ -1,92 +0,0 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : rec {
|
||||
name = "mesos";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ offline kamilchm cstrahan ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
master = { ... }: {
|
||||
networking.firewall.enable = false;
|
||||
services.zookeeper.enable = true;
|
||||
services.mesos.master = {
|
||||
enable = true;
|
||||
zk = "zk://master:2181/mesos";
|
||||
};
|
||||
};
|
||||
|
||||
slave = { ... }: {
|
||||
networking.firewall.enable = false;
|
||||
networking.nat.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
services.mesos = {
|
||||
slave = {
|
||||
enable = true;
|
||||
master = "master:5050";
|
||||
dockerRegistry = registry;
|
||||
executorEnvironmentVariables = {
|
||||
PATH = "/run/current-system/sw/bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
simpleDocker = pkgs.dockerTools.buildImage {
|
||||
name = "echo";
|
||||
tag = "latest";
|
||||
contents = [ pkgs.stdenv.shellPackage pkgs.coreutils ];
|
||||
config = {
|
||||
Env = [
|
||||
# When shell=true, mesos invokes "sh -c '<cmd>'", so make sure "sh" is
|
||||
# on the PATH.
|
||||
"PATH=${pkgs.stdenv.shellPackage}/bin:${pkgs.coreutils}/bin"
|
||||
];
|
||||
Entrypoint = [ "echo" ];
|
||||
};
|
||||
};
|
||||
|
||||
registry = pkgs.runCommand "registry" { } ''
|
||||
mkdir -p $out
|
||||
cp ${simpleDocker} $out/echo:latest.tar
|
||||
'';
|
||||
|
||||
testFramework = pkgs.pythonPackages.buildPythonPackage {
|
||||
name = "mesos-tests";
|
||||
propagatedBuildInputs = [ pkgs.mesos ];
|
||||
catchConflicts = false;
|
||||
src = ./mesos_test.py;
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
installPhase = ''
|
||||
install -Dvm 0755 $src $out/bin/mesos_test.py
|
||||
|
||||
echo "done" > test.result
|
||||
tar czf $out/test.tar.gz test.result
|
||||
'';
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
startAll;
|
||||
$master->waitForUnit("zookeeper.service");
|
||||
$master->waitForUnit("mesos-master.service");
|
||||
$slave->waitForUnit("docker.service");
|
||||
$slave->waitForUnit("mesos-slave.service");
|
||||
$master->waitForOpenPort(2181);
|
||||
$master->waitForOpenPort(5050);
|
||||
$slave->waitForOpenPort(5051);
|
||||
|
||||
# is slave registered?
|
||||
$master->waitUntilSucceeds("curl -s --fail http://master:5050/master/slaves".
|
||||
" | grep -q \"\\\"hostname\\\":\\\"slave\\\"\"");
|
||||
|
||||
# try to run docker image
|
||||
$master->succeed("${pkgs.mesos}/bin/mesos-execute --master=master:5050".
|
||||
" --resources=\"cpus:0.1;mem:32\" --name=simple-docker".
|
||||
" --containerizer=mesos --docker_image=echo:latest".
|
||||
" --shell=true --command=\"echo done\" | grep -q TASK_FINISHED");
|
||||
|
||||
# simple command with .tar.gz uri
|
||||
$master->succeed("${testFramework}/bin/mesos_test.py master ".
|
||||
"${testFramework}/test.tar.gz");
|
||||
'';
|
||||
})
|
@ -1,72 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import uuid
|
||||
import time
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
import sys
|
||||
|
||||
from mesos.interface import Scheduler
|
||||
from mesos.native import MesosSchedulerDriver
|
||||
from mesos.interface import mesos_pb2
|
||||
|
||||
def log(msg):
|
||||
process = subprocess.Popen("systemd-cat", stdin=subprocess.PIPE)
|
||||
(out,err) = process.communicate(msg)
|
||||
|
||||
class NixosTestScheduler(Scheduler):
|
||||
def __init__(self):
|
||||
self.master_ip = sys.argv[1]
|
||||
self.download_uri = sys.argv[2]
|
||||
|
||||
def resourceOffers(self, driver, offers):
|
||||
log("XXX got resource offer")
|
||||
|
||||
offer = offers[0]
|
||||
task = self.new_task(offer)
|
||||
uri = task.command.uris.add()
|
||||
uri.value = self.download_uri
|
||||
task.command.value = "cat test.result"
|
||||
driver.launchTasks(offer.id, [task])
|
||||
|
||||
def statusUpdate(self, driver, update):
|
||||
log("XXX status update")
|
||||
if update.state == mesos_pb2.TASK_FAILED:
|
||||
log("XXX test task failed with message: " + update.message)
|
||||
driver.stop()
|
||||
sys.exit(1)
|
||||
elif update.state == mesos_pb2.TASK_FINISHED:
|
||||
driver.stop()
|
||||
sys.exit(0)
|
||||
|
||||
def new_task(self, offer):
|
||||
task = mesos_pb2.TaskInfo()
|
||||
id = uuid.uuid4()
|
||||
task.task_id.value = str(id)
|
||||
task.slave_id.value = offer.slave_id.value
|
||||
task.name = "task {}".format(str(id))
|
||||
|
||||
cpus = task.resources.add()
|
||||
cpus.name = "cpus"
|
||||
cpus.type = mesos_pb2.Value.SCALAR
|
||||
cpus.scalar.value = 0.1
|
||||
|
||||
mem = task.resources.add()
|
||||
mem.name = "mem"
|
||||
mem.type = mesos_pb2.Value.SCALAR
|
||||
mem.scalar.value = 32
|
||||
|
||||
return task
|
||||
|
||||
if __name__ == '__main__':
|
||||
log("XXX framework started")
|
||||
|
||||
framework = mesos_pb2.FrameworkInfo()
|
||||
framework.user = "root"
|
||||
framework.name = "nixos-test-framework"
|
||||
driver = MesosSchedulerDriver(
|
||||
NixosTestScheduler(),
|
||||
framework,
|
||||
sys.argv[1] + ":5050"
|
||||
)
|
||||
driver.run()
|
@ -20,12 +20,24 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
|
||||
{ fsType = "tmpfs";
|
||||
options = [ "mode=1777" "noauto" ];
|
||||
};
|
||||
# Tests https://discourse.nixos.org/t/how-to-make-a-derivations-executables-have-the-s-permission/8555
|
||||
"/user-mount/point" = {
|
||||
device = "/user-mount/source";
|
||||
fsType = "none";
|
||||
options = [ "bind" "rw" "user" "noauto" ];
|
||||
};
|
||||
"/user-mount/denied-point" = {
|
||||
device = "/user-mount/denied-source";
|
||||
fsType = "none";
|
||||
options = [ "bind" "rw" "noauto" ];
|
||||
};
|
||||
};
|
||||
systemd.automounts = singleton
|
||||
{ wantedBy = [ "multi-user.target" ];
|
||||
where = "/tmp2";
|
||||
};
|
||||
users.users.sybil = { isNormalUser = true; group = "wheel"; };
|
||||
users.users.alice = { isNormalUser = true; };
|
||||
security.sudo = { enable = true; wheelNeedsPassword = false; };
|
||||
boot.kernel.sysctl."vm.swappiness" = 1;
|
||||
boot.kernelParams = [ "vsyscall=emulate" ];
|
||||
@ -112,6 +124,26 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
|
||||
machine.succeed("touch /tmp2/x")
|
||||
machine.succeed("grep '/tmp2 tmpfs' /proc/mounts")
|
||||
|
||||
with subtest(
|
||||
"Whether mounting by a user is possible with the `user` option in fstab (#95444)"
|
||||
):
|
||||
machine.succeed("mkdir -p /user-mount/source")
|
||||
machine.succeed("touch /user-mount/source/file")
|
||||
machine.succeed("chmod -R a+Xr /user-mount/source")
|
||||
machine.succeed("mkdir /user-mount/point")
|
||||
machine.succeed("chown alice:users /user-mount/point")
|
||||
machine.succeed("su - alice -c 'mount /user-mount/point'")
|
||||
machine.succeed("su - alice -c 'ls /user-mount/point/file'")
|
||||
with subtest(
|
||||
"Whether mounting by a user is denied without the `user` option in fstab"
|
||||
):
|
||||
machine.succeed("mkdir -p /user-mount/denied-source")
|
||||
machine.succeed("touch /user-mount/denied-source/file")
|
||||
machine.succeed("chmod -R a+Xr /user-mount/denied-source")
|
||||
machine.succeed("mkdir /user-mount/denied-point")
|
||||
machine.succeed("chown alice:users /user-mount/denied-point")
|
||||
machine.fail("su - alice -c 'mount /user-mount/denied-point'")
|
||||
|
||||
with subtest("shell-vars"):
|
||||
machine.succeed('[ -n "$NIX_PATH" ]')
|
||||
|
||||
|
@ -172,20 +172,6 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
|
||||
"echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42"
|
||||
)
|
||||
|
||||
# Check if TokuDB plugin works
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; create table tokudb (test_id INT, PRIMARY KEY (test_id)) ENGINE = TokuDB;' | sudo -u testuser mysql -u testuser"
|
||||
)
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; insert into tokudb values (25);' | sudo -u testuser mysql -u testuser"
|
||||
)
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; select test_id from tokudb;' | sudo -u testuser mysql -u testuser -N | grep 25"
|
||||
)
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; drop table tokudb;' | sudo -u testuser mysql -u testuser"
|
||||
)
|
||||
|
||||
# Check if RocksDB plugin works
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; create table rocksdb (test_id INT, PRIMARY KEY (test_id)) ENGINE = RocksDB;' | sudo -u testuser mysql -u testuser"
|
||||
@ -199,5 +185,19 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; drop table rocksdb;' | sudo -u testuser mysql -u testuser"
|
||||
)
|
||||
'' + pkgs.stdenv.lib.optionalString pkgs.stdenv.isx86_64 ''
|
||||
# Check if TokuDB plugin works
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; create table tokudb (test_id INT, PRIMARY KEY (test_id)) ENGINE = TokuDB;' | sudo -u testuser mysql -u testuser"
|
||||
)
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; insert into tokudb values (25);' | sudo -u testuser mysql -u testuser"
|
||||
)
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; select test_id from tokudb;' | sudo -u testuser mysql -u testuser -N | grep 25"
|
||||
)
|
||||
mariadb.succeed(
|
||||
"echo 'use testdb; drop table tokudb;' | sudo -u testuser mysql -u testuser"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
@ -46,6 +46,17 @@ let
|
||||
"zpool destroy rpool",
|
||||
"udevadm settle",
|
||||
)
|
||||
|
||||
machine.succeed(
|
||||
'echo password | zpool create -o altroot="/tmp/mnt" '
|
||||
+ "-O encryption=aes-256-gcm -O keyformat=passphrase rpool /dev/vdb1",
|
||||
"zfs create -o mountpoint=legacy rpool/root",
|
||||
"mount -t zfs rpool/root /tmp/mnt",
|
||||
"udevadm settle",
|
||||
"umount /tmp/mnt",
|
||||
"zpool destroy rpool",
|
||||
"udevadm settle",
|
||||
)
|
||||
'' + extraTest;
|
||||
|
||||
};
|
||||
@ -57,18 +68,6 @@ in {
|
||||
|
||||
unstable = makeZfsTest "unstable" {
|
||||
enableUnstable = true;
|
||||
extraTest = ''
|
||||
machine.succeed(
|
||||
'echo password | zpool create -o altroot="/tmp/mnt" '
|
||||
+ "-O encryption=aes-256-gcm -O keyformat=passphrase rpool /dev/vdb1",
|
||||
"zfs create -o mountpoint=legacy rpool/root",
|
||||
"mount -t zfs rpool/root /tmp/mnt",
|
||||
"udevadm settle",
|
||||
"umount /tmp/mnt",
|
||||
"zpool destroy rpool",
|
||||
"udevadm settle",
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
installer = (import ./installer.nix { }).zfsroot;
|
||||
|
@ -5,7 +5,8 @@
|
||||
, pkgconfig
|
||||
, cmake
|
||||
, llvm
|
||||
, emscripten
|
||||
# TODO: put back when it builds again
|
||||
# , emscripten
|
||||
, openssl
|
||||
, libsndfile
|
||||
, libmicrohttpd
|
||||
@ -20,13 +21,13 @@ with stdenv.lib.strings;
|
||||
|
||||
let
|
||||
|
||||
version = "unstable-2020-06-08";
|
||||
version = "unstable-2020-08-03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grame-cncm";
|
||||
repo = "faust";
|
||||
rev = "f0037e289987818b65d3f6fb1ad943aaad2a2b28";
|
||||
sha256 = "0h08902rgx7rhzpng4h1qw8i2nzv50f79vrlbzdk5d35wa4zibh4";
|
||||
rev = "b6045f4592384076d3b383d116e602a95a000eb3";
|
||||
sha256 = "1wcpilwnkc7rrbv9gbkj5hb7kamkh8nrc3r4hbcvbz5ar2pfc6d5";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@ -46,7 +47,7 @@ let
|
||||
inherit src;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig cmake vim which ];
|
||||
buildInputs = [ llvm emscripten openssl libsndfile libmicrohttpd gnutls libtasn1 p11-kit ];
|
||||
buildInputs = [ llvm /*emscripten*/ openssl libsndfile libmicrohttpd gnutls libtasn1 p11-kit ];
|
||||
|
||||
|
||||
passthru = {
|
||||
|
@ -1,26 +1,34 @@
|
||||
{ stdenv, fetchFromGitHub
|
||||
, llvm, qt48Full, qrencode, libmicrohttpd, libjack2, alsaLib, faust, curl
|
||||
, bc, coreutils, which
|
||||
, bc, coreutils, which, libsndfile, pkg-config
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "faustlive";
|
||||
version = "2017-12-05";
|
||||
version = "2.5.4";
|
||||
src = fetchFromGitHub {
|
||||
owner = "grame-cncm";
|
||||
repo = "faustlive";
|
||||
rev = "281fcb852dcd94f8c57ade1b2a7a3937542e1b2d";
|
||||
sha256 = "0sw44yd9928rid9ib0b5mx2x129m7zljrayfm6jz6hrwdc5q3k9a";
|
||||
rev = version;
|
||||
sha256 = "0npn8fvq8iafyamq4wrj1k1bmk4xd0my2sp3gi5jdjfx6hc1sm3n";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
llvm qt48Full qrencode libmicrohttpd libjack2 alsaLib faust curl
|
||||
bc coreutils which
|
||||
bc coreutils which libsndfile pkg-config
|
||||
];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
preBuild = "patchShebangs Build/Linux/buildversion";
|
||||
postPatch = "cd Build";
|
||||
|
||||
installPhase = ''
|
||||
install -d "$out/bin"
|
||||
install -d "$out/share/applications"
|
||||
install FaustLive/FaustLive "$out/bin"
|
||||
install rsrc/FaustLive.desktop "$out/share/applications"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A standalone just-in-time Faust compiler";
|
||||
|
40
pkgs/applications/audio/mamba/default.nix
Normal file
40
pkgs/applications/audio/mamba/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, pkgconfig
|
||||
, cairo
|
||||
, libX11
|
||||
, libjack2
|
||||
, liblo
|
||||
, libsigcxx
|
||||
, libsmf
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mamba";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "brummer10";
|
||||
repo = "Mamba";
|
||||
rev = "v${version}";
|
||||
sha256 = "1wa3f9c4l239mpxa7nxx8hajy4icn40vpvaxq5l1qzskl74w072d";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [ ./fix-build.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ cairo libX11 libjack2 liblo libsigcxx libsmf ];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/brummer10/Mamba";
|
||||
description = "Virtual MIDI keyboard for Jack Audio Connection Kit";
|
||||
license = licenses.bsd0;
|
||||
maintainers = with maintainers; [ magnetophon orivej ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
10
pkgs/applications/audio/mamba/fix-build.patch
Normal file
10
pkgs/applications/audio/mamba/fix-build.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/libxputty/Build/Makefile
|
||||
+++ b/libxputty/Build/Makefile
|
||||
@@ -20,1 +20,1 @@
|
||||
- LDFLAGS += -fPIC `pkg-config --static --cflags --libs cairo x11` -lm
|
||||
+ LDFLAGS += -fPIC `pkg-config --cflags --libs cairo x11` -lm
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -84,1 +83,1 @@ ifneq ("$(wildcard ./$(BUILD_DIR))","")
|
||||
- update-desktop-database
|
||||
+ update-desktop-database || true
|
@ -2,11 +2,11 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "padthv1";
|
||||
version = "0.9.15";
|
||||
version = "0.9.16";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/padthv1/${pname}-${version}.tar.gz";
|
||||
sha256 = "18ma429kamifcvjmsv0hysxk7qn2r9br4fia929bvfccapck98y1";
|
||||
sha256 = "1f2v60dpja0rnml60g463fjiz0f84v32yjwpvr56z79h1i6fssmv";
|
||||
};
|
||||
|
||||
buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools fftw ];
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sfizz";
|
||||
version = "0.3.2";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sfztools";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1px22x9lb6wyqfbv1jg1sbl1rsnwrzs8sm4dnas1w4ifchiv3ymd";
|
||||
sha256 = "0zpmvmh7n0064rxfqxb7z9rnz493k7yq7nl0vxppqnasg97jn5f3";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
@ -24,6 +24,5 @@ rustPlatform.buildRustPackage rec {
|
||||
changelog = "https://github.com/Rigellute/spotify-tui/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jwijenbergh ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -7,14 +7,14 @@
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "btcdeb";
|
||||
version = "0.2.19";
|
||||
pname = "btcdeb-unstable";
|
||||
version = "200806";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kallewoof";
|
||||
repo = pname;
|
||||
rev = "fb2dace4cd115dc9529a81515cee855b8ce94784";
|
||||
sha256 = "0l0niamcjxmgyvc6w0wiygfgwsjam3ypv8mvjglgsj50gyv1vnb3";
|
||||
owner = "bitcoin-core";
|
||||
repo = "btcdeb";
|
||||
rev = "f6708c397c64894c9f9e31bea2d22285d9462de7";
|
||||
sha256 = "0qkmf89z2n7s95vhw3n9vh9dbi14zy4vqw3ffdh1w911jwm5ry3z";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
|
@ -1,72 +0,0 @@
|
||||
{ stdenv, makeWrapper, fetchurl, unzip, atomEnv, makeDesktopItem, buildFHSUserEnv, gtk2 }:
|
||||
|
||||
let
|
||||
version = "0.11.1";
|
||||
pname = "mist";
|
||||
|
||||
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Browse and use Ðapps on the Ethereum network";
|
||||
homepage = "https://github.com/ethereum/mist";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
};
|
||||
|
||||
urlVersion = builtins.replaceStrings ["."] ["-"] version;
|
||||
|
||||
desktopItem = makeDesktopItem rec {
|
||||
name = "Mist";
|
||||
exec = "mist";
|
||||
icon = "mist";
|
||||
desktopName = name;
|
||||
genericName = "Mist Browser";
|
||||
categories = "Network;";
|
||||
};
|
||||
|
||||
mist = stdenv.lib.appendToName "unwrapped" (stdenv.mkDerivation {
|
||||
inherit pname version meta;
|
||||
|
||||
src = {
|
||||
i686-linux = fetchurl {
|
||||
url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux32-${urlVersion}.zip";
|
||||
sha256 = "1ffzp9aa0g6w3d5pzp69fljk3sd51cbqdgxa1x16vj106sqm0gj7";
|
||||
};
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux64-${urlVersion}.zip";
|
||||
sha256 = "0yx4x72l8gk68yh9saki48zgqx8k92xnkm79dc651wdpd5c25cz3";
|
||||
};
|
||||
}.${stdenv.hostPlatform.system} or throwSystem;
|
||||
|
||||
buildInputs = [ unzip makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/lib/mist $out/bin
|
||||
unzip -d $out/lib/mist $src
|
||||
ln -s $out/lib/mist/mist $out/bin
|
||||
fixupPhase
|
||||
mkdir -p $out/share/applications
|
||||
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${atomEnv.libPath}:${gtk2}/lib:$out/lib/mist" \
|
||||
$out/lib/mist/mist
|
||||
'';
|
||||
});
|
||||
in
|
||||
buildFHSUserEnv {
|
||||
name = "mist";
|
||||
inherit meta;
|
||||
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
mist
|
||||
];
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p "$out/share/applications"
|
||||
cp "${desktopItem}/share/applications/"* $out/share/applications
|
||||
'';
|
||||
|
||||
runScript = "mist";
|
||||
}
|
@ -12,13 +12,13 @@ with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "monero-gui";
|
||||
version = "0.16.0.2";
|
||||
version = "0.16.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "monero-project";
|
||||
repo = "monero-gui";
|
||||
rev = "v${version}";
|
||||
sha256 = "1b1m8vhs0hdh81ysm8s8vfwqskqsihylb51wz16kc98ba40r9gqg";
|
||||
sha256 = "0iwjp8x5swy8i8pzrlm5v55awhm54cf48pm1vz98lcq361lhfzk6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
|
||||
|
@ -3,14 +3,14 @@
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
version = "nc0.20.0";
|
||||
version = "nc0.20.1";
|
||||
name = "namecoin" + toString (optional (!withGui) "d") + "-" + version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "namecoin";
|
||||
repo = "namecoin-core";
|
||||
rev = version;
|
||||
sha256 = "115nlsq5g169mj4qjmkhxx1bnx740871zqyng9zbm2y4i0xf71c4";
|
||||
sha256 = "1wpfp9y95lmfg2nk1xqzchwck1wk6gwkya1rj07mf5in9jngxk9z";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -11,7 +11,7 @@
|
||||
, withGTK3 ? true, gtk3-x11 ? null, gsettings-desktop-schemas ? null
|
||||
, withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null, glib-networking ? null
|
||||
, withCsrc ? true
|
||||
, srcRepo ? false, autoconf ? null, automake ? null, texinfo ? null
|
||||
, srcRepo ? false, autoreconfHook ? null, texinfo ? null
|
||||
, siteStart ? ./site-start.el
|
||||
, nativeComp ? false
|
||||
, toolkit ? (
|
||||
@ -56,6 +56,15 @@ in stdenv.mkDerivation {
|
||||
rm -fr .git
|
||||
'')
|
||||
|
||||
''
|
||||
substituteInPlace lisp/international/mule-cmds.el \
|
||||
--replace /usr/share/locale ${gettext}/share/locale
|
||||
|
||||
for makefile_in in $(find . -name Makefile.in -print); do
|
||||
substituteInPlace $makefile_in --replace /bin/pwd pwd
|
||||
done
|
||||
''
|
||||
|
||||
# Make native compilation work both inside and outside of nix build
|
||||
(lib.optionalString nativeComp (let
|
||||
libPath = lib.concatStringsSep ":" [
|
||||
@ -78,7 +87,7 @@ in stdenv.mkDerivation {
|
||||
LIBRARY_PATH = if nativeComp then "${lib.getLib stdenv.cc.libc}/lib" else "";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig makeWrapper ]
|
||||
++ lib.optionals srcRepo [ autoconf automake texinfo ]
|
||||
++ lib.optionals srcRepo [ autoreconfHook texinfo ]
|
||||
++ lib.optional (withX && (withGTK3 || withXwidgets)) wrapGAppsHook;
|
||||
|
||||
buildInputs =
|
||||
@ -107,24 +116,13 @@ in stdenv.mkDerivation {
|
||||
(if withNS
|
||||
then [ "--disable-ns-self-contained" ]
|
||||
else if withX
|
||||
then [ "--with-x-toolkit=${toolkit}" "--with-xft" ]
|
||||
then [ "--with-x-toolkit=${toolkit}" "--with-xft" "--with-cairo" ]
|
||||
else [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no"
|
||||
"--with-gif=no" "--with-tiff=no" ])
|
||||
++ lib.optional withXwidgets "--with-xwidgets"
|
||||
++ lib.optional nativeComp "--with-nativecomp"
|
||||
;
|
||||
|
||||
preConfigure = lib.optionalString srcRepo ''
|
||||
./autogen.sh
|
||||
'' + ''
|
||||
substituteInPlace lisp/international/mule-cmds.el \
|
||||
--replace /usr/share/locale ${gettext}/share/locale
|
||||
|
||||
for makefile_in in $(find . -name Makefile.in -print); do
|
||||
substituteInPlace $makefile_in --replace /bin/pwd pwd
|
||||
done
|
||||
'';
|
||||
|
||||
installTargets = [ "tags" "install" ];
|
||||
|
||||
postInstall = ''
|
||||
|
@ -20,6 +20,5 @@ rustPlatform.buildRustPackage {
|
||||
homepage = "https://github.com/Luz/hexdino";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.luz ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -9,5 +9,6 @@
|
||||
kak-fzf = pkgs.callPackage ./kak-fzf.nix { };
|
||||
kak-plumb = pkgs.callPackage ./kak-plumb.nix { };
|
||||
kak-powerline = pkgs.callPackage ./kak-powerline.nix { };
|
||||
kak-prelude = pkgs.callPackage ./kak-prelude.nix { };
|
||||
kak-vertical-selection = pkgs.callPackage ./kak-vertical-selection.nix { };
|
||||
}
|
||||
|
@ -4,12 +4,12 @@ assert stdenv.lib.asserts.assertOneOf "fzf" fzf.pname [ "fzf" "skim" ];
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "kak-fzf";
|
||||
version = "2019-07-16";
|
||||
version = "2020-05-24";
|
||||
src = fetchFromGitHub {
|
||||
owner = "andreyorst";
|
||||
repo = "fzf.kak";
|
||||
rev = "ede90d3e02bceb714f997adfcbab8260b42e0a19";
|
||||
sha256 = "18w90j3fpk2ddn68497s33n66aap8phw5636y1r7pqsa641zdxcv";
|
||||
rev = "b2aeb26473962ab0bf3b51ba5c81c50c1d8253d3";
|
||||
sha256 = "0bg845i814xh4y688p2zx726rsg0pd6nb4a7qv2fckmk639f4wzc";
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
|
25
pkgs/applications/editors/kakoune/plugins/kak-prelude.nix
Normal file
25
pkgs/applications/editors/kakoune/plugins/kak-prelude.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
stdenv.mkDerivation {
|
||||
name = "kak-prelude";
|
||||
version = "2020-03-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alexherbo2";
|
||||
repo = "prelude.kak";
|
||||
rev = "05b2642b1e014bd46423f9d738cc38a624947b63";
|
||||
sha256 = "180p8hq8z7mznzd9w9ma5as3ijs7zbzcj96prcpswqg263a0b329";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/kak/autoload/plugins
|
||||
cp -r rc $out/share/kak/autoload/plugins/auto-pairs
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib;
|
||||
{ description = "Prelude of shell blocks for Kakoune.";
|
||||
homepage = "https://github.com/alexherbo2/prelude.kak";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [ buffet ];
|
||||
platform = platforms.all;
|
||||
};
|
||||
}
|
@ -1,18 +1,18 @@
|
||||
{ stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, makeWrapper
|
||||
, boost, xercesc
|
||||
, qtbase, qttools, qtwebkit, qtxmlpatterns
|
||||
, python3, python3Packages
|
||||
, boost, xercesc, hunspell, zlib, pcre16
|
||||
, qtbase, qttools, qtwebengine, qtxmlpatterns
|
||||
, python3Packages
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "sigil";
|
||||
version = "0.9.14";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "0fmfbfpnmhclbbv9cbr1xnv97si6ls7331kk3ix114iqkngqwgl1";
|
||||
rev = version;
|
||||
repo = "Sigil";
|
||||
owner = "Sigil-Ebook";
|
||||
rev = version;
|
||||
sha256 = "02bkyi9xpaxdcivm075y3praxgvfay9z0189gvr6g8yc3ml1miyr";
|
||||
};
|
||||
|
||||
pythonPath = with python3Packages; [ lxml ];
|
||||
@ -20,8 +20,9 @@ mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
boost xercesc qtbase qttools qtwebkit qtxmlpatterns
|
||||
python3Packages.lxml ];
|
||||
boost xercesc qtbase qttools qtwebengine qtxmlpatterns
|
||||
python3Packages.lxml
|
||||
];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
|
@ -1,27 +1,90 @@
|
||||
{ stdenv, fetchurl, gdal, wxGTK30, proj, libiodbc, lzma,
|
||||
libharu, opencv2, vigra, postgresql, Cocoa,
|
||||
unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }:
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
# native
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
# not native
|
||||
, gdal
|
||||
, wxGTK31-gtk3
|
||||
, proj_5
|
||||
, dxflib
|
||||
, curl
|
||||
, libiodbc
|
||||
, lzma
|
||||
, libharu
|
||||
, opencv
|
||||
, vigra
|
||||
, postgresql
|
||||
, Cocoa
|
||||
, unixODBC
|
||||
, poppler
|
||||
, hdf4
|
||||
, hdf5
|
||||
, netcdf
|
||||
, sqlite
|
||||
, qhull
|
||||
, giflib
|
||||
, libsvm
|
||||
, fftw
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "saga";
|
||||
version = "7.6.3";
|
||||
version = "7.7.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://sourceforge.net/projects/saga-gis/files/SAGA%20-%20${stdenv.lib.versions.major version}/SAGA%20-%20${version}/saga-${version}.tar.gz";
|
||||
sha256 = "1nmvrlcpcm2pas9pnav13iydnym9d8yqqnwq47lm0j6b0a2wy9zk";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
# Upstream's gnerated ./configure is not reliable
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
configureFlags = [
|
||||
"--with-system-svm"
|
||||
# hdf is no detected otherwise
|
||||
"HDF5_LIBS=-l${hdf5}/lib"
|
||||
"HDF5_CFLAGS=-I${hdf5.dev}/include"
|
||||
];
|
||||
buildInputs = [
|
||||
curl
|
||||
dxflib
|
||||
fftw
|
||||
libsvm
|
||||
hdf5
|
||||
gdal
|
||||
wxGTK31-gtk3
|
||||
proj_5
|
||||
libharu
|
||||
opencv
|
||||
vigra
|
||||
postgresql
|
||||
libiodbc
|
||||
lzma
|
||||
qhull
|
||||
giflib
|
||||
]
|
||||
# See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
|
||||
# for why the have additional buildInputs on darwin
|
||||
buildInputs = [ gdal wxGTK30 proj libharu opencv2 vigra postgresql libiodbc lzma
|
||||
qhull giflib ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin
|
||||
[ Cocoa unixODBC poppler hdf4.out hdf5 netcdf sqlite ];
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
Cocoa
|
||||
unixODBC
|
||||
poppler
|
||||
netcdf
|
||||
sqlite
|
||||
];
|
||||
|
||||
patches = [
|
||||
# See https://sourceforge.net/p/saga-gis/bugs/280/
|
||||
./opencv4.patch
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/SAGA%20-%207.6.3/saga-7.6.3.tar.gz";
|
||||
sha256 = "0f1qy2y929gd9y7h45bkv9x71xapbzyn06v6wqivjaiydsi1qycb";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "System for Automated Geoscientific Analyses";
|
||||
homepage = "http://www.saga-gis.org";
|
||||
|
14
pkgs/applications/gis/saga/opencv4.patch
Normal file
14
pkgs/applications/gis/saga/opencv4.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/src/tools/imagery/imagery_opencv/Makefile.am
|
||||
+++ b/src/tools/imagery/imagery_opencv/Makefile.am
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
if HAVE_CV
|
||||
DEF_SAGA = -D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD
|
||||
-CXX_INCS = -I$(top_srcdir)/src/saga_core -I/usr/include/opencv
|
||||
+CXX_INCS = -I$(top_srcdir)/src/saga_core `pkg-config opencv4 --cflags`
|
||||
AM_CXXFLAGS = -fPIC $(CXX_INCS) $(DEF_SAGA) $(DBGFLAGS) $(GOMPFLAGS)
|
||||
-AM_LDFLAGS = -fPIC -shared -avoid-version `pkg-config opencv --libs`
|
||||
+AM_LDFLAGS = -fPIC -shared -avoid-version `pkg-config opencv4 --libs`
|
||||
pkglib_LTLIBRARIES = libimagery_opencv.la
|
||||
libimagery_opencv_la_SOURCES =\
|
||||
MLB_Interface.cpp\
|
@ -19,6 +19,5 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://jblindsay.github.io/ghrg/WhiteboxTools/index.html";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.mpickering ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ let
|
||||
else throw "ImageMagick is not supported on this platform.";
|
||||
|
||||
cfg = {
|
||||
version = "7.0.10-25";
|
||||
sha256 = "15y07kgy4mx3qyxsbd9g6s2yaa2mxnfvfzas35jw0vz6qjjyaw5c";
|
||||
version = "7.0.10-27";
|
||||
sha256 = "1fqwbg2ws6ix3bymx7ncb4k4f6bg8q44n9xnlvngjapflnrmhcph";
|
||||
patches = [];
|
||||
};
|
||||
in
|
||||
|
@ -22,6 +22,5 @@ buildGoModule rec {
|
||||
homepage = "https://pdfcpu.io";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -18,6 +18,5 @@ buildGoPackage rec {
|
||||
homepage = "https://github.com/sgreben/yeetgif";
|
||||
license = with licenses; [ mit asl20 cc-by-nc-sa-40 ];
|
||||
maintainers = with maintainers; [ ajs124 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -23,6 +23,5 @@ buildGoModule rec {
|
||||
homepage = "https://github.com/mholt/archiver";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kalbasit ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -46,6 +46,5 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://github.com/sanpii/effitask";
|
||||
maintainers = with maintainers; [ davidak ];
|
||||
license = with licenses; [ mit ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
|
||||
version = "0.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "geistesk";
|
||||
owner = "oxzi";
|
||||
repo = "et";
|
||||
rev = version;
|
||||
sha256 = "0i0lgmnly8n7y4y6pb10pxgxyz8s5zk26k8z1g1578v1wan01lnq";
|
||||
@ -22,9 +22,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Minimal libnotify-based (egg) timer";
|
||||
homepage = "https://github.com/geistesk/et";
|
||||
homepage = "https://github.com/oxzi/et";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ geistesk ];
|
||||
maintainers = with maintainers; [ oxzi ];
|
||||
};
|
||||
}
|
||||
|
41
pkgs/applications/misc/fslint/default.nix
Normal file
41
pkgs/applications/misc/fslint/default.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ lib, stdenv, fetchFromGitHub, python2, makeWrapper }:
|
||||
|
||||
let pythonEnv = python2.withPackages(ps: [ ps.pyGtkGlade]);
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "fslint";
|
||||
version = "2.46";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pixelb";
|
||||
repo = "fslint";
|
||||
rev = version;
|
||||
sha256 = "048pc1rsslbsrfchl2wmdd4hpa2gycglib7kdx8vqs947zcm0sfv";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pythonEnv makeWrapper
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace fslint-gui --replace "liblocation=os.path.dirname(os.path.abspath(sys.argv[0]))" "liblocation='$out'"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp * -R $out/
|
||||
cp fslint-gui $out/bin/fslint
|
||||
|
||||
wrapProgram "$out/bin/fslint" \
|
||||
--prefix PYTHONPATH : "${pythonEnv.interpreter}"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A utility to find and clean various forms of lint on a filesystem.";
|
||||
homepage = "https://www.pixelbeat.org/fslint/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.dasj19 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -2,12 +2,12 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fuzzel";
|
||||
version = "1.3.0";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://codeberg.org/dnkl/fuzzel";
|
||||
rev = "${version}";
|
||||
sha256 = "12jv5iwmksygw8nfkxbd9rbi03wnpgb30hczq009aqgy7lyi5zmp";
|
||||
sha256 = "18pg46xry7q4i19mpjfz942c6vkqlrj4q18p85zldzv9gdsxnm9c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config meson ninja scdoc git ];
|
||||
|
@ -19,7 +19,6 @@ buildGoModule rec {
|
||||
description = "Automatic GeoIP database updater";
|
||||
homepage = "https://github.com/maxmind/geoipupdate";
|
||||
license = with licenses; [ asl20 ];
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ das_j ];
|
||||
};
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ libintl libiconv json_c ];
|
||||
propagatedBuildInputs = [ glib gtk ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=disabled" # docs do not seem to be installed
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv
|
||||
, fetchFromGitLab
|
||||
, fetchurl
|
||||
, pkgconfig
|
||||
, autoconf
|
||||
, automake
|
||||
@ -26,7 +26,8 @@
|
||||
, goocanvasmm2
|
||||
, evince
|
||||
, isocodes
|
||||
, gtksourceviewmm4
|
||||
, gtksourceview
|
||||
, gtksourceviewmm
|
||||
, postgresql
|
||||
, gobject-introspection
|
||||
, yelp-tools
|
||||
@ -48,16 +49,13 @@ let
|
||||
boost_python = boost.override { enablePython = true; inherit python; };
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "glom";
|
||||
version = "unstable-2018-12-16";
|
||||
version = "1.32.0";
|
||||
|
||||
outputs = [ "out" "lib" "dev" "doc" "devdoc" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "GNOME";
|
||||
repo = pname;
|
||||
rev = "fa5ff04f209f35bf3e97bc1c3eb1d1138d6172ce";
|
||||
sha256 = "145hnk96xa4v35i3a3mbf3fnx4nlk8cksc0qhm7nrh8cnnrbdfgn";
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1wcd4kd3crwqjv0jfp73jkyyf5ws8mvykg37kqxmcb58piz21gsk";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -93,7 +91,8 @@ in stdenv.mkDerivation rec {
|
||||
evince
|
||||
isocodes
|
||||
python3.pkgs.pygobject3
|
||||
gtksourceviewmm4
|
||||
gtksourceview
|
||||
gtksourceviewmm
|
||||
postgresql # for pg_config
|
||||
];
|
||||
|
||||
|
@ -2,21 +2,14 @@
|
||||
|
||||
with python3.pkgs; buildPythonApplication rec {
|
||||
pname = "khal";
|
||||
version = "0.10.1";
|
||||
version = "0.10.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l";
|
||||
sha256 = "11qhrga44knlnp88py9p547d4nr5kn041d2nszwa3dqw7mf22ks9";
|
||||
};
|
||||
|
||||
# Include a khal.desktop file via upstream commit.
|
||||
# This patch should be removed when updating to the next version, probably.
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "add-khal-dot-desktop.patch";
|
||||
url = "https://github.com/pimutils/khal/commit/1f93d238fec7c934dd2f8e48f54925d22130e3aa.patch";
|
||||
sha256 = "06skn3van7zd93348fc6axllx71ckkc7h2zljqlvwa339vca608c";
|
||||
})
|
||||
./skip-broken-test.patch
|
||||
];
|
||||
|
||||
|
@ -1,3 +1,15 @@
|
||||
diff --git a/tests/cli_test.py b/tests/cli_test.py
|
||||
index 5e354a5..d8fbcd5 100644
|
||||
--- a/tests/cli_test.py
|
||||
+++ b/tests/cli_test.py
|
||||
@@ -493,6 +493,7 @@ def test_import_invalid_choice_and_prefix(runner):
|
||||
assert result.output == '09.04.-09.04. An Event\n'
|
||||
|
||||
|
||||
+@pytest.mark.skip(reason="Mocking breaks in this testcase")
|
||||
def test_import_from_stdin(runner, monkeypatch):
|
||||
ics_data = 'This is some really fake icalendar data'
|
||||
|
||||
diff --git a/tests/ui/test_editor.py b/tests/ui/test_editor.py
|
||||
index 27b7fa5..5978d72 100644
|
||||
--- a/tests/ui/test_editor.py
|
||||
|
@ -1,12 +1,12 @@
|
||||
{ stdenv, glibcLocales, python3 }:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
version = "0.16.1";
|
||||
version = "0.17.0";
|
||||
pname = "khard";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0fg4qh5gzki5wg958wlpc8a2icnk74gzg33lqxjm755cfnjng7qd";
|
||||
sha256 = "062nv4xkfsjc11k9m52dh6xjn9z68a4a6x1s8z05wwv4jbp1lkhn";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "klayout";
|
||||
version = "0.26.5";
|
||||
version = "0.26.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "KLayout";
|
||||
repo = "klayout";
|
||||
rev = "v${version}";
|
||||
sha256 = "1zv8yazhdyxm33vdn0m5cciw7zzg45nwdg4rdcsydnrwg7d667r6";
|
||||
sha256 = "0z17pdjdc2r2m5yi5bfz504dzzs978z8p6bhlf08v2npvigp8vz1";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ stdenv, fetchFromGitHub, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.4.2";
|
||||
@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
checkInputs = [ which ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,share/{${pname}-${version},man/man1}}
|
||||
|
@ -26,6 +26,5 @@ buildGoPackage rec {
|
||||
description = "Simple stock tracker implemented in go";
|
||||
homepage = "https://github.com/mop-tracker/mop";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -45,11 +45,11 @@ let
|
||||
inherit (python2.pkgs) paramiko pycairo pyodbc;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "mysql-workbench";
|
||||
version = "8.0.20";
|
||||
version = "8.0.21";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
|
||||
sha256 = "0c0ig2fqfpli7fwb4v4iwvfh4szzj3grx8j9rbh40kllkc8v5qh6";
|
||||
sha256 = "0rqgr1dcbf6yp60hninbw5dnwykx5ngbyhhx0sbhgv0m0cq5a44h";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -142,7 +142,7 @@ in stdenv.mkDerivation rec {
|
||||
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"
|
||||
"-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config"
|
||||
"-DWITH_ANTLR_JAR=${antlr4_7.jarLocation}"
|
||||
# mysql-workbench 8.0.20 depends on libmysqlconnectorcpp 1.1.8.
|
||||
# mysql-workbench 8.0.21 depends on libmysqlconnectorcpp 1.1.8.
|
||||
# Newer versions of connector still provide the legacy library when enabled
|
||||
# but the headers are in a different location.
|
||||
"-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc"
|
||||
|
@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [ "--enable-python-libs" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A framework for controlling entertainment lighting equipment.";
|
||||
homepage = "https://www.openlighting.org/ola/";
|
||||
|
@ -21,6 +21,5 @@ rustPlatform.buildRustPackage rec {
|
||||
changelog = "https://github.com/sharkdp/pastel/releases/tag/v${version}";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -21,6 +21,5 @@ buildGoModule rec {
|
||||
changelog = "https://github.com/juruen/rmapi/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.agpl3;
|
||||
maintainers = [ maintainers.nickhu ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -18,6 +18,5 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://github.com/valebes/rsClock";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [valebes];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://tools.suckless.org/slstatus/";
|
||||
description = "status monitor for window managers that use WM_NAME like dwm";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ geistesk ];
|
||||
maintainers = with maintainers; [ oxzi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -23,6 +23,5 @@ buildGoPackage rec {
|
||||
homepage = "https://github.com/alex2108/syncthing-tray";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ nickhu ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ buildGoModule rec {
|
||||
description = "Shows colorful, animated party parrot in your terminial";
|
||||
homepage = "https://github.com/jmhobbs/terminal-parrot";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.heel ];
|
||||
};
|
||||
}
|
||||
|
@ -20,6 +20,5 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://github.com/Ekleog/todiff";
|
||||
maintainers = with maintainers; [ ekleog ];
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
44
pkgs/applications/misc/x3270/default.nix
Normal file
44
pkgs/applications/misc/x3270/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ stdenv, fetchurl, openssl, m4, expat
|
||||
, libX11, libXt, libXaw, libXmu, bdftopcf, mkfontdir
|
||||
, fontadobe100dpi, fontadobeutopia100dpi, fontbh100dpi
|
||||
, fontbhlucidatypewriter100dpi, fontbitstream100dpi
|
||||
, tcl
|
||||
, ncurses }:
|
||||
|
||||
let
|
||||
majorVersion = "4";
|
||||
minorVersion = "0";
|
||||
versionSuffix = "ga9";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "x3270";
|
||||
version = "${majorVersion}.${minorVersion}${versionSuffix}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://x3270.bgp.nu/download/0${majorVersion}.0${minorVersion}/suite3270-${version}-src.tgz";
|
||||
sha256 = "0km24rgll0s4ji6iz8lvy5ra76ds162s95y33w5px6697cwqkp9j";
|
||||
};
|
||||
|
||||
buildFlags = "unix";
|
||||
|
||||
postConfigure = ''
|
||||
pushd c3270 ; ./configure ; popd
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ m4 ];
|
||||
buildInputs = [
|
||||
expat
|
||||
libX11 libXt libXaw libXmu bdftopcf mkfontdir
|
||||
fontadobe100dpi fontadobeutopia100dpi fontbh100dpi
|
||||
fontbhlucidatypewriter100dpi fontbitstream100dpi
|
||||
tcl
|
||||
ncurses
|
||||
expat
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "IBM 3270 terminal emulator for the X Window System";
|
||||
homepage = "http://x3270.bgp.nu/index.html";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.anna328p ];
|
||||
};
|
||||
}
|
@ -24,18 +24,17 @@ stdenv.mkDerivation rec {
|
||||
mesonFlags = [
|
||||
"-Dsqlite=enabled"
|
||||
"-Dmagic=enabled"
|
||||
# "-Dseccomp=enabled"
|
||||
"-Dmanpages=enabled"
|
||||
"-Dconvert-icon=enabled"
|
||||
"-Dsynctex=enabled"
|
||||
# Make sure tests are enabled for doCheck
|
||||
"-Dtests=enabled"
|
||||
];
|
||||
] ++ optional (!stdenv.isLinux) "-Dseccomp=disabled";
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja pkgconfig desktop-file-utils python3.pkgs.sphinx
|
||||
gettext wrapGAppsHook libxml2 check
|
||||
] ++ optional stdenv.isLinux appstream-glib;
|
||||
gettext wrapGAppsHook libxml2 check appstream-glib
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk girara libintl sqlite glib file librsvg
|
||||
|
@ -31,6 +31,5 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://www.getzola.org/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dywedir ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
let
|
||||
pname = "Sylk";
|
||||
version = "2.8.0";
|
||||
version = "2.8.2";
|
||||
in
|
||||
|
||||
appimageTools.wrapType2 rec {
|
||||
@ -10,7 +10,7 @@ appimageTools.wrapType2 rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.ag-projects.com/Sylk/Sylk-${version}-x86_64.AppImage";
|
||||
hash = "sha256:09j1kijs31yk3iw2lj7szv1nwkqiqydj3zkkmr49qlib1qj717wh";
|
||||
hash = "sha256:0figpfm5cgbryq6v26k9gj42zgbk335bsa3bzyxpvz2slq8rzb2y";
|
||||
};
|
||||
|
||||
profile = ''
|
||||
|
@ -16,7 +16,6 @@ buildGoPackage rec {
|
||||
description = "Dedicated Chrome instance to log into captive portals without messing with DNS settings";
|
||||
homepage = "https://blog.filippo.io/captive-browser";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ volth ];
|
||||
};
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user