Merge branch 'master' into haskell-extensible

This commit is contained in:
Peter Simons 2017-02-28 09:14:50 +01:00 committed by GitHub
commit e1908d4e21
568 changed files with 19970 additions and 9184 deletions

View File

@ -1 +1 @@
17.03
17.09

View File

@ -10,7 +10,7 @@ will prevent installation if any of the following criteria are
true:</para>
<itemizedlist>
<listitem><para>The packages is thought to be broken, and has had
<listitem><para>The package is thought to be broken, and has had
its <literal>meta.broken</literal> set to
<literal>true</literal>.</para></listitem>
@ -23,7 +23,14 @@ true:</para>
<literal>meta.knownVulnerabilities</literal>.</para></listitem>
</itemizedlist>
<para>Each of these criteria can be altering the nixpkgs
<para>Note that all this is checked during evaluation already,
and the check includes any package that is evaluated.
In particular, all build-time dependencies are checked.
<literal>nix-env -qa</literal> will (attempt to) hide any packages
that would be refused.
</para>
<para>Each of these criteria can be altered in the nixpkgs
configuration.</para>
<para>The nixpkgs configuration for a NixOS system is set in the
@ -68,10 +75,11 @@ configuration file located at
add <literal>allowBroken = true;</literal> to your user's
configuration file, like this:
<programlisting>
<programlisting>
{
allowBroken = true;
}</programlisting>
}
</programlisting>
</para></listitem>
</itemizedlist>
</section>
@ -156,7 +164,7 @@ configuration file located at
</title>
<para>There are several ways to tweak how Nix handles a package
which has been marked as unfree.</para>
which has been marked as insecure.</para>
<itemizedlist>
<listitem><para>

View File

@ -2,67 +2,31 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-qt">
<title>Qt</title>
<title>Qt and KDE</title>
<para>The information in this section applies to Qt 5.5 and later.</para>
<para>Qt is an application development toolkit for C++. Although it is
not a distinct programming language, there are special considerations
for packaging Qt-based programs and libraries. A small set of tools
and conventions has grown out of these considerations.</para>
<para>Qt is a comprehensive desktop and mobile application development toolkit for C++. Legacy support is available for Qt 3 and Qt 4, but all current development uses Qt 5. The Qt 5 packages in Nixpkgs are updated frequently to take advantage of new features, but older versions are typically retained to support packages that may not be compatible with the latest version. When packaging applications and libraries for Nixpkgs, it is important to ensure that compatible versions of Qt 5 are used throughout; this consideration motivates the tools described below.</para>
<section xml:id="ssec-qt-libraries"><title>Libraries</title>
<para>Packages that provide libraries should be listed in
<varname>qt5LibsFun</varname> so that the library is built with each
Qt version. A set of packages is provided for each version of Qt; for
example, <varname>qt5Libs</varname> always provides libraries built
with the latest version, <varname>qt55Libs</varname> provides
libraries built with Qt 5.5, and so on. To avoid version conflicts, no
top-level attributes are created for these packages.</para>
<para>Libraries that depend on Qt 5 should be built with each available version to avoid linking a dependent package against incompatible versions of Qt 5. (Although Qt 5 maintains backward ABI compatibility, linking against multiple versions at once is generally not possible; at best it will lead to runtime faults.) Packages that provide libraries should be added to the top-level function <varname>mkLibsForQt5</varname>, which is used to build a set of libraries for every Qt 5 version. The <varname>callPackage</varname> provided in this scope will ensure that only one Qt version will be used throughout the dependency tree. Dependencies should be imported unqualified, i.e. <literal>qtbase</literal> not <literal>qt5.qtbase</literal>, so that <varname>callPackage</varname> can do its work. <emphasis>Do not</emphasis> import a package set such as <literal>qt5</literal> or <literal>libsForQt5</literal> into your package; although it may work fine in the moment, it could well break at the next Qt update.</para>
<para>If a library does not support a particular version of Qt 5, it is best to mark it as broken by setting its <literal>meta.broken</literal> attribute. A package may be marked broken for certain versions by testing the <literal>qtbase.version</literal> attribute, which will always give the current Qt 5 version.</para>
</section>
<section xml:id="ssec-qt-programs"><title>Programs</title>
<section xml:id="ssec-qt-applications"><title>Applications</title>
<para>Application packages do not need to be built with every Qt
version. To ensure consistency between the package's dependencies,
call the package with <literal>qt5Libs.callPackage</literal> instead
of the usual <literal>callPackage</literal>. An older version may be
selected in case of incompatibility. For example, to build with Qt
5.5, call the package with
<literal>qt55Libs.callPackage</literal>.</para>
<para>Applications generally do not need to be built with every Qt version because they do not provide any libraries for dependent packages to link against. The primary consideration is merely ensuring that the application itself and its dependencies are linked against only one version of Qt. To call your application expression, use <literal>libsForQt5.callPackage</literal> instead of <literal>callPackage</literal>. Dependencies should be imported unqualified, i.e. <literal>qtbase</literal> not <literal>qt5.qtbase</literal>. <emphasis>Do not</emphasis> import a package set such as <literal>qt5</literal> or <literal>libsForQt5</literal> into your package; although it may work fine in the moment, it could well break at the next Qt update.</para>
<para>Several environment variables must be set at runtime for Qt
applications to function correctly, including:</para>
<para>It is generally best to build an application package against the <varname>libsForQt5</varname> library set. In case a package does not build with the latest Qt version, it is possible to pick a set pinned to a particular version, e.g. <varname>libsForQt55</varname> for Qt 5.5, if that is the latest version the package supports.</para>
<itemizedlist>
<listitem><para><envar>QT_PLUGIN_PATH</envar></para></listitem>
<listitem><para><envar>QML_IMPORT_PATH</envar></para></listitem>
<listitem><para><envar>QML2_IMPORT_PATH</envar></para></listitem>
<listitem><para><envar>XDG_DATA_DIRS</envar></para></listitem>
</itemizedlist>
<para>To ensure that these are set correctly, the program must be wrapped by
invoking <literal>wrapQtProgram <replaceable>program</replaceable></literal>
during installation (for example, during
<literal>fixupPhase</literal>). <literal>wrapQtProgram</literal>
accepts the same options as <literal>makeWrapper</literal>.
</para>
<para>Qt-based applications require that several paths be set at runtime. This is accomplished by wrapping the provided executables in a package with <literal>wrapQtProgram</literal> or <literal>makeQtWrapper</literal> during the <literal>postFixup</literal> phase. To use the wrapper generators, add <literal>makeQtWrapper</literal> to <literal>nativeBuildInputs</literal>. The wrapper generators support the same options as <literal>wrapProgram</literal> and <literal>makeWrapper</literal> respectively. It is usually only necessary to generate wrappers for programs intended to be invoked by the user.</para>
</section>
<section xml:id="ssec-qt-kde"><title>KDE</title>
<para>Many of the considerations above also apply to KDE packages,
especially the need to set the correct environment variables at
runtime. To ensure that this is done, invoke <literal>wrapKDEProgram
<replaceable>program</replaceable></literal> during
installation. <literal>wrapKDEProgram</literal> also generates a
<literal>ksycoca</literal> database so that required data and services
can be found. Like its Qt counterpart,
<literal>wrapKDEProgram</literal> accepts the same options as
<literal>makeWrapper</literal>.</para>
<para>The KDE Frameworks are a set of libraries for Qt 5 which form the basis of the Plasma desktop environment and the KDE Applications suite. Packaging a Frameworks-based library does not require any steps beyond those described above for general Qt-based libraries. Frameworks-based applications should not use <literal>makeQtWrapper</literal>; instead, use <literal>kdeWrapper</literal> to create the necessary wrappers: <literal>kdeWrapper { unwrapped = <replaceable>expr</replaceable>; targets = <replaceable>exes</replaceable>; }</literal>, where <replaceable>expr</replaceable> is the un-wrapped package expression and <replaceable>exes</replaceable> is a list of strings giving the relative paths to programs in the package which should be wrapped.</para>
</section>

View File

@ -177,9 +177,10 @@ rec {
let self = f self // {
newScope = scope: newScope (self // scope);
callPackage = self.newScope {};
override = g: makeScope newScope (self_:
let super = f self_;
in super // g super self_);
override = g:
makeScope newScope
(self_: let super = f self_; in super // g super self_);
packages = f;
};
in self;

View File

@ -20,7 +20,8 @@ rec {
, prefix ? []
, # This should only be used for special arguments that need to be evaluated
# when resolving module structure (like in imports). For everything else,
# there's _module.args.
# there's _module.args. If specialArgs.modulesPath is defined it will be
# used as the base path for disabledModules.
specialArgs ? {}
, # This would be remove in the future, Prefer _module.args option instead.
args ? {}
@ -58,10 +59,7 @@ rec {
closed = closeModules (modules ++ [ internalModule ]) ({ inherit config options; lib = import ./.; } // specialArgs);
# Note: the list of modules is reversed to maintain backward
# compatibility with the old module system. Not sure if this is
# the most sensible policy.
options = mergeModules prefix (reverseList closed);
options = mergeModules prefix (filterModules (specialArgs.modulesPath or "") closed);
# Traverse options and extract the option values into the final
# config set. At the same time, check whether all option
@ -87,6 +85,16 @@ rec {
result = { inherit options config; };
in result;
# Filter disabled modules. Modules can be disabled allowing
# their implementation to be replaced.
filterModules = modulesPath: modules:
let
moduleKey = m: if isString m then toString modulesPath + "/" + m else toString m;
disabledKeys = map moduleKey (concatMap (m: m.disabledModules) modules);
in
filter (m: !(elem m.key disabledKeys)) modules;
/* Close a set of modules under the imports relation. */
closeModules = modules: args:
let
@ -111,12 +119,13 @@ rec {
else {};
in
if m ? config || m ? options then
let badAttrs = removeAttrs m ["imports" "options" "config" "key" "_file" "meta"]; in
let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in
if badAttrs != {} then
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
else
{ file = m._file or file;
key = toString m.key or key;
disabledModules = m.disabledModules or [];
imports = m.imports or [];
options = m.options or {};
config = mkMerge [ (m.config or {}) metaSet ];
@ -124,9 +133,10 @@ rec {
else
{ file = m._file or file;
key = toString m.key or key;
disabledModules = m.disabledModules or [];
imports = m.require or [] ++ m.imports or [];
options = {};
config = mkMerge [ (removeAttrs m ["key" "_file" "require" "imports"]) metaSet ];
config = mkMerge [ (removeAttrs m ["_file" "key" "disabledModules" "require" "imports"]) metaSet ];
};
applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then

View File

@ -99,6 +99,14 @@ checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-if-foo-enabl
checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-foo-if-enable.nix
checkConfigOutput 'true' "$@" ./define-enable.nix ./define-loaOfSub-foo-enable-if.nix
# Check disabledModules with config definitions and option declarations.
set -- config.enable ./define-enable.nix ./declare-enable.nix
checkConfigOutput "true" "$@"
checkConfigOutput "false" "$@" ./disable-define-enable.nix
checkConfigError "The option .*enable.* defined in .* does not exist" "$@" ./disable-declare-enable.nix
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-define-enable.nix ./disable-declare-enable.nix
checkConfigError "attribute .*enable.* in selection path .*config.enable.* not found" "$@" ./disable-enable-modules.nix
# Check _module.args.
set -- config.enable ./declare-enable.nix ./define-enable-with-custom-arg.nix
checkConfigError 'while evaluating the module argument .*custom.* in .*define-enable-with-custom-arg.nix.*:' "$@"

View File

@ -1,7 +1,8 @@
{ lib ? import <nixpkgs/lib>, modules ? [] }:
{ lib ? import ../.., modules ? [] }:
{
inherit (lib.evalModules {
inherit modules;
specialArgs.modulesPath = ./.;
}) config options;
}

View File

@ -0,0 +1,5 @@
{ lib, ... }:
{
disabledModules = [ ./declare-enable.nix ];
}

View File

@ -0,0 +1,5 @@
{ lib, ... }:
{
disabledModules = [ ./define-enable.nix ];
}

View File

@ -0,0 +1,5 @@
{ lib, ... }:
{
disabledModules = [ "define-enable.nix" "declare-enable.nix" ];
}

View File

@ -0,0 +1,75 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-replace-modules">
<title>Replace Modules</title>
<para>Modules that are imported can also be disabled. The option
declarations and config implementation of a disabled module will be
ignored, allowing another to take it's place. This can be used to
import a set of modules from another channel while keeping the rest
of the system on a stable release.</para>
<para><literal>disabledModules</literal> is a top level attribute like
<literal>imports</literal>, <literal>options</literal> and
<literal>config</literal>. It contains a list of modules that will
be disabled. This can either be the full path to the module or a
string with the filename relative to the modules path
(eg. &lt;nixpkgs/nixos/modules&gt; for nixos).
</para>
<para>This example will replace the existing postgresql module with
the version defined in the nixos-unstable channel while keeping the
rest of the modules and packages from the original nixos channel.
This only overrides the module definition, this won't use postgresql
from nixos-unstable unless explicitly configured to do so.</para>
<programlisting>
{ config, lib, pkgs, ... }:
{
disabledModules = [ "services/databases/postgresql.nix" ];
imports =
[ # Use postgresql service from nixos-unstable channel.
# sudo nix-channel --add http://nixos.org/channels/nixos-unstable nixos-unstable
&lt;nixos-unstable/nixos/modules/services/databases/postgresql.nix&gt;
];
services.postgresql.enable = true;
}
</programlisting>
<para>This example shows how to define a custom module as a
replacement for an existing module. Importing this module will
disable the original module without having to know it's
implementation details.</para>
<programlisting>
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.man;
in
{
disabledModules = [ "services/programs/man.nix" ];
options = {
programs.man.enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable manual pages.";
};
};
config = mkIf cfg.enabled {
warnings = [ "disabled manpages for production deployments." ];
};
}
</programlisting>
</section>

View File

@ -179,5 +179,6 @@ in {
<xi:include href="option-types.xml" />
<xi:include href="option-def.xml" />
<xi:include href="meta-attributes.xml" />
<xi:include href="replace-modules.xml" />
</chapter>

View File

@ -9,6 +9,7 @@
<para>This section lists the release notes for each stable version of NixOS
and current unstable revision.</para>
<xi:include href="rl-1709.xml" />
<xi:include href="rl-1703.xml" />
<xi:include href="rl-1609.xml" />
<xi:include href="rl-1603.xml" />

View File

@ -261,6 +261,16 @@ following incompatible changes:</para>
</para>
</listitem>
<listitem>
<para>
Modules can now be disabled by using <link
xlink:href="https://nixos.org/nixpkgs/manual/#sec-replace-modules">
disabledModules</link>, allowing another to take it's place. This can be
used to import a set of modules from another channel while keeping the
rest of the system on a stable release.
</para>
</listitem>
</itemizedlist>

View File

@ -0,0 +1,48 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-17.09">
<title>Release 17.09 (“Hummingbird”, 2017/09/??)</title>
<para>In addition to numerous new and upgraded packages, this release
has the following highlights: </para>
<itemizedlist>
<listitem>
<para></para>
</listitem>
</itemizedlist>
<para>The following new services were added since the last release:</para>
<itemizedlist>
<listitem>
<para></para>
</listitem>
</itemizedlist>
<para>When upgrading from a previous release, please be aware of the
following incompatible changes:</para>
<itemizedlist>
<listitem>
<para>
</para>
</listitem>
</itemizedlist>
<para>Other notable improvements:</para>
<itemizedlist>
<listitem>
<para>
</para>
</listitem>
</itemizedlist>
</section>

View File

@ -145,9 +145,11 @@ pkgs.vmTools.runInLinuxVM (
umount /mnt
# Make sure resize2fs works
# Make sure resize2fs works. Note that resize2fs has stricter criteria for resizing than a normal
# mount, so the `-c 0` and `-i 0` don't affect it. Setting it to `now` doesn't produce deterministic
# output, of course, but we can fix that when/if we start making images deterministic.
${optionalString (fsType == "ext4") ''
tune2fs -c 0 -i 0 $rootDisk
tune2fs -T now -c 0 -i 0 $rootDisk
''}
''
)

View File

@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
with lib;
{
imports =
[ ../../../modules/installer/cd-dvd/channel.nix
../../../modules/virtualisation/nova-config.nix
];
system.build.novaImage = import ../../../lib/make-disk-image.nix {
inherit lib config;
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
diskSize = 8192;
format = "qcow2";
configFile = pkgs.writeText "configuration.nix"
''
{
imports = [ <nixpkgs/nixos/modules/virtualisation/nova-config.nix> ];
}
'';
};
}

View File

@ -22,7 +22,8 @@ with lib;
###### implementation
config = mkIf config.hardware.cpu.amd.updateMicrocode {
boot.initrd.prepend = [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
# Microcode updates must be the first item prepended in the initrd
boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
};
}

View File

@ -22,7 +22,8 @@ with lib;
###### implementation
config = mkIf config.hardware.cpu.intel.updateMicrocode {
boot.initrd.prepend = [ "${pkgs.microcodeIntel}/intel-ucode.img" ];
# Microcode updates must be the first item prepended in the initrd
boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeIntel}/intel-ucode.img" ];
};
}

View File

@ -0,0 +1,37 @@
{ config, lib, pkgs, ... }:
with lib;
{
meta.maintainers = [ maintainers.grahamc ];
options = {
hardware.mcelog = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable the Machine Check Exception logger.
'';
};
};
};
config = mkIf config.hardware.mcelog.enable {
systemd.services.mcelog = {
description = "Machine Check Exception Logging Daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.mcelog}/bin/mcelog --daemon --foreground";
SuccessExitStatus = [ 0 15 ];
ProtectHome = true;
PrivateNetwork = true;
PrivateTmp = true;
};
};
};
}

View File

@ -44,7 +44,7 @@ in
panel = mkOption {
type = with types; nullOr path;
default = null;
example = literalExample "''${pkgs.kde5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
example = literalExample "''${pkgs.plasma5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
description = "Replace the IBus panel with another panel.";
};
};

View File

@ -66,7 +66,7 @@ with lib;
in ''
mkdir -p /root/Desktop
ln -sfT ${desktopFile} /root/Desktop/nixos-manual.desktop
ln -sfT ${pkgs.kde5.konsole}/share/applications/org.kde.konsole.desktop /root/Desktop/org.kde.konsole.desktop
ln -sfT ${pkgs.kdeApplications.konsole}/share/applications/org.kde.konsole.desktop /root/Desktop/org.kde.konsole.desktop
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop
'';

View File

@ -95,7 +95,7 @@ in
nixosVersionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId));
# Note: code names must only increase in alphabetical order.
nixosCodeName = "Gorilla";
nixosCodeName = "Hummingbird";
};
# Generate /etc/os-release. See
@ -106,9 +106,12 @@ in
NAME=NixOS
ID=nixos
VERSION="${config.system.nixosVersion} (${config.system.nixosCodeName})"
VERSION_CODENAME=${toLower config.system.nixosCodeName}
VERSION_ID="${config.system.nixosVersion}"
PRETTY_NAME="NixOS ${config.system.nixosVersion} (${config.system.nixosCodeName})"
HOME_URL="http://nixos.org/"
HOME_URL="https://nixos.org/"
SUPPORT_URL="https://nixos.org/nixos/support.html"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
'';
};

View File

@ -30,6 +30,7 @@
./hardware/cpu/amd-microcode.nix
./hardware/cpu/intel-microcode.nix
./hardware/ksm.nix
./hardware/mcelog.nix
./hardware/network/b43.nix
./hardware/network/intel-2100bg.nix
./hardware/network/intel-2200bg.nix
@ -427,6 +428,7 @@
./services/networking/namecoind.nix
./services/networking/nat.nix
./services/networking/networkmanager.nix
./services/networking/nftables.nix
./services/networking/ngircd.nix
./services/networking/nix-serve.nix
./services/networking/nntp-proxy.nix

View File

@ -178,6 +178,9 @@ with lib;
(mkRenamedOptionModule [ "services" "nfs" "lockdPort" ] [ "services" "nfs" "server" "lockdPort" ])
(mkRenamedOptionModule [ "services" "nfs" "statdPort" ] [ "services" "nfs" "server" "statdPort" ])
# KDE Plasma 5
(mkRenamedOptionModule [ "services" "xserver" "desktopManager" "kde5" ] [ "services" "xserver" "desktopManager" "plasma5" ])
# Options that are obsolete and have no replacement.
(mkRemovedOptionModule [ "boot" "initrd" "luks" "enable" ] "")
(mkRemovedOptionModule [ "programs" "bash" "enable" ] "")

View File

@ -280,8 +280,8 @@ let
${optionalString cfg.pamMount
"auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so"}
${optionalString cfg.enableKwallet
("auth optional ${pkgs.kde5.kwallet-pam}/lib/security/pam_kwallet5.so" +
" kwalletd=${pkgs.kde5.kwallet}/bin/kwalletd5")}
("auth optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" +
" kwalletd=${pkgs.libsForQt5.kwallet}/bin/kwalletd5")}
'') + ''
${optionalString cfg.unixAuth
"auth sufficient pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} likeauth try_first_pass"}
@ -349,8 +349,8 @@ let
${optionalString (cfg.enableAppArmor && config.security.apparmor.enable)
"session optional ${pkgs.apparmor-pam}/lib/security/pam_apparmor.so order=user,group,default debug"}
${optionalString (cfg.enableKwallet)
("session optional ${pkgs.kde5.kwallet-pam}/lib/security/pam_kwallet5.so" +
" kwalletd=${pkgs.kde5.kwallet}/bin/kwalletd5")}
("session optional ${pkgs.plasma5.kwallet-pam}/lib/security/pam_kwallet5.so" +
" kwalletd=${pkgs.libsForQt5.kwallet}/bin/kwalletd5")}
'');
};

View File

@ -19,13 +19,8 @@ let
${toString cfg.extraProperties}
'';
configDir = pkgs.buildEnv {
name = "apache-kafka-conf";
paths = [
(pkgs.writeTextDir "server.properties" serverProperties)
(pkgs.writeTextDir "log4j.properties" cfg.log4jProperties)
];
};
serverConfig = pkgs.writeText "server.properties" serverProperties;
logConfig = pkgs.writeText "log4j.properties" cfg.log4jProperties;
in {
@ -143,10 +138,11 @@ in {
serviceConfig = {
ExecStart = ''
${pkgs.jre}/bin/java \
-cp "${cfg.package}/libs/*:${configDir}" \
-cp "${cfg.package}/libs/*" \
-Dlog4j.configuration=file:${logConfig} \
${toString cfg.jvmOptions} \
kafka.Kafka \
${configDir}/server.properties
${serverConfig}
'';
User = "apache-kafka";
PermissionsStartOnly = true;

View File

@ -60,8 +60,9 @@ let
};
};
machineOpts = {...}: {
config = {
machineOpts = { ... }: {
options = {
hostName = mkOption {
type = types.str;
@ -156,7 +157,7 @@ let
};
machines = mkOption {
type = types.listOf (types.submodule machineOpts);
type = with types; listOf (submodule machineOpts);
default = [];
example = [
{ hostName = "foo";

View File

@ -0,0 +1,125 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.networking.nftables;
in
{
###### interface
options = {
networking.nftables.enable = mkOption {
type = types.bool;
default = false;
description =
''
Whether to enable nftables. nftables is a Linux-based packet
filtering framework intended to replace frameworks like iptables.
This conflicts with the standard networking firewall, so make sure to
disable it before using nftables.
'';
};
networking.nftables.ruleset = mkOption {
type = types.lines;
example = ''
# Check out https://wiki.nftables.org/ for better documentation.
# Table for both IPv4 and IPv6.
table inet filter {
# Block all incomming connections traffic except SSH and "ping".
chain input {
type filter hook input priority 0;
# accept any localhost traffic
iifname lo accept
# accept traffic originated from us
ct state {established, related} accept
# ICMP
# routers may also want: mld-listener-query, nd-router-solicit
ip6 nexthdr icmpv6 icmpv6 type { destination-unreachable, packet-too-big, time-exceeded, parameter-problem, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert } accept
ip protocol icmp icmp type { destination-unreachable, router-advertisement, time-exceeded, parameter-problem } accept
# allow "ping"
ip6 nexthdr icmp icmpv6 type echo-request accept
ip protocol icmp icmp type echo-request accept
# accept SSH connections (required for a server)
tcp dport 22 accept
# count and drop any other traffic
counter drop
}
# Allow all outgoing connections.
chain output {
type filter hook output priority 0;
accept
}
chain forward {
type filter hook forward priority 0;
accept
}
}
'';
description =
''
The ruleset to be used with nftables. Should be in a format that
can be loaded using "/bin/nft -f". The ruleset is updated atomically.
'';
};
networking.nftables.rulesetFile = mkOption {
type = types.path;
default = pkgs.writeTextFile {
name = "nftables-rules";
text = cfg.ruleset;
};
description =
''
The ruleset file to be used with nftables. Should be in a format that
can be loaded using "nft -f". The ruleset is updated atomically.
'';
};
};
###### implementation
config = mkIf cfg.enable {
assertions = [{
assertion = config.networking.firewall.enable == false;
message = "You can not use nftables with services.networking.firewall.";
}];
boot.blacklistedKernelModules = [ "ip_tables" ];
environment.systemPackages = [ pkgs.nftables ];
systemd.services.nftables = {
description = "nftables firewall";
before = [ "network-pre.target" ];
wants = [ "network-pre.target" ];
wantedBy = [ "multi-user.target" ];
reloadIfChanged = true;
serviceConfig = let
rulesScript = pkgs.writeScript "nftables-rules" ''
#! ${pkgs.nftables}/bin/nft -f
flush ruleset
include "${cfg.rulesetFile}"
'';
checkScript = pkgs.writeScript "nftables-check" ''
#! ${pkgs.stdenv.shell} -e
if $(${pkgs.kmod}/bin/lsmod | grep -q ip_tables); then
echo "Unload ip_tables before using nftables!" 1>&2
exit 1
else
${rulesScript}
fi
'';
in {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = checkScript;
ExecReload = checkScript;
ExecStop = "${pkgs.nftables}/bin/nft flush ruleset";
};
};
};
}

View File

@ -4,30 +4,32 @@ with lib;
let
cfg = config.services.phpfpm;
enabled = cfg.poolConfigs != {} || cfg.pools != {};
stateDir = "/run/phpfpm";
poolConfigs = cfg.poolConfigs // mapAttrs mkPool cfg.pools;
mkPool = n: p: ''
[${n}]
listen = ${p.listen}
${p.extraConfig}
'';
cfgFile = pkgs.writeText "phpfpm.conf" ''
fpmCfgFile = pool: poolConfig: pkgs.writeText "phpfpm-${pool}.conf" ''
[global]
error_log = syslog
daemonize = no
${cfg.extraConfig}
${concatStringsSep "\n" (mapAttrsToList mkPool cfg.pools)}
${concatStringsSep "\n" (mapAttrsToList (n: v: "[${n}]\n${v}") cfg.poolConfigs)}
[${pool}]
${poolConfig}
'';
phpIni = pkgs.writeText "php.ini" ''
${readFile "${cfg.phpPackage}/etc/php.ini"}
${cfg.phpOptions}
phpIni = pkgs.runCommand "php.ini" {
inherit (cfg) phpPackage phpOptions;
passAsFile = [ "phpOptions" ];
} ''
cat $phpPackage/etc/php.ini $phpOptionsFile > $out
'';
in {
@ -118,18 +120,41 @@ in {
};
};
config = mkIf (cfg.pools != {} || cfg.poolConfigs != {}) {
config = mkIf enabled {
systemd.services.phpfpm = {
wantedBy = [ "multi-user.target" ];
preStart = ''
mkdir -p "${stateDir}"
'';
serviceConfig = {
Type = "notify";
ExecStart = "${cfg.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${phpIni}";
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
};
systemd.slices.phpfpm = {
description = "PHP FastCGI Process manager pools slice";
};
systemd.targets.phpfpm = {
description = "PHP FastCGI Process manager pools target";
wantedBy = [ "multi-user.target" ];
};
systemd.services = flip mapAttrs' poolConfigs (pool: poolConfig:
nameValuePair "phpfpm-${pool}" {
description = "PHP FastCGI Process Manager service for pool ${pool}";
after = [ "network.target" ];
wantedBy = [ "phpfpm.target" ];
partOf = [ "phpfpm.target" ];
preStart = ''
mkdir -p ${stateDir}
'';
serviceConfig = let
cfgFile = fpmCfgFile pool poolConfig;
in {
Slice = "phpfpm.slice";
PrivateTmp = true;
PrivateDevices = true;
ProtectSystem = "full";
ProtectHome = true;
NoNewPrivileges = true;
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
Type = "notify";
ExecStart = "${cfg.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${phpIni}";
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
};
}
);
};
}

View File

@ -16,9 +16,9 @@ in
{
# Note: the order in which desktop manager modules are imported here
# determines the default: later modules (if enabled) are preferred.
# E.g., if KDE is enabled, it supersedes xterm.
# E.g., if Plasma 5 is enabled, it supersedes xterm.
imports = [
./none.nix ./xterm.nix ./xfce.nix ./kde5.nix ./lumina.nix
./none.nix ./xterm.nix ./xfce.nix ./plasma5.nix ./lumina.nix
./lxqt.nix ./enlightenment.nix ./gnome3.nix ./kodi.nix
];

View File

@ -1,258 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.kde5;
xorg = pkgs.xorg;
kde5 = pkgs.kde5;
in
{
options = {
services.xserver.desktopManager.kde5 = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable the Plasma 5 (KDE 5) desktop environment.";
};
enableQt4Support = mkOption {
type = types.bool;
default = true;
description = ''
Enable support for Qt 4-based applications. Particularly, install the
Qt 4 version of the Breeze theme and a default backend for Phonon.
'';
};
extraPackages = mkOption {
type = types.listOf types.package;
default = [];
description = ''
KDE packages that need to be installed system-wide.
'';
};
};
};
config = mkMerge [
(mkIf (cfg.extraPackages != []) {
environment.systemPackages = [ (kde5.kdeWrapper cfg.extraPackages) ];
})
(mkIf (xcfg.enable && cfg.enable) {
services.xserver.desktopManager.session = singleton {
name = "kde5";
bgSupport = true;
start = ''
# Load PulseAudio module for routing support.
# See http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
${optionalString config.hardware.pulseaudio.enable ''
${getBin config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
''}
exec "${kde5.startkde}"
'';
};
security.wrappers = {
kcheckpass.source = "${kde5.plasma-workspace.out}/lib/libexec/kcheckpass";
"start_kdeinit".source = "${kde5.kinit.out}/lib/libexec/kf5/start_kdeinit";
};
environment.systemPackages =
[
kde5.frameworkintegration
kde5.kactivities
kde5.kauth
kde5.kcmutils
kde5.kconfig
kde5.kconfigwidgets
kde5.kcoreaddons
kde5.kdbusaddons
kde5.kdeclarative
kde5.kded
kde5.kdesu
kde5.kdnssd
kde5.kemoticons
kde5.kfilemetadata
kde5.kglobalaccel
kde5.kguiaddons
kde5.kiconthemes
kde5.kidletime
kde5.kimageformats
kde5.kinit
kde5.kio
kde5.kjobwidgets
kde5.knewstuff
kde5.knotifications
kde5.knotifyconfig
kde5.kpackage
kde5.kparts
kde5.kpeople
kde5.krunner
kde5.kservice
kde5.ktextwidgets
kde5.kwallet
kde5.kwallet-pam
kde5.kwalletmanager
kde5.kwayland
kde5.kwidgetsaddons
kde5.kxmlgui
kde5.kxmlrpcclient
kde5.plasma-framework
kde5.solid
kde5.sonnet
kde5.threadweaver
kde5.breeze-qt5
kde5.kactivitymanagerd
kde5.kde-cli-tools
kde5.kdecoration
kde5.kdeplasma-addons
kde5.kgamma5
kde5.khotkeys
kde5.kinfocenter
kde5.kmenuedit
kde5.kscreen
kde5.kscreenlocker
kde5.ksysguard
kde5.kwayland
kde5.kwin
kde5.kwrited
kde5.libkscreen
kde5.libksysguard
kde5.milou
kde5.plasma-integration
kde5.polkit-kde-agent
kde5.systemsettings
kde5.plasma-desktop
kde5.plasma-workspace
kde5.plasma-workspace-wallpapers
kde5.dolphin-plugins
kde5.ffmpegthumbs
kde5.kdegraphics-thumbnailers
kde5.kio-extras
kde5.print-manager
# Install Breeze icons if available
(kde5.breeze-icons or kde5.oxygen-icons5 or kde5.oxygen-icons)
pkgs.hicolor_icon_theme
kde5.kde-gtk-config kde5.breeze-gtk
pkgs.qt5.phonon-backend-gstreamer
]
# Plasma 5.5 and later has a Breeze GTK theme.
# If it is not available, Orion is very similar to Breeze.
++ lib.optional (!(lib.hasAttr "breeze-gtk" kde5)) pkgs.orion
# Install activity manager if available
++ lib.optional (lib.hasAttr "kactivitymanagerd" kde5) kde5.kactivitymanagerd
# frameworkintegration was split with plasma-integration in Plasma 5.6
++ lib.optional (lib.hasAttr "plasma-integration" kde5) kde5.plasma-integration
++ lib.optionals cfg.enableQt4Support [ kde5.breeze-qt4 pkgs.phonon-backend-gstreamer ]
# Optional hardware support features
++ lib.optional config.hardware.bluetooth.enable kde5.bluedevil
++ lib.optional config.networking.networkmanager.enable kde5.plasma-nm
++ lib.optional config.hardware.pulseaudio.enable kde5.plasma-pa
++ lib.optional config.powerManagement.enable kde5.powerdevil
++ lib.optional config.services.colord.enable pkgs.colord-kde
++ lib.optionals config.services.samba.enable [ kde5.kdenetwork-filesharing pkgs.samba ];
services.xserver.desktopManager.kde5.extraPackages =
[
kde5.khelpcenter
kde5.oxygen
kde5.dolphin
kde5.konsole
];
environment.pathsToLink = [ "/share" ];
environment.etc = singleton {
source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
environment.variables =
{
# Enable GTK applications to load SVG icons
GST_PLUGIN_SYSTEM_PATH_1_0 =
lib.makeSearchPath "/lib/gstreamer-1.0"
(builtins.map (pkg: pkg.out) (with pkgs.gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gst-plugins-bad
gst-libav # for mp3 playback
]));
}
// (if (lib.hasAttr "breeze-icons" kde5)
then { GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"; }
else { });
fonts.fonts = [
(kde5.oxygen-fonts or pkgs.noto-fonts)
pkgs.hack-font
];
programs.ssh.askPassword = "${kde5.ksshaskpass.out}/bin/ksshaskpass";
# Enable helpful DBus services.
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
services.dbus.packages =
mkIf config.services.printing.enable [ pkgs.system-config-printer ];
# Extra UDEV rules used by Solid
services.udev.packages = [
pkgs.libmtp
pkgs.media-player-info
];
services.xserver.displayManager.sddm = {
theme = "breeze";
themes = [
kde5.ecm # for the setup-hook
kde5.plasma-workspace
kde5.breeze-icons
];
};
security.pam.services.kde = { allowNullPassword = true; };
# Doing these one by one seems silly, but we currently lack a better
# construct for handling common pam configs.
security.pam.services.gdm.enableKwallet = true;
security.pam.services.kdm.enableKwallet = true;
security.pam.services.lightdm.enableKwallet = true;
security.pam.services.sddm.enableKwallet = true;
security.pam.services.slim.enableKwallet = true;
# use kimpanel as the default IBus panel
i18n.inputMethod.ibus.panel =
lib.mkDefault
"${pkgs.kde5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
})
];
}

View File

@ -32,8 +32,8 @@ in
environment.systemPackages = [
pkgs.fluxbox
pkgs.kde5.kwindowsystem
pkgs.kde5.oxygen-icons5
pkgs.qt5.kwindowsystem
pkgs.qt5.oxygen-icons5
pkgs.lumina
pkgs.numlockx
pkgs.qt5.qtsvg

View File

@ -0,0 +1,241 @@
{ config, lib, pkgs, ... }:
with lib;
let
xcfg = config.services.xserver;
cfg = xcfg.desktopManager.plasma5;
inherit (pkgs) kdeWrapper kdeApplications plasma5 libsForQt5 qt5 xorg;
in
{
options = {
services.xserver.desktopManager.plasma5 = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable the Plasma 5 (KDE 5) desktop environment.";
};
enableQt4Support = mkOption {
type = types.bool;
default = true;
description = ''
Enable support for Qt 4-based applications. Particularly, install the
Qt 4 version of the Breeze theme and a default backend for Phonon.
'';
};
extraPackages = mkOption {
type = types.listOf types.package;
default = [];
description = ''
KDE packages that need to be installed system-wide.
'';
};
};
};
config = mkMerge [
(mkIf (cfg.extraPackages != []) {
environment.systemPackages = [ (kdeWrapper cfg.extraPackages) ];
})
(mkIf (xcfg.enable && cfg.enable) {
services.xserver.desktopManager.session = singleton {
name = "plasma5";
bgSupport = true;
start = ''
# Load PulseAudio module for routing support.
# See http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
${optionalString config.hardware.pulseaudio.enable ''
${getBin config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
''}
exec "${plasma5.startkde}"
'';
};
security.wrappers = {
kcheckpass.source = "${plasma5.plasma-workspace.out}/lib/libexec/kcheckpass";
"start_kdeinit".source = "${pkgs.kinit.out}/lib/libexec/kf5/start_kdeinit";
};
environment.systemPackages = with pkgs; with qt5; with libsForQt5; with plasma5; with kdeApplications;
[
frameworkintegration
kactivities
kauth
kcmutils
kconfig
kconfigwidgets
kcoreaddons
kdbusaddons
kdeclarative
kded
kdesu
kdnssd
kemoticons
kfilemetadata
kglobalaccel
kguiaddons
kiconthemes
kidletime
kimageformats
kinit
kio
kjobwidgets
knewstuff
knotifications
knotifyconfig
kpackage
kparts
kpeople
krunner
kservice
ktextwidgets
kwallet
kwallet-pam
kwalletmanager
kwayland
kwidgetsaddons
kxmlgui
kxmlrpcclient
plasma-framework
solid
sonnet
threadweaver
breeze-qt5
kactivitymanagerd
kde-cli-tools
kdecoration
kdeplasma-addons
kgamma5
khotkeys
kinfocenter
kmenuedit
kscreen
kscreenlocker
ksysguard
kwayland
kwin
kwrited
libkscreen
libksysguard
milou
plasma-integration
polkit-kde-agent
systemsettings
plasma-desktop
plasma-workspace
plasma-workspace-wallpapers
dolphin-plugins
ffmpegthumbs
kdegraphics-thumbnailers
kio-extras
print-manager
breeze-icons
pkgs.hicolor_icon_theme
kde-gtk-config breeze-gtk
phonon-backend-gstreamer
]
++ lib.optionals cfg.enableQt4Support [ breeze-qt4 pkgs.phonon-backend-gstreamer ]
# Optional hardware support features
++ lib.optional config.hardware.bluetooth.enable bluedevil
++ lib.optional config.networking.networkmanager.enable plasma-nm
++ lib.optional config.hardware.pulseaudio.enable plasma-pa
++ lib.optional config.powerManagement.enable powerdevil
++ lib.optional config.services.colord.enable colord-kde
++ lib.optionals config.services.samba.enable [ kdenetwork-filesharing pkgs.samba ];
services.xserver.desktopManager.plasma5.extraPackages =
with kdeApplications; with plasma5;
[
khelpcenter
oxygen
dolphin
konsole
];
environment.pathsToLink = [ "/share" ];
environment.etc = singleton {
source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
target = "X11/xkb";
};
environment.variables = {
# Enable GTK applications to load SVG icons
GST_PLUGIN_SYSTEM_PATH_1_0 =
lib.makeSearchPath "/lib/gstreamer-1.0"
(builtins.map (pkg: pkg.out) (with pkgs.gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gst-plugins-bad
gst-libav # for mp3 playback
]));
GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache";
};
fonts.fonts = with pkgs; [ noto-fonts hack-font ];
programs.ssh.askPassword = "${plasma5.ksshaskpass.out}/bin/ksshaskpass";
# Enable helpful DBus services.
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
services.dbus.packages =
mkIf config.services.printing.enable [ pkgs.system-config-printer ];
# Extra UDEV rules used by Solid
services.udev.packages = [
pkgs.libmtp
pkgs.media-player-info
];
services.xserver.displayManager.sddm = {
theme = "breeze";
themes = [
pkgs.extra-cmake-modules # for the setup-hook
plasma5.plasma-workspace
pkgs.breeze-icons
];
};
security.pam.services.kde = { allowNullPassword = true; };
# Doing these one by one seems silly, but we currently lack a better
# construct for handling common pam configs.
security.pam.services.gdm.enableKwallet = true;
security.pam.services.kdm.enableKwallet = true;
security.pam.services.lightdm.enableKwallet = true;
security.pam.services.sddm.enableKwallet = true;
security.pam.services.slim.enableKwallet = true;
# use kimpanel as the default IBus panel
i18n.inputMethod.ibus.panel =
lib.mkDefault
"${plasma5.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
})
];
}

View File

@ -46,15 +46,13 @@ let
[Seat:*]
xserver-command = ${xserverWrapper}
session-wrapper = ${dmcfg.session.script}
${optionalString (elem defaultSessionName dmcfg.session.names) ''
user-session = ${defaultSessionName}
''}
${optionalString cfg.greeter.enable ''
greeter-session = ${cfg.greeter.name}
''}
${optionalString cfg.autoLogin.enable ''
autologin-user = ${cfg.autoLogin.user}
autologin-user-timeout = ${toString cfg.autoLogin.timeout}
autologin-session = ${defaultSessionName}
''}
${cfg.extraSeatDefaults}
'';

View File

@ -45,9 +45,8 @@ in {
inherit script;
description = "Reconfigure the system from EC2 userdata on startup";
wantedBy = [ "sshd.service" ];
before = [ "sshd.service" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
requires = [ "network-online.target" ];
restartIfChanged = false;

View File

@ -0,0 +1,57 @@
{ config, lib, pkgs, ... }:
with lib;
{
imports = [
../profiles/qemu-guest.nix
../profiles/headless.nix
./grow-partition.nix
];
config = {
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
};
virtualisation.growPartition = true;
boot.kernelParams = [ "console=ttyS0" ];
boot.loader.grub.device = "/dev/vda";
boot.loader.timeout = 0;
# Allow root logins
services.openssh.enable = true;
services.openssh.permitRootLogin = "prohibit-password";
# Put /tmp and /var on /ephemeral0, which has a lot more space.
# Unfortunately we can't do this with the `fileSystems' option
# because it has no support for creating the source of a bind
# mount. Also, "move" /nix to /ephemeral0 by layering a unionfs-fuse
# mount on top of it so we have a lot more space for Nix operations.
/*
boot.initrd.postMountCommands =
''
mkdir -m 1777 -p $targetRoot/ephemeral0/tmp
mkdir -m 1777 -p $targetRoot/tmp
mount --bind $targetRoot/ephemeral0/tmp $targetRoot/tmp
mkdir -m 755 -p $targetRoot/ephemeral0/var
mkdir -m 755 -p $targetRoot/var
mount --bind $targetRoot/ephemeral0/var $targetRoot/var
mkdir -p /unionfs-chroot/ro-nix
mount --rbind $targetRoot/nix /unionfs-chroot/ro-nix
mkdir -p /unionfs-chroot/rw-nix
mkdir -m 755 -p $targetRoot/ephemeral0/nix
mount --rbind $targetRoot/ephemeral0/nix /unionfs-chroot/rw-nix
unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot,max_files=32768 /rw-nix=RW:/ro-nix=RO $targetRoot/nix
'';
boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
*/
};
}

View File

@ -1,65 +0,0 @@
# Usage:
# $ NIXOS_CONFIG=`pwd`/nixos/modules/virtualisation/nova-image.nix nix-build '<nixpkgs/nixos>' -A config.system.build.novaImage
{ config, lib, pkgs, ... }:
with lib;
{
system.build.novaImage = import ../../lib/make-disk-image.nix {
inherit pkgs lib config;
partitioned = true;
diskSize = 1 * 1024;
configFile = pkgs.writeText "configuration.nix"
''
{
imports = [ <nixpkgs/nixos/modules/virtualisation/nova-image.nix> ];
}
'';
};
imports = [
../profiles/qemu-guest.nix
../profiles/headless.nix
];
fileSystems."/".device = "/dev/disk/by-label/nixos";
boot.kernelParams = [ "console=ttyS0" ];
boot.loader.grub.device = "/dev/vda";
boot.loader.timeout = 0;
# Allow root logins
services.openssh.enable = true;
services.openssh.permitRootLogin = "prohibit-password";
# Put /tmp and /var on /ephemeral0, which has a lot more space.
# Unfortunately we can't do this with the `fileSystems' option
# because it has no support for creating the source of a bind
# mount. Also, "move" /nix to /ephemeral0 by layering a unionfs-fuse
# mount on top of it so we have a lot more space for Nix operations.
/*
boot.initrd.postMountCommands =
''
mkdir -m 1777 -p $targetRoot/ephemeral0/tmp
mkdir -m 1777 -p $targetRoot/tmp
mount --bind $targetRoot/ephemeral0/tmp $targetRoot/tmp
mkdir -m 755 -p $targetRoot/ephemeral0/var
mkdir -m 755 -p $targetRoot/var
mount --bind $targetRoot/ephemeral0/var $targetRoot/var
mkdir -p /unionfs-chroot/ro-nix
mount --rbind $targetRoot/nix /unionfs-chroot/ro-nix
mkdir -p /unionfs-chroot/rw-nix
mkdir -m 755 -p $targetRoot/ephemeral0/nix
mount --rbind $targetRoot/ephemeral0/nix /unionfs-chroot/rw-nix
unionfs -o allow_other,cow,nonempty,chroot=/unionfs-chroot,max_files=32768 /rw-nix=RW:/ro-nix=RO $targetRoot/nix
'';
boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
*/
}

View File

@ -286,6 +286,7 @@ in rec {
tests.pam-oath-login = callTest tests/pam-oath-login.nix {};
#tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; });
tests.peerflix = callTest tests/peerflix.nix {};
tests.pgjwt = callTest tests/pgjwt.nix {};
tests.postgresql = callTest tests/postgresql.nix {};
tests.printing = callTest tests/printing.nix {};
tests.proxy = callTest tests/proxy.nix {};

View File

@ -25,8 +25,13 @@ let
# access. Mostly copied from
# modules/profiles/installation-device.nix.
system.extraDependencies =
[ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio
pkgs.unionfs-fuse pkgs.mkinitcpio-nfs-utils
with pkgs; [
stdenv busybox perlPackages.ArchiveCpio unionfs-fuse mkinitcpio-nfs-utils
# These are used in the configure-from-userdata tests for EC2. Httpd and valgrind are requested
# directly by the configuration we set, and libxslt.bin is used indirectly as a build dependency
# of the derivation for dbus configuration files.
apacheHttpd valgrind.doc libxslt.bin
];
}
];
@ -137,6 +142,8 @@ in {
# ### http://nixos.org/channels/nixos-unstable nixos
userData = ''
{ pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/virtualisation/amazon-image.nix>
@ -146,12 +153,22 @@ in {
environment.etc.testFile = {
text = "whoa";
};
services.httpd = {
enable = true;
adminAddr = "test@example.org";
documentRoot = "${pkgs.valgrind.doc}/share/doc/valgrind/html";
};
networking.firewall.allowedTCPPorts = [ 80 ];
}
'';
script = ''
$machine->start;
$machine->waitForFile("/etc/testFile");
$machine->succeed("cat /etc/testFile | grep -q 'whoa'");
$machine->waitForUnit("httpd.service");
$machine->succeed("curl http://localhost | grep Valgrind");
'';
};
}

42
nixos/tests/pgjwt.nix Normal file
View File

@ -0,0 +1,42 @@
import ./make-test.nix ({ pkgs, ...} :
let
test = pkgs.writeText "test.sql" ''
CREATE EXTENSION pgcrypto;
CREATE EXTENSION pgjwt;
select sign('{"sub":"1234567890","name":"John Doe","admin":true}', 'secret');
select * from verify('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ', 'secret');
'';
in
{
name = "pgjwt";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ spinus ];
};
nodes = {
master =
{ pkgs, config, ... }:
{
services.postgresql = let mypg = pkgs.postgresql95; in {
enable = true;
package = mypg;
extraPlugins =[pkgs.pgjwt];
initialScript = pkgs.writeText "postgresql-init.sql"
''
CREATE ROLE postgres WITH superuser login createdb;
'';
};
};
};
testScript = ''
startAll;
$master->waitForUnit("postgresql");
$master->succeed("timeout 10 bash -c 'while ! psql postgres -c \"SELECT 1;\";do sleep 1;done;'");
$master->succeed("cat ${test} | psql postgres");
# I can't make original test working :[
# $master->succeed("${pkgs.perlPackages.TAPParserSourceHandlerpgTAP}/bin/pg_prove -d postgres ${pkgs.pgjwt.src}/test.sql");
'';
})

View File

@ -1,5 +1,5 @@
{ pkgs, stdenv, lib, fetchurl, intltool, pkgconfig, gstreamer, gst_plugins_base
, gst_plugins_good, gst_plugins_bad, gst_plugins_ugly, gst_ffmpeg, glib
{ pkgs, stdenv, lib, fetchurl, intltool, pkgconfig, gstreamer, gst-plugins-base
, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, gst-ffmpeg, glib
, mono, mono-addins, dbus-sharp-1_0, dbus-sharp-glib-1_0, notify-sharp, gtk-sharp-2_0
, boo, gdata-sharp, taglib-sharp, sqlite, gnome-sharp, gconf, gtk-sharp-beans, gio-sharp
, libmtp, libgpod, mono-zeroconf }:
@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig intltool ];
buildInputs = [
gtk-sharp-2_0.gtk gstreamer gst_plugins_base gst_plugins_good
gst_plugins_bad gst_plugins_ugly gst_ffmpeg
gtk-sharp-2_0.gtk gstreamer gst-plugins-base gst-plugins-good
gst-plugins-bad gst-plugins-ugly gst-ffmpeg
mono dbus-sharp-1_0 dbus-sharp-glib-1_0 mono-addins notify-sharp
gtk-sharp-2_0 boo gdata-sharp taglib-sharp sqlite gnome-sharp gconf gtk-sharp-beans
gio-sharp libmtp libgpod mono-zeroconf

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, boost, cmake, gettext, gstreamer, gst_plugins_base
{ stdenv, fetchurl, boost, cmake, gettext, gstreamer, gst-plugins-base
, liblastfm, qt4, taglib, fftw, glew, qjson, sqlite, libgpod, libplist
, usbmuxd, libmtp, gvfs, libcdio, libspotify, protobuf, qca2, pkgconfig
, sparsehash, config, makeWrapper, runCommand, gst_plugins }:
@ -27,7 +27,7 @@ let
fftw
gettext
glew
gst_plugins_base
gst-plugins-base
gstreamer
gvfs
libcdio

View File

@ -6,7 +6,7 @@
gcc,
ginac,
jamomacore,
kde5,
kdnssd,
libsndfile,
ninja,
portaudio,
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
ginac
gcc
jamomacore
kde5.kdnssd
kdnssd
libsndfile
ninja
portaudio

View File

@ -1,20 +1,21 @@
{ stdenv, fetchurl, fftw, gtk, lv2, libsamplerate, libsndfile, pkgconfig, zita-convolver }:
{ stdenv, fetchFromGitHub, fftw, gtk2, lv2, libsamplerate, libsndfile, pkgconfig, zita-convolver }:
stdenv.mkDerivation rec {
name = "ir.lv2-${version}";
version = "1.2.2";
version = "1.2.3";
src = fetchurl {
url = "http://factorial.hu/system/files/${name}.tar.gz";
sha256 = "17a6h2mv9xv41jpbx6bdakkngin4kqzh2v67l4076ddq609k5a7v";
src = fetchFromGitHub {
owner = "tomszilagyi";
repo = "ir.lv2";
rev = "${version}";
sha256 = "16vy06qb0vgwg4yx15grzh5m2q3cbzm3jd0p37g2qb8rgvjhladg";
};
buildInputs = [ fftw gtk lv2 libsamplerate libsndfile pkgconfig zita-convolver ];
buildInputs = [ fftw gtk2 lv2 libsamplerate libsndfile zita-convolver ];
buildPhase = ''
make
make convert4chan
'';
nativeBuildInputs = [ pkgconfig ];
postBuild = "make convert4chan";
installPhase = ''
mkdir -p "$out/bin"
@ -23,10 +24,6 @@ stdenv.mkDerivation rec {
make PREFIX="$out" install
install -Dm755 convert4chan "$out/bin/convert4chan"
# fixed location
sed -i 's/, but seem like its gone://' README
sed -i 's@rhythminmind.net/1313@rhythminmind.net/STN@' README
install -Dm644 README "$out/share/doc/README"
'';
meta = with stdenv.lib; {

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ lv2 ];
installFlags = [ "LV2_PATH=$out/lib/lv2" ];
installFlags = [ "LV2_PATH=$(out)/lib/lv2" ];
meta = with stdenv.lib; {
homepage = https://github.com/portalmod/mod-distortion;

View File

@ -1,5 +1,5 @@
{ stdenv, fetchgit, pythonPackages, cdparanoia, cdrdao
, gst_python, gst_plugins_base, gst_plugins_good
, gst-python, gst-plugins-base, gst-plugins-good
, utillinux, makeWrapper, substituteAll, autoreconfHook }:
let
@ -17,7 +17,7 @@ in stdenv.mkDerivation rec {
};
pythonPath = with pythonPackages; [
pygobject2 gst_python musicbrainzngs
pygobject2 gst-python musicbrainzngs
pycdio pyxdg setuptools
CDDB
];
@ -25,7 +25,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
python cdparanoia cdrdao utillinux makeWrapper
gst_plugins_base gst_plugins_good
gst-plugins-base gst-plugins-good
] ++ pythonPath;
patches = [

View File

@ -13,11 +13,11 @@ stdenv.mkDerivation rec {
patches = [ ./include-multistream.patch ];
configureFlags = [ "--disable-examples" ];
meta = {
meta = with stdenv.lib; {
description = "High-level API for decoding and seeking in .opus files";
homepage = http://www.opus-codec.org/;
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ fuuzetsu ];
};
}

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, python2Packages, intltool
, gst_python, withGstPlugins ? false, gst_plugins_base ? null
, gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }:
, gst-python, withGstPlugins ? false, gst-plugins-base ? null
, gst-plugins-good ? null, gst-plugins-ugly ? null, gst-plugins-bad ? null }:
assert withGstPlugins -> gst_plugins_base != null
|| gst_plugins_good != null
|| gst_plugins_ugly != null
|| gst_plugins_bad != null;
assert withGstPlugins -> gst-plugins-base != null
|| gst-plugins-good != null
|| gst-plugins-ugly != null
|| gst-plugins-bad != null;
let
version = "2.6.3";
@ -44,11 +44,11 @@ in buildPythonApplication {
patches = [ ./quodlibet-package-plugins.patch ];
buildInputs = stdenv.lib.optionals withGstPlugins [
gst_plugins_base gst_plugins_good gst_plugins_ugly gst_plugins_bad
gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad
];
propagatedBuildInputs = [
mutagen pygtk pygobject2 dbus-python gst_python intltool
mutagen pygtk pygobject2 dbus-python gst-python intltool
];
postInstall = stdenv.lib.optionalString withGstPlugins ''

View File

@ -1,6 +1,6 @@
{ stdenv, fetchzip, lib, makeWrapper, alsaLib, atk, cairo, gdk_pixbuf
, glib, gst_ffmpeg, gst_plugins_bad, gst_plugins_base
, gst_plugins_good, gst_plugins_ugly, gstreamer, gtk2, libSM, libX11
, glib, gst-ffmpeg, gst-plugins-bad, gst-plugins-base
, gst-plugins-good, gst-plugins-ugly, gstreamer, gtk2, libSM, libX11
, libpng12, pango, zlib }:
stdenv.mkDerivation rec {
@ -21,14 +21,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ gst_plugins_base gst_plugins_good
gst_plugins_bad gst_plugins_ugly gst_ffmpeg ];
buildInputs = [ gst-plugins-base gst-plugins-good
gst-plugins-bad gst-plugins-ugly gst-ffmpeg ];
dontPatchELF = true;
libPath = lib.makeLibraryPath [
stdenv.cc.cc glib gtk2 atk pango cairo gdk_pixbuf alsaLib
libX11 libSM libpng12 gstreamer gst_plugins_base zlib
libX11 libSM libpng12 gstreamer gst-plugins-base zlib
];
installPhase = ''

View File

@ -3,12 +3,12 @@
, mesa_glu, lv2, mesa, gtk2, cairo, pango, fftwFloat, zita-convolver }:
stdenv.mkDerivation rec {
version = "20160825";
version = "20161230";
name = "x42-plugins-${version}";
src = fetchurl {
url = "http://gareus.org/misc/x42-plugins/${name}.tar.xz";
sha256 = "13ln5ccmrrc07ykfp040389av60dlgqz1kh6vfjkga6sq7z51msr";
sha256 = "1yni9c17kl2pi9lqxip07b6g6lyfii1pch5czp183113gk54fwj5";
};
buildInputs = [ mesa_glu ftgl freefont_ttf libjack2 libltc libsndfile libsamplerate lv2 mesa gtk2 cairo pango fftwFloat pkgconfig zita-convolver];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "zam-plugins-${version}";
version = "3.7";
version = "3.8";
src = fetchgit {
url = "https://github.com/zamaudio/zam-plugins.git";
deepClone = true;
rev = "932046905a57f698406318765a60807a1f81257d";
sha256 = "0zgkmq3jgysrsb6cm6sfbgqpgfpwv8nxlgkqm29zzvb97j56bm7z";
rev = "830ab2e9dd1db8cf56d12c71057157e5d8e9fd74";
sha256 = "1hyly5inis59cvh0r7lyi203h8v5jh84ca9jpaljm53cvw6d93px";
};
buildInputs = [ boost libX11 mesa liblo libjack2 ladspaH lv2 pkgconfig rubberband libsndfile ];

View File

@ -14,6 +14,8 @@ rec {
### Eclipse CPP
eclipse-cpp = eclipse-cpp-46; # always point to latest
eclipse-cpp-46 = buildEclipse {
name = "eclipse-cpp-4.6.0";
description = "Eclipse IDE for C/C++ Developers, Neon release";
@ -50,6 +52,8 @@ rec {
### Eclipse Modeling
eclipse-modeling = eclipse-modeling-46; # always point to latest
eclipse-modeling-46 = buildEclipse {
name = "eclipse-modeling-4.6";
description = "Eclipse Modeling Tools";
@ -85,7 +89,7 @@ rec {
### Eclipse Platform
eclipse-platform = eclipse-platform-46;
eclipse-platform = eclipse-platform-46; # always point to latest
eclipse-platform-46 = buildEclipse {
name = "eclipse-platform-4.6.2";
@ -104,6 +108,8 @@ rec {
### Eclipse Scala SDK
eclipse-scala-sdk = eclipse-scala-sdk-441; # always point to latest
eclipse-scala-sdk-441 = buildEclipse {
name = "eclipse-scala-sdk-4.4.1";
description = "Eclipse IDE for Scala Developers";
@ -122,6 +128,8 @@ rec {
### Eclipse SDK
eclipse-sdk = eclipse-sdk-46; # always point to latest
eclipse-sdk-46 = buildEclipse {
name = "eclipse-sdk-4.6.2";
description = "Eclipse Neon 2 Classic";

View File

@ -1,28 +1,68 @@
{ stdenv, fetchurl, automoc4, cmake, gettext, perl, pkgconfig
, shared_mime_info, kdelibs
{ kdeDerivation
, lib
, fetchgit
, extra-cmake-modules
, kdoctools
, kdeWrapper
, qtscript
, kconfig
, kcrash
, kdbusaddons
, kdelibs4support
, kguiaddons
, kiconthemes
, kinit
, khtml
, konsole
, kparts
, ktexteditor
, kwindowsystem
, poppler
}:
stdenv.mkDerivation rec {
name = "kile-2.1.3";
let
unwrapped =
kdeDerivation rec {
name = "kile-${version}";
version = "2017-02-09";
src = fetchurl {
url = "mirror://sourceforge/kile/${name}.tar.bz2";
sha256 = "18nfi37s46v9xav7vyki3phasddgcy4m7nywzxis198vr97yqqx0";
};
src = fetchgit {
url = git://anongit.kde.org/kile.git;
rev = "f77f6e627487c152f111e307ad6dc71699ade746";
sha256 = "0wpqaix9ssa28cm7qqjj0zfrscjgk8s3kmi5b4kk8h583gsrikib";
nativeBuildInputs = [
automoc4 cmake gettext perl pkgconfig shared_mime_info
];
buildInputs = [ kdelibs ];
};
# for KDE 4.7 the nl translations fail since kile-2.1.2
preConfigure = "rm -r translations/nl";
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
meta = {
description = "An integrated LaTeX editor for KDE";
homepage = http://kile.sourceforge.net;
maintainers = [ stdenv.lib.maintainers.urkud ];
license = stdenv.lib.licenses.gpl2Plus;
inherit (kdelibs.meta) platforms;
};
buildInputs = [
kconfig
kcrash
kdbusaddons
kdelibs4support
kdoctools
kguiaddons
kiconthemes
kinit
khtml
kparts
ktexteditor
kwindowsystem
poppler
qtscript
];
meta = {
description = "Kile is a user friendly TeX/LaTeX authoring tool for the KDE desktop environment";
homepage = https://www.kde.org/applications/office/kile/;
maintainers = with lib.maintainers; [ fridh ];
license = lib.licenses.gpl2Plus;
};
};
in
kdeWrapper
{
inherit unwrapped;
targets = [ "bin/kile" ];
paths = [ konsole.unwrapped ];
}

View File

@ -1,68 +0,0 @@
{ kdeDerivation
, lib
, fetchgit
, ecm
, kdoctools
, kdeWrapper
, qtscript
, kconfig
, kcrash
, kdbusaddons
, kdelibs4support
, kguiaddons
, kiconthemes
, kinit
, khtml
, konsole
, kparts
, ktexteditor
, kwindowsystem
, poppler
}:
let
unwrapped =
kdeDerivation rec {
name = "kile-${version}";
version = "2017-02-09";
src = fetchgit {
url = git://anongit.kde.org/kile.git;
rev = "f77f6e627487c152f111e307ad6dc71699ade746";
sha256 = "0wpqaix9ssa28cm7qqjj0zfrscjgk8s3kmi5b4kk8h583gsrikib";
};
nativeBuildInputs = [ ecm kdoctools ];
buildInputs = [
kconfig
kcrash
kdbusaddons
kdelibs4support
kdoctools
kguiaddons
kiconthemes
kinit
khtml
kparts
ktexteditor
kwindowsystem
poppler
qtscript
];
meta = {
description = "Kile is a user friendly TeX/LaTeX authoring tool for the KDE desktop environment";
homepage = https://www.kde.org/applications/office/kile/;
maintainers = with lib.maintainers; [ fridh ];
license = lib.licenses.gpl2Plus;
};
};
in
kdeWrapper
{
inherit unwrapped;
targets = [ "bin/kile" ];
paths = [ konsole.unwrapped ];
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, ecm, makeQtWrapper
{ stdenv, fetchurl, cmake, extra-cmake-modules, makeQtWrapper
# For `digitaglinktree`
, perl, sqlite
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
sha256 = "0dgsgji14l5zvxny36hrfsp889fsfrsbbn9bg57m18404xp903kg";
};
nativeBuildInputs = [ cmake ecm makeQtWrapper ];
nativeBuildInputs = [ cmake extra-cmake-modules makeQtWrapper ];
patches = [ ./0001-Disable-fno-operator-names.patch ];

View File

@ -1,6 +1,6 @@
{
stdenv, fetchurl,
ecm,
extra-cmake-modules,
karchive, kconfig, ki18n, kiconthemes, kio, kservice, kwindowsystem, kxmlgui,
libkipi, qtbase, qtsvg, qtxmlpatterns
}:
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
cd extra/kipi-plugins
'';
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
karchive kconfig ki18n kiconthemes kio kservice kwindowsystem kxmlgui libkipi
qtbase qtsvg qtxmlpatterns

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm,
extra-cmake-modules,
akonadi-mime, grantlee, kcontacts, kio, kitemmodels, kmime, qtwebengine,
akonadi
}:
@ -11,7 +11,7 @@ kdeApp {
license = with lib.licenses; [ gpl2 lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
akonadi-mime grantlee kcontacts kio kitemmodels kmime qtwebengine
];

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm,
extra-cmake-modules,
akonadi, kdbusaddons, kio, kitemmodels, kmime
}:
@ -10,6 +10,6 @@ kdeApp {
license = with lib.licenses; [ gpl2 lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ akonadi kdbusaddons kio kitemmodels kmime ];
}

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm,
extra-cmake-modules,
kcompletion, kconfigwidgets, kdbusaddons, kdesignerplugin, kiconthemes,
kio,
boost, kitemmodels
@ -12,7 +12,7 @@ kdeApp {
license = [ lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
kcompletion kconfigwidgets kdbusaddons kdesignerplugin kiconthemes kio
];

View File

@ -1,13 +1,16 @@
{
kdeApp, lib, kdeWrapper,
kdeApp, lib, config, kdeWrapper,
ecm, kdoctools, makeWrapper,
extra-cmake-modules, kdoctools, makeWrapper,
karchive, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, khtml, kio,
kservice, kpty, kwidgetsaddons, libarchive,
# Archive tools
p7zip, unrar, unzipNLS, zip
p7zip, unzipNLS, zip,
# Unfree tools
unfreeEnableUnrar ? false, unrar,
}:
let
@ -15,7 +18,7 @@ let
kdeApp {
name = "ark";
nativeBuildInputs = [
ecm kdoctools makeWrapper
extra-cmake-modules kdoctools makeWrapper
];
propagatedBuildInputs = [
khtml ki18n kio karchive kconfig kcrash kdbusaddons kiconthemes kservice
@ -23,15 +26,16 @@ let
];
postInstall =
let
PATH = lib.makeBinPath [
p7zip unrar unzipNLS zip
];
PATH =
lib.makeBinPath
([ p7zip unzipNLS zip ] ++ lib.optional unfreeEnableUnrar unrar);
in ''
wrapProgram "$out/bin/ark" \
--prefix PATH : "${PATH}"
'';
meta = {
license = with lib.licenses; [ gpl2 lgpl3 ];
license = with lib.licenses;
[ gpl2 lgpl3 ] ++ lib.optional unfreeEnableUnrar unfree;
maintainers = [ lib.maintainers.ttuegel ];
};
};

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
baloo, kconfig, kdelibs4support, kfilemetadata, ki18n, kio, kservice
}:
@ -10,7 +10,7 @@ kdeApp {
license = [ lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
baloo kconfig kdelibs4support kfilemetadata ki18n kio kservice
];

View File

@ -0,0 +1,93 @@
/*
# New packages
READ THIS FIRST
This module is for official packages in the KDE Applications Bundle. All
available packages are listed in `./srcs.nix`, although some are not yet
packaged in Nixpkgs (see below).
IF YOUR PACKAGE IS NOT LISTED IN `./srcs.nix`, IT DOES NOT GO HERE.
Many of the packages released upstream are not yet built in Nixpkgs due to lack
of demand. To add a Nixpkgs build for an upstream package, copy one of the
existing packages here and modify it as necessary. A simple example package that
still shows most of the available features is in `./gwenview.nix`.
# Updates
1. Update the URL in `./fetch.sh`.
2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/desktops/kde-5/applications`
from the top of the Nixpkgs tree.
3. Use `nox-review wip` to check that everything builds.
4. Commit the changes and open a pull request.
*/
{
stdenv, lib, libsForQt5, fetchurl, recurseIntoAttrs,
kdeDerivation, plasma5,
attica, phonon,
debug ? false,
}:
let
mirror = "mirror://kde";
srcs = import ./srcs.nix { inherit fetchurl mirror; };
in
let
packages = self: with self;
let
callPackage = self.newScope {
kdeApp = import ./build-support/application.nix {
inherit lib kdeDerivation;
inherit debug srcs;
};
};
in {
kdelibs = callPackage ./kdelibs { inherit attica phonon; };
akonadi = callPackage ./akonadi.nix {};
akonadi-contacts = callPackage ./akonadi-contacts.nix {};
akonadi-mime = callPackage ./akonadi-mime.nix {};
ark = callPackage ./ark/default.nix {};
baloo-widgets = callPackage ./baloo-widgets.nix {};
dolphin = callPackage ./dolphin.nix {};
dolphin-plugins = callPackage ./dolphin-plugins.nix {};
ffmpegthumbs = callPackage ./ffmpegthumbs.nix { };
filelight = callPackage ./filelight.nix {};
gwenview = callPackage ./gwenview.nix {};
kate = callPackage ./kate.nix {};
kdenlive = callPackage ./kdenlive.nix {};
kcalc = callPackage ./kcalc.nix {};
kcolorchooser = callPackage ./kcolorchooser.nix {};
kcontacts = callPackage ./kcontacts.nix {};
kdegraphics-mobipocket = callPackage ./kdegraphics-mobipocket.nix {};
kdegraphics-thumbnailers = callPackage ./kdegraphics-thumbnailers.nix {};
kdenetwork-filesharing = callPackage ./kdenetwork-filesharing.nix {};
kdf = callPackage ./kdf.nix {};
kgpg = callPackage ./kgpg.nix {};
khelpcenter = callPackage ./khelpcenter.nix {};
kig = callPackage ./kig.nix {};
kio-extras = callPackage ./kio-extras.nix {};
kmime = callPackage ./kmime.nix {};
kmix = callPackage ./kmix.nix {};
kompare = callPackage ./kompare.nix {};
konsole = callPackage ./konsole.nix {};
kwalletmanager = callPackage ./kwalletmanager.nix {};
libkdcraw = callPackage ./libkdcraw.nix {};
libkexiv2 = callPackage ./libkexiv2.nix {};
libkipi = callPackage ./libkipi.nix {};
libkomparediff2 = callPackage ./libkomparediff2.nix {};
marble = callPackage ./marble.nix {};
okteta = callPackage ./okteta.nix {};
okular = callPackage ./okular.nix {};
print-manager = callPackage ./print-manager.nix {};
spectacle = callPackage ./spectacle.nix {};
l10n = recurseIntoAttrs (import ./l10n.nix { inherit callPackage lib recurseIntoAttrs; });
};
in lib.makeScope libsForQt5.newScope packages

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
dolphin, kdelibs4support, ki18n, kio, kxmlgui
}:
@ -10,7 +10,7 @@ kdeApp {
license = [ lib.licenses.gpl2 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
dolphin.unwrapped kdelibs4support ki18n kio kxmlgui
];

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools, makeQtWrapper,
extra-cmake-modules, kdoctools, makeQtWrapper,
baloo, baloo-widgets, dolphin-plugins, kactivities, kbookmarks, kcmutils,
kcompletion, kconfig, kcoreaddons, kdelibs4support, kdbusaddons,
kfilemetadata, ki18n, kiconthemes, kinit, kio, knewstuff, knotifications,
@ -15,7 +15,7 @@ let
license = with lib.licenses; [ gpl2 fdl12 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools makeQtWrapper ];
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
propagatedBuildInputs = [
baloo baloo-widgets kactivities kbookmarks kcmutils kcompletion kconfig
kcoreaddons kdelibs4support kdbusaddons kfilemetadata ki18n kiconthemes

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm,
extra-cmake-modules,
ffmpeg, kio
}:
@ -10,6 +10,6 @@ kdeApp {
license = with lib.licenses; [ gpl2 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
propagatedBuildInputs = [ ffmpeg kio ];
}

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kio, kparts, kxmlgui, qtscript, solid
}:
@ -12,7 +12,7 @@ let
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ fridh vcunat ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
kio kparts kxmlgui qtscript solid
];

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
baloo, exiv2, kactivities, kdelibs4support, kio, kipi-plugins, lcms2,
libkdcraw, libkipi, phonon, qtimageformats, qtsvg, qtx11extras
}:
@ -13,7 +13,7 @@ let
license = with lib.licenses; [ gpl2 fdl12 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
baloo kactivities kdelibs4support kio exiv2 lcms2 libkdcraw
libkipi phonon qtimageformats qtsvg qtx11extras

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kactivities, kconfig, kcrash, kdbusaddons, kguiaddons, kiconthemes, ki18n,
kinit, kio, kitemmodels, kjobwidgets, knewstuff, knotifications, konsole,
kparts, ktexteditor, kwindowsystem, kwallet, kxmlgui, libgit2,
@ -15,7 +15,7 @@ let
license = with lib.licenses; [ gpl3 lgpl3 lgpl2 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
kactivities ki18n kio ktexteditor kwindowsystem plasma-framework
qtscript kconfig kcrash kguiaddons kiconthemes kinit kjobwidgets kparts

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kconfig, kconfigwidgets, kguiaddons, kinit, knotifications, gmp
}:
@ -12,7 +12,7 @@ let
license = with lib.licenses; [ gpl2 ];
maintainers = [ lib.maintainers.fridh ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
gmp kconfig kconfigwidgets kguiaddons kinit knotifications
];

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, ki18n, kwidgetsaddons, kxmlgui
extra-cmake-modules, ki18n, kwidgetsaddons, kxmlgui
}:
let
@ -11,7 +11,7 @@ let
license = with lib.licenses; [ mit ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
propagatedBuildInputs = [ ki18n kwidgetsaddons kxmlgui ];
};
in

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm, ki18n,
extra-cmake-modules, ki18n,
kcoreaddons, kconfig, kcodecs
}:
@ -10,6 +10,6 @@ kdeApp {
license = [ lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ki18n ];
nativeBuildInputs = [ extra-cmake-modules ki18n ];
buildInputs = [ kcoreaddons kconfig kcodecs ];
}

View File

@ -1,6 +1,6 @@
name: args:
{ kdeApp, cmake, ecm, gettext, kdoctools }:
{ kdeApp, cmake, extra-cmake-modules, gettext, kdoctools }:
kdeApp (args // {
sname = "kde-l10n-${name}";
@ -9,7 +9,7 @@ kdeApp (args // {
outputs = [ "out" ];
nativeBuildInputs =
[ cmake ecm gettext kdoctools ]
[ cmake extra-cmake-modules gettext kdoctools ]
++ (args.nativeBuildInputs or []);
preConfigure = ''

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm,
extra-cmake-modules,
kio
}:
@ -10,6 +10,6 @@ kdeApp {
license = [ lib.licenses.gpl2Plus ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ kio ];
}

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm, kio, libkexiv2, libkdcraw
extra-cmake-modules, kio, libkexiv2, libkdcraw
}:
kdeApp {
@ -9,6 +9,6 @@ kdeApp {
license = [ lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
propagatedBuildInputs = [ kio libkexiv2 libkdcraw ];
}

View File

@ -1,5 +1,5 @@
{
kdeApp, lib, src, version,
kdeApp, lib,
automoc4, bison, cmake, flex, libxslt, perl, pkgconfig, shared_mime_info,
attica, attr, avahi, docbook_xml_dtd_42, docbook_xsl, giflib, ilmbase,
libdbusmenu_qt, libjpeg, libxml2, phonon, polkit_qt4, qca2, qt4,

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kcoreaddons, ki18n, kio, kwidgetsaddons, samba
}:
@ -10,6 +10,6 @@ kdeApp {
license = [ lib.licenses.gpl2 lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [ kcoreaddons ki18n kio kwidgetsaddons samba ];
}

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kcmutils
}:
@ -12,7 +12,7 @@ let
license = with lib.licenses; [ gpl2 ];
maintainers = [ lib.maintainers.peterhoeg ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
kcmutils
];

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm, kdoctools, ki18n,
extra-cmake-modules, kdoctools, ki18n,
akonadi-contacts, gpgme, karchive, kcodecs, kcontacts, kcoreaddons, kcrash,
kdbusaddons, kiconthemes, kjobwidgets, kio, knotifications, kservice,
ktextwidgets, kxmlgui, kwidgetsaddons, kwindowsystem
@ -8,7 +8,7 @@
kdeApp {
name = "kgpg";
nativeBuildInputs = [ ecm kdoctools ki18n ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ki18n ];
buildInputs = [
akonadi-contacts gpgme karchive kcodecs kcontacts kcoreaddons kcrash kdbusaddons
kiconthemes kjobwidgets kio knotifications kservice ktextwidgets kxmlgui

View File

@ -1,6 +1,6 @@
{
kdeApp, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
grantlee, kconfig, kcoreaddons, kdbusaddons, ki18n, kinit, kcmutils,
kdelibs4support, khtml, kservice, xapian
}:
@ -9,7 +9,7 @@ let
unwrapped =
kdeApp {
name = "khelpcenter";
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
grantlee kdelibs4support khtml ki18n kconfig kcoreaddons kdbusaddons
kinit kcmutils kservice xapian

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper
, ecm, kdoctools, kparts
, extra-cmake-modules, kdoctools, kparts
, qtsvg, qtxmlpatterns, ktexteditor, boost
}:
@ -12,7 +12,7 @@ let
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ raskin ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
kparts qtsvg qtxmlpatterns ktexteditor boost
];

View File

@ -1,5 +1,5 @@
{
kdeApp, lib, ecm, kdoctools, shared_mime_info,
kdeApp, lib, extra-cmake-modules, kdoctools, shared_mime_info,
exiv2, kactivities, karchive, kbookmarks, kconfig, kconfigwidgets,
kcoreaddons, kdbusaddons, kguiaddons, kdnssd, kiconthemes, ki18n, kio, khtml,
kdelibs4support, kpty, libmtp, libssh, openexr, ilmbase, openslp, phonon,
@ -12,7 +12,7 @@ kdeApp {
license = with lib.licenses; [ gpl2 lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools shared_mime_info ];
nativeBuildInputs = [ extra-cmake-modules kdoctools shared_mime_info ];
propagatedBuildInputs = [
exiv2 kactivities karchive kbookmarks kconfig kconfigwidgets kcoreaddons
kdbusaddons kguiaddons kdnssd kiconthemes ki18n kio khtml kdelibs4support

View File

@ -1,6 +1,6 @@
{
kdeApp, lib,
ecm, ki18n,
extra-cmake-modules, ki18n,
kcodecs
}:
@ -10,6 +10,6 @@ kdeApp {
license = [ lib.licenses.lgpl21 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ki18n ];
nativeBuildInputs = [ extra-cmake-modules ki18n ];
buildInputs = [ kcodecs ];
}

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kglobalaccel, kxmlgui, kcoreaddons, kdelibs4support,
plasma-framework, libpulseaudio, alsaLib, libcanberra_kde
}:
@ -13,7 +13,7 @@ let
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
maintainers = [ lib.maintainers.rongcuid ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ libpulseaudio alsaLib libcanberra_kde ];
propagatedBuildInputs = [
kglobalaccel kxmlgui kcoreaddons kdelibs4support

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kparts, ktexteditor, kwidgetsaddons, libkomparediff2
}:
@ -9,7 +9,7 @@ let
kdeApp {
name = "kompare";
meta = { license = with lib.licenses; [ gpl2 ]; };
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
kparts ktexteditor kwidgetsaddons libkomparediff2
];

View File

@ -1,6 +1,6 @@
{
kdeApp, lib, kdeWrapper,
ecm, kdoctools,
extra-cmake-modules, kdoctools,
kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kguiaddons,
ki18n, kiconthemes, kinit, kdelibs4support, kio, knotifications,
knotifyconfig, kparts, kpty, kservice, ktextwidgets, kwidgetsaddons,
@ -15,7 +15,7 @@ let
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
kdelibs4support ki18n kwindowsystem qtscript kbookmarks kcompletion
kconfig kconfigwidgets kcoreaddons kguiaddons kiconthemes kinit kio

View File

@ -1,7 +1,7 @@
{ lib
, kdeApp
, kdeWrapper
, ecm
, extra-cmake-modules
, kdoctools
, kauth
, kcmutils
@ -19,7 +19,7 @@ let
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ fridh ];
};
nativeBuildInputs = [ ecm kdoctools ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
kauth
kcmutils

View File

@ -1,4 +1,4 @@
{ callPackage, pkgs, lib }:
{ callPackage, recurseIntoAttrs, lib }:
let
@ -7,7 +7,7 @@ let
in
lib.mapAttrs (name: attr: pkgs.recurseIntoAttrs attr) {
lib.mapAttrs (name: attr: recurseIntoAttrs attr) {
ar = {
qt4 = callPackage (kdeLocale4 "ar" {}) {};
qt5 = callPackage (kdeLocale5 "ar" {}) {};

View File

@ -1,4 +1,4 @@
{ kdeApp, lib, ecm, libraw }:
{ kdeApp, lib, extra-cmake-modules, libraw, qtbase }:
kdeApp {
name = "libkdcraw";
@ -6,6 +6,7 @@ kdeApp {
license = with lib.licenses; [ gpl2 lgpl21 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ qtbase ];
propagatedBuildInputs = [ libraw ];
}

View File

@ -1,4 +1,4 @@
{ kdeApp, lib, exiv2, ecm }:
{ kdeApp, lib, exiv2, extra-cmake-modules, qtbase }:
kdeApp {
name = "libkexiv2";
@ -6,6 +6,7 @@ kdeApp {
license = with lib.licenses; [ gpl2 lgpl21 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ qtbase ];
propagatedBuildInputs = [ exiv2 ];
}

View File

@ -1,4 +1,4 @@
{ kdeApp, lib, ecm, kconfig, ki18n, kservice, kxmlgui }:
{ kdeApp, lib, extra-cmake-modules, kconfig, ki18n, kservice, kxmlgui }:
kdeApp {
name = "libkipi";
@ -6,6 +6,6 @@ kdeApp {
license = with lib.licenses; [ gpl2 lgpl21 bsd3 ];
maintainers = [ lib.maintainers.ttuegel ];
};
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
propagatedBuildInputs = [ kconfig ki18n kservice kxmlgui ];
}

View File

@ -0,0 +1,7 @@
{ kdeApp, lib, extra-cmake-modules, ki18n, kxmlgui, kcodecs, kio }:
kdeApp {
name = "libkomparediff2";
nativeBuildInputs = [ extra-cmake-modules ];
propagatedBuildInputs = [ kcodecs ki18n kxmlgui kio ];
}

View File

@ -1,5 +1,5 @@
{ kdeApp, lib, kdeWrapper
, ecm, qtscript, qtsvg, qtquickcontrols
, extra-cmake-modules, qtscript, qtsvg, qtquickcontrols
, gpsd
}:
@ -9,7 +9,7 @@ let
name = "marble";
meta.license = with lib.licenses; [ lgpl21 gpl3 ];
nativeBuildInputs = [ ecm ];
nativeBuildInputs = [ extra-cmake-modules ];
propagatedBuildInputs = [
qtscript qtsvg qtquickcontrols
gpsd

Some files were not shown because too many files have changed in this diff Show More