mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
Merge master into staging-next
This commit is contained in:
commit
8d56f2472e
@ -113,6 +113,15 @@ mkDerivation {
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
<literal>wrapQtAppsHook</literal> ignores files that are non-ELF executables.
|
||||
This means that scripts won't be automatically wrapped so you'll need to manually
|
||||
wrap them as previously mentioned. An example of when you'd always need to do this
|
||||
is with Python applications that use PyQT.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal>
|
||||
attribute to disable the package for unsupported Qt versions:
|
||||
|
@ -1599,6 +1599,16 @@ installTargets = "install-bin install-doc";</programlisting>
|
||||
|
||||
<variablelist>
|
||||
<title>Variables controlling the fixup phase</title>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<varname>dontFixup</varname>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set to true to skip the fixup phase.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<varname>dontStrip</varname>
|
||||
|
@ -71,6 +71,15 @@ checkConfigError 'The option value .* in .* is not of type.*positive integer.*'
|
||||
checkConfigOutput "42" config.value ./declare-int-between-value.nix ./define-value-int-positive.nix
|
||||
checkConfigError 'The option value .* in .* is not of type.*between.*-21 and 43.*inclusive.*' config.value ./declare-int-between-value.nix ./define-value-int-negative.nix
|
||||
|
||||
# Check either types
|
||||
# types.either
|
||||
checkConfigOutput "42" config.value ./declare-either.nix ./define-value-int-positive.nix
|
||||
checkConfigOutput "\"24\"" config.value ./declare-either.nix ./define-value-string.nix
|
||||
# types.oneOf
|
||||
checkConfigOutput "42" config.value ./declare-oneOf.nix ./define-value-int-positive.nix
|
||||
checkConfigOutput "[ ]" config.value ./declare-oneOf.nix ./define-value-list.nix
|
||||
checkConfigOutput "\"24\"" config.value ./declare-oneOf.nix ./define-value-string.nix
|
||||
|
||||
# Check mkForce without submodules.
|
||||
set -- config.enable ./declare-enable.nix ./define-enable.nix
|
||||
checkConfigOutput "true" "$@"
|
||||
|
5
lib/tests/modules/declare-either.nix
Normal file
5
lib/tests/modules/declare-either.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ lib, ... }: {
|
||||
options.value = lib.mkOption {
|
||||
type = lib.types.either lib.types.int lib.types.str;
|
||||
};
|
||||
}
|
9
lib/tests/modules/declare-oneOf.nix
Normal file
9
lib/tests/modules/declare-oneOf.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ lib, ... }: {
|
||||
options.value = lib.mkOption {
|
||||
type = lib.types.oneOf [
|
||||
lib.types.int
|
||||
(lib.types.listOf lib.types.int)
|
||||
lib.types.str
|
||||
];
|
||||
};
|
||||
}
|
@ -443,6 +443,13 @@ rec {
|
||||
functor = (defaultFunctor name) // { wrapped = [ t1 t2 ]; };
|
||||
};
|
||||
|
||||
# Any of the types in the given list
|
||||
oneOf = ts:
|
||||
let
|
||||
head' = if ts == [] then throw "types.oneOf needs to get at least one type in its argument" else head ts;
|
||||
tail' = tail ts;
|
||||
in foldl' either head' tail';
|
||||
|
||||
# Either value of type `finalType` or `coercedType`, the latter is
|
||||
# converted to `finalType` using `coerceFunc`.
|
||||
coercedTo = coercedType: coerceFunc: finalType:
|
||||
|
@ -66,14 +66,6 @@
|
||||
email = "aaron@ajanse.me";
|
||||
github = "aaronjanse";
|
||||
name = "Aaron Janse";
|
||||
keys = [
|
||||
{ longkeyid = "rsa2048/0x651BD4B37D75E234"; # Email only
|
||||
fingerprint = "490F 5009 34E7 20BD 4C53 96C2 651B D4B3 7D75 E234";
|
||||
}
|
||||
{ longkeyid = "rsa4096/0xBE6C92145BFF4A34"; # Git, etc
|
||||
fingerprint = "CED9 6DF4 63D7 B86A 1C4B 1322 BE6C 9214 5BFF 4A34";
|
||||
}
|
||||
];
|
||||
};
|
||||
aaronschif = {
|
||||
email = "aaronschif@gmail.com";
|
||||
@ -85,6 +77,15 @@
|
||||
github = "baldo";
|
||||
name = "Andreas Baldeau";
|
||||
};
|
||||
abbe = {
|
||||
email = "ashish.is@lostca.se";
|
||||
github = "wahjava";
|
||||
name = "Ashish SHUKLA";
|
||||
keys = [{
|
||||
longkeyid = "rsa4096/0xC746CFA9E74FA4B0";
|
||||
fingerprint = "F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0";
|
||||
}];
|
||||
};
|
||||
abbradar = {
|
||||
email = "ab@fmap.me";
|
||||
github = "abbradar";
|
||||
@ -1518,6 +1519,11 @@
|
||||
github = "liclac";
|
||||
name = "embr";
|
||||
};
|
||||
emily = {
|
||||
email = "nixpkgs@emily.moe";
|
||||
github = "emilazy";
|
||||
name = "Emily";
|
||||
};
|
||||
ederoyd46 = {
|
||||
email = "matt@ederoyd.co.uk";
|
||||
github = "ederoyd46";
|
||||
@ -1763,6 +1769,11 @@
|
||||
github = "fare";
|
||||
name = "Francois-Rene Rideau";
|
||||
};
|
||||
farlion = {
|
||||
email = "florian.peter@gmx.at";
|
||||
github = "workflow";
|
||||
name = "Florian Peter";
|
||||
};
|
||||
fdns = {
|
||||
email = "fdns02@gmail.com";
|
||||
github = "fdns";
|
||||
|
@ -5,55 +5,6 @@ with pkgs;
|
||||
let
|
||||
lib = pkgs.lib;
|
||||
|
||||
# Remove invisible and internal options.
|
||||
optionsListVisible = lib.filter (opt: opt.visible && !opt.internal) (lib.optionAttrSetToDocList options);
|
||||
|
||||
# Replace functions by the string <function>
|
||||
substFunction = x:
|
||||
if builtins.isAttrs x then lib.mapAttrs (name: substFunction) x
|
||||
else if builtins.isList x then map substFunction x
|
||||
else if lib.isFunction x then "<function>"
|
||||
else x;
|
||||
|
||||
# Generate DocBook documentation for a list of packages. This is
|
||||
# what `relatedPackages` option of `mkOption` from
|
||||
# ../../../lib/options.nix influences.
|
||||
#
|
||||
# Each element of `relatedPackages` can be either
|
||||
# - a string: that will be interpreted as an attribute name from `pkgs`,
|
||||
# - a list: that will be interpreted as an attribute path from `pkgs`,
|
||||
# - an attrset: that can specify `name`, `path`, `package`, `comment`
|
||||
# (either of `name`, `path` is required, the rest are optional).
|
||||
genRelatedPackages = packages:
|
||||
let
|
||||
unpack = p: if lib.isString p then { name = p; }
|
||||
else if lib.isList p then { path = p; }
|
||||
else p;
|
||||
describe = args:
|
||||
let
|
||||
title = args.title or null;
|
||||
name = args.name or (lib.concatStringsSep "." args.path);
|
||||
path = args.path or [ args.name ];
|
||||
package = args.package or (lib.attrByPath path (throw "Invalid package attribute path `${toString path}'") pkgs);
|
||||
in "<listitem>"
|
||||
+ "<para><literal>${lib.optionalString (title != null) "${title} aka "}pkgs.${name} (${package.meta.name})</literal>"
|
||||
+ lib.optionalString (!package.meta.available) " <emphasis>[UNAVAILABLE]</emphasis>"
|
||||
+ ": ${package.meta.description or "???"}.</para>"
|
||||
+ lib.optionalString (args ? comment) "\n<para>${args.comment}</para>"
|
||||
# Lots of `longDescription's break DocBook, so we just wrap them into <programlisting>
|
||||
+ lib.optionalString (package.meta ? longDescription) "\n<programlisting>${package.meta.longDescription}</programlisting>"
|
||||
+ "</listitem>";
|
||||
in "<itemizedlist>${lib.concatStringsSep "\n" (map (p: describe (unpack p)) packages)}</itemizedlist>";
|
||||
|
||||
optionsListDesc = lib.flip map optionsListVisible (opt: opt // {
|
||||
# Clean up declaration sites to not refer to the NixOS source tree.
|
||||
declarations = map stripAnyPrefixes opt.declarations;
|
||||
}
|
||||
// lib.optionalAttrs (opt ? example) { example = substFunction opt.example; }
|
||||
// lib.optionalAttrs (opt ? default) { default = substFunction opt.default; }
|
||||
// lib.optionalAttrs (opt ? type) { type = substFunction opt.type; }
|
||||
// lib.optionalAttrs (opt ? relatedPackages && opt.relatedPackages != []) { relatedPackages = genRelatedPackages opt.relatedPackages; });
|
||||
|
||||
# We need to strip references to /nix/store/* from options,
|
||||
# including any `extraSources` if some modules came from elsewhere,
|
||||
# or else the build will fail.
|
||||
@ -63,37 +14,13 @@ let
|
||||
prefixesToStrip = map (p: "${toString p}/") ([ ../../.. ] ++ extraSources);
|
||||
stripAnyPrefixes = lib.flip (lib.fold lib.removePrefix) prefixesToStrip;
|
||||
|
||||
# Custom "less" that pushes up all the things ending in ".enable*"
|
||||
# and ".package*"
|
||||
optionLess = a: b:
|
||||
let
|
||||
ise = lib.hasPrefix "enable";
|
||||
isp = lib.hasPrefix "package";
|
||||
cmp = lib.splitByAndCompare ise lib.compare
|
||||
(lib.splitByAndCompare isp lib.compare lib.compare);
|
||||
in lib.compareLists cmp a.loc b.loc < 0;
|
||||
|
||||
# Customly sort option list for the man page.
|
||||
optionsList = lib.sort optionLess optionsListDesc;
|
||||
|
||||
# Convert the list of options into an XML file.
|
||||
optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList);
|
||||
|
||||
optionsDocBook = runCommand "options-db.xml" {} ''
|
||||
optionsXML=${optionsXML}
|
||||
if grep /nixpkgs/nixos/modules $optionsXML; then
|
||||
echo "The manual appears to depend on the location of Nixpkgs, which is bad"
|
||||
echo "since this prevents sharing via the NixOS channel. This is typically"
|
||||
echo "caused by an option default that refers to a relative path (see above"
|
||||
echo "for hints about the offending path)."
|
||||
exit 1
|
||||
fi
|
||||
${buildPackages.libxslt.bin}/bin/xsltproc \
|
||||
--stringparam revision '${revision}' \
|
||||
-o intermediate.xml ${./options-to-docbook.xsl} $optionsXML
|
||||
${buildPackages.libxslt.bin}/bin/xsltproc \
|
||||
-o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml
|
||||
'';
|
||||
optionsDoc = buildPackages.nixosOptionsDoc {
|
||||
inherit options revision;
|
||||
transformOptions = opt: opt // {
|
||||
# Clean up declaration sites to not refer to the NixOS source tree.
|
||||
declarations = map stripAnyPrefixes opt.declarations;
|
||||
};
|
||||
};
|
||||
|
||||
sources = lib.sourceFilesBySuffices ./. [".xml"];
|
||||
|
||||
@ -108,7 +35,7 @@ let
|
||||
generatedSources = runCommand "generated-docbook" {} ''
|
||||
mkdir $out
|
||||
ln -s ${modulesDoc} $out/modules.xml
|
||||
ln -s ${optionsDocBook} $out/options-db.xml
|
||||
ln -s ${optionsDoc.optionsDocBook} $out/options-db.xml
|
||||
printf "%s" "${version}" > $out/version
|
||||
'';
|
||||
|
||||
@ -234,22 +161,7 @@ let
|
||||
in rec {
|
||||
inherit generatedSources;
|
||||
|
||||
# The NixOS options in JSON format.
|
||||
optionsJSON = runCommand "options-json"
|
||||
{ meta.description = "List of NixOS options in JSON format";
|
||||
}
|
||||
''
|
||||
# Export list of options in different format.
|
||||
dst=$out/share/doc/nixos
|
||||
mkdir -p $dst
|
||||
|
||||
cp ${builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON
|
||||
(builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList))))
|
||||
} $dst/options.json
|
||||
|
||||
mkdir -p $out/nix-support
|
||||
echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
|
||||
''; # */
|
||||
inherit (optionsDoc) optionsJSON optionsXML optionsDocBook;
|
||||
|
||||
# Generate the NixOS manual.
|
||||
manualHTML = runCommand "nixos-manual-html"
|
||||
|
@ -346,6 +346,18 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<varname>types.oneOf</varname> [ <replaceable>t1</replaceable> <replaceable>t2</replaceable> ... ]
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Type <replaceable>t1</replaceable> or type <replaceable>t2</replaceable> and so forth,
|
||||
e.g. <literal>with types; oneOf [ int str bool ]</literal>. Multiple definitions
|
||||
cannot be merged.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<varname>types.coercedTo</varname> <replaceable>from</replaceable> <replaceable>f</replaceable> <replaceable>to</replaceable>
|
||||
|
@ -98,6 +98,16 @@
|
||||
<literal>stableBranch</literal> set to false.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Remove attributes that we know we will not be able to support,
|
||||
especially if there is a stable alternative. E.g. Check that our
|
||||
Linux kernels'
|
||||
<link xlink:href="https://www.kernel.org/category/releases.html">
|
||||
projected end-of-life</link> are after our release projected
|
||||
end-of-life
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Edit changelog at
|
||||
|
@ -14,6 +14,13 @@
|
||||
to build the new configuration, make it the default configuration for
|
||||
booting, and try to realise the configuration in the running system (e.g., by
|
||||
restarting system services).
|
||||
<warning>
|
||||
<para>
|
||||
This command doesn't start/stop <link linkend="opt-systemd.user.services">user
|
||||
services</link> automatically. <command>nixos-rebuild</command> only runs a
|
||||
<literal>daemon-reload</literal> for each user with running user services.
|
||||
</para>
|
||||
</warning>
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
|
@ -90,6 +90,35 @@
|
||||
<arg>
|
||||
<option>--show-trace</option>
|
||||
</arg>
|
||||
<arg>
|
||||
<option>-I</option>
|
||||
<replaceable>path</replaceable>
|
||||
</arg>
|
||||
<arg>
|
||||
<group choice='req'>
|
||||
<arg choice='plain'><option>--verbose</option></arg>
|
||||
<arg choice='plain'><option>-v</option></arg>
|
||||
</group>
|
||||
</arg>
|
||||
<arg>
|
||||
<group choice='req'>
|
||||
<arg choice='plain'><option>--max-jobs</option></arg>
|
||||
<arg choice='plain'><option>-j</option></arg>
|
||||
</group>
|
||||
<replaceable>number</replaceable>
|
||||
</arg>
|
||||
<arg>
|
||||
<group choice='req'>
|
||||
<arg choice='plain'><option>--keep-failed</option></arg>
|
||||
<arg choice='plain'><option>-K</option></arg>
|
||||
</group>
|
||||
</arg>
|
||||
<arg>
|
||||
<group choice='req'>
|
||||
<arg choice='plain'><option>--keep-going</option></arg>
|
||||
<arg choice='plain'><option>-k</option></arg>
|
||||
</group>
|
||||
</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsection>
|
||||
@ -101,7 +130,8 @@
|
||||
NixOS module, you must run <command>nixos-rebuild</command> to make the
|
||||
changes take effect. It builds the new system in
|
||||
<filename>/nix/store</filename>, runs its activation script, and stop and
|
||||
(re)starts any system services if needed.
|
||||
(re)starts any system services if needed. Please note that user services need
|
||||
to be started manually as they aren't detected by the activation script at the moment.
|
||||
</para>
|
||||
<para>
|
||||
This command has one required argument, which specifies the desired
|
||||
|
@ -33,6 +33,15 @@
|
||||
PHP 7.1 is no longer supported due to upstream not supporting this version for the entire lifecycle of the 19.09 release.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The binfmt module is now easier to use. Additional systems can
|
||||
be added through <option>boot.binfmt.emulatedSystems</option>.
|
||||
For instance, <literal>boot.binfmt.emulatedSystems = [
|
||||
"wasm32-wasi" "x86_64-windows" "aarch64-linux" ];</literal> will
|
||||
set up binfmt interpreters for each of those listed systems.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
@ -47,6 +56,13 @@
|
||||
The following new services were added since the last release:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>./programs/dwm-status.nix</literal>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
<section xmlns="http://docbook.org/ns/docbook"
|
||||
@ -226,6 +242,12 @@
|
||||
Only some exporters are affected by the latter, namely the exporters <literal>dovecot</literal>, <literal>node</literal>, <literal>postfix</literal> and <literal>varnish</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>ibus-qt</literal> package is not installed by default anymore when <xref linkend="opt-i18n.inputMethod.enabled" /> is set to <literal>ibus</literal>.
|
||||
If IBus support in Qt 4.x applications is required, add the <literal>ibus-qt</literal> package to your <xref linkend="opt-environment.systemPackages" /> manually.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
164
nixos/lib/make-options-doc/default.nix
Normal file
164
nixos/lib/make-options-doc/default.nix
Normal file
@ -0,0 +1,164 @@
|
||||
/* Generate JSON, XML and DocBook documentation for given NixOS options.
|
||||
|
||||
Minimal example:
|
||||
|
||||
{ pkgs, }:
|
||||
|
||||
let
|
||||
eval = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||
baseModules = [
|
||||
../module.nix
|
||||
];
|
||||
modules = [];
|
||||
};
|
||||
in pkgs.nixosOptionsDoc {
|
||||
options = eval.options;
|
||||
}
|
||||
|
||||
*/
|
||||
{ pkgs
|
||||
, lib
|
||||
, options
|
||||
, transformOptions ? lib.id # function for additional tranformations of the options
|
||||
, revision ? "" # Specify revision for the options
|
||||
}:
|
||||
|
||||
let
|
||||
# Replace functions by the string <function>
|
||||
substFunction = x:
|
||||
if builtins.isAttrs x then lib.mapAttrs (name: substFunction) x
|
||||
else if builtins.isList x then map substFunction x
|
||||
else if lib.isFunction x then "<function>"
|
||||
else x;
|
||||
|
||||
optionsListDesc = lib.flip map optionsListVisible
|
||||
(opt: transformOptions opt
|
||||
// lib.optionalAttrs (opt ? example) { example = substFunction opt.example; }
|
||||
// lib.optionalAttrs (opt ? default) { default = substFunction opt.default; }
|
||||
// lib.optionalAttrs (opt ? type) { type = substFunction opt.type; }
|
||||
// lib.optionalAttrs (opt ? relatedPackages && opt.relatedPackages != []) { relatedPackages = genRelatedPackages opt.relatedPackages; }
|
||||
);
|
||||
|
||||
# Generate DocBook documentation for a list of packages. This is
|
||||
# what `relatedPackages` option of `mkOption` from
|
||||
# ../../../lib/options.nix influences.
|
||||
#
|
||||
# Each element of `relatedPackages` can be either
|
||||
# - a string: that will be interpreted as an attribute name from `pkgs`,
|
||||
# - a list: that will be interpreted as an attribute path from `pkgs`,
|
||||
# - an attrset: that can specify `name`, `path`, `package`, `comment`
|
||||
# (either of `name`, `path` is required, the rest are optional).
|
||||
genRelatedPackages = packages:
|
||||
let
|
||||
unpack = p: if lib.isString p then { name = p; }
|
||||
else if lib.isList p then { path = p; }
|
||||
else p;
|
||||
describe = args:
|
||||
let
|
||||
title = args.title or null;
|
||||
name = args.name or (lib.concatStringsSep "." args.path);
|
||||
path = args.path or [ args.name ];
|
||||
package = args.package or (lib.attrByPath path (throw "Invalid package attribute path `${toString path}'") pkgs);
|
||||
in "<listitem>"
|
||||
+ "<para><literal>${lib.optionalString (title != null) "${title} aka "}pkgs.${name} (${package.meta.name})</literal>"
|
||||
+ lib.optionalString (!package.meta.available) " <emphasis>[UNAVAILABLE]</emphasis>"
|
||||
+ ": ${package.meta.description or "???"}.</para>"
|
||||
+ lib.optionalString (args ? comment) "\n<para>${args.comment}</para>"
|
||||
# Lots of `longDescription's break DocBook, so we just wrap them into <programlisting>
|
||||
+ lib.optionalString (package.meta ? longDescription) "\n<programlisting>${package.meta.longDescription}</programlisting>"
|
||||
+ "</listitem>";
|
||||
in "<itemizedlist>${lib.concatStringsSep "\n" (map (p: describe (unpack p)) packages)}</itemizedlist>";
|
||||
|
||||
# Custom "less" that pushes up all the things ending in ".enable*"
|
||||
# and ".package*"
|
||||
optionLess = a: b:
|
||||
let
|
||||
ise = lib.hasPrefix "enable";
|
||||
isp = lib.hasPrefix "package";
|
||||
cmp = lib.splitByAndCompare ise lib.compare
|
||||
(lib.splitByAndCompare isp lib.compare lib.compare);
|
||||
in lib.compareLists cmp a.loc b.loc < 0;
|
||||
|
||||
# Remove invisible and internal options.
|
||||
optionsListVisible = lib.filter (opt: opt.visible && !opt.internal) (lib.optionAttrSetToDocList options);
|
||||
|
||||
# Customly sort option list for the man page.
|
||||
optionsList = lib.sort optionLess optionsListDesc;
|
||||
|
||||
# Convert the list of options into an XML file.
|
||||
optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList);
|
||||
|
||||
optionsNix = builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList);
|
||||
|
||||
# TODO: declarations: link to github
|
||||
singleAsciiDoc = name: value: ''
|
||||
== ${name}
|
||||
|
||||
${value.description}
|
||||
|
||||
[discrete]
|
||||
=== details
|
||||
|
||||
Type:: ${value.type}
|
||||
${ if lib.hasAttr "default" value
|
||||
then ''
|
||||
Default::
|
||||
+
|
||||
----
|
||||
${builtins.toJSON value.default}
|
||||
----
|
||||
''
|
||||
else "No Default:: {blank}"
|
||||
}
|
||||
${ if value.readOnly
|
||||
then "Read Only:: {blank}"
|
||||
else ""
|
||||
}
|
||||
${ if lib.hasAttr "example" value
|
||||
then ''
|
||||
Example::
|
||||
+
|
||||
----
|
||||
${builtins.toJSON value.example}
|
||||
----
|
||||
''
|
||||
else "No Example:: {blank}"
|
||||
}
|
||||
'';
|
||||
|
||||
in rec {
|
||||
inherit optionsNix;
|
||||
|
||||
optionsAsciiDoc = lib.concatStringsSep "\n" (lib.mapAttrsToList singleAsciiDoc optionsNix);
|
||||
|
||||
optionsJSON = pkgs.runCommand "options.json"
|
||||
{ meta.description = "List of NixOS options in JSON format";
|
||||
}
|
||||
''
|
||||
# Export list of options in different format.
|
||||
dst=$out/share/doc/nixos
|
||||
mkdir -p $dst
|
||||
|
||||
cp ${builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix))} $dst/options.json
|
||||
|
||||
mkdir -p $out/nix-support
|
||||
echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
|
||||
''; # */
|
||||
|
||||
optionsDocBook = pkgs.runCommand "options-docbook.xml" {} ''
|
||||
optionsXML=${optionsXML}
|
||||
if grep /nixpkgs/nixos/modules $optionsXML; then
|
||||
echo "The manual appears to depend on the location of Nixpkgs, which is bad"
|
||||
echo "since this prevents sharing via the NixOS channel. This is typically"
|
||||
echo "caused by an option default that refers to a relative path (see above"
|
||||
echo "for hints about the offending path)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${pkgs.libxslt.bin}/bin/xsltproc \
|
||||
--stringparam revision '${revision}' \
|
||||
-o intermediate.xml ${./options-to-docbook.xsl} $optionsXML
|
||||
${pkgs.libxslt.bin}/bin/xsltproc \
|
||||
-o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml
|
||||
'';
|
||||
}
|
@ -9,6 +9,8 @@ let
|
||||
timezone = types.nullOr (types.addCheck types.str nospace)
|
||||
// { description = "null or string without spaces"; };
|
||||
|
||||
lcfg = config.location;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
@ -37,12 +39,45 @@ in
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
location = {
|
||||
|
||||
latitude = mkOption {
|
||||
type = types.float;
|
||||
description = ''
|
||||
Your current latitude, between
|
||||
<literal>-90.0</literal> and <literal>90.0</literal>. Must be provided
|
||||
along with longitude.
|
||||
'';
|
||||
};
|
||||
|
||||
longitude = mkOption {
|
||||
type = types.float;
|
||||
description = ''
|
||||
Your current longitude, between
|
||||
between <literal>-180.0</literal> and <literal>180.0</literal>. Must be
|
||||
provided along with latitude.
|
||||
'';
|
||||
};
|
||||
|
||||
provider = mkOption {
|
||||
type = types.enum [ "manual" "geoclue2" ];
|
||||
default = "manual";
|
||||
description = ''
|
||||
The location provider to use for determining your location. If set to
|
||||
<literal>manual</literal> you must also provide latitude/longitude.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
environment.sessionVariables.TZDIR = "/etc/zoneinfo";
|
||||
|
||||
services.geoclue2.enable = mkIf (lcfg.provider == "geoclue2") true;
|
||||
|
||||
# This way services are restarted when tzdata changes.
|
||||
systemd.globalEnvironment.TZDIR = tzdir;
|
||||
|
@ -564,7 +564,10 @@ in {
|
||||
};
|
||||
}) (filterAttrs (_: u: u.packages != []) cfg.users));
|
||||
|
||||
environment.profiles = [ "/etc/profiles/per-user/$USER" ];
|
||||
environment.profiles = [
|
||||
"$HOME/.nix-profile"
|
||||
"/etc/profiles/per-user/$USER"
|
||||
];
|
||||
|
||||
assertions = [
|
||||
{ assertion = !cfg.enforceIdUniqueness || (uidsAreUnique && gidsAreUnique);
|
||||
|
@ -55,7 +55,7 @@ in
|
||||
|
||||
# Without dconf enabled it is impossible to use IBus
|
||||
environment.systemPackages = with pkgs; [
|
||||
ibus-qt gnome3.dconf ibusAutostart
|
||||
gnome3.dconf ibusAutostart
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
|
@ -607,90 +607,7 @@ EOF
|
||||
}
|
||||
|
||||
write_file($fn, <<EOF);
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
$bootLoaderConfig
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password\@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n = {
|
||||
# consoleFont = "Lat2-Terminus16";
|
||||
# consoleKeyMap = "us";
|
||||
# defaultLocale = "en_US.UTF-8";
|
||||
# };
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# \$ nix search wget
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# wget vim
|
||||
# ];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
# services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
# sound.enable = true;
|
||||
# hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
# services.xserver.layout = "us";
|
||||
# services.xserver.xkbOptions = "eurosign:e";
|
||||
|
||||
# Enable touchpad support.
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Enable the KDE Desktop Environment.
|
||||
# services.xserver.displayManager.sddm.enable = true;
|
||||
# services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.jane = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# };
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "${\(qw(@release@))}"; # Did you read the comment?
|
||||
|
||||
}
|
||||
@configuration@
|
||||
EOF
|
||||
} else {
|
||||
print STDERR "warning: not overwriting existing $fn\n";
|
||||
|
@ -38,7 +38,7 @@ let
|
||||
src = ./nixos-generate-config.pl;
|
||||
path = lib.optionals (lib.elem "btrfs" config.boot.supportedFilesystems) [ pkgs.btrfs-progs ];
|
||||
perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix}";
|
||||
inherit (config.system.nixos) release;
|
||||
inherit (config.system.nixos-generate-config) configuration;
|
||||
};
|
||||
|
||||
nixos-option = makeProg {
|
||||
@ -61,8 +61,111 @@ in
|
||||
|
||||
{
|
||||
|
||||
options.system.nixos-generate-config.configuration = mkOption {
|
||||
internal = true;
|
||||
type = types.str;
|
||||
description = ''
|
||||
The NixOS module that <literal>nixos-generate-config</literal>
|
||||
saves to <literal>/etc/nixos/configuration.nix</literal>.
|
||||
|
||||
This is an internal option. No backward compatibility is guaranteed.
|
||||
Use at your own risk!
|
||||
|
||||
Note that this string gets spliced into a Perl script. The perl
|
||||
variable <literal>$bootLoaderConfig</literal> can be used to
|
||||
splice in the boot loader configuration.
|
||||
'';
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
system.nixos-generate-config.configuration = mkDefault ''
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
$bootLoaderConfig
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password\@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n = {
|
||||
# consoleFont = "Lat2-Terminus16";
|
||||
# consoleKeyMap = "us";
|
||||
# defaultLocale = "en_US.UTF-8";
|
||||
# };
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# \$ nix search wget
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# wget vim
|
||||
# ];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
# services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
# sound.enable = true;
|
||||
# hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
# services.xserver.layout = "us";
|
||||
# services.xserver.xkbOptions = "eurosign:e";
|
||||
|
||||
# Enable touchpad support.
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Enable the KDE Desktop Environment.
|
||||
# services.xserver.displayManager.sddm.enable = true;
|
||||
# services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.jane = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# };
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "${config.system.nixos.release}"; # Did you read the comment?
|
||||
|
||||
}
|
||||
'';
|
||||
|
||||
environment.systemPackages =
|
||||
[ nixos-build-vms
|
||||
nixos-install
|
||||
|
@ -58,7 +58,6 @@ in
|
||||
"crashkernel=${crashdump.reservedMemory}"
|
||||
"nmi_watchdog=panic"
|
||||
"softlockup_panic=1"
|
||||
"idle=poll"
|
||||
];
|
||||
kernelPatches = [ {
|
||||
name = "crashdump-config";
|
||||
|
@ -19,7 +19,7 @@ let
|
||||
lhs = optCall lhs_ { inherit pkgs; };
|
||||
rhs = optCall rhs_ { inherit pkgs; };
|
||||
in
|
||||
lhs // rhs //
|
||||
recursiveUpdate lhs rhs //
|
||||
optionalAttrs (lhs ? packageOverrides) {
|
||||
packageOverrides = pkgs:
|
||||
optCall lhs.packageOverrides pkgs //
|
||||
|
@ -20,6 +20,7 @@
|
||||
./config/iproute2.nix
|
||||
./config/krb5/default.nix
|
||||
./config/ldap.nix
|
||||
./config/locale.nix
|
||||
./config/malloc.nix
|
||||
./config/networking.nix
|
||||
./config/no-x-libs.nix
|
||||
@ -33,7 +34,6 @@
|
||||
./config/system-environment.nix
|
||||
./config/system-path.nix
|
||||
./config/terminfo.nix
|
||||
./config/timezone.nix
|
||||
./config/unix-odbc-drivers.nix
|
||||
./config/users-groups.nix
|
||||
./config/vpnc.nix
|
||||
@ -106,9 +106,14 @@
|
||||
./programs/digitalbitbox/default.nix
|
||||
./programs/dmrconfig.nix
|
||||
./programs/environment.nix
|
||||
./programs/evince.nix
|
||||
./programs/file-roller.nix
|
||||
./programs/firejail.nix
|
||||
./programs/fish.nix
|
||||
./programs/freetds.nix
|
||||
./programs/gnome-disks.nix
|
||||
./programs/gnome-documents.nix
|
||||
./programs/gpaste.nix
|
||||
./programs/gnupg.nix
|
||||
./programs/gphoto2.nix
|
||||
./programs/iftop.nix
|
||||
@ -209,6 +214,7 @@
|
||||
./services/backup/duplicity.nix
|
||||
./services/backup/mysql-backup.nix
|
||||
./services/backup/postgresql-backup.nix
|
||||
./services/backup/postgresql-wal-receiver.nix
|
||||
./services/backup/restic.nix
|
||||
./services/backup/restic-rest-server.nix
|
||||
./services/backup/rsnapshot.nix
|
||||
@ -280,12 +286,8 @@
|
||||
./services/desktops/pipewire.nix
|
||||
./services/desktops/gnome3/at-spi2-core.nix
|
||||
./services/desktops/gnome3/chrome-gnome-shell.nix
|
||||
./services/desktops/gnome3/evince.nix
|
||||
./services/desktops/gnome3/evolution-data-server.nix
|
||||
./services/desktops/gnome3/file-roller.nix
|
||||
./services/desktops/gnome3/glib-networking.nix
|
||||
./services/desktops/gnome3/gnome-disks.nix
|
||||
./services/desktops/gnome3/gnome-documents.nix
|
||||
./services/desktops/gnome3/gnome-keyring.nix
|
||||
./services/desktops/gnome3/gnome-online-accounts.nix
|
||||
./services/desktops/gnome3/gnome-remote-desktop.nix
|
||||
@ -293,7 +295,6 @@
|
||||
./services/desktops/gnome3/gnome-settings-daemon.nix
|
||||
./services/desktops/gnome3/gnome-terminal-server.nix
|
||||
./services/desktops/gnome3/gnome-user-share.nix
|
||||
./services/desktops/gnome3/gpaste.nix
|
||||
./services/desktops/gnome3/gvfs.nix
|
||||
./services/desktops/gnome3/rygel.nix
|
||||
./services/desktops/gnome3/seahorse.nix
|
||||
@ -402,6 +403,7 @@
|
||||
./services/misc/couchpotato.nix
|
||||
./services/misc/devmon.nix
|
||||
./services/misc/dictd.nix
|
||||
./services/misc/dwm-status.nix
|
||||
./services/misc/dysnomia.nix
|
||||
./services/misc/disnix.nix
|
||||
./services/misc/docker-registry.nix
|
||||
@ -818,6 +820,7 @@
|
||||
./services/web-servers/varnish/default.nix
|
||||
./services/web-servers/zope2.nix
|
||||
./services/x11/extra-layouts.nix
|
||||
./services/x11/clight.nix
|
||||
./services/x11/colord.nix
|
||||
./services/x11/compton.nix
|
||||
./services/x11/unclutter.nix
|
||||
|
@ -23,9 +23,8 @@ in
|
||||
XCURSOR_PATH = [ "$HOME/.icons" ];
|
||||
};
|
||||
|
||||
environment.profiles =
|
||||
[ "$HOME/.nix-profile"
|
||||
"/nix/var/nix/profiles/default"
|
||||
environment.profiles = mkAfter
|
||||
[ "/nix/var/nix/profiles/default"
|
||||
"/run/current-system/sw"
|
||||
];
|
||||
|
||||
|
@ -6,14 +6,21 @@ with lib;
|
||||
|
||||
{
|
||||
|
||||
# Added 2019-08-09
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "evince" "enable" ]
|
||||
[ "programs" "evince" "enable" ])
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome3.evince = {
|
||||
programs.evince = {
|
||||
|
||||
enable = mkEnableOption
|
||||
"systemd and dbus services for Evince, the GNOME document viewer";
|
||||
"Evince, the GNOME document viewer";
|
||||
|
||||
};
|
||||
|
||||
@ -22,7 +29,7 @@ with lib;
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome3.evince.enable {
|
||||
config = mkIf config.programs.evince.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.evince ];
|
||||
|
@ -6,11 +6,18 @@ with lib;
|
||||
|
||||
{
|
||||
|
||||
# Added 2019-08-09
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "file-roller" "enable" ]
|
||||
[ "programs" "file-roller" "enable" ])
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome3.file-roller = {
|
||||
programs.file-roller = {
|
||||
|
||||
enable = mkEnableOption "File Roller, an archive manager for GNOME";
|
||||
|
||||
@ -21,7 +28,7 @@ with lib;
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome3.file-roller.enable {
|
||||
config = mkIf config.programs.file-roller.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome3.file-roller ];
|
||||
|
@ -1,4 +1,4 @@
|
||||
# GNOME Disks daemon.
|
||||
# GNOME Disks.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
@ -6,17 +6,24 @@ with lib;
|
||||
|
||||
{
|
||||
|
||||
# Added 2019-08-09
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-disks" "enable" ]
|
||||
[ "programs" "gnome-disks" "enable" ])
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome3.gnome-disks = {
|
||||
programs.gnome-disks = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable GNOME Disks daemon, a service designed to
|
||||
Whether to enable GNOME Disks daemon, a program designed to
|
||||
be a UDisks2 graphical front-end.
|
||||
'';
|
||||
};
|
||||
@ -28,7 +35,7 @@ with lib;
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome3.gnome-disks.enable {
|
||||
config = mkIf config.programs.gnome-disks.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome3.gnome-disk-utility ];
|
||||
|
@ -1,4 +1,4 @@
|
||||
# GNOME Documents daemon.
|
||||
# GNOME Documents.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
@ -6,17 +6,24 @@ with lib;
|
||||
|
||||
{
|
||||
|
||||
# Added 2019-08-09
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-documents" "enable" ]
|
||||
[ "programs" "gnome-documents" "enable" ])
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome3.gnome-documents = {
|
||||
programs.gnome-documents = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable GNOME Documents services, a document
|
||||
Whether to enable GNOME Documents, a document
|
||||
manager application for GNOME.
|
||||
'';
|
||||
};
|
||||
@ -28,7 +35,7 @@ with lib;
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome3.gnome-documents.enable {
|
||||
config = mkIf config.programs.gnome-documents.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome3.gnome-documents ];
|
||||
|
@ -1,12 +1,20 @@
|
||||
# GPaste daemon.
|
||||
# GPaste.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
# Added 2019-08-09
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gpaste" "enable" ]
|
||||
[ "programs" "gpaste" "enable" ])
|
||||
];
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.gnome3.gpaste = {
|
||||
programs.gpaste = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
@ -18,10 +26,9 @@ with lib;
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.gnome3.gpaste.enable {
|
||||
config = mkIf config.programs.gpaste.enable {
|
||||
environment.systemPackages = [ pkgs.gnome3.gpaste ];
|
||||
services.dbus.packages = [ pkgs.gnome3.gpaste ];
|
||||
services.xserver.desktopManager.gnome3.sessionPath = [ pkgs.gnome3.gpaste ];
|
||||
systemd.packages = [ pkgs.gnome3.gpaste ];
|
||||
};
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.nylas-mail;
|
||||
in {
|
||||
###### interface
|
||||
options = {
|
||||
services.nylas-mail = {
|
||||
|
||||
enable = mkEnableOption ''
|
||||
nylas-mail - Open-source mail client built on the modern web with Electron, React, and Flux
|
||||
'';
|
||||
|
||||
gnome3-keyring = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable gnome3 keyring for nylas-mail.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.nylas-mail-bin ];
|
||||
|
||||
services.gnome3.gnome-keyring = mkIf cfg.gnome3-keyring {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
@ -51,6 +51,10 @@ with lib;
|
||||
(mkRemovedOptionModule [ "services" "misc" "nzbget" "openFirewall" ] "The port used by nzbget is managed through the web interface so you should adjust your firewall rules accordingly.")
|
||||
(mkRemovedOptionModule [ "services" "prometheus" "alertmanager" "user" ] "The alertmanager service is now using systemd's DynamicUser mechanism which obviates a user setting.")
|
||||
(mkRemovedOptionModule [ "services" "prometheus" "alertmanager" "group" ] "The alertmanager service is now using systemd's DynamicUser mechanism which obviates a group setting.")
|
||||
(mkRemovedOptionModule [ "services" "prometheus2" "alertmanagerURL" ] ''
|
||||
Due to incompatibility, the alertmanagerURL option has been removed,
|
||||
please use 'services.prometheus2.alertmanagers' instead.
|
||||
'')
|
||||
(mkRenamedOptionModule [ "services" "tor" "relay" "portSpec" ] [ "services" "tor" "relay" "port" ])
|
||||
(mkRenamedOptionModule [ "services" "vmwareGuest" ] [ "virtualisation" "vmware" "guest" ])
|
||||
(mkRenamedOptionModule [ "jobs" ] [ "systemd" "services" ])
|
||||
@ -258,6 +262,20 @@ with lib;
|
||||
(mkRenamedOptionModule [ "networking" "extraResolvconfConf" ] [ "networking" "resolvconf" "extraConfig" ])
|
||||
(mkRenamedOptionModule [ "networking" "resolvconfOptions" ] [ "networking" "resolvconf" "extraOptions" ])
|
||||
|
||||
# Redshift
|
||||
(mkChangedOptionModule [ "services" "redshift" "latitude" ] [ "location" "latitude" ]
|
||||
(config:
|
||||
let value = getAttrFromPath [ "services" "redshift" "latitude" ] config;
|
||||
in if value == null then
|
||||
throw "services.redshift.latitude is set to null, you can remove this"
|
||||
else builtins.fromJSON value))
|
||||
(mkChangedOptionModule [ "services" "redshift" "longitude" ] [ "location" "longitude" ]
|
||||
(config:
|
||||
let value = getAttrFromPath [ "services" "redshift" "longitude" ] config;
|
||||
in if value == null then
|
||||
throw "services.redshift.longitude is set to null, you can remove this"
|
||||
else builtins.fromJSON value))
|
||||
|
||||
] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
|
||||
"jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
|
||||
"snmpExporter" "unifiExporter" "varnishExporter" ]
|
||||
|
@ -97,8 +97,8 @@ in
|
||||
|
||||
preStart = ''
|
||||
mkdir -p ${cfg.dataDir}/.config/oxidized
|
||||
cp -v ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db
|
||||
cp -v ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config
|
||||
ln -f -s ${cfg.routerDB} ${cfg.dataDir}/.config/oxidized/router.db
|
||||
ln -f -s ${cfg.configFile} ${cfg.dataDir}/.config/oxidized/config
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
|
@ -41,7 +41,7 @@ in
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = with types; attrsOf (either (either str (either int bool)) (listOf str));
|
||||
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||
default = {};
|
||||
description = ''
|
||||
automysqlbackup configuration. Refer to
|
||||
|
203
nixos/modules/services/backup/postgresql-wal-receiver.nix
Normal file
203
nixos/modules/services/backup/postgresql-wal-receiver.nix
Normal file
@ -0,0 +1,203 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
receiverSubmodule = {
|
||||
options = {
|
||||
postgresqlPackage = mkOption {
|
||||
type = types.package;
|
||||
example = literalExample "pkgs.postgresql_11";
|
||||
description = ''
|
||||
PostgreSQL package to use.
|
||||
'';
|
||||
};
|
||||
|
||||
directory = mkOption {
|
||||
type = types.path;
|
||||
example = literalExample "/mnt/pg_wal/main/";
|
||||
description = ''
|
||||
Directory to write the output to.
|
||||
'';
|
||||
};
|
||||
|
||||
statusInterval = mkOption {
|
||||
type = types.int;
|
||||
default = 10;
|
||||
description = ''
|
||||
Specifies the number of seconds between status packets sent back to the server.
|
||||
This allows for easier monitoring of the progress from server.
|
||||
A value of zero disables the periodic status updates completely,
|
||||
although an update will still be sent when requested by the server, to avoid timeout disconnect.
|
||||
'';
|
||||
};
|
||||
|
||||
slot = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
example = "some_slot_name";
|
||||
description = ''
|
||||
Require <command>pg_receivewal</command> to use an existing replication slot (see
|
||||
<link xlink:href="https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS">Section 26.2.6 of the PostgreSQL manual</link>).
|
||||
When this option is used, <command>pg_receivewal</command> will report a flush position to the server,
|
||||
indicating when each segment has been synchronized to disk so that the server can remove that segment if it is not otherwise needed.
|
||||
|
||||
When the replication client of <command>pg_receivewal</command> is configured on the server as a synchronous standby,
|
||||
then using a replication slot will report the flush position to the server, but only when a WAL file is closed.
|
||||
Therefore, that configuration will cause transactions on the primary to wait for a long time and effectively not work satisfactorily.
|
||||
The option <option>synchronous</option> must be specified in addition to make this work correctly.
|
||||
'';
|
||||
};
|
||||
|
||||
synchronous = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Flush the WAL data to disk immediately after it has been received.
|
||||
Also send a status packet back to the server immediately after flushing, regardless of <option>statusInterval</option>.
|
||||
|
||||
This option should be specified if the replication client of <command>pg_receivewal</command> is configured on the server as a synchronous standby,
|
||||
to ensure that timely feedback is sent to the server.
|
||||
'';
|
||||
};
|
||||
|
||||
compress = mkOption {
|
||||
type = types.ints.between 0 9;
|
||||
default = 0;
|
||||
description = ''
|
||||
Enables gzip compression of write-ahead logs, and specifies the compression level
|
||||
(<literal>0</literal> through <literal>9</literal>, <literal>0</literal> being no compression and <literal>9</literal> being best compression).
|
||||
The suffix <literal>.gz</literal> will automatically be added to all filenames.
|
||||
|
||||
This option requires PostgreSQL >= 10.
|
||||
'';
|
||||
};
|
||||
|
||||
connection = mkOption {
|
||||
type = types.str;
|
||||
example = "postgresql://user@somehost";
|
||||
description = ''
|
||||
Specifies parameters used to connect to the server, as a connection string.
|
||||
See <link xlink:href="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING">Section 34.1.1 of the PostgreSQL manual</link> for more information.
|
||||
|
||||
Because <command>pg_receivewal</command> doesn't connect to any particular database in the cluster,
|
||||
database name in the connection string will be ignored.
|
||||
'';
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
example = literalExample ''
|
||||
[
|
||||
"--no-sync"
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
A list of extra arguments to pass to the <command>pg_receivewal</command> command.
|
||||
'';
|
||||
};
|
||||
|
||||
environment = mkOption {
|
||||
type = with types; attrsOf str;
|
||||
default = { };
|
||||
example = literalExample ''
|
||||
{
|
||||
PGPASSFILE = "/private/passfile";
|
||||
PGSSLMODE = "require";
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Environment variables passed to the service.
|
||||
Usable parameters are listed in <link xlink:href="https://www.postgresql.org/docs/current/libpq-envars.html">Section 34.14 of the PostgreSQL manual</link>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
options = {
|
||||
services.postgresqlWalReceiver = {
|
||||
receivers = mkOption {
|
||||
type = with types; attrsOf (submodule receiverSubmodule);
|
||||
default = { };
|
||||
example = literalExample ''
|
||||
{
|
||||
main = {
|
||||
postgresqlPackage = pkgs.postgresql_11;
|
||||
directory = /mnt/pg_wal/main/;
|
||||
slot = "main_wal_receiver";
|
||||
connection = "postgresql://user@somehost";
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
PostgreSQL WAL receivers.
|
||||
Stream write-ahead logs from a PostgreSQL server using <command>pg_receivewal</command> (formerly <command>pg_receivexlog</command>).
|
||||
See <link xlink:href="https://www.postgresql.org/docs/current/app-pgreceivewal.html">the man page</link> for more information.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
receivers = config.services.postgresqlWalReceiver.receivers;
|
||||
in mkIf (receivers != { }) {
|
||||
users = {
|
||||
users.postgres = {
|
||||
uid = config.ids.uids.postgres;
|
||||
group = "postgres";
|
||||
description = "PostgreSQL server user";
|
||||
};
|
||||
|
||||
groups.postgres = {
|
||||
gid = config.ids.gids.postgres;
|
||||
};
|
||||
};
|
||||
|
||||
assertions = concatLists (attrsets.mapAttrsToList (name: config: [
|
||||
{
|
||||
assertion = config.compress > 0 -> versionAtLeast config.postgresqlPackage.version "10";
|
||||
message = "Invalid configuration for WAL receiver \"${name}\": compress requires PostgreSQL version >= 10.";
|
||||
}
|
||||
]) receivers);
|
||||
|
||||
systemd.tmpfiles.rules = mapAttrsToList (name: config: ''
|
||||
d ${escapeShellArg config.directory} 0750 postgres postgres - -
|
||||
'') receivers;
|
||||
|
||||
systemd.services = with attrsets; mapAttrs' (name: config: nameValuePair "postgresql-wal-receiver-${name}" {
|
||||
description = "PostgreSQL WAL receiver (${name})";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
User = "postgres";
|
||||
Group = "postgres";
|
||||
KillSignal = "SIGINT";
|
||||
Restart = "always";
|
||||
RestartSec = 30;
|
||||
};
|
||||
|
||||
inherit (config) environment;
|
||||
|
||||
script = let
|
||||
receiverCommand = postgresqlPackage:
|
||||
if (versionAtLeast postgresqlPackage.version "10")
|
||||
then "${postgresqlPackage}/bin/pg_receivewal"
|
||||
else "${postgresqlPackage}/bin/pg_receivexlog";
|
||||
in ''
|
||||
${receiverCommand config.postgresqlPackage} \
|
||||
--no-password \
|
||||
--directory=${escapeShellArg config.directory} \
|
||||
--status-interval=${toString config.statusInterval} \
|
||||
--dbname=${escapeShellArg config.connection} \
|
||||
${optionalString (config.compress > 0) "--compress=${toString config.compress}"} \
|
||||
${optionalString (config.slot != "") "--slot=${escapeShellArg config.slot}"} \
|
||||
${optionalString config.synchronous "--synchronous"} \
|
||||
${concatStringsSep " " config.extraArgs}
|
||||
'';
|
||||
}) receivers;
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ pacien ];
|
||||
}
|
@ -160,7 +160,7 @@ in {
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${dirOf cfg.uriFile}' - ${cfg.user} ${cfg.group} - -"
|
||||
"d '${dirOf cfg.logFile}' - ${cfg.user} ${cfg.group} - -"
|
||||
"f '${cfg.logFile}' - ${cfg.user} ${cfg.group} - -"
|
||||
"d '${cfg.databaseDir}' - ${cfg.user} ${cfg.group} - -"
|
||||
"d '${cfg.viewIndexDir}' - ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
@ -169,11 +169,9 @@ in {
|
||||
description = "CouchDB Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
preStart =
|
||||
''
|
||||
preStart = ''
|
||||
touch ${cfg.configFile}
|
||||
touch -a ${cfg.logFile}
|
||||
'';
|
||||
'';
|
||||
|
||||
environment = mkIf useVersion2 {
|
||||
# we are actually specifying 4 configuration files:
|
||||
|
@ -86,7 +86,25 @@ in
|
||||
in "${memcached}/bin/memcached ${networking} -m ${toString cfg.maxMemory} -c ${toString cfg.maxConnections} ${concatStringsSep " " cfg.extraOptions}";
|
||||
|
||||
User = cfg.user;
|
||||
|
||||
# Filesystem access
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectControlGroups = true;
|
||||
RuntimeDirectory = "memcached";
|
||||
# Caps
|
||||
CapabilityBoundingSet = "";
|
||||
NoNewPrivileges = true;
|
||||
# Misc.
|
||||
LockPersonality = true;
|
||||
RestrictRealtime = true;
|
||||
PrivateMounts = true;
|
||||
PrivateUsers = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -330,13 +330,13 @@ in
|
||||
fi
|
||||
'' + optionalString (cfg.ensureDatabases != []) ''
|
||||
${concatMapStrings (database: ''
|
||||
$PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${database}'" | grep -q 1 || $PSQL -tAc "CREATE DATABASE ${database}"
|
||||
$PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${database}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${database}"'
|
||||
'') cfg.ensureDatabases}
|
||||
'' + ''
|
||||
${concatMapStrings (user: ''
|
||||
$PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='${user.name}'" | grep -q 1 || $PSQL -tAc "CREATE USER ${user.name}"
|
||||
${concatStringsSep "\n" (mapAttrsToList (database: permission: ''
|
||||
$PSQL -tAc "GRANT ${permission} ON ${database} TO ${user.name}"
|
||||
$PSQL -tAc 'GRANT ${permission} ON ${database} TO ${user.name}'
|
||||
'') user.ensurePermissions)}
|
||||
'') cfg.ensureUsers}
|
||||
'';
|
||||
|
@ -118,7 +118,7 @@ in {
|
||||
};
|
||||
|
||||
serverProperties = mkOption {
|
||||
type = with types; attrsOf (either bool (either int str));
|
||||
type = with types; attrsOf (oneOf [ bool int str ]);
|
||||
default = {};
|
||||
example = literalExample ''
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ let
|
||||
cfg = config.services.davmail;
|
||||
|
||||
configType = with types;
|
||||
either (either (attrsOf configType) str) (either int bool) // {
|
||||
oneOf [ (attrsOf configType) str int bool ] // {
|
||||
description = "davmail config type (str, int, bool or attribute set thereof)";
|
||||
};
|
||||
|
||||
|
@ -447,7 +447,7 @@ in
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = with types; attrsOf (either bool (either str (listOf str)));
|
||||
type = with types; attrsOf (oneOf [ bool str (listOf str) ]);
|
||||
description = ''
|
||||
The main.cf configuration file as key value set.
|
||||
'';
|
||||
|
@ -331,7 +331,7 @@ in
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = with types; attrsOf (either bool (either str (listOf str)));
|
||||
type = with types; attrsOf (oneOf [ bool str (listOf str) ]);
|
||||
description = ''
|
||||
Addon to postfix configuration
|
||||
'';
|
||||
|
@ -30,7 +30,7 @@ in {
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = with types; attrsOf (either str (either int bool));
|
||||
type = with types; attrsOf (oneOf [ str int bool ]);
|
||||
default = {};
|
||||
description = ''
|
||||
The configuration to give rss2email.
|
||||
|
73
nixos/modules/services/misc/dwm-status.nix
Normal file
73
nixos/modules/services/misc/dwm-status.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.dwm-status;
|
||||
|
||||
order = concatMapStringsSep "," (feature: ''"${feature}"'') cfg.order;
|
||||
|
||||
configFile = pkgs.writeText "dwm-status.toml" ''
|
||||
order = [${order}]
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.dwm-status = {
|
||||
|
||||
enable = mkEnableOption "dwm-status user service";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.dwm-status;
|
||||
defaultText = "pkgs.dwm-status";
|
||||
example = "pkgs.dwm-status.override { enableAlsaUtils = false; }";
|
||||
description = ''
|
||||
Which dwm-status package to use.
|
||||
'';
|
||||
};
|
||||
|
||||
order = mkOption {
|
||||
type = types.listOf (types.enum [ "audio" "backlight" "battery" "cpu_load" "network" "time" ]);
|
||||
description = ''
|
||||
List of enabled features in order.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Extra config in TOML format.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.upower.enable = elem "battery" cfg.order;
|
||||
|
||||
systemd.user.services.dwm-status = {
|
||||
description = "Highly performant and configurable DWM status service";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
|
||||
serviceConfig.ExecStart = "${cfg.package}/bin/dwm-status ${configFile}";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -502,7 +502,7 @@ in {
|
||||
"d ${cfg.statePath} 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${cfg.statePath}/builds 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${cfg.statePath}/config 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${cfg.statePath}/config/initializers 0750 ${cfg.user} ${cfg.group} -"
|
||||
"D ${cfg.statePath}/config/initializers 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${cfg.statePath}/db 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${cfg.statePath}/log 0750 ${cfg.user} ${cfg.group} -"
|
||||
"d ${cfg.statePath}/repositories 2770 ${cfg.user} ${cfg.group} -"
|
||||
|
@ -42,9 +42,9 @@ let
|
||||
# Apply the configured extraIntegrations to the provided agent
|
||||
# package. See the documentation of `dd-agent/integrations-core.nix`
|
||||
# for detailed information on this.
|
||||
datadogPkg = cfg.package.overrideAttrs(_: {
|
||||
python = (pkgs.datadog-integrations-core cfg.extraIntegrations).python;
|
||||
});
|
||||
datadogPkg = cfg.package.override {
|
||||
pythonPackages = pkgs.datadog-integrations-core cfg.extraIntegrations;
|
||||
};
|
||||
in {
|
||||
options.services.datadog-agent = {
|
||||
enable = mkOption {
|
||||
@ -60,7 +60,7 @@ in {
|
||||
defaultText = "pkgs.datadog-agent";
|
||||
description = ''
|
||||
Which DataDog v6 agent package to use. Note that the provided
|
||||
package is expected to have an overridable `python`-attribute
|
||||
package is expected to have an overridable `pythonPackages`-attribute
|
||||
which configures the Python environment with the Datadog
|
||||
checks.
|
||||
'';
|
||||
|
@ -503,12 +503,12 @@ in {
|
||||
message = "Cannot set both adminPassword and adminPasswordFile";
|
||||
}
|
||||
{
|
||||
assertion = cfg.security.secretKeyFile != opt.security.secretKeyFile.default -> cfg.security.secretKeyFile == null;
|
||||
assertion = cfg.security.secretKey != opt.security.secretKey.default -> cfg.security.secretKeyFile == null;
|
||||
message = "Cannot set both secretKey and secretKeyFile";
|
||||
}
|
||||
{
|
||||
assertion = cfg.smtp.password != opt.smtp.password.default -> cfg.smtp.passwordFile == null;
|
||||
message = "Cannot set both password and secretKeyFile";
|
||||
message = "Cannot set both password and passwordFile";
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -79,12 +79,8 @@ let
|
||||
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg2.rules))
|
||||
]);
|
||||
scrape_configs = filterValidPrometheus cfg2.scrapeConfigs;
|
||||
alerting = optionalAttrs (cfg2.alertmanagerURL != []) {
|
||||
alertmanagers = [{
|
||||
static_configs = [{
|
||||
targets = cfg2.alertmanagerURL;
|
||||
}];
|
||||
}];
|
||||
alerting = {
|
||||
inherit (cfg2) alertmanagers;
|
||||
};
|
||||
};
|
||||
|
||||
@ -738,11 +734,23 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
alertmanagerURL = mkOption {
|
||||
type = types.listOf types.str;
|
||||
alertmanagers = mkOption {
|
||||
type = types.listOf types.attrs;
|
||||
example = literalExample ''
|
||||
[ {
|
||||
scheme = "https";
|
||||
path_prefix = "/alertmanager";
|
||||
static_configs = [ {
|
||||
targets = [
|
||||
"prometheus.domain.tld"
|
||||
];
|
||||
} ];
|
||||
} ]
|
||||
'';
|
||||
default = [];
|
||||
description = ''
|
||||
List of Alertmanager URLs to send notifications to.
|
||||
A list of alertmanagers to send alerts to.
|
||||
See <link xlink:href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config">the official documentation</link> for more information.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,13 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.blackbox;
|
||||
|
||||
checkConfig = file: pkgs.runCommand "checked-blackbox-exporter.conf" {
|
||||
preferLocalBuild = true;
|
||||
buildInputs = [ pkgs.buildPackages.prometheus-blackbox-exporter ]; } ''
|
||||
ln -s ${file} $out
|
||||
blackbox_exporter --config.check --config.file $out
|
||||
'';
|
||||
in
|
||||
{
|
||||
port = 9115;
|
||||
@ -21,7 +28,7 @@ in
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \
|
||||
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
||||
--config.file ${cfg.configFile} \
|
||||
--config.file ${checkConfig cfg.configFile} \
|
||||
${concatStringsSep " \\\n " cfg.extraFlags}
|
||||
'';
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
|
@ -62,9 +62,9 @@ let
|
||||
concatStringsSep "\n" (toLines cfg.config);
|
||||
|
||||
semanticTypes = with types; rec {
|
||||
zncAtom = nullOr (either (either int bool) str);
|
||||
zncAtom = nullOr (oneOf [ int bool str ]);
|
||||
zncAttr = attrsOf (nullOr zncConf);
|
||||
zncAll = either (either zncAtom (listOf zncAtom)) zncAttr;
|
||||
zncAll = oneOf [ zncAtom (listOf zncAtom) zncAttr ];
|
||||
zncConf = attrsOf (zncAll // {
|
||||
# Since this is a recursive type and the description by default contains
|
||||
# the description of its subtypes, infinite recursion would occur without
|
||||
|
@ -36,7 +36,7 @@ in {
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = attrsOf (nullOr (either (either bool int) str));
|
||||
type = attrsOf (nullOr (oneOf [ bool int str ]));
|
||||
default = {};
|
||||
example = literalExample ''
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ let
|
||||
|
||||
pkg = pkgs.limesurvey;
|
||||
|
||||
configType = with types; either (either (attrsOf configType) str) (either int bool) // {
|
||||
configType = with types; oneOf [ (attrsOf configType) str int bool ] // {
|
||||
description = "limesurvey config type (str, int, bool or attribute set thereof)";
|
||||
};
|
||||
|
||||
|
@ -336,7 +336,7 @@ let
|
||||
++ optional enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; }
|
||||
++ concatMap (svc: svc.extraModules) allSubservices
|
||||
++ extraForeignModules;
|
||||
in concatMapStrings load allModules
|
||||
in concatMapStrings load (unique allModules)
|
||||
}
|
||||
|
||||
AddHandler type-map var
|
||||
|
115
nixos/modules/services/x11/clight.nix
Normal file
115
nixos/modules/services/x11/clight.nix
Normal file
@ -0,0 +1,115 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.clight;
|
||||
|
||||
toConf = v:
|
||||
if builtins.isFloat v then toString v
|
||||
else if isInt v then toString v
|
||||
else if isBool v then boolToString v
|
||||
else if isString v then ''"${escape [''"''] v}"''
|
||||
else if isList v then "[ " + concatMapStringsSep ", " toConf v + " ]"
|
||||
else abort "clight.toConf: unexpected type (v = ${v})";
|
||||
|
||||
clightConf = pkgs.writeText "clight.conf"
|
||||
(concatStringsSep "\n" (mapAttrsToList
|
||||
(name: value: "${toString name} = ${toConf value};")
|
||||
(filterAttrs
|
||||
(_: value: value != null)
|
||||
cfg.settings)));
|
||||
in {
|
||||
options.services.clight = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable clight or not.
|
||||
'';
|
||||
};
|
||||
|
||||
temperature = {
|
||||
day = mkOption {
|
||||
type = types.int;
|
||||
default = 5500;
|
||||
description = ''
|
||||
Colour temperature to use during the day, between
|
||||
<literal>1000</literal> and <literal>25000</literal> K.
|
||||
'';
|
||||
};
|
||||
night = mkOption {
|
||||
type = types.int;
|
||||
default = 3700;
|
||||
description = ''
|
||||
Colour temperature to use at night, between
|
||||
<literal>1000</literal> and <literal>25000</literal> K.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
settings = let
|
||||
validConfigTypes = with types; either int (either str (either bool float));
|
||||
in mkOption {
|
||||
type = with types; attrsOf (nullOr (either validConfigTypes (listOf validConfigTypes)));
|
||||
default = {};
|
||||
example = { captures = 20; gamma_long_transition = true; ac_capture_timeouts = [ 120 300 60 ]; };
|
||||
description = ''
|
||||
Additional configuration to extend clight.conf. See
|
||||
<link xlink:href="https://github.com/FedeDP/Clight/blob/master/Extra/clight.conf"/> for a
|
||||
sample configuration file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.kernelModules = [ "i2c_dev" ];
|
||||
environment.systemPackages = with pkgs; [ clight clightd ];
|
||||
services.dbus.packages = with pkgs; [ clight clightd ];
|
||||
services.upower.enable = true;
|
||||
|
||||
services.clight.settings = {
|
||||
gamma_temp = with cfg.temperature; mkDefault [ day night ];
|
||||
} // (optionalAttrs (config.location.provider == "manual") {
|
||||
latitude = mkDefault config.location.latitude;
|
||||
longitude = mkDefault config.location.longitude;
|
||||
});
|
||||
|
||||
services.geoclue2.appConfig."clightc" = {
|
||||
isAllowed = true;
|
||||
isSystem = true;
|
||||
};
|
||||
|
||||
systemd.services.clightd = {
|
||||
requires = [ "polkit.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
description = "Bus service to manage various screen related properties (gamma, dpms, backlight)";
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "org.clightd.clightd";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
ExecStart = ''
|
||||
${pkgs.clightd}/bin/clightd
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.clight = {
|
||||
after = [ "upower.service" "clightd.service" ];
|
||||
wants = [ "upower.service" "clightd.service" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
|
||||
description = "C daemon to adjust screen brightness to match ambient brightness, as computed capturing frames from webcam";
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
ExecStart = ''
|
||||
${pkgs.clight}/bin/clight --conf-file ${clightConf}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -215,7 +215,7 @@ in {
|
||||
};
|
||||
|
||||
settings = let
|
||||
configTypes = with types; either bool (either int (either float str));
|
||||
configTypes = with types; oneOf [ bool int float str ];
|
||||
# types.loaOf converts lists to sets
|
||||
loaOf = t: with types; either (listOf t) (attrsOf t);
|
||||
in mkOption {
|
||||
|
@ -123,12 +123,8 @@ in {
|
||||
services.dleyna-renderer.enable = mkDefault true;
|
||||
services.dleyna-server.enable = mkDefault true;
|
||||
services.gnome3.at-spi2-core.enable = true;
|
||||
services.gnome3.evince.enable = mkDefault true;
|
||||
services.gnome3.evolution-data-server.enable = true;
|
||||
services.gnome3.file-roller.enable = mkDefault true;
|
||||
services.gnome3.glib-networking.enable = true;
|
||||
services.gnome3.gnome-disks.enable = mkDefault true;
|
||||
services.gnome3.gnome-documents.enable = mkDefault true;
|
||||
services.gnome3.gnome-keyring.enable = true;
|
||||
services.gnome3.gnome-online-accounts.enable = mkDefault true;
|
||||
services.gnome3.gnome-remote-desktop.enable = mkDefault true;
|
||||
@ -157,6 +153,12 @@ in {
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
# Enable default programs
|
||||
programs.evince.enable = mkDefault true;
|
||||
programs.file-roller.enable = mkDefault true;
|
||||
programs.gnome-disks.enable = mkDefault true;
|
||||
programs.gnome-documents.enable = mkDefault true;
|
||||
|
||||
# If gnome3 is installed, build vim for gtk3 too.
|
||||
nixpkgs.config.vim.gui = "gtk3";
|
||||
|
||||
|
@ -5,6 +5,7 @@ with lib;
|
||||
let
|
||||
|
||||
cfg = config.services.redshift;
|
||||
lcfg = config.location;
|
||||
|
||||
in {
|
||||
|
||||
@ -18,35 +19,6 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
latitude = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Your current latitude, between
|
||||
<literal>-90.0</literal> and <literal>90.0</literal>. Must be provided
|
||||
along with longitude.
|
||||
'';
|
||||
};
|
||||
|
||||
longitude = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Your current longitude, between
|
||||
between <literal>-180.0</literal> and <literal>180.0</literal>. Must be
|
||||
provided along with latitude.
|
||||
'';
|
||||
};
|
||||
|
||||
provider = mkOption {
|
||||
type = types.enum [ "manual" "geoclue2" ];
|
||||
default = "manual";
|
||||
description = ''
|
||||
The location provider to use for determining your location. If set to
|
||||
<literal>manual</literal> you must also provide latitude/longitude.
|
||||
'';
|
||||
};
|
||||
|
||||
temperature = {
|
||||
day = mkOption {
|
||||
type = types.int;
|
||||
@ -106,33 +78,19 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
if cfg.provider == "manual"
|
||||
then (cfg.latitude != null && cfg.longitude != null)
|
||||
else (cfg.latitude == null && cfg.longitude == null);
|
||||
message = "Latitude and longitude must be provided together, and with provider set to null.";
|
||||
}
|
||||
];
|
||||
|
||||
# needed so that .desktop files are installed, which geoclue cares about
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
services.geoclue2 = mkIf (cfg.provider == "geoclue2") {
|
||||
enable = true;
|
||||
appConfig."redshift" = {
|
||||
isAllowed = true;
|
||||
isSystem = true;
|
||||
};
|
||||
services.geoclue2.appConfig."redshift" = {
|
||||
isAllowed = true;
|
||||
isSystem = true;
|
||||
};
|
||||
|
||||
systemd.user.services.redshift =
|
||||
systemd.user.services.redshift =
|
||||
let
|
||||
providerString =
|
||||
if cfg.provider == "manual"
|
||||
then "${cfg.latitude}:${cfg.longitude}"
|
||||
else cfg.provider;
|
||||
providerString = if lcfg.provider == "manual"
|
||||
then "${toString lcfg.latitude}:${toString lcfg.longitude}"
|
||||
else lcfg.provider;
|
||||
in
|
||||
{
|
||||
description = "Redshift colour temperature adjuster";
|
||||
|
@ -115,6 +115,14 @@ let
|
||||
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00'';
|
||||
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
|
||||
};
|
||||
wasm32-wasi = {
|
||||
magicOrExtension = ''\x00asm'';
|
||||
mask = ''\xff\xff\xff\xff'';
|
||||
};
|
||||
wasm64-wasi = {
|
||||
magicOrExtension = ''\x00asm'';
|
||||
mask = ''\xff\xff\xff\xff'';
|
||||
};
|
||||
x86_64-windows = {
|
||||
magicOrExtension = ".exe";
|
||||
recognitionType = "extension";
|
||||
@ -226,6 +234,7 @@ in {
|
||||
|
||||
emulatedSystems = mkOption {
|
||||
default = [];
|
||||
example = [ "wasm32-wasi" "x86_64-windows" "aarch64-linux" ];
|
||||
description = ''
|
||||
List of systems to emulate. Will also configure Nix to
|
||||
support your new systems.
|
||||
|
@ -226,7 +226,7 @@ in rec {
|
||||
|
||||
environment = mkOption {
|
||||
default = {};
|
||||
type = with types; attrsOf (nullOr (either str (either path package)));
|
||||
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
|
||||
example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
|
||||
description = "Environment variables passed to the service's processes.";
|
||||
};
|
||||
|
@ -524,7 +524,7 @@ in
|
||||
};
|
||||
|
||||
systemd.globalEnvironment = mkOption {
|
||||
type = with types; attrsOf (nullOr (either str (either path package)));
|
||||
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
|
||||
default = {};
|
||||
example = { TZ = "CET"; };
|
||||
description = ''
|
||||
|
@ -68,8 +68,9 @@ in rec {
|
||||
nixos.tests.chromium.x86_64-linux or []
|
||||
(all nixos.tests.firefox)
|
||||
(all nixos.tests.firewall)
|
||||
(except ["aarch64-linux"] nixos.tests.gnome3)
|
||||
(except ["aarch64-linux"] nixos.tests.pantheon)
|
||||
(all nixos.tests.gnome3-xorg)
|
||||
(all nixos.tests.gnome3)
|
||||
(all nixos.tests.pantheon)
|
||||
nixos.tests.installer.zfsroot.x86_64-linux or [] # ZFS is 64bit only
|
||||
(except ["aarch64-linux"] nixos.tests.installer.lvm)
|
||||
(except ["aarch64-linux"] nixos.tests.installer.luksroot)
|
||||
@ -103,7 +104,7 @@ in rec {
|
||||
#(all nixos.tests.keymap.neo)
|
||||
#(all nixos.tests.keymap.qwertz)
|
||||
(all nixos.tests.plasma5)
|
||||
#(all nixos.tests.lightdm)
|
||||
(all nixos.tests.lightdm)
|
||||
(all nixos.tests.login)
|
||||
(all nixos.tests.misc)
|
||||
(all nixos.tests.mutableUsers)
|
||||
|
@ -56,7 +56,7 @@ in
|
||||
containers-physical_interfaces = handleTest ./containers-physical_interfaces.nix {};
|
||||
containers-restart_networking = handleTest ./containers-restart_networking.nix {};
|
||||
containers-tmpfs = handleTest ./containers-tmpfs.nix {};
|
||||
#couchdb = handleTest ./couchdb.nix {}; # spidermonkey-1.8.5 is marked as broken
|
||||
couchdb = handleTest ./couchdb.nix {};
|
||||
deluge = handleTest ./deluge.nix {};
|
||||
dhparams = handleTest ./dhparams.nix {};
|
||||
dnscrypt-proxy = handleTestOn ["x86_64-linux"] ./dnscrypt-proxy.nix {};
|
||||
@ -93,8 +93,8 @@ in
|
||||
gitlab = handleTest ./gitlab.nix {};
|
||||
gitolite = handleTest ./gitolite.nix {};
|
||||
gjs = handleTest ./gjs.nix {};
|
||||
gnome3 = handleTestOn ["x86_64-linux"] ./gnome3.nix {}; # libsmbios is unsupported on aarch64
|
||||
gnome3-gdm = handleTestOn ["x86_64-linux"] ./gnome3-gdm.nix {}; # libsmbios is unsupported on aarch64
|
||||
gnome3-xorg = handleTest ./gnome3-xorg.nix {};
|
||||
gnome3 = handleTest ./gnome3.nix {};
|
||||
gocd-agent = handleTest ./gocd-agent.nix {};
|
||||
gocd-server = handleTest ./gocd-server.nix {};
|
||||
google-oslogin = handleTest ./google-oslogin {};
|
||||
@ -139,7 +139,7 @@ in
|
||||
ldap = handleTest ./ldap.nix {};
|
||||
leaps = handleTest ./leaps.nix {};
|
||||
lidarr = handleTest ./lidarr.nix {};
|
||||
#lightdm = handleTest ./lightdm.nix {};
|
||||
lightdm = handleTest ./lightdm.nix {};
|
||||
limesurvey = handleTest ./limesurvey.nix {};
|
||||
login = handleTest ./login.nix {};
|
||||
loki = handleTest ./loki.nix {};
|
||||
@ -183,6 +183,7 @@ in
|
||||
nginx = handleTest ./nginx.nix {};
|
||||
nginx-sso = handleTest ./nginx-sso.nix {};
|
||||
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
|
||||
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
|
||||
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
|
||||
nsd = handleTest ./nsd.nix {};
|
||||
nzbget = handleTest ./nzbget.nix {};
|
||||
@ -209,6 +210,7 @@ in
|
||||
plotinus = handleTest ./plotinus.nix {};
|
||||
postgis = handleTest ./postgis.nix {};
|
||||
postgresql = handleTest ./postgresql.nix {};
|
||||
postgresql-wal-receiver = handleTest ./postgresql-wal-receiver.nix {};
|
||||
powerdns = handleTest ./powerdns.nix {};
|
||||
predictable-interface-names = handleTest ./predictable-interface-names.nix {};
|
||||
printing = handleTest ./printing.nix {};
|
||||
|
@ -1,63 +0,0 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "gnome3-gdm";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ lethalman ];
|
||||
};
|
||||
|
||||
machine =
|
||||
{ ... }:
|
||||
|
||||
{ imports = [ ./common/user-account.nix ];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.displayManager.gdm = {
|
||||
enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
};
|
||||
};
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
|
||||
virtualisation.memorySize = 1024;
|
||||
};
|
||||
|
||||
testScript = let
|
||||
# Keep line widths somewhat managable
|
||||
bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus";
|
||||
gdbus = "${bus} gdbus";
|
||||
# Call javascript in gnome shell, returns a tuple (success, output), where
|
||||
# `success` is true if the dbus call was successful and output is what the
|
||||
# javascript evaluates to.
|
||||
eval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval";
|
||||
# False when startup is done
|
||||
startingUp = "${gdbus} ${eval} Main.layoutManager._startingUp";
|
||||
# Hopefully gnome-terminal's wm class
|
||||
wmClass = "${gdbus} ${eval} global.display.focus_window.wm_class";
|
||||
in ''
|
||||
# wait for gdm to start
|
||||
$machine->waitForUnit("display-manager.service");
|
||||
|
||||
# wait for alice to be logged in
|
||||
$machine->waitForUnit("default.target","alice");
|
||||
|
||||
# Check that logging in has given the user ownership of devices.
|
||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||
|
||||
# Wait for the wayland server
|
||||
$machine->waitForFile("/run/user/1000/wayland-0");
|
||||
|
||||
# Wait for gnome shell, correct output should be "(true, 'false')"
|
||||
$machine->waitUntilSucceeds("su - alice -c '${startingUp} | grep -q true,..false'");
|
||||
|
||||
# open a terminal
|
||||
$machine->succeed("su - alice -c '${bus} gnome-terminal'");
|
||||
# and check it's there
|
||||
$machine->waitUntilSucceeds("su - alice -c '${wmClass} | grep -q gnome-terminal-server'");
|
||||
|
||||
# wait to get a nice screenshot
|
||||
$machine->sleep(20);
|
||||
$machine->screenshot("screen");
|
||||
'';
|
||||
})
|
41
nixos/tests/gnome3-xorg.nix
Normal file
41
nixos/tests/gnome3-xorg.nix
Normal file
@ -0,0 +1,41 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "gnome3-xorg";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = pkgs.gnome3.maintainers;
|
||||
};
|
||||
|
||||
machine =
|
||||
{ ... }:
|
||||
|
||||
{ imports = [ ./common/user-account.nix ];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.displayManager.gdm.enable = false;
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
||||
services.xserver.displayManager.lightdm.autoLogin.user = "alice";
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
services.xserver.desktopManager.default = "gnome-xorg";
|
||||
|
||||
virtualisation.memorySize = 1024;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForX;
|
||||
|
||||
# wait for alice to be logged in
|
||||
$machine->waitForUnit("default.target","alice");
|
||||
|
||||
# Check that logging in has given the user ownership of devices.
|
||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||
|
||||
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||
$machine->waitForWindow(qr/alice.*machine/);
|
||||
$machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'");
|
||||
$machine->sleep(10);
|
||||
$machine->screenshot("screen");
|
||||
'';
|
||||
})
|
@ -1,7 +1,7 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "gnome3";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ domenkozar eelco lethalman ];
|
||||
maintainers = pkgs.gnome3.maintainers;
|
||||
};
|
||||
|
||||
machine =
|
||||
@ -11,19 +11,34 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.displayManager.gdm.enable = false;
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
||||
services.xserver.displayManager.lightdm.autoLogin.user = "alice";
|
||||
services.xserver.displayManager.gdm = {
|
||||
enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
services.xserver.desktopManager.default = "gnome-xorg";
|
||||
|
||||
virtualisation.memorySize = 1024;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForX;
|
||||
testScript = let
|
||||
# Keep line widths somewhat managable
|
||||
bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus";
|
||||
gdbus = "${bus} gdbus";
|
||||
# Call javascript in gnome shell, returns a tuple (success, output), where
|
||||
# `success` is true if the dbus call was successful and output is what the
|
||||
# javascript evaluates to.
|
||||
eval = "call --session -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval";
|
||||
# False when startup is done
|
||||
startingUp = "${gdbus} ${eval} Main.layoutManager._startingUp";
|
||||
# Hopefully gnome-terminal's wm class
|
||||
wmClass = "${gdbus} ${eval} global.display.focus_window.wm_class";
|
||||
in ''
|
||||
# wait for gdm to start
|
||||
$machine->waitForUnit("display-manager.service");
|
||||
|
||||
# wait for alice to be logged in
|
||||
$machine->waitForUnit("default.target","alice");
|
||||
@ -31,11 +46,19 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
# Check that logging in has given the user ownership of devices.
|
||||
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
||||
|
||||
$machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'");
|
||||
$machine->succeed("xauth merge ~alice/.Xauthority");
|
||||
$machine->waitForWindow(qr/alice.*machine/);
|
||||
$machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'");
|
||||
$machine->sleep(10);
|
||||
# Wait for the wayland server
|
||||
$machine->waitForFile("/run/user/1000/wayland-0");
|
||||
|
||||
# Wait for gnome shell, correct output should be "(true, 'false')"
|
||||
$machine->waitUntilSucceeds("su - alice -c '${startingUp} | grep -q true,..false'");
|
||||
|
||||
# open a terminal
|
||||
$machine->succeed("su - alice -c '${bus} gnome-terminal'");
|
||||
# and check it's there
|
||||
$machine->waitUntilSucceeds("su - alice -c '${wmClass} | grep -q gnome-terminal-server'");
|
||||
|
||||
# wait to get a nice screenshot
|
||||
$machine->sleep(20);
|
||||
$machine->screenshot("screen");
|
||||
'';
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "lightdm";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ aszlig ];
|
||||
maintainers = [ aszlig worldofpeace ];
|
||||
};
|
||||
|
||||
machine = { ... }: {
|
||||
|
@ -49,21 +49,40 @@ in rec {
|
||||
|
||||
testScript = let
|
||||
file = "/tmp/msg";
|
||||
payload = "wootWOOT";
|
||||
sub = args:
|
||||
"(${cmd "sub"} -C 1 ${args} | tee ${file} &)";
|
||||
in ''
|
||||
startAll;
|
||||
$server->waitForUnit("mosquitto.service");
|
||||
|
||||
$server->fail("test -f ${file}");
|
||||
$server->execute("(${cmd "sub"} -C 1 | tee ${file} &)");
|
||||
|
||||
$client1->fail("test -f ${file}");
|
||||
$client1->execute("(${cmd "sub"} -C 1 | tee ${file} &)");
|
||||
$client2->fail("test -f ${file}");
|
||||
|
||||
$client2->succeed("${cmd "pub"} -m ${payload}");
|
||||
|
||||
$server->succeed("grep -q ${payload} ${file}");
|
||||
# QoS = 0, so only one subscribers should get it
|
||||
$server->execute("${sub "-q 0"}");
|
||||
|
||||
$client1->succeed("grep -q ${payload} ${file}");
|
||||
# we need to give the subscribers some time to connect
|
||||
$client2->execute("sleep 5");
|
||||
$client2->succeed("${cmd "pub"} -m FOO -q 0");
|
||||
|
||||
$server->waitUntilSucceeds("grep -q FOO ${file}");
|
||||
$server->execute("rm ${file}");
|
||||
|
||||
|
||||
# QoS = 1, so both subscribers should get it
|
||||
$server->execute("${sub "-q 1"}");
|
||||
$client1->execute("${sub "-q 1"}");
|
||||
|
||||
# we need to give the subscribers some time to connect
|
||||
$client2->execute("sleep 5");
|
||||
$client2->succeed("${cmd "pub"} -m BAR -q 1");
|
||||
|
||||
$server->waitUntilSucceeds("grep -q BAR ${file}");
|
||||
$server->execute("rm ${file}");
|
||||
|
||||
$client1->waitUntilSucceeds("grep -q BAR ${file}");
|
||||
$client1->execute("rm ${file}");
|
||||
'';
|
||||
})
|
||||
|
24
nixos/tests/nixos-generate-config.nix
Normal file
24
nixos/tests/nixos-generate-config.nix
Normal file
@ -0,0 +1,24 @@
|
||||
import ./make-test.nix ({ lib, ... } : {
|
||||
name = "nixos-generate-config";
|
||||
meta.maintainers = with lib.maintainers; [ basvandijk ];
|
||||
machine = {
|
||||
system.nixos-generate-config.configuration = ''
|
||||
# OVERRIDDEN
|
||||
{ config, pkgs, ... }: {
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
$bootLoaderConfig
|
||||
}
|
||||
'';
|
||||
};
|
||||
testScript = ''
|
||||
startAll;
|
||||
$machine->waitForUnit("multi-user.target");
|
||||
$machine->succeed("nixos-generate-config");
|
||||
|
||||
# Test if the configuration really is overridden
|
||||
$machine->succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix");
|
||||
|
||||
# Test of if the Perl variable $bootLoaderConfig is spliced correctly:
|
||||
$machine->succeed("grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix");
|
||||
'';
|
||||
})
|
86
nixos/tests/postgresql-wal-receiver.nix
Normal file
86
nixos/tests/postgresql-wal-receiver.nix
Normal file
@ -0,0 +1,86 @@
|
||||
{ system ? builtins.currentSystem
|
||||
, config ? { }
|
||||
, pkgs ? import ../.. { inherit system config; } }:
|
||||
|
||||
with import ../lib/testing.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
postgresqlDataDir = "/var/db/postgresql/test";
|
||||
replicationUser = "wal_receiver_user";
|
||||
replicationSlot = "wal_receiver_slot";
|
||||
replicationConn = "postgresql://${replicationUser}@localhost";
|
||||
baseBackupDir = "/tmp/pg_basebackup";
|
||||
walBackupDir = "/tmp/pg_wal";
|
||||
recoveryConf = pkgs.writeText "recovery.conf" ''
|
||||
restore_command = 'cp ${walBackupDir}/%f %p'
|
||||
'';
|
||||
|
||||
makePostgresqlWalReceiverTest = subTestName: postgresqlPackage: makeTest {
|
||||
name = "postgresql-wal-receiver-${subTestName}";
|
||||
meta.maintainers = with maintainers; [ pacien ];
|
||||
|
||||
machine = { ... }: {
|
||||
services.postgresql = {
|
||||
package = postgresqlPackage;
|
||||
enable = true;
|
||||
dataDir = postgresqlDataDir;
|
||||
extraConfig = ''
|
||||
wal_level = archive # alias for replica on pg >= 9.6
|
||||
max_wal_senders = 10
|
||||
max_replication_slots = 10
|
||||
'';
|
||||
authentication = ''
|
||||
host replication ${replicationUser} all trust
|
||||
'';
|
||||
initialScript = pkgs.writeText "init.sql" ''
|
||||
create user ${replicationUser} replication;
|
||||
select * from pg_create_physical_replication_slot('${replicationSlot}');
|
||||
'';
|
||||
};
|
||||
|
||||
services.postgresqlWalReceiver.receivers.main = {
|
||||
inherit postgresqlPackage;
|
||||
connection = replicationConn;
|
||||
slot = replicationSlot;
|
||||
directory = walBackupDir;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
# make an initial base backup
|
||||
$machine->waitForUnit('postgresql');
|
||||
$machine->waitForUnit('postgresql-wal-receiver-main');
|
||||
# WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other
|
||||
# required only for 9.4
|
||||
$machine->sleep(5);
|
||||
$machine->succeed('${postgresqlPackage}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}');
|
||||
|
||||
# create a dummy table with 100 records
|
||||
$machine->succeed('sudo -u postgres psql --command="create table dummy as select * from generate_series(1, 100) as val;"');
|
||||
|
||||
# stop postgres and destroy data
|
||||
$machine->systemctl('stop postgresql');
|
||||
$machine->systemctl('stop postgresql-wal-receiver-main');
|
||||
$machine->succeed('rm -r ${postgresqlDataDir}/{base,global,pg_*}');
|
||||
|
||||
# restore the base backup
|
||||
$machine->succeed('cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}');
|
||||
|
||||
# prepare WAL and recovery
|
||||
$machine->succeed('chmod a+rX -R ${walBackupDir}');
|
||||
$machine->execute('for part in ${walBackupDir}/*.partial; do mv $part ''${part%%.*}; done'); # make use of partial segments too
|
||||
$machine->succeed('cp ${recoveryConf} ${postgresqlDataDir}/recovery.conf && chmod 666 ${postgresqlDataDir}/recovery.conf');
|
||||
|
||||
# replay WAL
|
||||
$machine->systemctl('start postgresql');
|
||||
$machine->waitForFile('${postgresqlDataDir}/recovery.done');
|
||||
$machine->systemctl('restart postgresql');
|
||||
$machine->waitForUnit('postgresql');
|
||||
|
||||
# check that our records have been restored
|
||||
$machine->succeed('test $(sudo -u postgres psql --pset="pager=off" --tuples-only --command="select count(distinct val) from dummy;") -eq 100');
|
||||
'';
|
||||
};
|
||||
|
||||
in mapAttrs makePostgresqlWalReceiverTest (import ../../pkgs/servers/sql/postgresql pkgs)
|
@ -22,9 +22,13 @@ in {
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
my $config;
|
||||
|
||||
$machine->waitForUnit("syncthing-init.service");
|
||||
$machine->succeed("cat /var/lib/syncthing/config.xml") =~ /${testId}/ or die;
|
||||
$machine->succeed("cat /var/lib/syncthing/config.xml") =~ /testFolder/ or die;
|
||||
$config = $machine->succeed("cat /var/lib/syncthing/.config/syncthing/config.xml");
|
||||
|
||||
$config =~ /${testId}/ or die;
|
||||
$config =~ /testFolder/ or die;
|
||||
'';
|
||||
})
|
||||
|
||||
|
@ -2,23 +2,23 @@
|
||||
, pkgconfig, autoreconfHook
|
||||
, db5, openssl, boost, zlib, miniupnpc
|
||||
, protobuf, utillinux, qt4, qrencode
|
||||
, withGui }:
|
||||
, withGui, libevent }:
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dogecoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
||||
version = "1.10.0";
|
||||
version = "1.14.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dogecoin";
|
||||
repo = "dogecoin";
|
||||
rev = "v${version}";
|
||||
sha256 = "04rddx20d4fps2w3h1jxa2j8iyqpjv2fh897z0z3r06qjvjzf7rr";
|
||||
sha256 = "0nmbi5gmms16baqs3fmdp2xm0yf8wawnyz80gcmca4j5ph2zka1v";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
buildInputs = [ openssl db5 openssl utillinux
|
||||
protobuf boost zlib miniupnpc ]
|
||||
protobuf boost zlib miniupnpc libevent ]
|
||||
++ optionals withGui [ qt4 qrencode ];
|
||||
|
||||
configureFlags = [ "--with-incompatible-bdb"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "go-ethereum";
|
||||
version = "1.9.1";
|
||||
version = "1.9.2";
|
||||
|
||||
goPackagePath = "github.com/ethereum/go-ethereum";
|
||||
|
||||
@ -17,7 +17,7 @@ buildGoPackage rec {
|
||||
owner = "ethereum";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "05vnjdjwahdp2j7c6g81jchpdhxmdpbr20mjzpszylp9824v4cba";
|
||||
sha256 = "0lymwylh4j63fzj9jy7mcw676a2ksgpsj9mazif1r3d2q73h9m88";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "denemo-${version}";
|
||||
version = "2.2.0";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.gnu.org/gnu/denemo/denemo-${version}.tar.gz";
|
||||
sha256 = "18zcs4xmfj4vpzi15dj7k5bjzzzlr3sjf9xhrrgy4samrrdpqzfh";
|
||||
sha256 = "1blkcl3slbsq9jlhwcf2m9v9g38a0sjfhh9advgi2qr1gxri08by";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -1,10 +1,10 @@
|
||||
{ stdenv, lib, fetchzip, cmake, pkgconfig
|
||||
{ stdenv, mkDerivation, lib, fetchzip, cmake, pkgconfig
|
||||
, alsaLib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis
|
||||
, portaudio, portmidi, qtbase, qtdeclarative, qtscript, qtsvg, qttools
|
||||
, qtwebengine, qtxmlpatterns
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
mkDerivation rec {
|
||||
name = "musescore-${version}";
|
||||
version = "3.0.5";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, python3Packages, fetchFromGitHub, gettext, chromaprint }:
|
||||
{ stdenv, python3Packages, fetchFromGitHub, gettext, chromaprint, qt5 }:
|
||||
|
||||
let
|
||||
pythonPackages = python3Packages;
|
||||
@ -13,7 +13,7 @@ in pythonPackages.buildPythonApplication rec {
|
||||
sha256 = "1armg8vpvnbpk7rrfk9q7nj5gm56rza00ni9qwdyqpxp1xaz6apj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gettext ];
|
||||
nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ];
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
pyqt5
|
||||
@ -22,15 +22,16 @@ in pythonPackages.buildPythonApplication rec {
|
||||
discid
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
python setup.py install --prefix="$out"
|
||||
'';
|
||||
|
||||
prePatch = ''
|
||||
# Pesky unicode punctuation.
|
||||
substituteInPlace setup.cfg --replace "‘" "'"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
python setup.py install --prefix="$out"
|
||||
wrapQtApp $out/bin/picard
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://musicbrainz.org/doc/MusicBrainz_Picard;
|
||||
description = "The official MusicBrainz tagger";
|
||||
|
@ -3,12 +3,12 @@
|
||||
, libGLU, lv2, gtk2, cairo, pango, fftwFloat, zita-convolver }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "20190206";
|
||||
version = "20190714";
|
||||
name = "x42-plugins-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://gareus.org/misc/x42-plugins/${name}.tar.xz";
|
||||
sha256 = "0rsp8lm8zr20l410whr98d61401rkphgpl8llbn5p2wsiw0q9aqd";
|
||||
sha256 = "1mifmdy9pi1lg0h4nsvyjjnnni41vhgg34lks94mrx46wq90bgx4";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patchPhase = ''
|
||||
patchShebangs ./stepseq.lv2/gridgen.sh
|
||||
patchShebangs ./matrixmixer.lv2/genttl.sh #TODO: remove at next update, see https://github.com/x42/matrixmixer.lv2/issues/2
|
||||
patchShebangs ./matrixmixer.lv2/genhead.sh #TODO: remove at next update, see https://github.com/x42/matrixmixer.lv2/issues/2
|
||||
sed -i 's|/usr/include/zita-convolver.h|${zita-convolver}/include/zita-convolver.h|g' ./convoLV2/Makefile
|
||||
'';
|
||||
|
||||
|
@ -13,9 +13,9 @@ let
|
||||
sha256Hash = "090rc307mfm0yw4h592l9307lq4aas8zq0ci49csn6kxhds8rsrm";
|
||||
};
|
||||
betaVersion = {
|
||||
version = "3.5.0.19"; # "Android Studio 3.5 RC 2"
|
||||
build = "191.5763348";
|
||||
sha256Hash = "0z7mjpk0cqwk4ysd3cdsahlg70ax90353qvvag9wgyzl2x2sr6d2";
|
||||
version = "3.5.0.20"; # "Android Studio 3.5 RC 3"
|
||||
build = "191.5781497";
|
||||
sha256Hash = "03c5f01dqjvz55l8vyrpypjmmip96kc27p8sw0c5jky0igiyym5j";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "3.6.0.3"; # "Android Studio 3.6 Canary 3"
|
||||
|
@ -1,17 +1,17 @@
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkgconfig
|
||||
, curl, freetype, giflib, harfbuzz, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
|
||||
, libX11, libXext, libXcursor, libXxf86vm
|
||||
{ stdenv, lib, callPackage, fetchFromGitHub, fetchpatch, cmake, ninja, pkgconfig
|
||||
, curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
|
||||
, harfbuzzFull, glib, fontconfig, pcre
|
||||
, libX11, libXext, libXcursor, libXxf86vm, libGL
|
||||
, unfree ? false
|
||||
, cmark
|
||||
}:
|
||||
|
||||
# Unfree version is not redistributable:
|
||||
# https://dev.aseprite.org/2016/09/01/new-source-code-license/
|
||||
# Consider supporting the developer: https://aseprite.org/#buy
|
||||
|
||||
let
|
||||
skia = callPackage ./skia.nix {};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "aseprite-${version}";
|
||||
version = if unfree then "1.2.9" else "1.1.7";
|
||||
version = if unfree then "1.2.11" else "1.1.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aseprite";
|
||||
@ -19,21 +19,27 @@ stdenv.mkDerivation rec {
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = if unfree
|
||||
then "0a9xk163j0984n8nn6pqf27n83gr6w7g25wkiv591zx88pa6cpbd"
|
||||
then "1illr51jpg5g6nx29rav9dllyy5lzyyn7lj2fhrnpz1ysqgaq5p8"
|
||||
else "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
nativeBuildInputs = [
|
||||
cmake pkgconfig
|
||||
] ++ lib.optionals unfree [ ninja ];
|
||||
|
||||
buildInputs = [
|
||||
curl freetype giflib harfbuzz libjpeg libpng libwebp pixman tinyxml zlib
|
||||
curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib
|
||||
libX11 libXext libXcursor libXxf86vm
|
||||
] ++ lib.optionals unfree [ cmark harfbuzz ];
|
||||
] ++ lib.optionals unfree [
|
||||
cmark
|
||||
harfbuzzFull glib fontconfig pcre
|
||||
skia libGL
|
||||
];
|
||||
|
||||
patches = lib.optionals unfree [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/aseprite/aseprite/commit/cfb4dac6feef1f39e161c23c886055a8f9acfd0d.patch";
|
||||
sha256 = "1qhjfpngg8b1vvb9w26lhjjfamfx57ih0p31km3r5l96nm85l7f9";
|
||||
url = "https://github.com/lfont/aseprite/commit/f1ebc47012d3fed52306ed5922787b4b98cc0a7b.patch";
|
||||
sha256 = "03xg7x6b9iv7z18vzlqxhcfphmx4v3qhs9f5rgf38ppyklca5jyw";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/orivej/aseprite/commit/ea87e65b357ad0bd65467af5529183b5a48a8c17.patch";
|
||||
@ -67,6 +73,9 @@ stdenv.mkDerivation rec {
|
||||
"-DENABLE_CAT=OFF"
|
||||
"-DENABLE_CPIO=OFF"
|
||||
"-DENABLE_TAR=OFF"
|
||||
# UI backend.
|
||||
"-DLAF_OS_BACKEND=skia"
|
||||
"-DSKIA_DIR=${skia}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
@ -87,6 +96,24 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://www.aseprite.org/;
|
||||
description = "Animated sprite editor & pixel art tool";
|
||||
license = if unfree then licenses.unfree else licenses.gpl2;
|
||||
longDescription =
|
||||
''Aseprite is a program to create animated sprites. Its main features are:
|
||||
|
||||
- Sprites are composed by layers & frames (as separated concepts).
|
||||
- Supported color modes: RGBA, Indexed (palettes up to 256 colors), and Grayscale.
|
||||
- Load/save sequence of PNG files and GIF animations (and FLC, FLI, JPG, BMP, PCX, TGA).
|
||||
- Export/import animations to/from Sprite Sheets.
|
||||
- Tiled drawing mode, useful to draw patterns and textures.
|
||||
- Undo/Redo for every operation.
|
||||
- Real-time animation preview.
|
||||
- Multiple editors support.
|
||||
- Pixel-art specific tools like filled Contour, Polygon, Shading mode, etc.
|
||||
- Onion skinning.
|
||||
'' + lib.optionalString unfree
|
||||
''
|
||||
This version is not redistributable: https://dev.aseprite.org/2016/09/01/new-source-code-license/
|
||||
Consider supporting the developer: https://aseprite.org/#buy
|
||||
'';
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
23
pkgs/applications/editors/aseprite/skia-deps.nix
Normal file
23
pkgs/applications/editors/aseprite/skia-deps.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ fetchgit }:
|
||||
{
|
||||
angle2 = fetchgit {
|
||||
url = "https://chromium.googlesource.com/angle/angle.git";
|
||||
rev = "956ab4d9fab36be9929e63829475d4d69b2c681c";
|
||||
sha256 = "0fcw04wwkn3ixr9l9k0d32n78r9g72p31ii9i5spsq2d0wlylr38";
|
||||
};
|
||||
dng_sdk = fetchgit {
|
||||
url = "https://android.googlesource.com/platform/external/dng_sdk.git";
|
||||
rev = "96443b262250c390b0caefbf3eed8463ba35ecae";
|
||||
sha256 = "1rsr7njhj7c5p87hfznj069fdc3qqhvvnq9sa2rb8c4q849rlzx6";
|
||||
};
|
||||
piex = fetchgit {
|
||||
url = "https://android.googlesource.com/platform/external/piex.git";
|
||||
rev = "bb217acdca1cc0c16b704669dd6f91a1b509c406";
|
||||
sha256 = "05ipmag6k55jmidbyvg5mkqm69zfw03gfkqhi9jnjlmlbg31y412";
|
||||
};
|
||||
sfntly = fetchgit {
|
||||
url = "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git";
|
||||
rev = "b18b09b6114b9b7fe6fc2f96d8b15e8a72f66916";
|
||||
sha256 = "0zf1h0dibmm38ldypccg4faacvskmd42vsk6zbxlfcfwjlqm6pp4";
|
||||
};
|
||||
}
|
37
pkgs/applications/editors/aseprite/skia-make-deps.sh
Executable file
37
pkgs/applications/editors/aseprite/skia-make-deps.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
FILTER=$1
|
||||
OUT=skia-deps.nix
|
||||
REVISION=89e4ca4352d05adc892f5983b108433f29b2c0c2
|
||||
DEPS=$(curl -s https://raw.githubusercontent.com/aseprite/skia/$REVISION/DEPS)
|
||||
THIRD_PARTY_DEPS=$(echo "$DEPS" | grep third_party | grep "#" -v | sed 's/"//g')
|
||||
|
||||
function write_fetch_defs ()
|
||||
{
|
||||
while read -r DEP; do
|
||||
NAME=$(echo "$DEP" | cut -d: -f1 | cut -d/ -f3 | sed 's/ //g')
|
||||
URL=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f1 | sed 's/ //g')
|
||||
REV=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f2 | sed 's/[ ,]//g')
|
||||
|
||||
echo "Fetching $NAME@$REV"
|
||||
PREFETCH=$(nix-prefetch-git --rev "$REV" "$URL")
|
||||
|
||||
(
|
||||
cat <<EOF
|
||||
$NAME = fetchgit {
|
||||
url = "$URL";
|
||||
rev = "$REV";
|
||||
sha256 = $(echo $PREFETCH | jq '.sha256');
|
||||
};
|
||||
EOF
|
||||
) >> "$OUT"
|
||||
|
||||
echo "----------"
|
||||
echo
|
||||
done <<< "$1"
|
||||
}
|
||||
|
||||
echo "{ fetchgit }:" > "$OUT"
|
||||
echo "{" >> "$OUT"
|
||||
write_fetch_defs "$(echo "$THIRD_PARTY_DEPS" | grep -E "$FILTER")"
|
||||
echo "}" >> "$OUT"
|
68
pkgs/applications/editors/aseprite/skia.nix
Normal file
68
pkgs/applications/editors/aseprite/skia.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{ stdenv, lib, fetchFromGitHub, fetchgit, python2, gn, ninja
|
||||
, fontconfig, expat, icu58, libjpeg, libpng, libwebp, zlib
|
||||
, mesa, libX11
|
||||
}:
|
||||
|
||||
let
|
||||
# skia-deps.nix is generated by: ./skia-make-deps.sh 'angle2|dng_sdk|piex|sfntly'
|
||||
depSrcs = import ./skia-deps.nix { inherit fetchgit; };
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "skia-aseprite-m71";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aseprite";
|
||||
repo = "skia";
|
||||
# latest commit from aseprite-m71 branch
|
||||
rev = "89e4ca4352d05adc892f5983b108433f29b2c0c2";
|
||||
sha256 = "0n3vrkswvi6rib9zv2pzi18h3j5wm7flmgkgaikcm6q7iw4l2c7x";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python2 gn ninja ];
|
||||
|
||||
buildInputs = [
|
||||
fontconfig expat icu58 libjpeg libpng libwebp zlib
|
||||
mesa libX11
|
||||
];
|
||||
|
||||
preConfigure = with depSrcs; ''
|
||||
mkdir -p third_party/externals
|
||||
ln -s ${angle2} third_party/externals/angle2
|
||||
ln -s ${dng_sdk} third_party/externals/dng_sdk
|
||||
ln -s ${piex} third_party/externals/piex
|
||||
ln -s ${sfntly} third_party/externals/sfntly
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
gn gen out/Release --args="is_debug=false is_official_build=true"
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
ninja -C out/Release skia
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
|
||||
# Glob will match all subdirs.
|
||||
shopt -s globstar
|
||||
|
||||
# All these paths are used in some way when building aseprite.
|
||||
cp -r --parents -t $out/ \
|
||||
include/codec \
|
||||
include/config \
|
||||
include/core \
|
||||
include/effects \
|
||||
include/gpu \
|
||||
include/private \
|
||||
include/utils \
|
||||
out/Release/*.a \
|
||||
src/gpu/**/*.h \
|
||||
third_party/externals/angle2/include \
|
||||
third_party/skcms/**/*.h
|
||||
'';
|
||||
}
|
268
pkgs/applications/editors/emacs-modes/elpa-generated.nix
generated
268
pkgs/applications/editors/emacs-modes/elpa-generated.nix
generated
@ -39,10 +39,10 @@
|
||||
elpaBuild {
|
||||
pname = "ada-mode";
|
||||
ename = "ada-mode";
|
||||
version = "6.1.0";
|
||||
version = "6.1.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/ada-mode-6.1.0.tar";
|
||||
sha256 = "1qa4kjv5xxlj50fghg5516cxn8ckv8vlyarcab2isxjnnxnb6g7s";
|
||||
url = "https://elpa.gnu.org/packages/ada-mode-6.1.1.tar";
|
||||
sha256 = "090zyspc32fmfqwr0qpzi6qclsaarvb5484b0lq0cdyzgjhimdla";
|
||||
};
|
||||
packageRequires = [ cl-lib emacs wisi ];
|
||||
meta = {
|
||||
@ -84,10 +84,10 @@
|
||||
elpaBuild {
|
||||
pname = "adjust-parens";
|
||||
ename = "adjust-parens";
|
||||
version = "3.0";
|
||||
version = "3.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/adjust-parens-3.0.tar";
|
||||
sha256 = "16gmrgdfyqs7i617669f7xy5mds1svbyfv12xhdjk96rbssfngzg";
|
||||
url = "https://elpa.gnu.org/packages/adjust-parens-3.1.tar";
|
||||
sha256 = "059v0njd52vxidr5xwv2jmknm2shnwpj3101069q6lsmz1wq242a";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
@ -178,10 +178,10 @@
|
||||
elpaBuild {
|
||||
pname = "arbitools";
|
||||
ename = "arbitools";
|
||||
version = "0.976";
|
||||
version = "0.977";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/arbitools-0.976.el";
|
||||
sha256 = "08lvm921zhm22aghz17pps0b5g4f1xyyrl0qisdvd98kz1ajq7xr";
|
||||
url = "https://elpa.gnu.org/packages/arbitools-0.977.el";
|
||||
sha256 = "0nvdy14lqvy2ca4vw2qlr2kg2vv4y4sr8sa7kqrpf8cg7k9q3mbv";
|
||||
};
|
||||
packageRequires = [ cl-lib ];
|
||||
meta = {
|
||||
@ -204,7 +204,7 @@
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
async = callPackage ({ elpaBuild, fetchurl, lib }:
|
||||
async = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, nadvice }:
|
||||
elpaBuild {
|
||||
pname = "async";
|
||||
ename = "async";
|
||||
@ -213,7 +213,7 @@
|
||||
url = "https://elpa.gnu.org/packages/async-1.9.2.tar";
|
||||
sha256 = "17fnvrj7jww29sav6a6jpizclg4w2962m6h37akpii71gf0vrffw";
|
||||
};
|
||||
packageRequires = [];
|
||||
packageRequires = [ cl-lib nadvice ];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/async.html";
|
||||
license = lib.licenses.free;
|
||||
@ -735,10 +735,10 @@
|
||||
elpaBuild {
|
||||
pname = "debbugs";
|
||||
ename = "debbugs";
|
||||
version = "0.18";
|
||||
version = "0.19";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/debbugs-0.18.tar";
|
||||
sha256 = "00kich80zdg7v3v613f9prqddkpwpm1nf9sj10f0n6wh15rzwv07";
|
||||
url = "https://elpa.gnu.org/packages/debbugs-0.19.tar";
|
||||
sha256 = "0cpby8f088cqb5mpd756a2mb706x763k15cg2xdmmsxl415k3yw4";
|
||||
};
|
||||
packageRequires = [ cl-lib emacs soap-client ];
|
||||
meta = {
|
||||
@ -746,7 +746,7 @@
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
delight = callPackage ({ elpaBuild, fetchurl, lib }:
|
||||
delight = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, nadvice }:
|
||||
elpaBuild {
|
||||
pname = "delight";
|
||||
ename = "delight";
|
||||
@ -755,7 +755,7 @@
|
||||
url = "https://elpa.gnu.org/packages/delight-1.5.el";
|
||||
sha256 = "0kzlvzwmn6zj0874086q2xw0pclyi7wlkq48zh2lkd2796xm8vw7";
|
||||
};
|
||||
packageRequires = [];
|
||||
packageRequires = [ cl-lib nadvice ];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/delight.html";
|
||||
license = lib.licenses.free;
|
||||
@ -780,10 +780,10 @@
|
||||
elpaBuild {
|
||||
pname = "diff-hl";
|
||||
ename = "diff-hl";
|
||||
version = "1.8.6";
|
||||
version = "1.8.7";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/diff-hl-1.8.6.tar";
|
||||
sha256 = "02hvi5jxv2anf62lw878bdz6xk7xjhjd5q85pqihmadbpj6i6pfq";
|
||||
url = "https://elpa.gnu.org/packages/diff-hl-1.8.7.tar";
|
||||
sha256 = "1qcwicflvm6dxcflnlg891hyzwp2q79fdkdbdwp1440a0j09riam";
|
||||
};
|
||||
packageRequires = [ cl-lib emacs ];
|
||||
meta = {
|
||||
@ -870,10 +870,10 @@
|
||||
elpaBuild {
|
||||
pname = "djvu";
|
||||
ename = "djvu";
|
||||
version = "1.0.1";
|
||||
version = "1.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/djvu-1.0.1.el";
|
||||
sha256 = "1am4cm9csc5df3mbdby7j197j8yxv0x0maf6kfmn2ww1iwcyv8x6";
|
||||
url = "https://elpa.gnu.org/packages/djvu-1.1.el";
|
||||
sha256 = "0njgyx09q225hliacsnjk8wallg5i6xkz6bj501pb05nwqfbvfk7";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
@ -930,10 +930,10 @@
|
||||
elpaBuild {
|
||||
pname = "ebdb";
|
||||
ename = "ebdb";
|
||||
version = "0.6.8";
|
||||
version = "0.6.10";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/ebdb-0.6.8.tar";
|
||||
sha256 = "0bcs4f2l6cdg6hx3crk0vchhljhgwd1ik8n0p001gs1mk91178jp";
|
||||
url = "https://elpa.gnu.org/packages/ebdb-0.6.10.tar";
|
||||
sha256 = "0z0q7kcwczvdh0ddd775vv233j74sjlllv8pjm446bmy9cy6pg8j";
|
||||
};
|
||||
packageRequires = [ cl-lib emacs seq ];
|
||||
meta = {
|
||||
@ -990,10 +990,10 @@
|
||||
elpaBuild {
|
||||
pname = "eev";
|
||||
ename = "eev";
|
||||
version = "20190425";
|
||||
version = "20190517";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/eev-20190425.tar";
|
||||
sha256 = "0wffwdkk68hcnkggrfmx0ag3pmapdzwzq54sx8y0m68aw0by90y1";
|
||||
url = "https://elpa.gnu.org/packages/eev-20190517.tar";
|
||||
sha256 = "0hgjdax0kg2w7bf3idl6mw6m8j2wkh1253px42v2lbaxp6897m07";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -1030,10 +1030,10 @@
|
||||
elpaBuild {
|
||||
pname = "el-search";
|
||||
ename = "el-search";
|
||||
version = "1.12.5";
|
||||
version = "1.12.6.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/el-search-1.12.5.tar";
|
||||
sha256 = "0q6fnjp2hh8p1l7wj7645szlz6qxdfy71s0xljjrmc2836i32xzc";
|
||||
url = "https://elpa.gnu.org/packages/el-search-1.12.6.1.tar";
|
||||
sha256 = "150f4rirg107hmzpv8ifa32k2mgf07smbf9z44ln5rh8n17xwqah";
|
||||
};
|
||||
packageRequires = [ cl-print emacs stream ];
|
||||
meta = {
|
||||
@ -1132,10 +1132,10 @@
|
||||
elpaBuild {
|
||||
pname = "excorporate";
|
||||
ename = "excorporate";
|
||||
version = "0.8.1";
|
||||
version = "0.8.3";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/excorporate-0.8.1.tar";
|
||||
sha256 = "1k89472x80wsn14y16km5bgynmmd2kbdfhylb3cc17jvdn1xr53y";
|
||||
url = "https://elpa.gnu.org/packages/excorporate-0.8.3.tar";
|
||||
sha256 = "04bsbiwgfbfd501qvwh0iwyk0xh442kjfj73b3876idwj3p8alr5";
|
||||
};
|
||||
packageRequires = [ emacs fsm nadvice soap-client url-http-ntlm ];
|
||||
meta = {
|
||||
@ -1207,10 +1207,10 @@
|
||||
elpaBuild {
|
||||
pname = "flymake";
|
||||
ename = "flymake";
|
||||
version = "1.0.6";
|
||||
version = "1.0.8";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/flymake-1.0.6.el";
|
||||
sha256 = "10n9vnabiz3m5gs3azc76x7y1p9qhc6aspgygw7awq9ff6hhkhbw";
|
||||
url = "https://elpa.gnu.org/packages/flymake-1.0.8.el";
|
||||
sha256 = "1hqxrqb227v4ncjjqx8im3c4mhg8w5yjbz9hpfcm5x8xnr2yd6bp";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -1222,10 +1222,10 @@
|
||||
elpaBuild {
|
||||
pname = "fountain-mode";
|
||||
ename = "fountain-mode";
|
||||
version = "2.7.1";
|
||||
version = "2.7.3";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/fountain-mode-2.7.1.el";
|
||||
sha256 = "198ls0rvzgpb942mvjyljgbaxp05wjys1a003bfq528przv0vpaz";
|
||||
url = "https://elpa.gnu.org/packages/fountain-mode-2.7.3.el";
|
||||
sha256 = "1sz3qp3y52d05jd006zc99r4ryignpa2jgfk72rw3zfqmikzv15j";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -1252,10 +1252,10 @@
|
||||
elpaBuild {
|
||||
pname = "frog-menu";
|
||||
ename = "frog-menu";
|
||||
version = "0.2.8";
|
||||
version = "0.2.9";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/frog-menu-0.2.8.el";
|
||||
sha256 = "18f937lvhw2dxwldahim13pr3ppndssjp0dis95iaspiwg9mwc4h";
|
||||
url = "https://elpa.gnu.org/packages/frog-menu-0.2.9.el";
|
||||
sha256 = "1gjhypsafpqybcbwi49qi1g419hcq9qv4p940ybspydg9gqk3gmp";
|
||||
};
|
||||
packageRequires = [ avy emacs posframe ];
|
||||
meta = {
|
||||
@ -1596,10 +1596,10 @@
|
||||
elpaBuild {
|
||||
pname = "ivy";
|
||||
ename = "ivy";
|
||||
version = "0.11.0";
|
||||
version = "0.12.0";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/ivy-0.11.0.tar";
|
||||
sha256 = "1pxapdc7jarqc8lf3a3fsn4nsi4j146dh07f89xkj087psq30v50";
|
||||
url = "https://elpa.gnu.org/packages/ivy-0.12.0.tar";
|
||||
sha256 = "14q9kh48iabrnhwcmhlvgk7sg4a0j5c3zjp0yzj1ijrz5zbdhxxz";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -1746,10 +1746,10 @@
|
||||
elpaBuild {
|
||||
pname = "let-alist";
|
||||
ename = "let-alist";
|
||||
version = "1.0.5";
|
||||
version = "1.0.6";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/let-alist-1.0.5.el";
|
||||
sha256 = "0r7b9jni50la1m79kklml11syg8d2fmdlr83pv005sv1wh02jszw";
|
||||
url = "https://elpa.gnu.org/packages/let-alist-1.0.6.el";
|
||||
sha256 = "0szj7vnjzz4zci5fvz7xqgcpi4pzdyyf4qi2s8xar2hi7v3yaawr";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -2250,10 +2250,10 @@
|
||||
elpaBuild {
|
||||
pname = "org";
|
||||
ename = "org";
|
||||
version = "9.2.3";
|
||||
version = "9.2.5";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/org-9.2.3.tar";
|
||||
sha256 = "0hqy4lns9q5p0l1ylgmlckqprn9sbasszhznanmv0rsh0gzhsbyw";
|
||||
url = "https://elpa.gnu.org/packages/org-9.2.5.tar";
|
||||
sha256 = "1pid1sykgz83i4ry5n8f270finag6sm7ckqxn5lkikyya43wlzx1";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
@ -2366,6 +2366,21 @@
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
path-iterator = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "path-iterator";
|
||||
ename = "path-iterator";
|
||||
version = "1.0";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/path-iterator-1.0.tar";
|
||||
sha256 = "0kgl7rhv9x23jyr6ahfy6ql447zpz9fnmfwldkpn69g7jdx6a3cc";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/path-iterator.html";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
peg = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "peg";
|
||||
@ -2381,6 +2396,36 @@
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
persist = callPackage ({ elpaBuild, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "persist";
|
||||
ename = "persist";
|
||||
version = "0.4";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/persist-0.4.tar";
|
||||
sha256 = "0gpxy41qawzss2526j9a7lys60vqma1lvamn4bfabwza7gfhac0q";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/persist.html";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
phps-mode = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "phps-mode";
|
||||
ename = "phps-mode";
|
||||
version = "0.2.3";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/phps-mode-0.2.3.tar";
|
||||
sha256 = "1wp04d5mi97287qwhic239kkf4r69839gl0hsn5m8qr3dbkhqxy5";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/phps-mode.html";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
pinentry = callPackage ({ elpaBuild, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "pinentry";
|
||||
@ -2415,10 +2460,10 @@
|
||||
elpaBuild {
|
||||
pname = "posframe";
|
||||
ename = "posframe";
|
||||
version = "0.4.3";
|
||||
version = "0.5.0";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/posframe-0.4.3.el";
|
||||
sha256 = "06q0p4qim6lha2xr9fxaspbzw01xn01ik9gxlld6hdhh19b65cmi";
|
||||
url = "https://elpa.gnu.org/packages/posframe-0.5.0.el";
|
||||
sha256 = "1fjnpwg1fj9j54nymh802vd4viggrg3qnqwh52281n7zv6xfv0qb";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -2556,10 +2601,10 @@
|
||||
elpaBuild {
|
||||
pname = "realgud";
|
||||
ename = "realgud";
|
||||
version = "1.5.0";
|
||||
version = "1.5.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/realgud-1.5.0.tar";
|
||||
sha256 = "0bfshrgkfrfb1d8insnb5n25230xd0scdk6bijhgh34q2phjy2fy";
|
||||
url = "https://elpa.gnu.org/packages/realgud-1.5.1.tar";
|
||||
sha256 = "01155sydricdvxy3djk64w2zc6x0q4j669bvz8m8rd766wsmida8";
|
||||
};
|
||||
packageRequires = [ emacs load-relative loc-changes test-simple ];
|
||||
meta = {
|
||||
@ -2710,10 +2755,10 @@
|
||||
elpaBuild {
|
||||
pname = "relint";
|
||||
ename = "relint";
|
||||
version = "1.8";
|
||||
version = "1.9";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/relint-1.8.el";
|
||||
sha256 = "1bl6m2h7131acbmr0kqfnjjpv2syiv2mxfnm61g874ynnvkmmkm3";
|
||||
url = "https://elpa.gnu.org/packages/relint-1.9.el";
|
||||
sha256 = "0y386kch263199mwl93ambwib948s2vrw466kf0ly9cxv7xpv6hr";
|
||||
};
|
||||
packageRequires = [ xr ];
|
||||
meta = {
|
||||
@ -2971,10 +3016,10 @@
|
||||
elpaBuild {
|
||||
pname = "sql-indent";
|
||||
ename = "sql-indent";
|
||||
version = "1.3";
|
||||
version = "1.4";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/sql-indent-1.3.tar";
|
||||
sha256 = "0zira8my1q975bad2h76bz4yddjzf0dskvy6x865np86rmzd0c9w";
|
||||
url = "https://elpa.gnu.org/packages/sql-indent-1.4.tar";
|
||||
sha256 = "1nilxfm30nb2la1463729rgbgbma7igkf0z325k8cbapqanb1wgl";
|
||||
};
|
||||
packageRequires = [ cl-lib ];
|
||||
meta = {
|
||||
@ -3016,10 +3061,10 @@
|
||||
elpaBuild {
|
||||
pname = "svg";
|
||||
ename = "svg";
|
||||
version = "0.2";
|
||||
version = "1.0";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/svg-0.2.el";
|
||||
sha256 = "14yfi27v3zdzh1chcjiq4l63iwh0vd99wv1z4w7agr33540jybc5";
|
||||
url = "https://elpa.gnu.org/packages/svg-1.0.el";
|
||||
sha256 = "1hh0x7sz2rqb7zdhcm2q9knr8nnwqrsbz1zfp29k8l1318li9f62";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -3046,10 +3091,10 @@
|
||||
elpaBuild {
|
||||
pname = "system-packages";
|
||||
ename = "system-packages";
|
||||
version = "1.0.10";
|
||||
version = "1.0.11";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/system-packages-1.0.10.tar";
|
||||
sha256 = "1vwf2j0fxrsqmrgc7x5nkkg0vlhwgxppc4w7kb5is6dgrssskpb5";
|
||||
url = "https://elpa.gnu.org/packages/system-packages-1.0.11.tar";
|
||||
sha256 = "0xf2q5bslxpw0wycgi2k983lnfpw182rgdzq0f99f64kb7ifns9y";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
@ -3132,6 +3177,21 @@
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
tramp = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "tramp";
|
||||
ename = "tramp";
|
||||
version = "2.4.2.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/tramp-2.4.2.1.tar";
|
||||
sha256 = "139y05b2m715zryxqw7k438cc137mziz2k5nbzrrahddfz0i3cf9";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/tramp.html";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
tramp-theme = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "tramp-theme";
|
||||
@ -3207,6 +3267,21 @@
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
uniquify-files = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "uniquify-files";
|
||||
ename = "uniquify-files";
|
||||
version = "1.0";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/uniquify-files-1.0.tar";
|
||||
sha256 = "1n1r3pmnh9b8zb7pyv158pzmvha4gqqrfrapvpjdcrcnnd2dynkm";
|
||||
};
|
||||
packageRequires = [ emacs ];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/uniquify-files.html";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
url-http-ntlm = callPackage ({ cl-lib ? null
|
||||
, elpaBuild
|
||||
, fetchurl
|
||||
@ -3276,6 +3351,23 @@
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
verilog-mode = callPackage ({ elpaBuild
|
||||
, fetchurl
|
||||
, lib }:
|
||||
elpaBuild {
|
||||
pname = "verilog-mode";
|
||||
ename = "verilog-mode";
|
||||
version = "2019.6.21.103209889";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/verilog-mode-2019.6.21.103209889.el";
|
||||
sha256 = "0hlcp2jhm30bzx6iabdb31aqv0dmmim30g9z5kqb0hl1bd1dnm9m";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
homepage = "https://elpa.gnu.org/packages/verilog-mode.html";
|
||||
license = lib.licenses.free;
|
||||
};
|
||||
}) {};
|
||||
vigenere = callPackage ({ elpaBuild, emacs, fetchurl, lib }:
|
||||
elpaBuild {
|
||||
pname = "vigenere";
|
||||
@ -3358,10 +3450,10 @@
|
||||
elpaBuild {
|
||||
pname = "wcheck-mode";
|
||||
ename = "wcheck-mode";
|
||||
version = "2016.1.30";
|
||||
version = "2019.6.17";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/wcheck-mode-2016.1.30.el";
|
||||
sha256 = "0hzrxnslfl04h083njy7wp4hhgrqpyz0cnm73v348kr1i4wx9xjq";
|
||||
url = "https://elpa.gnu.org/packages/wcheck-mode-2019.6.17.el";
|
||||
sha256 = "0579a3p9swq0j0fca9s885kzv69y9lhhnqa6m4pzdgrr6pfrirqv";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
@ -3418,10 +3510,10 @@
|
||||
elpaBuild {
|
||||
pname = "websocket";
|
||||
ename = "websocket";
|
||||
version = "1.9";
|
||||
version = "1.11.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/websocket-1.9.tar";
|
||||
sha256 = "00sd0dawpjcr79w6klya5ywq9r1p86d97z62vqpjij6yg5qv470f";
|
||||
url = "https://elpa.gnu.org/packages/websocket-1.11.1.tar";
|
||||
sha256 = "09s8qyi012djmm3vrj1qg1zqqy0h0cbcfzfkhybvqi4amy4jgliw";
|
||||
};
|
||||
packageRequires = [ cl-lib ];
|
||||
meta = {
|
||||
@ -3463,10 +3555,10 @@
|
||||
elpaBuild {
|
||||
pname = "wisi";
|
||||
ename = "wisi";
|
||||
version = "2.1.0";
|
||||
version = "2.1.1";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/wisi-2.1.0.tar";
|
||||
sha256 = "143xfdr7agyc52wz9zsx67rvvnjs4rlj7j3cbdhvs6wyl7whyg38";
|
||||
url = "https://elpa.gnu.org/packages/wisi-2.1.1.tar";
|
||||
sha256 = "0j7pnjik07j2ipj3xavhayngnmk5jdglq78azrjvwni88m12920n";
|
||||
};
|
||||
packageRequires = [ cl-lib emacs seq ];
|
||||
meta = {
|
||||
@ -3493,10 +3585,10 @@
|
||||
elpaBuild {
|
||||
pname = "xclip";
|
||||
ename = "xclip";
|
||||
version = "1.8";
|
||||
version = "1.9";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/xclip-1.8.el";
|
||||
sha256 = "1ymc9dhpwbh92ad7w64p8xlrjdws5c9h90h47ckh6479h8r697xg";
|
||||
url = "https://elpa.gnu.org/packages/xclip-1.9.el";
|
||||
sha256 = "0xbs6fw0dfm5iynhdx62cwixzizjkrwrib6n0fjnsj31kajbkf3y";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
@ -3538,10 +3630,10 @@
|
||||
elpaBuild {
|
||||
pname = "xr";
|
||||
ename = "xr";
|
||||
version = "1.12";
|
||||
version = "1.13";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/xr-1.12.tar";
|
||||
sha256 = "1vv87h0h8ldc1mbsn45w5z1m6jq8j2js4xz23a9ixdby06g60y3g";
|
||||
url = "https://elpa.gnu.org/packages/xr-1.13.tar";
|
||||
sha256 = "1km4x92pii8c4bcimks4xzhmwpypdf183z0zh7raj062jz4jb74r";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
@ -3586,10 +3678,10 @@
|
||||
elpaBuild {
|
||||
pname = "zones";
|
||||
ename = "zones";
|
||||
version = "2019.4.30";
|
||||
version = "2019.7.13";
|
||||
src = fetchurl {
|
||||
url = "https://elpa.gnu.org/packages/zones-2019.4.30.el";
|
||||
sha256 = "0f0ryd9wnkg7vh2jv30bqhpzzkaf0gc2ysmib6y36s3m8c2sa9b6";
|
||||
url = "https://elpa.gnu.org/packages/zones-2019.7.13.el";
|
||||
sha256 = "0qp1ba2pkqx9d35g7z8hf8qs2k455krf2a92l4rka3ipsbnmq5k1";
|
||||
};
|
||||
packageRequires = [];
|
||||
meta = {
|
||||
|
@ -50,6 +50,15 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
|
||||
# part of a larger package
|
||||
caml = dontConfigure super.caml;
|
||||
|
||||
cmake-mode = super.cmake-mode.overrideAttrs (attrs: {
|
||||
buildInputs = (attrs.buildInputs or []) ++ [
|
||||
external.openssl
|
||||
];
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [
|
||||
external.pkgconfig
|
||||
];
|
||||
});
|
||||
|
||||
# Expects bash to be at /bin/bash
|
||||
company-rtags = markBroken super.company-rtags;
|
||||
|
||||
@ -215,6 +224,24 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
|
||||
# upstream issue: missing file header
|
||||
tawny-mode = markBroken super.tawny-mode;
|
||||
|
||||
# Telega has a server portion for it's network protocol
|
||||
telega = super.telega.overrideAttrs(old: {
|
||||
|
||||
buildInputs = old.buildInputs ++ [ pkgs.tdlib ];
|
||||
|
||||
postBuild = ''
|
||||
cd source/server
|
||||
make
|
||||
cd -
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
install -m755 -Dt $out/bin ./source/server/telega-server
|
||||
'';
|
||||
|
||||
});
|
||||
|
||||
# upstream issue: missing file header
|
||||
textmate = markBroken super.textmate;
|
||||
|
||||
@ -232,55 +259,6 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
|
||||
# upstream issue: missing file header
|
||||
window-numbering = markBroken super.window-numbering;
|
||||
|
||||
vterm = let
|
||||
emacsSources = pkgs.stdenv.mkDerivation {
|
||||
name = self.emacs.name + "-sources";
|
||||
src = self.emacs.src;
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
fixupPhase = ":";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -a * $out
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
libvterm = pkgs.libvterm-neovim.overrideAttrs(old: rec {
|
||||
pname = "libvterm-neovim";
|
||||
version = "2019-04-27";
|
||||
name = pname + "-" + version;
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "neovim";
|
||||
repo = "libvterm";
|
||||
rev = "89675ffdda615ffc3f29d1c47a933f4f44183364";
|
||||
sha256 = "0l9ixbj516vl41v78fi302ws655xawl7s94gmx1kb3fmfgamqisy";
|
||||
};
|
||||
});
|
||||
|
||||
in pkgs.stdenv.mkDerivation rec {
|
||||
inherit (super.vterm) name version src;
|
||||
|
||||
nativeBuildInputs = [ pkgs.cmake ];
|
||||
buildInputs = [ self.emacs libvterm ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DEMACS_SOURCE=${emacsSources}"
|
||||
"-DUSE_SYSTEM_LIBVTERM=True"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/share/emacs/site-lisp
|
||||
install ../*.el $out/share/emacs/site-lisp
|
||||
install ../*.so $out/share/emacs/site-lisp
|
||||
'';
|
||||
};
|
||||
# Legacy alias
|
||||
emacs-libvterm = shared.vterm;
|
||||
|
||||
zmq = super.zmq.overrideAttrs(old: {
|
||||
stripDebugList = [ "share" ];
|
||||
preBuild = ''
|
||||
@ -443,6 +421,55 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
|
||||
(attrs.nativeBuildInputs or []) ++ [ external.git ];
|
||||
});
|
||||
|
||||
vterm = let
|
||||
emacsSources = pkgs.stdenv.mkDerivation {
|
||||
name = self.emacs.name + "-sources";
|
||||
src = self.emacs.src;
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
fixupPhase = ":";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -a * $out
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
libvterm = pkgs.libvterm-neovim.overrideAttrs(old: rec {
|
||||
pname = "libvterm-neovim";
|
||||
version = "2019-04-27";
|
||||
name = pname + "-" + version;
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "neovim";
|
||||
repo = "libvterm";
|
||||
rev = "89675ffdda615ffc3f29d1c47a933f4f44183364";
|
||||
sha256 = "0l9ixbj516vl41v78fi302ws655xawl7s94gmx1kb3fmfgamqisy";
|
||||
};
|
||||
});
|
||||
|
||||
in pkgs.stdenv.mkDerivation rec {
|
||||
inherit (super.vterm) name version src;
|
||||
|
||||
nativeBuildInputs = [ pkgs.cmake ];
|
||||
buildInputs = [ self.emacs libvterm ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DEMACS_SOURCE=${emacsSources}"
|
||||
"-DUSE_SYSTEM_LIBVTERM=True"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/share/emacs/site-lisp
|
||||
install ../*.el $out/share/emacs/site-lisp
|
||||
install ../*.so $out/share/emacs/site-lisp
|
||||
'';
|
||||
};
|
||||
# Legacy alias
|
||||
emacs-libvterm = unstable.vterm;
|
||||
|
||||
w3m = super.w3m.override (args: {
|
||||
melpaBuild = drv: args.melpaBuild (drv // {
|
||||
prePatch =
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kdev-php";
|
||||
version = "5.3.3";
|
||||
version = "5.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz";
|
||||
sha256 = "0nn3yfbi60h7p7p1w2pvgg098qplbds79rk2iadyvhvl3sjd77wf";
|
||||
sha256 = "1lfl8y1nmai7kp7jil8cykalw2ib0f3n47jvnz7302qsrs3lvhf2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules ];
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kdev-python";
|
||||
version = "5.3.3";
|
||||
version = "5.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz";
|
||||
sha256 = "0bqsny2jgi6wi1cz65i2j9r1hiwna2x10mzy7vdk8bz7b4z766yg";
|
||||
sha256 = "1bsls5gf8jcb5zmswz82x8whfqadpgcapfc8sxvpjv5yhnjknk8c";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -7,16 +7,13 @@
|
||||
, libksysguard, konsole, llvmPackages, makeWrapper, kpurpose, boost
|
||||
}:
|
||||
|
||||
let
|
||||
qtVersion = "5.${lib.versions.minor qtbase.version}";
|
||||
in
|
||||
mkDerivation rec {
|
||||
pname = "kdevelop";
|
||||
version = "5.3.3";
|
||||
version = "5.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
|
||||
sha256 = "0778587qvi268ab2fgggfl40cv2swgr8q891q1paflp3m1xirpff";
|
||||
sha256 = "0zi59xlw6facak1jfzlyviwmpjn98dmircmjyqiv3ac5xr30f0ll";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -44,13 +41,6 @@ mkDerivation rec {
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
postPatch = ''
|
||||
# FIXME: temporary until https://invent.kde.org/kde/kdevelop/merge_requests/8 is merged
|
||||
substituteInPlace kdevplatform/language/backgroundparser/parsejob.cpp --replace \
|
||||
'if (internalFilePath.startsWith(dataPath.canonicalPath() + QStringLiteral("/kdev"))) {' \
|
||||
'if (internalFilePath.startsWith(dataPath.canonicalPath() + QStringLiteral("/kdev")) || localFile.startsWith(path + QStringLiteral("/kdev"))) {'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# The kdevelop! script (shell environment) needs qdbus and kioclient5 in PATH.
|
||||
wrapProgram "$out/bin/kdevelop!" \
|
||||
|
@ -100,7 +100,7 @@ let
|
||||
# Only display the log on error since it will contain a few normally
|
||||
# irrelevant messages.
|
||||
if ! $out/bin/nvim \
|
||||
-u ${vimUtils.vimrcFile (configure // { customRC = ""; })} \
|
||||
-u ${vimUtils.vimrcFile (configure // { customRC = ""; beforePlugins = ''filetype indent plugin on | syn on''; })} \
|
||||
-i NONE -n \
|
||||
-E -V1rplugins.log -s \
|
||||
+UpdateRemotePlugins +quit! > outfile 2>&1; then
|
||||
|
@ -3,7 +3,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "10.0";
|
||||
version = "11.0";
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "netbeans";
|
||||
exec = "netbeans";
|
||||
@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
||||
name = "netbeans-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/incubator/netbeans/incubating-netbeans/incubating-${version}/incubating-netbeans-${version}-bin.zip";
|
||||
sha512 = "ba83575f42c1d5515e2a5336a621bc2b4087b2e0bcacb6edb76f376f8272555609bdd4eefde8beae8ffc6c1a7db2fb721b844638ce27933c3dd78f71cbb41ad8";
|
||||
sha512 = "15mv59njrnq3sjfzb0n7xcc79kpixygf37cxvbswnvm651cw6lb1i9w8wbjivh0z4zcf3f62vbmshxh5pkaxqpqsg0iyy6gddfbwzwx";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
|
@ -1,9 +1,8 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit}:
|
||||
{ mkDerivation, lib, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit }:
|
||||
|
||||
let
|
||||
mkDerivation rec {
|
||||
pname = "notepadqq";
|
||||
version = "1.4.8";
|
||||
in stdenv.mkDerivation {
|
||||
name = "notepadqq-${version}";
|
||||
src = fetchFromGitHub {
|
||||
owner = "notepadqq";
|
||||
repo = "notepadqq";
|
||||
@ -24,13 +23,19 @@ in stdenv.mkDerivation {
|
||||
export LRELEASE="lrelease"
|
||||
'';
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preFixup = ''
|
||||
wrapQtApp $out/bin/notepadqq
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
homepage = https://notepadqq.com/;
|
||||
description = "Notepad++-like editor for the Linux desktop";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ rszibele ];
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.rszibele ];
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, pkgconfig, makeWrapper
|
||||
{ stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, makeWrapper
|
||||
, boost, xercesc
|
||||
, qtbase, qttools, qtwebkit, qtxmlpatterns
|
||||
, python3, python3Packages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
mkDerivation rec {
|
||||
name = "sigil-${version}";
|
||||
version = "0.9.14";
|
||||
|
||||
@ -17,17 +17,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
pythonPath = with python3Packages; [ lxml ];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ lxml ];
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
boost xercesc qtbase qttools qtwebkit qtxmlpatterns
|
||||
python3 python3Packages.lxml ];
|
||||
python3Packages.lxml ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram "$out/bin/sigil" \
|
||||
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath ${python3Packages.lxml})
|
||||
--prefix PYTHONPATH : $PYTHONPATH \
|
||||
''${qtWrapperArgs[@]}
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
description = "Free, open source, multi-platform ebook (ePub) editor";
|
||||
homepage = https://github.com/Sigil-Ebook/Sigil/;
|
||||
license = licenses.gpl3;
|
||||
maintainers =[ maintainers.ramkromberg ];
|
||||
# currently unmaintained
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, appimage-run, fetchurl, runtimeShell }:
|
||||
|
||||
let
|
||||
version = "3.0.6";
|
||||
version = "3.0.15";
|
||||
|
||||
plat = {
|
||||
"i386-linux" = "i386";
|
||||
@ -9,8 +9,8 @@ let
|
||||
}.${stdenv.hostPlatform.system};
|
||||
|
||||
sha256 = {
|
||||
"i386-linux" = "0czhlbacjks9x8y2w46nzlvk595psqhqw0vl0bvsq7sz768dk0ni";
|
||||
"x86_64-linux" = "0haji9h8rrm9yvqdv6i2y6xdd0yhsssjjj83hmf6cb868lwyigsf";
|
||||
"i386-linux" = "0v2nsis6vb1lnhmjd28vrfxqwwpycv02j0nvjlfzcgj4b3400j7a";
|
||||
"x86_64-linux" = "130n586cw0836zsbwqcz3pp3h0d4ny74ngqs4k4cvfb92556r7xh";
|
||||
}.${stdenv.hostPlatform.system};
|
||||
in
|
||||
|
||||
|
@ -11,13 +11,13 @@ let
|
||||
archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz";
|
||||
|
||||
sha256 = {
|
||||
"x86_64-linux" = "1ck13xpnfklfc81jd8d5md09fcp0gjypacdqj276mzhr5mig29cd";
|
||||
"x86_64-darwin" = "0xpzm372swv0by22saxib16fvvvfjr7d68aj3l5dsl5c9a8v23qj";
|
||||
"x86_64-linux" = "17g7mra9a52qlrrj77cw16vqvc7fsvbhc03wrl4iq1afzxsyqi22";
|
||||
"x86_64-darwin" = "1is04anvhl2b354h5w7i5qi7ixhzna277f7xdy4qj9gjby6zydc6";
|
||||
}.${system};
|
||||
in
|
||||
callPackage ./generic.nix rec {
|
||||
|
||||
version = "1.36.1";
|
||||
version = "1.37.0";
|
||||
pname = "vscode";
|
||||
|
||||
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, cmake, ninja, coin3d, xercesc, ode, eigen, qt5, opencascade-occt, gts
|
||||
{ stdenv, mkDerivation, fetchurl, cmake, ninja, coin3d, xercesc, ode, eigen, qt5, opencascade-occt, gts
|
||||
, hdf5, vtk, medfile, zlib, python3Packages, swig, gfortran, libXmu
|
||||
, soqt, libf2c, libGLU, makeWrapper, pkgconfig
|
||||
, mpi ? null }:
|
||||
@ -7,7 +7,7 @@ assert mpi != null;
|
||||
|
||||
let
|
||||
pythonPackages = python3Packages;
|
||||
in stdenv.mkDerivation rec {
|
||||
in mkDerivation rec {
|
||||
name = "freecad-${version}";
|
||||
version = "0.18.3";
|
||||
|
||||
@ -46,12 +46,13 @@ in stdenv.mkDerivation rec {
|
||||
# Their main() removes PYTHONPATH=, and we rely on it.
|
||||
preConfigure = ''
|
||||
sed '/putenv("PYTHONPATH/d' -i src/Main/MainGui.cpp
|
||||
|
||||
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/FreeCAD --prefix PYTHONPATH : $PYTHONPATH \
|
||||
--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1
|
||||
'';
|
||||
qtWrapperArgs = [
|
||||
"--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
mv $out/share/doc $out
|
||||
@ -59,9 +60,9 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
|
||||
homepage = https://www.freecadweb.org/;
|
||||
homepage = "https://www.freecadweb.org/";
|
||||
license = licenses.lgpl2Plus;
|
||||
maintainers = [ maintainers.viric ];
|
||||
maintainers = with maintainers; [ viric gebner ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
68
pkgs/applications/graphics/ideogram/default.nix
Normal file
68
pkgs/applications/graphics/ideogram/default.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pkgconfig
|
||||
, python3
|
||||
, glib
|
||||
, gtk3
|
||||
, meson
|
||||
, ninja
|
||||
, libgee
|
||||
, pantheon
|
||||
, desktop-file-utils
|
||||
, xorg
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ideogram";
|
||||
version = "1.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cassidyjames";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1qakgg3y4n2vcnykk2004ndvwmjbk2yy0p4j30mlb7p14dxscif6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
desktop-file-utils
|
||||
meson
|
||||
ninja
|
||||
pantheon.vala
|
||||
pkgconfig
|
||||
python3
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
gtk3
|
||||
libgee
|
||||
pantheon.granite
|
||||
xorg.libX11
|
||||
xorg.libXtst
|
||||
];
|
||||
|
||||
patches = [
|
||||
# See: https://github.com/cassidyjames/ideogram/issues/26
|
||||
(fetchpatch {
|
||||
url = "https://github.com/cassidyjames/ideogram/commit/65994ee11bd21f8316b057cec01afbf50639a708.patch";
|
||||
sha256 = "12vrvvggpqq53dmhbm7gbbbigncn19m1fjln9wxaady21m0w776c";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x meson/post_install.py
|
||||
patchShebangs meson/post_install.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Insert emoji anywhere, even in non-native apps - designed for elementary OS";
|
||||
homepage = https://github.com/cassidyjames/ideogram;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = pantheon.maintainers;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
}
|
@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "pdfcpu";
|
||||
version = "0.2.2";
|
||||
version = "0.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hhrutter";
|
||||
owner = "pdfcpu";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1knvi0v9nfzw40dayrw5cjidg9h900143v1pi6240yd7r7isx348";
|
||||
sha256 = "11q57j3wzmy2glkv53i9n7jkp14x4bqm20f3rqs3gkm4j9bcas4y";
|
||||
};
|
||||
|
||||
modSha256 = "0cz4gs88s9z2yv1gc9ap92vv2j93ab6kr25zjgl2r7z6clbl5fzp";
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ stdenv, fetchurl, python3Packages
|
||||
{ stdenv, mkDerivationWith, fetchurl, python3Packages
|
||||
, file, intltool, gobject-introspection, libgudev
|
||||
, udisks, gexiv2, gst_all_1, libnotify
|
||||
, exiftool, gdk-pixbuf, libmediainfo, vmtouch
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
mkDerivationWith python3Packages.buildPythonApplication rec {
|
||||
pname = "rapid-photo-downloader";
|
||||
version = "0.9.14";
|
||||
version = "0.9.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/rapid/pyqt/${version}/+download/${pname}-${version}.tar.gz";
|
||||
sha256 = "1nywkkyxlpzq3s9anza9k67j5689pfclfha218frih36qdb0j258";
|
||||
sha256 = "14s8x2qp1li05pailflw1nprp79q0aa7lb92hnwa1air8756z7al";
|
||||
};
|
||||
|
||||
# Disable version check and fix install tests
|
||||
@ -64,6 +64,7 @@ python3Packages.buildPythonApplication rec {
|
||||
requests
|
||||
colorlog
|
||||
pyprind
|
||||
tenacity
|
||||
];
|
||||
|
||||
makeWrapperArgs = [
|
||||
@ -72,6 +73,7 @@ python3Packages.buildPythonApplication rec {
|
||||
"--prefix PATH : ${stdenv.lib.makeBinPath [ exiftool vmtouch ]}"
|
||||
"--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libmediainfo ]}"
|
||||
"--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
|
||||
"\${qtWrapperArgs[@]}"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -6,12 +6,12 @@
|
||||
|
||||
let
|
||||
pname = "runwayml";
|
||||
version = "0.8.1";
|
||||
version = "0.9.0";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://runway-releases.s3.amazonaws.com/Runway%20${version}.AppImage";
|
||||
sha256 = "0pqnlwk804cly2x9kph39g9ps5dv75ybi2v1fgrvmhk3wbmwmpb0";
|
||||
sha256 = "0rg7ipp7kx0l4qgcymfg5d3saz0c6d2j0c6rf28rwqgbm92gbjjq";
|
||||
name="${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
{ stdenv, fetchurl, poppler_utils, pkgconfig, libpng
|
||||
{ stdenv, mkDerivation, fetchurl, poppler_utils, pkgconfig, libpng
|
||||
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
|
||||
, makeWrapper, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
|
||||
, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
|
||||
, xdg_utils, makeDesktopItem, wrapGAppsHook, removeReferencesTo, qt5
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.45.2";
|
||||
mkDerivation rec {
|
||||
name = "calibre-${version}";
|
||||
version = "3.45.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.calibre-ebook.com/${version}/${name}.tar.xz";
|
||||
@ -35,11 +35,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig qmake removeReferencesTo qt5.wrapQtAppsHook ];
|
||||
nativeBuildInputs = [ pkgconfig qmake removeReferencesTo wrapGAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
poppler_utils libpng imagemagick libjpeg
|
||||
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
|
||||
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
|
||||
] ++ (with python2Packages; [
|
||||
apsw cssselect css-parser dateutil dnspython html5-parser lxml mechanize netifaces pillow
|
||||
python pyqt5_with_qtwebkit sip
|
||||
@ -48,10 +48,6 @@ stdenv.mkDerivation rec {
|
||||
odfpy
|
||||
]);
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--prefix PATH : ${poppler_utils.out}/bin"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@ -74,10 +70,6 @@ stdenv.mkDerivation rec {
|
||||
sed -i "s/env python[0-9.]*/python/" $PYFILES
|
||||
sed -i "2i import sys; sys.argv[0] = 'calibre'" $out/bin/calibre
|
||||
|
||||
for program in $out/bin/*; do
|
||||
wrapQtApp $program --prefix PYTHONPATH : $PYTHONPATH
|
||||
done
|
||||
|
||||
# Replace @out@ by the output path.
|
||||
mkdir -p $out/share/applications/
|
||||
cp {$calibreDesktopItem,$ebookEditDesktopItem,$ebookViewerDesktopItem}/share/applications/* $out/share/applications/
|
||||
@ -91,15 +83,23 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# Wrap manually
|
||||
dontWrapQtApps = true;
|
||||
dontWrapGApps = true;
|
||||
|
||||
# Remove some references to shrink the closure size. This reference (as of
|
||||
# 2018-11-06) was a single string like the following:
|
||||
# /nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-podofo-0.9.6-dev/include/podofo/base/PdfVariant.h
|
||||
preFixup = ''
|
||||
remove-references-to -t ${podofo.dev} $out/lib/calibre/calibre/plugins/podofo.so
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
|
||||
for program in $out/bin/*; do
|
||||
wrapProgram $program \
|
||||
''${qtWrapperArgs[@]} \
|
||||
''${gappsWrapperArgs[@]} \
|
||||
--prefix PYTHONPATH : $PYTHONPATH \
|
||||
--prefix PATH : ${poppler_utils.out}/bin
|
||||
done
|
||||
'';
|
||||
|
||||
disallowedReferences = [ podofo.dev ];
|
||||
|
75
pkgs/applications/misc/clight/clightd.nix
Normal file
75
pkgs/applications/misc/clight/clightd.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, dbus, cmake, pkgconfig
|
||||
, glib, udev, polkit, libmodule
|
||||
, pcre, libXdmcp, utillinux, libpthreadstubs
|
||||
, enableDdc ? true, ddcutil
|
||||
, enableDpms ? true, libXext
|
||||
, enableGamma ? true, libXrandr
|
||||
, enableScreen ? true }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clightd";
|
||||
version = "3.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FedeDP";
|
||||
repo = "Clightd";
|
||||
rev = version;
|
||||
sha256 = "0g6kawizwfhvigkwm7rbfq6rg872xn8igy8n355w4d7mmcxk0jf8";
|
||||
};
|
||||
|
||||
# dbus-1.pc has datadir=/etc
|
||||
SYSTEM_BUS_DIR = "${placeholder "out"}/share/dbus-1/system-services";
|
||||
# systemd.pc has prefix=${systemd.out}
|
||||
MODULE_LOAD_DIR = "${placeholder "out"}/lib/modules-load.d";
|
||||
# polkit-gobject-1.pc has prefix=${polkit.out}
|
||||
POLKIT_ACTION_DIR = "${placeholder "out"}/share/polkit-1/actions";
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s@/etc@$out\0@" CMakeLists.txt
|
||||
sed -i "s@pkg_get_variable(SYSTEM_BUS_DIR.*@set(SYSTEM_BUS_DIR $SYSTEM_BUS_DIR)@" CMakeLists.txt
|
||||
sed -i "s@pkg_get_variable(MODULE_LOAD_DIR.*@set(MODULE_LOAD_DIR $MODULE_LOAD_DIR)@" CMakeLists.txt
|
||||
sed -i "s@pkg_get_variable(POLKIT_ACTION_DIR.*@set(POLKIT_ACTION_DIR $POLKIT_ACTION_DIR)@" CMakeLists.txt
|
||||
'';
|
||||
|
||||
cmakeFlags = with lib;
|
||||
optional enableDdc "-DENABLE_DDC=1"
|
||||
++ optional enableDpms "-DENABLE_DPMS=1"
|
||||
++ optional enableGamma "-DENABLE_GAMMA=1"
|
||||
++ optional enableScreen "-DENABLE_SCREEN=1";
|
||||
|
||||
nativeBuildInputs = [
|
||||
dbus
|
||||
cmake
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
buildInputs = with lib; [
|
||||
glib
|
||||
udev
|
||||
polkit
|
||||
libmodule
|
||||
|
||||
pcre
|
||||
libXdmcp
|
||||
utillinux
|
||||
libpthreadstubs
|
||||
] ++ optional enableDdc ddcutil
|
||||
++ optional enableDpms libXext
|
||||
++ optional enableGamma libXrandr;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
ln -svT $out/lib/clightd/clightd $out/bin/clightd
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux bus interface that changes screen brightness/temperature";
|
||||
homepage = https://github.com/FedeDP/Clightd;
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [
|
||||
eadwu
|
||||
];
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user