Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk 2019-12-19 09:21:24 +01:00
commit 39037a3431
159 changed files with 2727 additions and 787 deletions

View File

@ -105,6 +105,17 @@ stdenv.mkDerivation {
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<literal>fetchFromGitiles</literal>
</term>
<listitem>
<para>
This is used with Gitiles repositories. The arguments expected
are similar to fetchgit.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<literal>fetchFromBitbucket</literal> <literal>fetchFromBitbucket</literal>

View File

@ -1034,7 +1034,10 @@ Create this `default.nix` file, together with a `requirements.txt` and simply ex
```nix ```nix
with import <nixpkgs> {}; with import <nixpkgs> {};
with python27Packages;
let
pythonPackages = python27Packages;
in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "impurePythonEnv"; name = "impurePythonEnv";
@ -1044,9 +1047,8 @@ stdenv.mkDerivation {
buildInputs = [ buildInputs = [
# these packages are required for virtualenv and pip to work: # these packages are required for virtualenv and pip to work:
# #
python27Full pythonPackages.virtualenv
python27Packages.virtualenv pythonPackages.pip
python27Packages.pip
# the following packages are related to the dependencies of your python # the following packages are related to the dependencies of your python
# project. # project.
# In this particular example the python modules listed in the # In this particular example the python modules listed in the
@ -1059,14 +1061,13 @@ stdenv.mkDerivation {
libxml2 libxml2
libxslt libxslt
libzip libzip
stdenv
zlib zlib
]; ];
shellHook = '' shellHook = ''
# set SOURCE_DATE_EPOCH so that we can use python wheels # set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s) SOURCE_DATE_EPOCH=$(date +%s)
virtualenv --no-setuptools venv virtualenv --python=${pythonPackages.python.interpreter} --no-setuptools venv
export PATH=$PWD/venv/bin:$PATH export PATH=$PWD/venv/bin:$PATH
pip install -r requirements.txt pip install -r requirements.txt
''; '';

View File

@ -5239,6 +5239,12 @@
githubId = 20792; githubId = 20792;
name = "Sebastian Galkin"; name = "Sebastian Galkin";
}; };
pashashocky = {
email = "pashashocky@gmail.com";
github = "pashashocky";
githubId = 673857;
name = "Pash Shocky";
};
pashev = { pashev = {
email = "pashev.igor@gmail.com"; email = "pashev.igor@gmail.com";
github = "ip1981"; github = "ip1981";

View File

@ -83,8 +83,7 @@
desktop environment. If you wanted no desktop environment and i3 as your your desktop environment. If you wanted no desktop environment and i3 as your your
window manager, you'd define: window manager, you'd define:
<programlisting> <programlisting>
<xref linkend="opt-services.xserver.desktopManager.default"/> = "none"; <xref linkend="opt-services.xserver.displayManager.defaultSession"/> = "none+i3";
<xref linkend="opt-services.xserver.windowManager.default"/> = "i3";
</programlisting> </programlisting>
And, finally, to enable auto-login for a user <literal>johndoe</literal>: And, finally, to enable auto-login for a user <literal>johndoe</literal>:
<programlisting> <programlisting>

View File

@ -7,9 +7,8 @@
<para> <para>
To enable the Xfce Desktop Environment, set To enable the Xfce Desktop Environment, set
<programlisting> <programlisting>
<link linkend="opt-services.xserver.desktopManager.default">services.xserver.desktopManager</link> = { <xref linkend="opt-services.xserver.desktopManager.xfce.enable" /> = true;
<link linkend="opt-services.xserver.desktopManager.xfce.enable">xfce.enable</link> = true; <xref linkend="opt-services.xserver.displayManager.defaultSession" /> = "xfce";
<link linkend="opt-services.xserver.desktopManager.default">default</link> = "xfce";
}; };
</programlisting> </programlisting>
</para> </para>

View File

@ -119,4 +119,13 @@ Defined by:
bug, please report to Nicolas Pierron. bug, please report to Nicolas Pierron.
</para> </para>
</refsection> </refsection>
<refsection>
<title>See also</title>
<para>
<citerefentry>
<refentrytitle>configuration.nix</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>
</para>
</refsection>
</refentry> </refentry>

View File

@ -55,6 +55,19 @@
and adding a <option>--all</option> option which prints all options and their values. and adding a <option>--all</option> option which prints all options and their values.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
<option>services.xserver.desktopManager.default</option> and <option>services.xserver.windowManager.default</option> options were replaced by a single <xref linkend="opt-services.xserver.displayManager.defaultSession"/> option to improve support for upstream session files. If you used something like:
<programlisting>
services.xserver.desktopManager.default = "xfce";
services.xserver.windowManager.default = "icewm";
</programlisting>
you should change it to:
<programlisting>
services.xserver.displayManager.defaultSession = "xfce+icewm";
</programlisting>
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -262,9 +262,8 @@ in rec {
virtualisation.memorySize = 1024; virtualisation.memorySize = 1024;
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.auto.enable = true; services.xserver.displayManager.auto.enable = true;
services.xserver.windowManager.default = "icewm"; services.xserver.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true; services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
}; };
in in
runInMachine ({ runInMachine ({

View File

@ -249,9 +249,8 @@ in rec {
virtualisation.memorySize = 1024; virtualisation.memorySize = 1024;
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.auto.enable = true; services.xserver.displayManager.auto.enable = true;
services.xserver.windowManager.default = "icewm"; services.xserver.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true; services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
}; };
in in
runInMachine ({ runInMachine ({

View File

@ -443,6 +443,7 @@
./services/misc/logkeys.nix ./services/misc/logkeys.nix
./services/misc/leaps.nix ./services/misc/leaps.nix
./services/misc/lidarr.nix ./services/misc/lidarr.nix
./services/misc/mame.nix
./services/misc/mathics.nix ./services/misc/mathics.nix
./services/misc/matrix-synapse.nix ./services/misc/matrix-synapse.nix
./services/misc/mbpfan.nix ./services/misc/mbpfan.nix

View File

@ -24,6 +24,7 @@ let
swayJoined = pkgs.symlinkJoin { swayJoined = pkgs.symlinkJoin {
name = "sway-joined"; name = "sway-joined";
paths = [ swayWrapped swayPackage ]; paths = [ swayWrapped swayPackage ];
passthru.providedSessions = [ "sway" ];
}; };
in { in {
options.programs.sway = { options.programs.sway = {
@ -88,7 +89,7 @@ in {
fonts.enableDefaultFonts = mkDefault true; fonts.enableDefaultFonts = mkDefault true;
programs.dconf.enable = mkDefault true; programs.dconf.enable = mkDefault true;
# To make a Sway session available if a display manager like SDDM is enabled: # To make a Sway session available if a display manager like SDDM is enabled:
services.xserver.displayManager.extraSessionFilePackages = [ swayJoined ]; services.xserver.displayManager.sessionPackages = [ swayJoined ];
}; };
meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ]; meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ];

View File

@ -111,6 +111,7 @@ in
Restart = "always"; Restart = "always";
WorkingDirectory = cfg.dataDir; WorkingDirectory = cfg.dataDir;
KillSignal = "SIGKILL"; KillSignal = "SIGKILL";
PIDFile = "${cfg.dataDir}.config/oxidized/pid";
}; };
}; };
}; };

View File

@ -0,0 +1,67 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.mame;
mame = "mame${lib.optionalString pkgs.stdenv.is64bit "64"}";
in
{
options = {
services.mame = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to setup TUN/TAP Ethernet interface for MAME emulator.
'';
};
user = mkOption {
type = types.str;
description = ''
User from which you run MAME binary.
'';
};
hostAddr = mkOption {
type = types.str;
description = ''
IP address of the host system. Usually an address of the main network
adapter or the adapter through which you get an internet connection.
'';
example = "192.168.31.156";
};
emuAddr = mkOption {
type = types.str;
description = ''
IP address of the guest system. The same you set inside guest OS under
MAME. Should be on the same subnet as <option>services.mame.hostAddr</option>.
'';
example = "192.168.31.155";
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.mame ];
security.wrappers."${mame}" = {
source = "${pkgs.mame}/bin/${mame}";
capabilities = "cap_net_admin,cap_net_raw+eip";
};
systemd.services.mame = {
description = "MAME TUN/TAP Ethernet interface";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.iproute ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.mame}/bin/taputil.sh -c ${cfg.user} ${cfg.emuAddr} ${cfg.hostAddr} -";
ExecStop = "${pkgs.mame}/bin/taputil.sh -d ${cfg.user}";
};
};
};
meta.maintainers = with lib.maintainers; [ gnidorah ];
}

View File

@ -86,23 +86,14 @@ in
}; };
default = mkOption { default = mkOption {
type = types.str; type = types.nullOr types.str;
default = ""; default = null;
example = "none"; example = "none";
description = "Default desktop manager loaded if none have been chosen."; description = ''
apply = defaultDM: <emphasis role="strong">Deprecated</emphasis>, please use <xref linkend="opt-services.xserver.displayManager.defaultSession"/> instead.
if defaultDM == "" && cfg.session.list != [] then
(head cfg.session.list).name Default desktop manager loaded if none have been chosen.
else if any (w: w.name == defaultDM) cfg.session.list then '';
defaultDM
else
builtins.trace ''
Default desktop manager (${defaultDM}) not found at evaluation time.
These are the known valid session names:
${concatMapStringsSep "\n " (w: "services.xserver.desktopManager.default = \"${w.name}\";") cfg.session.list}
It's also possible the default can be found in one of these packages:
${concatMapStringsSep "\n " (p: p.name) config.services.xserver.displayManager.extraSessionFilePackages}
'' defaultDM;
}; };
}; };

View File

@ -144,7 +144,7 @@ in
services.gnome3.core-shell.enable = true; services.gnome3.core-shell.enable = true;
services.gnome3.core-utilities.enable = mkDefault true; services.gnome3.core-utilities.enable = mkDefault true;
services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ]; services.xserver.displayManager.sessionPackages = [ pkgs.gnome3.gnome-session ];
environment.extraInit = '' environment.extraInit = ''
${concatMapStrings (p: '' ${concatMapStrings (p: ''
@ -171,7 +171,7 @@ in
}) })
(mkIf flashbackEnabled { (mkIf flashbackEnabled {
services.xserver.displayManager.extraSessionFilePackages = map services.xserver.displayManager.sessionPackages = map
(wm: pkgs.gnome3.gnome-flashback.mkSessionForWm { (wm: pkgs.gnome3.gnome-flashback.mkSessionForWm {
inherit (wm) wmName wmLabel wmCommand; inherit (wm) wmName wmLabel wmCommand;
}) (optional cfg.flashback.enableMetacity { }) (optional cfg.flashback.enableMetacity {

View File

@ -69,7 +69,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.xserver.displayManager.extraSessionFilePackages = [ pkgs.pantheon.elementary-session-settings ]; services.xserver.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ];
# Ensure lightdm is used when Pantheon is enabled # Ensure lightdm is used when Pantheon is enabled
# Without it screen locking will be nonfunctional because of the use of lightlocker # Without it screen locking will be nonfunctional because of the use of lightlocker
@ -81,9 +81,9 @@ in
services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true; services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true;
# If not set manually Pantheon session cannot be started # Without this, Elementary LightDM greeter will pre-select non-existent `default` session
# Known issue of https://github.com/NixOS/nixpkgs/pull/43992 # https://github.com/elementary/greeter/issues/368
services.xserver.desktopManager.default = mkForce "pantheon"; services.xserver.displayManager.defaultSession = "pantheon";
services.xserver.displayManager.sessionCommands = '' services.xserver.displayManager.sessionCommands = ''
if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then

View File

@ -118,7 +118,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.xserver.displayManager.extraSessionFilePackages = [ services.xserver.displayManager.sessionPackages = [
pkgs.surf-display pkgs.surf-display
]; ];

View File

@ -0,0 +1,39 @@
{ accountsservice
, glib
, gobject-introspection
, python3
, wrapGAppsHook
}:
python3.pkgs.buildPythonApplication {
name = "set-session";
format = "other";
src = ./set-session.py;
dontUnpack = true;
strictDeps = false;
nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
];
buildInputs = [
accountsservice
glib
];
propagatedBuildInputs = with python3.pkgs; [
pygobject3
ordered-set
];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/set-session
chmod +x $out/bin/set-session
'';
}

View File

@ -27,16 +27,7 @@ let
Xft.hintstyle: hintslight Xft.hintstyle: hintslight
''; '';
mkCases = session: # file provided by services.xserver.displayManager.sessionData.wrapper
concatStrings (
mapAttrsToList (name: starts: ''
(${name})
${concatMapStringsSep "\n " (n: n.start) starts}
;;
'') (lib.groupBy (n: n.name) session)
);
# file provided by services.xserver.displayManager.session.wrapper
xsessionWrapper = pkgs.writeScript "xsession-wrapper" xsessionWrapper = pkgs.writeScript "xsession-wrapper"
'' ''
#! ${pkgs.bash}/bin/bash #! ${pkgs.bash}/bin/bash
@ -116,94 +107,44 @@ let
# Run the supplied session command. Remove any double quotes with eval. # Run the supplied session command. Remove any double quotes with eval.
eval exec "$@" eval exec "$@"
else else
# Fall back to the default window/desktopManager # TODO: Do we need this? Should not the session always exist?
exec ${cfg.displayManager.session.script} echo "error: unknown session $1" 1>&2
exit 1
fi fi
''; '';
# file provided by services.xserver.displayManager.session.script installedSessions = pkgs.runCommand "desktops"
xsession = wm: dm: pkgs.writeScript "xsession"
''
#! ${pkgs.bash}/bin/bash
# Legacy session script used to construct .desktop files from
# `services.xserver.displayManager.session` entries. Called from
# `sessionWrapper`.
# Expected parameters:
# $1 = <desktop-manager>+<window-manager>
# The first argument of this script is the session type.
sessionType="$1"
if [ "$sessionType" = default ]; then sessionType=""; fi
# The session type is "<desktop-manager>+<window-manager>", so
# extract those (see:
# http://wiki.bash-hackers.org/syntax/pe#substring_removal).
windowManager="''${sessionType##*+}"
: ''${windowManager:=${cfg.windowManager.default}}
desktopManager="''${sessionType%%+*}"
: ''${desktopManager:=${cfg.desktopManager.default}}
# Start the window manager.
case "$windowManager" in
${mkCases wm}
(*) echo "$0: Window manager '$windowManager' not found.";;
esac
# Start the desktop manager.
case "$desktopManager" in
${mkCases dm}
(*) echo "$0: Desktop manager '$desktopManager' not found.";;
esac
${optionalString cfg.updateDbusEnvironment ''
${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all
''}
test -n "$waitPID" && wait "$waitPID"
${config.systemd.package}/bin/systemctl --user stop graphical-session.target
exit 0
'';
# Desktop Entry Specification:
# - https://standards.freedesktop.org/desktop-entry-spec/latest/
# - https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
mkDesktops = names: pkgs.runCommand "desktops"
{ # trivial derivation { # trivial derivation
preferLocalBuild = true; preferLocalBuild = true;
allowSubstitutes = false; allowSubstitutes = false;
} }
'' ''
mkdir -p "$out/share/xsessions" mkdir -p "$out/share/"{xsessions,wayland-sessions}
${concatMapStrings (n: ''
cat - > "$out/share/xsessions/${n}.desktop" << EODESKTOP
[Desktop Entry]
Version=1.0
Type=XSession
TryExec=${cfg.displayManager.session.script}
Exec=${cfg.displayManager.session.script} "${n}"
Name=${n}
Comment=
EODESKTOP
'') names}
${concatMapStrings (pkg: '' ${concatMapStrings (pkg: ''
for n in ${concatStringsSep " " pkg.providedSessions}; do
if ! test -f ${pkg}/share/wayland-sessions/$n.desktop -o \
-f ${pkg}/share/xsessions/$n.desktop; then
echo "Couldn't find provided session name, $n.desktop, in session package ${pkg.name}:"
echo " ${pkg}"
return 1
fi
done
if test -d ${pkg}/share/xsessions; then if test -d ${pkg}/share/xsessions; then
${xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions ${xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions
fi fi
'') cfg.displayManager.extraSessionFilePackages}
${concatMapStrings (pkg: ''
if test -d ${pkg}/share/wayland-sessions; then if test -d ${pkg}/share/wayland-sessions; then
mkdir -p "$out/share/wayland-sessions"
${xorg.lndir}/bin/lndir ${pkg}/share/wayland-sessions $out/share/wayland-sessions ${xorg.lndir}/bin/lndir ${pkg}/share/wayland-sessions $out/share/wayland-sessions
fi fi
'') cfg.displayManager.extraSessionFilePackages} '') cfg.displayManager.sessionPackages}
''; '';
dmDefault = cfg.desktopManager.default;
wmDefault = cfg.windowManager.default;
defaultSessionFromLegacyOptions = concatStringsSep "+" (filter (s: s != null) ([ dmDefault ] ++ optional (wmDefault != "none") wmDefault));
in in
{ {
@ -261,11 +202,24 @@ in
''; '';
}; };
extraSessionFilePackages = mkOption { sessionPackages = mkOption {
type = types.listOf types.package; type = with types; listOf (package // {
description = "package with provided sessions";
check = p: assertMsg
(package.check p && p ? providedSessions
&& p.providedSessions != [] && all isString p.providedSessions)
''
Package, '${p.name}', did not specify any session names, as strings, in
'passthru.providedSessions'. This is required when used as a session package.
The session names can be looked up in:
${p}/share/xsessions
${p}/share/wayland-sessions
'';
});
default = []; default = [];
description = '' description = ''
A list of packages containing xsession files to be passed to the display manager. A list of packages containing x11 or wayland session files to be passed to the display manager.
''; '';
}; };
@ -296,16 +250,48 @@ in
inside the display manager with the desktop manager name inside the display manager with the desktop manager name
followed by the window manager name. followed by the window manager name.
''; '';
apply = list: rec {
wm = filter (s: s.manage == "window") list;
dm = filter (s: s.manage == "desktop") list;
names = flip concatMap dm
(d: map (w: d.name + optionalString (w.name != "none") ("+" + w.name))
(filter (w: d.name != "none" || w.name != "none") wm));
desktops = mkDesktops names;
script = xsession wm dm;
wrapper = xsessionWrapper;
}; };
sessionData = mkOption {
description = "Data exported for display managers convenience";
internal = true;
default = {};
apply = val: {
wrapper = xsessionWrapper;
desktops = installedSessions;
sessionNames = concatMap (p: p.providedSessions) cfg.displayManager.sessionPackages;
# We do not want to force users to set defaultSession when they have only single DE.
autologinSession =
if cfg.displayManager.defaultSession != null then
cfg.displayManager.defaultSession
else if cfg.displayManager.sessionData.sessionNames != [] then
head cfg.displayManager.sessionData.sessionNames
else
null;
};
};
defaultSession = mkOption {
type = with types; nullOr str // {
description = "session name";
check = d:
assertMsg (d != null -> (str.check d && elem d cfg.displayManager.sessionData.sessionNames)) ''
Default graphical session, '${d}', not found.
Valid names for 'services.xserver.displayManager.defaultSession' are:
${concatStringsSep "\n " cfg.displayManager.sessionData.sessionNames}
'';
};
default =
if dmDefault != null || wmDefault != null then
defaultSessionFromLegacyOptions
else
null;
example = "gnome";
description = ''
Graphical session to pre-select in the session chooser (only effective for GDM and LightDM).
On GDM, LightDM and SDDM, it will also be used as a session for auto-login.
'';
}; };
job = { job = {
@ -356,6 +342,27 @@ in
}; };
config = { config = {
assertions = [
{
assertion = cfg.desktopManager.default != null || cfg.windowManager.default != null -> cfg.displayManager.defaultSession == defaultSessionFromLegacyOptions;
message = "You cannot use both services.xserver.displayManager.defaultSession option and legacy options (services.xserver.desktopManager.default and services.xserver.windowManager.default).";
}
];
warnings =
mkIf (dmDefault != null || wmDefault != null) [
''
The following options are deprecated:
${concatStringsSep "\n " (map ({c, t}: t) (filter ({c, t}: c != null) [
{ c = dmDefault; t = "- services.xserver.desktopManager.default"; }
{ c = wmDefault; t = "- services.xserver.windowManager.default"; }
]))}
Please use
services.xserver.displayManager.defaultSession = "${concatStringsSep "+" (filter (s: s != null) [ dmDefault wmDefault ])}";
instead.
''
];
services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X"; services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X";
systemd.user.targets.graphical-session = { systemd.user.targets.graphical-session = {
@ -364,6 +371,67 @@ in
StopWhenUnneeded = false; StopWhenUnneeded = false;
}; };
}; };
# Create desktop files and scripts for starting sessions for WMs/DMs
# that do not have upstream session files (those defined using services.{display,desktop,window}Manager.session options).
services.xserver.displayManager.sessionPackages =
let
dms = filter (s: s.manage == "desktop") cfg.displayManager.session;
wms = filter (s: s.manage == "window") cfg.displayManager.session;
# Script responsible for starting the window manager and the desktop manager.
xsession = wm: dm: pkgs.writeScript "xsession" ''
#! ${pkgs.bash}/bin/bash
# Legacy session script used to construct .desktop files from
# `services.xserver.displayManager.session` entries. Called from
# `sessionWrapper`.
# Start the window manager.
${wm.start}
# Start the desktop manager.
${dm.start}
${optionalString cfg.updateDbusEnvironment ''
${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all
''}
test -n "$waitPID" && wait "$waitPID"
${config.systemd.package}/bin/systemctl --user stop graphical-session.target
exit 0
'';
in
# We will generate every possible pair of WM and DM.
concatLists (
crossLists
(dm: wm: let
sessionName = "${dm.name}${optionalString (wm.name != "none") ("+" + wm.name)}";
script = xsession dm wm;
in
optional (dm.name != "none" || wm.name != "none")
(pkgs.writeTextFile {
name = "${sessionName}-xsession";
destination = "/share/xsessions/${sessionName}.desktop";
# Desktop Entry Specification:
# - https://standards.freedesktop.org/desktop-entry-spec/latest/
# - https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
text = ''
[Desktop Entry]
Version=1.0
Type=XSession
TryExec=${script}
Exec=${script}
Name=${sessionName}
'';
} // {
providedSessions = [ sessionName ];
})
)
[dms wms]
);
}; };
imports = [ imports = [
@ -371,6 +439,7 @@ in
"The option is no longer necessary because all display managers have already delegated lid management to systemd.") "The option is no longer necessary because all display managers have already delegated lid management to systemd.")
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logsXsession" ] [ "services" "xserver" "displayManager" "job" "logToFile" ]) (mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logsXsession" ] [ "services" "xserver" "displayManager" "job" "logToFile" ])
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "logToJournal" ] [ "services" "xserver" "displayManager" "job" "logToJournal" ]) (mkRenamedOptionModule [ "services" "xserver" "displayManager" "logToJournal" ] [ "services" "xserver" "displayManager" "job" "logToJournal" ])
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "extraSessionFilesPackages" ] [ "services" "xserver" "displayManager" "sessionPackages" ])
]; ];
} }

View File

@ -31,44 +31,9 @@ let
load-module module-position-event-sounds load-module module-position-event-sounds
''; '';
dmDefault = config.services.xserver.desktopManager.default; defaultSessionName = config.services.xserver.displayManager.defaultSession;
wmDefault = config.services.xserver.windowManager.default;
hasDefaultUserSession = dmDefault != "none" || wmDefault != "none";
defaultSessionName = dmDefault + optionalString (wmDefault != "none") ("+" + wmDefault);
setSessionScript = pkgs.python3.pkgs.buildPythonApplication {
name = "set-session";
format = "other";
src = ./set-session.py;
dontUnpack = true;
strictDeps = false;
nativeBuildInputs = with pkgs; [
wrapGAppsHook
gobject-introspection
];
buildInputs = with pkgs; [
accountsservice
glib
];
propagatedBuildInputs = with pkgs.python3.pkgs; [
pygobject3
ordered-set
];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/set-session
chmod +x $out/bin/set-session
'';
};
setSessionScript = pkgs.callPackage ./account-service-util.nix { };
in in
{ {
@ -186,7 +151,7 @@ in
environment = { environment = {
GDM_X_SERVER_EXTRA_ARGS = toString GDM_X_SERVER_EXTRA_ARGS = toString
(filter (arg: arg != "-terminate") cfg.xserverArgs); (filter (arg: arg != "-terminate") cfg.xserverArgs);
XDG_DATA_DIRS = "${cfg.session.desktops}/share/"; XDG_DATA_DIRS = "${cfg.sessionData.desktops}/share/";
} // optionalAttrs (xSessionWrapper != null) { } // optionalAttrs (xSessionWrapper != null) {
# Make GDM use this wrapper before running the session, which runs the # Make GDM use this wrapper before running the session, which runs the
# configured setupCommands. This relies on a patched GDM which supports # configured setupCommands. This relies on a patched GDM which supports
@ -204,16 +169,19 @@ in
cat - > /run/gdm/.config/gnome-initial-setup-done <<- EOF cat - > /run/gdm/.config/gnome-initial-setup-done <<- EOF
yes yes
EOF EOF
'' '' + optionalString (defaultSessionName != null) ''
# TODO: Make setSessionScript aware of previously used sessions # Set default session in session chooser to a specified values basically ignore session history.
# + optionalString hasDefaultUserSession '' ${setSessionScript}/bin/set-session ${cfg.sessionData.autologinSession}
# ${setSessionScript}/bin/set-session ${defaultSessionName} '';
# ''
;
}; };
systemd.services.display-manager.wants = [
# Because sd_login_monitor_new requires /run/systemd/machines # Because sd_login_monitor_new requires /run/systemd/machines
systemd.services.display-manager.wants = [ "systemd-machined.service" ]; "systemd-machined.service"
# setSessionScript wants AccountsService
"accounts-daemon.service"
];
systemd.services.display-manager.after = [ systemd.services.display-manager.after = [
"rc-local.service" "rc-local.service"
"systemd-machined.service" "systemd-machined.service"
@ -329,7 +297,7 @@ in
${optionalString cfg.gdm.debug "Enable=true"} ${optionalString cfg.gdm.debug "Enable=true"}
''; '';
environment.etc."gdm/Xsession".source = config.services.xserver.displayManager.session.wrapper; environment.etc."gdm/Xsession".source = config.services.xserver.displayManager.sessionData.wrapper;
# GDM LFS PAM modules, adapted somehow to NixOS # GDM LFS PAM modules, adapted somehow to NixOS
security.pam.services = { security.pam.services = {

View File

@ -53,9 +53,8 @@ in
Whether to enable lightdm-mini-greeter as the lightdm greeter. Whether to enable lightdm-mini-greeter as the lightdm greeter.
Note that this greeter starts only the default X session. Note that this greeter starts only the default X session.
You can configure the default X session by You can configure the default X session using
<option>services.xserver.desktopManager.default</option> and <xref linkend="opt-services.xserver.displayManager.defaultSession"/>.
<option>services.xserver.windowManager.default</option>.
''; '';
}; };

View File

@ -8,10 +8,9 @@ let
dmcfg = xcfg.displayManager; dmcfg = xcfg.displayManager;
xEnv = config.systemd.services.display-manager.environment; xEnv = config.systemd.services.display-manager.environment;
cfg = dmcfg.lightdm; cfg = dmcfg.lightdm;
sessionData = dmcfg.sessionData;
dmDefault = xcfg.desktopManager.default; setSessionScript = pkgs.callPackage ./account-service-util.nix { };
wmDefault = xcfg.windowManager.default;
hasDefaultUserSession = dmDefault != "none" || wmDefault != "none";
inherit (pkgs) lightdm writeScript writeText; inherit (pkgs) lightdm writeScript writeText;
@ -45,22 +44,19 @@ let
greeter-user = ${config.users.users.lightdm.name} greeter-user = ${config.users.users.lightdm.name}
greeters-directory = ${cfg.greeter.package} greeters-directory = ${cfg.greeter.package}
''} ''}
sessions-directory = ${dmcfg.session.desktops}/share/xsessions sessions-directory = ${dmcfg.sessionData.desktops}/share/xsessions:${dmcfg.sessionData.desktops}/share/wayland-sessions
${cfg.extraConfig} ${cfg.extraConfig}
[Seat:*] [Seat:*]
xserver-command = ${xserverWrapper} xserver-command = ${xserverWrapper}
session-wrapper = ${dmcfg.session.wrapper} session-wrapper = ${dmcfg.sessionData.wrapper}
${optionalString cfg.greeter.enable '' ${optionalString cfg.greeter.enable ''
greeter-session = ${cfg.greeter.name} greeter-session = ${cfg.greeter.name}
''} ''}
${optionalString cfg.autoLogin.enable '' ${optionalString cfg.autoLogin.enable ''
autologin-user = ${cfg.autoLogin.user} autologin-user = ${cfg.autoLogin.user}
autologin-user-timeout = ${toString cfg.autoLogin.timeout} autologin-user-timeout = ${toString cfg.autoLogin.timeout}
autologin-session = ${defaultSessionName} autologin-session = ${sessionData.autologinSession}
''}
${optionalString hasDefaultUserSession ''
user-session=${defaultSessionName}
''} ''}
${optionalString (dmcfg.setupCommands != "") '' ${optionalString (dmcfg.setupCommands != "") ''
display-setup-script=${pkgs.writeScript "lightdm-display-setup" '' display-setup-script=${pkgs.writeScript "lightdm-display-setup" ''
@ -71,7 +67,6 @@ let
${cfg.extraSeatDefaults} ${cfg.extraSeatDefaults}
''; '';
defaultSessionName = dmDefault + optionalString (wmDefault != "none") ("+" + wmDefault);
in in
{ {
# Note: the order in which lightdm greeter modules are imported # Note: the order in which lightdm greeter modules are imported
@ -199,11 +194,9 @@ in
LightDM auto-login requires services.xserver.displayManager.lightdm.autoLogin.user to be set LightDM auto-login requires services.xserver.displayManager.lightdm.autoLogin.user to be set
''; '';
} }
{ assertion = cfg.autoLogin.enable -> dmDefault != "none" || wmDefault != "none"; { assertion = cfg.autoLogin.enable -> sessionData.autologinSession != null;
message = '' message = ''
LightDM auto-login requires that services.xserver.desktopManager.default and LightDM auto-login requires that services.xserver.displayManager.defaultSession is set.
services.xserver.windowManager.default are set to valid values. The current
default session: ${defaultSessionName} is not valid.
''; '';
} }
{ assertion = !cfg.greeter.enable -> (cfg.autoLogin.enable && cfg.autoLogin.timeout == 0); { assertion = !cfg.greeter.enable -> (cfg.autoLogin.enable && cfg.autoLogin.timeout == 0);
@ -214,6 +207,20 @@ in
} }
]; ];
# Set default session in session chooser to a specified values basically ignore session history.
# Auto-login is already covered by a config value.
services.xserver.displayManager.job.preStart = optionalString (!cfg.autoLogin.enable && dmcfg.defaultSession != null) ''
${setSessionScript}/bin/set-session ${dmcfg.defaultSession}
'';
# setSessionScript needs session-files in XDG_DATA_DIRS
services.xserver.displayManager.job.environment.XDG_DATA_DIRS = "${dmcfg.sessionData.desktops}/share/";
# setSessionScript wants AccountsService
systemd.services.display-manager.wants = [
"accounts-daemon.service"
];
# lightdm relaunches itself via just `lightdm`, so needs to be on the PATH # lightdm relaunches itself via just `lightdm`, so needs to be on the PATH
services.xserver.displayManager.job.execCmd = '' services.xserver.displayManager.job.execCmd = ''
export PATH=${lightdm}/sbin:$PATH export PATH=${lightdm}/sbin:$PATH

View File

@ -50,8 +50,8 @@ let
MinimumVT=${toString (if xcfg.tty != null then xcfg.tty else 7)} MinimumVT=${toString (if xcfg.tty != null then xcfg.tty else 7)}
ServerPath=${xserverWrapper} ServerPath=${xserverWrapper}
XephyrPath=${pkgs.xorg.xorgserver.out}/bin/Xephyr XephyrPath=${pkgs.xorg.xorgserver.out}/bin/Xephyr
SessionCommand=${dmcfg.session.wrapper} SessionCommand=${dmcfg.sessionData.wrapper}
SessionDir=${dmcfg.session.desktops}/share/xsessions SessionDir=${dmcfg.sessionData.desktops}/share/xsessions
XauthPath=${pkgs.xorg.xauth}/bin/xauth XauthPath=${pkgs.xorg.xauth}/bin/xauth
DisplayCommand=${Xsetup} DisplayCommand=${Xsetup}
DisplayStopCommand=${Xstop} DisplayStopCommand=${Xstop}
@ -59,23 +59,19 @@ let
[Wayland] [Wayland]
EnableHidpi=${if cfg.enableHidpi then "true" else "false"} EnableHidpi=${if cfg.enableHidpi then "true" else "false"}
SessionDir=${dmcfg.session.desktops}/share/wayland-sessions SessionDir=${dmcfg.sessionData.desktops}/share/wayland-sessions
${optionalString cfg.autoLogin.enable '' ${optionalString cfg.autoLogin.enable ''
[Autologin] [Autologin]
User=${cfg.autoLogin.user} User=${cfg.autoLogin.user}
Session=${defaultSessionName}.desktop Session=${autoLoginSessionName}.desktop
Relogin=${boolToString cfg.autoLogin.relogin} Relogin=${boolToString cfg.autoLogin.relogin}
''} ''}
${cfg.extraConfig} ${cfg.extraConfig}
''; '';
defaultSessionName = autoLoginSessionName = dmcfg.sessionData.autologinSession;
let
dm = xcfg.desktopManager.default;
wm = xcfg.windowManager.default;
in dm + optionalString (wm != "none") ("+" + wm);
in in
{ {
@ -210,11 +206,9 @@ in
SDDM auto-login requires services.xserver.displayManager.sddm.autoLogin.user to be set SDDM auto-login requires services.xserver.displayManager.sddm.autoLogin.user to be set
''; '';
} }
{ assertion = cfg.autoLogin.enable -> elem defaultSessionName dmcfg.session.names; { assertion = cfg.autoLogin.enable -> autoLoginSessionName != null;
message = '' message = ''
SDDM auto-login requires that services.xserver.desktopManager.default and SDDM auto-login requires that services.xserver.displayManager.defaultSession is set.
services.xserver.windowManager.default are set to valid values. The current
default session: ${defaultSessionName} is not valid.
''; '';
} }
]; ];

View File

@ -59,15 +59,14 @@ in
}; };
default = mkOption { default = mkOption {
type = types.str; type = types.nullOr types.str;
default = "none"; default = null;
example = "wmii"; example = "wmii";
description = "Default window manager loaded if none have been chosen."; description = ''
apply = defaultWM: <emphasis role="strong">Deprecated</emphasis>, please use <xref linkend="opt-services.xserver.displayManager.defaultSession"/> instead.
if any (w: w.name == defaultWM) cfg.session then
defaultWM Default window manager loaded if none have been chosen.
else '';
throw "Default window manager (${defaultWM}) not found.";
}; };
}; };

View File

@ -1,12 +1,12 @@
{ lib, ... }:
{ services.xserver.enable = true; { services.xserver.enable = true;
# Automatically log in. # Automatically log in.
services.xserver.displayManager.auto.enable = true; services.xserver.displayManager.auto.enable = true;
# Use IceWM as the window manager. # Use IceWM as the window manager.
services.xserver.windowManager.default = "icewm";
services.xserver.windowManager.icewm.enable = true;
# Don't use a desktop manager. # Don't use a desktop manager.
services.xserver.desktopManager.default = "none"; services.xserver.displayManager.defaultSession = lib.mkDefault "none+icewm";
services.xserver.windowManager.icewm.enable = true;
} }

View File

@ -16,7 +16,7 @@ import ./make-test.nix ({ pkgs, ...} : {
services.xserver.displayManager.lightdm.autoLogin.enable = true; services.xserver.displayManager.lightdm.autoLogin.enable = true;
services.xserver.displayManager.lightdm.autoLogin.user = "alice"; services.xserver.displayManager.lightdm.autoLogin.user = "alice";
services.xserver.desktopManager.gnome3.enable = true; services.xserver.desktopManager.gnome3.enable = true;
services.xserver.desktopManager.default = "gnome-xorg"; services.xserver.displayManager.defaultSession = "gnome-xorg";
virtualisation.memorySize = 1024; virtualisation.memorySize = 1024;
}; };

View File

@ -1,4 +1,4 @@
import ../make-test.nix ({...}: { import ../make-test-python.nix ({...}: {
nodes = { nodes = {
namenode = {pkgs, ...}: { namenode = {pkgs, ...}: {
services.hadoop = { services.hadoop = {
@ -35,20 +35,20 @@ import ../make-test.nix ({...}: {
}; };
testScript = '' testScript = ''
startAll start_all()
$namenode->waitForUnit("hdfs-namenode"); namenode.wait_for_unit("hdfs-namenode")
$namenode->waitForUnit("network.target"); namenode.wait_for_unit("network.target")
$namenode->waitForOpenPort(8020); namenode.wait_for_open_port(8020)
$namenode->waitForOpenPort(9870); namenode.wait_for_open_port(9870)
$datanode->waitForUnit("hdfs-datanode"); datanode.wait_for_unit("hdfs-datanode")
$datanode->waitForUnit("network.target"); datanode.wait_for_unit("network.target")
$datanode->waitForOpenPort(9864); datanode.wait_for_open_port(9864)
$datanode->waitForOpenPort(9866); datanode.wait_for_open_port(9866)
$datanode->waitForOpenPort(9867); datanode.wait_for_open_port(9867)
$namenode->succeed("curl http://namenode:9870"); namenode.succeed("curl http://namenode:9870")
$datanode->succeed("curl http://datanode:9864"); datanode.succeed("curl http://datanode:9864")
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ../make-test.nix ({...}: { import ../make-test-python.nix ({...}: {
nodes = { nodes = {
resourcemanager = {pkgs, ...}: { resourcemanager = {pkgs, ...}: {
services.hadoop.package = pkgs.hadoop_3_1; services.hadoop.package = pkgs.hadoop_3_1;
@ -28,19 +28,19 @@ import ../make-test.nix ({...}: {
}; };
testScript = '' testScript = ''
startAll; start_all()
$resourcemanager->waitForUnit("yarn-resourcemanager"); resourcemanager.wait_for_unit("yarn-resourcemanager")
$resourcemanager->waitForUnit("network.target"); resourcemanager.wait_for_unit("network.target")
$resourcemanager->waitForOpenPort(8031); resourcemanager.wait_for_open_port(8031)
$resourcemanager->waitForOpenPort(8088); resourcemanager.wait_for_open_port(8088)
$nodemanager->waitForUnit("yarn-nodemanager"); nodemanager.wait_for_unit("yarn-nodemanager")
$nodemanager->waitForUnit("network.target"); nodemanager.wait_for_unit("network.target")
$nodemanager->waitForOpenPort(8042); nodemanager.wait_for_open_port(8042)
$nodemanager->waitForOpenPort(8041); nodemanager.wait_for_open_port(8041)
$resourcemanager->succeed("curl http://localhost:8088"); resourcemanager.succeed("curl http://localhost:8088")
$nodemanager->succeed("curl http://localhost:8042"); nodemanager.succeed("curl http://localhost:8042")
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...}: { import ./make-test-python.nix ({ pkgs, ...}: {
name = "haproxy"; name = "haproxy";
nodes = { nodes = {
machine = { ... }: { machine = { ... }: {
@ -33,11 +33,13 @@ import ./make-test.nix ({ pkgs, ...}: {
}; };
}; };
testScript = '' testScript = ''
startAll; start_all()
$machine->waitForUnit('multi-user.target'); machine.wait_for_unit("multi-user.target")
$machine->waitForUnit('haproxy.service'); machine.wait_for_unit("haproxy.service")
$machine->waitForUnit('httpd.service'); machine.wait_for_unit("httpd.service")
$machine->succeed('curl -k http://localhost:80/index.txt | grep "We are all good!"'); assert "We are all good!" in machine.succeed("curl -k http://localhost:80/index.txt")
$machine->succeed('curl -k http://localhost:80/metrics | grep haproxy_process_pool_allocated_bytes'); assert "haproxy_process_pool_allocated_bytes" in machine.succeed(
"curl -k http://localhost:80/metrics"
)
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ../make-test.nix ({ pkgs, ... }: import ../make-test-python.nix ({ pkgs, ... }:
{ {
name = "hitch"; name = "hitch";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
@ -23,11 +23,11 @@ import ../make-test.nix ({ pkgs, ... }:
testScript = testScript =
'' ''
startAll; start_all()
$machine->waitForUnit('multi-user.target'); machine.wait_for_unit("multi-user.target")
$machine->waitForUnit('hitch.service'); machine.wait_for_unit("hitch.service")
$machine->waitForOpenPort(443); machine.wait_for_open_port(443)
$machine->succeed('curl -k https://localhost:443/index.txt | grep "We are all good!"'); assert "We are all good!" in machine.succeed("curl -k https://localhost:443/index.txt")
''; '';
}) })

View File

@ -7,7 +7,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
machine = { lib, ... }: { machine = { lib, ... }: {
imports = [ ./common/x11.nix ./common/user-account.nix ]; imports = [ ./common/x11.nix ./common/user-account.nix ];
services.xserver.displayManager.auto.user = "alice"; services.xserver.displayManager.auto.user = "alice";
services.xserver.windowManager.default = lib.mkForce "i3"; services.xserver.displayManager.defaultSession = lib.mkForce "none+i3";
services.xserver.windowManager.i3.enable = true; services.xserver.windowManager.i3.enable = true;
}; };

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "initrd-network"; name = "initrd-network";
meta.maintainers = [ pkgs.stdenv.lib.maintainers.eelco ]; meta.maintainers = [ pkgs.stdenv.lib.maintainers.eelco ];
@ -15,8 +15,8 @@ import ./make-test.nix ({ pkgs, ...} : {
testScript = testScript =
'' ''
startAll; start_all()
$machine->waitForUnit("multi-user.target"); machine.wait_for_unit("multi-user.target")
$machine->succeed("ip link >&2"); machine.succeed("ip link >&2")
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... }: import ./make-test-python.nix ({ pkgs, ... }:
{ {
name = "leaps"; name = "leaps";
@ -22,9 +22,11 @@ import ./make-test.nix ({ pkgs, ... }:
testScript = testScript =
'' ''
startAll; start_all()
$server->waitForOpenPort(6666); server.wait_for_open_port(6666)
$client->waitForUnit("network.target"); client.wait_for_unit("network.target")
$client->succeed("${pkgs.curl}/bin/curl http://server:6666/leaps/ | grep -i 'leaps'"); assert "leaps" in client.succeed(
"${pkgs.curl}/bin/curl http://server:6666/leaps/"
)
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, ... }: import ./make-test-python.nix ({ lib, ... }:
with lib; with lib;
@ -11,8 +11,10 @@ with lib;
{ services.lidarr.enable = true; }; { services.lidarr.enable = true; };
testScript = '' testScript = ''
$machine->waitForUnit('lidarr.service'); start_all()
$machine->waitForOpenPort('8686');
$machine->succeed("curl --fail http://localhost:8686/"); machine.wait_for_unit("lidarr.service")
machine.wait_for_open_port("8686")
machine.succeed("curl --fail http://localhost:8686/")
''; '';
}) })

View File

@ -8,9 +8,8 @@ import ./make-test-python.nix ({ pkgs, ...} : {
imports = [ ./common/user-account.nix ]; imports = [ ./common/user-account.nix ];
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true; services.xserver.displayManager.lightdm.enable = true;
services.xserver.windowManager.default = "icewm"; services.xserver.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true; services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
}; };
enableOCR = true; enableOCR = true;

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, ... }: import ./make-test-python.nix ({ lib, ... }:
{ {
name = "mailcatcher"; name = "mailcatcher";
@ -16,11 +16,15 @@ import ./make-test.nix ({ lib, ... }:
}; };
testScript = '' testScript = ''
startAll; start_all()
$machine->waitForUnit('mailcatcher.service'); machine.wait_for_unit("mailcatcher.service")
$machine->waitForOpenPort('1025'); machine.wait_for_open_port("1025")
$machine->succeed('echo "this is the body of the email" | mail -s "subject" root@example.org'); machine.succeed(
$machine->succeed('curl http://localhost:1080/messages/1.source') =~ /this is the body of the email/ or die; 'echo "this is the body of the email" | mail -s "subject" root@example.org'
)
assert "this is the body of the email" in machine.succeed(
"curl http://localhost:1080/messages/1.source"
)
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, ... } : { import ./make-test-python.nix ({ lib, ... } : {
name = "paperless"; name = "paperless";
meta = with lib.maintainers; { meta = with lib.maintainers; {
maintainers = [ earvstedt ]; maintainers = [ earvstedt ];
@ -13,17 +13,24 @@ import ./make-test.nix ({ lib, ... } : {
}; };
testScript = '' testScript = ''
$machine->waitForUnit("paperless-consumer.service"); machine.wait_for_unit("paperless-consumer.service")
# Create test doc
$machine->succeed('convert -size 400x40 xc:white -font "DejaVu-Sans" -pointsize 20 -fill black \
-annotate +5+20 "hello world 16-10-2005" /var/lib/paperless/consume/doc.png');
$machine->waitForUnit("paperless-server.service"); # Create test doc
machine.succeed(
"convert -size 400x40 xc:white -font 'DejaVu-Sans' -pointsize 20 -fill black -annotate +5+20 'hello world 16-10-2005' /var/lib/paperless/consume/doc.png"
)
with subtest("Service gets ready"):
machine.wait_for_unit("paperless-server.service")
# Wait until server accepts connections # Wait until server accepts connections
$machine->waitUntilSucceeds("curl -s localhost:28981"); machine.wait_until_succeeds("curl -s localhost:28981")
# Wait until document is consumed
$machine->waitUntilSucceeds('(($(curl -s localhost:28981/api/documents/ | jq .count) == 1))'); with subtest("Test document is consumed"):
$machine->succeed("curl -s localhost:28981/api/documents/ | jq '.results | .[0] | .created'") machine.wait_until_succeeds(
=~ /2005-10-16/ or die; "(($(curl -s localhost:28981/api/documents/ | jq .count) == 1))"
)
assert "2005-10-16" in machine.succeed(
"curl -s localhost:28981/api/documents/ | jq '.results | .[0] | .created'"
)
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... }: { import ./make-test-python.nix ({ pkgs, ... }: {
name = "powerdns"; name = "powerdns";
nodes.server = { ... }: { nodes.server = { ... }: {
@ -6,7 +6,7 @@ import ./make-test.nix ({ pkgs, ... }: {
}; };
testScript = '' testScript = ''
$server->waitForUnit("pdns-recursor"); server.wait_for_unit("pdns-recursor")
$server->waitForOpenPort("53"); server.wait_for_open_port("53")
''; '';
}) })

View File

@ -1,6 +1,6 @@
# This test runs peerflix and checks if peerflix starts # This test runs peerflix and checks if peerflix starts
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "peerflix"; name = "peerflix";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ offline ]; maintainers = [ offline ];
@ -15,9 +15,9 @@ import ./make-test.nix ({ pkgs, ...} : {
}; };
testScript = '' testScript = ''
startAll; start_all()
$peerflix->waitForUnit("peerflix.service"); peerflix.wait_for_unit("peerflix.service")
$peerflix->waitUntilSucceeds("curl localhost:9000"); peerflix.wait_until_succeeds("curl localhost:9000")
''; '';
}) })

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ... } : import ./make-test-python.nix ({ pkgs, ... } :
let let
role = "test"; role = "test";
password = "secret"; password = "secret";
@ -29,11 +29,13 @@ in
}; };
testScript = '' testScript = ''
startAll; start_all()
$one->waitForUnit("default.target"); one.wait_for_unit("default.target")
$one->requireActiveUnit("pgmanage.service"); one.require_unit_state("pgmanage.service", "active")
# Test if we can log in. # Test if we can log in.
$one->waitUntilSucceeds("curl 'http://localhost:8080/pgmanage/auth' --data 'action=login&connname=${conn}&username=${role}&password=${password}' --fail"); one.wait_until_succeeds(
"curl 'http://localhost:8080/pgmanage/auth' --data 'action=login&connname=${conn}&username=${role}&password=${password}' --fail"
)
''; '';
}) })

View File

@ -1,7 +1,7 @@
let testString = "can-use-subgroups"; in let testString = "can-use-subgroups"; in
import ./make-test.nix ({ ...}: { import ./make-test-python.nix ({ ...}: {
name = "php-httpd-pcre-jit-test"; name = "php-httpd-pcre-jit-test";
machine = { lib, pkgs, ... }: { machine = { lib, pkgs, ... }: {
time.timeZone = "UTC"; time.timeZone = "UTC";
@ -31,9 +31,10 @@ import ./make-test.nix ({ ...}: {
}; };
testScript = { ... }: testScript = { ... }:
'' ''
$machine->waitForUnit('httpd.service'); machine.wait_for_unit("httpd.service")
# Ensure php evaluation by matching on the var_dump syntax # Ensure php evaluation by matching on the var_dump syntax
$machine->succeed('curl -vvv -s http://127.0.0.1:80/index.php \ assert 'string(${toString (builtins.stringLength testString)}) "${testString}"' in machine.succeed(
| grep "string(${toString (builtins.stringLength testString)}) \"${testString}\""'); "curl -vvv -s http://127.0.0.1:80/index.php"
)
''; '';
}) })

View File

@ -12,8 +12,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
imports = [ ./common/user-account.nix ]; imports = [ ./common/user-account.nix ];
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.defaultSession = "plasma5";
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma5.enable = true;
services.xserver.desktopManager.default = "plasma5";
services.xserver.displayManager.sddm.autoLogin = { services.xserver.displayManager.sddm.autoLogin = {
enable = true; enable = true;
user = "alice"; user = "alice";

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "postgis"; name = "postgis";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ lsix ]; maintainers = [ lsix ];
@ -20,10 +20,10 @@ import ./make-test.nix ({ pkgs, ...} : {
}; };
testScript = '' testScript = ''
startAll; start_all()
$master->waitForUnit("postgresql"); master.wait_for_unit("postgresql")
$master->sleep(10); # Hopefully this is long enough!! master.sleep(10) # Hopefully this is long enough!!
$master->succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'"); master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'")
$master->succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'"); master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'")
''; '';
}) })

View File

@ -5,7 +5,7 @@
# #
# All interfaces are in OSPF Area 0. # All interfaces are in OSPF Area 0.
import ./make-test.nix ({ pkgs, ... }: import ./make-test-python.nix ({ pkgs, ... }:
let let
ifAddr = node: iface: (pkgs.lib.head node.config.networking.interfaces.${iface}.ipv4.addresses).address; ifAddr = node: iface: (pkgs.lib.head node.config.networking.interfaces.${iface}.ipv4.addresses).address;
@ -74,23 +74,23 @@ import ./make-test.nix ({ pkgs, ... }:
testScript = testScript =
{ ... }: { ... }:
'' ''
startAll; start_all()
# Wait for the networking to start on all machines # Wait for the networking to start on all machines
$_->waitForUnit("network.target") foreach values %vms; for machine in client, router1, router2, server:
machine.wait_for_unit("network.target")
# Wait for OSPF to form adjacencies with subtest("Wait for OSPF to form adjacencies"):
for my $gw ($router1, $router2) { for gw in router1, router2:
$gw->waitForUnit("ospfd"); gw.wait_for_unit("ospfd")
$gw->waitUntilSucceeds("vtysh -c 'show ip ospf neighbor' | grep Full"); gw.wait_until_succeeds("vtysh -c 'show ip ospf neighbor' | grep Full")
$gw->waitUntilSucceeds("vtysh -c 'show ip route' | grep '^O>'"); gw.wait_until_succeeds("vtysh -c 'show ip route' | grep '^O>'")
}
# Test ICMP. with subtest("Test ICMP"):
$client->succeed("ping -c 3 server >&2"); client.wait_until_succeeds("ping -c 3 server >&2")
# Test whether HTTP works. with subtest("Test whether HTTP works"):
$server->waitForUnit("httpd"); server.wait_for_unit("httpd")
$client->succeed("curl --fail http://server/ >&2"); client.succeed("curl --fail http://server/ >&2")
''; '';
}) })

View File

@ -16,9 +16,8 @@ let
imports = [ ./common/user-account.nix ]; imports = [ ./common/user-account.nix ];
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.windowManager.default = "icewm"; services.xserver.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true; services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
}; };
enableOCR = true; enableOCR = true;
@ -52,9 +51,8 @@ let
user = "alice"; user = "alice";
}; };
}; };
services.xserver.windowManager.default = "icewm"; services.xserver.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true; services.xserver.windowManager.icewm.enable = true;
services.xserver.desktopManager.default = "none";
}; };
testScript = { nodes, ... }: let testScript = { nodes, ... }: let

View File

@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, ... }: import ./make-test-python.nix ({ lib, ... }:
with lib; with lib;
@ -11,8 +11,8 @@ with lib;
{ services.sonarr.enable = true; }; { services.sonarr.enable = true; };
testScript = '' testScript = ''
$machine->waitForUnit('sonarr.service'); machine.wait_for_unit("sonarr.service")
$machine->waitForOpenPort('8989'); machine.wait_for_open_port("8989")
$machine->succeed("curl --fail http://localhost:8989/"); machine.succeed("curl --fail http://localhost:8989/")
''; '';
}) })

View File

@ -1,6 +1,6 @@
# Test configuration switching. # Test configuration switching.
import ./make-test.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "switch-test"; name = "switch-test";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ gleber ]; maintainers = [ gleber ];
@ -28,7 +28,11 @@ import ./make-test.nix ({ pkgs, ...} : {
exec env -i "$@" | tee /dev/stderr exec env -i "$@" | tee /dev/stderr
''; '';
in '' in ''
$machine->succeed("${stderrRunner} ${originalSystem}/bin/switch-to-configuration test"); machine.succeed(
$machine->succeed("${stderrRunner} ${otherSystem}/bin/switch-to-configuration test"); "${stderrRunner} ${originalSystem}/bin/switch-to-configuration test"
)
machine.succeed(
"${stderrRunner} ${otherSystem}/bin/switch-to-configuration test"
)
''; '';
}) })

View File

@ -1,7 +1,7 @@
# Regression test for systemd-timesync having moved the state directory without # Regression test for systemd-timesync having moved the state directory without
# upstream providing a migration path. https://github.com/systemd/systemd/issues/12131 # upstream providing a migration path. https://github.com/systemd/systemd/issues/12131
import ./make-test.nix (let import ./make-test-python.nix (let
common = { lib, ... }: { common = { lib, ... }: {
# override the `false` value from the qemu-vm base profile # override the `false` value from the qemu-vm base profile
services.timesyncd.enable = lib.mkForce true; services.timesyncd.enable = lib.mkForce true;
@ -25,28 +25,28 @@ in {
}; };
testScript = '' testScript = ''
startAll; start_all()
$current->succeed('systemctl status systemd-timesyncd.service'); current.succeed("systemctl status systemd-timesyncd.service")
# on a new install with a recent systemd there should not be any # on a new install with a recent systemd there should not be any
# leftovers from the dynamic user mess # leftovers from the dynamic user mess
$current->succeed('test -e /var/lib/systemd/timesync'); current.succeed("test -e /var/lib/systemd/timesync")
$current->succeed('test ! -L /var/lib/systemd/timesync'); current.succeed("test ! -L /var/lib/systemd/timesync")
# timesyncd should be running on the upgrading system since we fixed the # timesyncd should be running on the upgrading system since we fixed the
# file bits in the activation script # file bits in the activation script
$pre1909->succeed('systemctl status systemd-timesyncd.service'); pre1909.succeed("systemctl status systemd-timesyncd.service")
# the path should be gone after the migration # the path should be gone after the migration
$pre1909->succeed('test ! -e /var/lib/private/systemd/timesync'); pre1909.succeed("test ! -e /var/lib/private/systemd/timesync")
# and the new path should no longer be a symlink # and the new path should no longer be a symlink
$pre1909->succeed('test -e /var/lib/systemd/timesync'); pre1909.succeed("test -e /var/lib/systemd/timesync")
$pre1909->succeed('test ! -L /var/lib/systemd/timesync'); pre1909.succeed("test ! -L /var/lib/systemd/timesync")
# after a restart things should still work and not fail in the activation # after a restart things should still work and not fail in the activation
# scripts and cause the boot to fail.. # scripts and cause the boot to fail..
$pre1909->shutdown; pre1909.shutdown()
$pre1909->start; pre1909.start()
$pre1909->succeed('systemctl status systemd-timesyncd.service'); pre1909.succeed("systemctl status systemd-timesyncd.service")
''; '';
}) })

View File

@ -13,7 +13,7 @@ let
in in
import ../make-test.nix ({ pkgs, ...} : { import ../make-test-python.nix ({ pkgs, ...} : {
name = "wireguard-with-namespaces"; name = "wireguard-with-namespaces";
meta = with pkgs.stdenv.lib.maintainers; { meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ asymmetric ]; maintainers = [ asymmetric ];
@ -65,16 +65,14 @@ import ../make-test.nix ({ pkgs, ...} : {
}; };
testScript = '' testScript = ''
startAll(); start_all()
$peer0->waitForUnit("wireguard-wg0.service"); for machine in peer0, peer1, peer2, peer3:
$peer1->waitForUnit("wireguard-wg0.service"); machine.wait_for_unit("wireguard-wg0.service")
$peer2->waitForUnit("wireguard-wg0.service");
$peer3->waitForUnit("wireguard-wg0.service");
$peer0->succeed("ip -n ${socketNamespace} link show wg0"); peer0.succeed("ip -n ${socketNamespace} link show wg0")
$peer1->succeed("ip -n ${interfaceNamespace} link show wg0"); peer1.succeed("ip -n ${interfaceNamespace} link show wg0")
$peer2->succeed("ip -n ${interfaceNamespace} link show wg0"); peer2.succeed("ip -n ${interfaceNamespace} link show wg0")
$peer3->succeed("ip link show wg0"); peer3.succeed("ip link show wg0")
''; '';
}) })

View File

@ -4,10 +4,10 @@ import ./make-test-python.nix ({ pkgs, ...} : {
maintainers = [ nequissimus ]; maintainers = [ nequissimus ];
}; };
machine = { lib, pkgs, ... }: { machine = { pkgs, ... }: {
imports = [ ./common/x11.nix ./common/user-account.nix ]; imports = [ ./common/x11.nix ./common/user-account.nix ];
services.xserver.displayManager.auto.user = "alice"; services.xserver.displayManager.auto.user = "alice";
services.xserver.windowManager.default = lib.mkForce "xmonad"; services.xserver.displayManager.defaultSession = "none+xmonad";
services.xserver.windowManager.xmonad = { services.xserver.windowManager.xmonad = {
enable = true; enable = true;
enableContribAndExtras = true; enableContribAndExtras = true;

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, python3, python3Packages, intltool { stdenv, fetchFromGitHub, python3, python3Packages, intltool
, glibcLocales, gnome3, gtk3, wrapGAppsHook , glibcLocales, gnome3, gtk3, wrapGAppsHook
, ipodSupport ? false, libgpod, gobject-introspection , gobject-introspection
}: }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
@ -50,7 +50,7 @@ python3Packages.buildPythonApplication rec {
podcastparser podcastparser
html5lib html5lib
gtk3 gtk3
] ++ stdenv.lib.optional ipodSupport libgpod; ];
makeFlags = [ makeFlags = [
"PREFIX=$(out)" "PREFIX=$(out)"

View File

@ -2,11 +2,11 @@
pythonPackages.buildPythonApplication rec { pythonPackages.buildPythonApplication rec {
pname = "Mopidy-Iris"; pname = "Mopidy-Iris";
version = "3.42.2"; version = "3.43.0";
src = pythonPackages.fetchPypi { src = pythonPackages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "1v1dy857kxxn1si0x7p3qz63l1af5pln1jji1f7fis6id8iy7wfm"; sha256 = "1qg9xyjf27dp0810h4kdliyfb8r3kvi37lq8r93d01xwfphdzs05";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -13,9 +13,9 @@ let
sha256Hash = "1nsm4d3vdx90szqd78a8mjq65xc9m5ipd35cqrlx3c3ny900sqxg"; sha256Hash = "1nsm4d3vdx90szqd78a8mjq65xc9m5ipd35cqrlx3c3ny900sqxg";
}; };
betaVersion = { betaVersion = {
version = "3.6.0.17"; # "Android Studio 3.6 Beta 5" version = "3.6.0.18"; # "Android Studio 3.6 RC 1"
build = "192.6018865"; build = "192.6071332";
sha256Hash = "0qlrdf7a6f5585mrni1aa2chic4n7b9c8lgrj8br6q929hc2f5d9"; sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q";
}; };
latestVersion = { # canary & dev latestVersion = { # canary & dev
version = "4.0.0.6"; # "Android Studio 4.0 Canary 6" version = "4.0.0.6"; # "Android Studio 4.0 Canary 6"

View File

@ -10,11 +10,11 @@ with stdenv.lib;
perlPackages.buildPerlPackage rec { perlPackages.buildPerlPackage rec {
pname = "gscan2pdf"; pname = "gscan2pdf";
version = "2.5.6"; version = "2.6.2";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/gscan2pdf/${version}/${pname}-${version}.tar.xz"; url = "mirror://sourceforge/gscan2pdf/${version}/${pname}-${version}.tar.xz";
sha256 = "0wp81nsi5jfypabwmjqiamxr739jq5ij79n5fzn5pbw1hg5gcmfz"; sha256 = "0z35lglf4anfczizynjp8sd1jpix5mkmm1nh39n1v94l7ahjxsww";
}; };
nativeBuildInputs = [ wrapGAppsHook ]; nativeBuildInputs = [ wrapGAppsHook ];

View File

@ -138,6 +138,7 @@ let
konquest = callPackage ./konquest.nix {}; konquest = callPackage ./konquest.nix {};
konqueror = callPackage ./konqueror.nix {}; konqueror = callPackage ./konqueror.nix {};
korganizer = callPackage ./korganizer.nix {}; korganizer = callPackage ./korganizer.nix {};
kpat = callPackage ./kpat.nix {};
kpimtextedit = callPackage ./kpimtextedit.nix {}; kpimtextedit = callPackage ./kpimtextedit.nix {};
ksmtp = callPackage ./ksmtp {}; ksmtp = callPackage ./ksmtp {};
kqtquickcharts = callPackage ./kqtquickcharts.nix {}; kqtquickcharts = callPackage ./kqtquickcharts.nix {};

View File

@ -0,0 +1,25 @@
{ lib
, mkDerivation
, extra-cmake-modules
, knewstuff
, shared-mime-info
, libkdegames
, freecell-solver
}:
mkDerivation {
name = "kpat";
nativeBuildInputs = [
extra-cmake-modules
shared-mime-info
];
buildInputs = [
knewstuff
libkdegames
freecell-solver
];
meta = {
license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
maintainers = with lib.maintainers; [ rnhmjoj ];
};
}

View File

@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, curl, xorg, avahi, qtbase, mkDerivation, { stdenv, fetchFromGitHub, cmake, curl, xorg, avahi, qtbase, mkDerivation,
openssl, wrapGAppsHook,
avahiWithLibdnssdCompat ? avahi.override { withLibdnssdCompat = true; } avahiWithLibdnssdCompat ? avahi.override { withLibdnssdCompat = true; }
}: }:
@ -13,12 +14,17 @@ mkDerivation rec {
sha256 = "1gbg3p7c0vcsdzsjj1ssx6k8xpj3rpyvais12266f0xvnbvihczd"; sha256 = "1gbg3p7c0vcsdzsjj1ssx6k8xpj3rpyvais12266f0xvnbvihczd";
}; };
buildInputs = [ cmake curl xorg.libX11 xorg.libXext xorg.libXtst avahiWithLibdnssdCompat qtbase ]; buildInputs = [ curl xorg.libX11 xorg.libXext xorg.libXtst avahiWithLibdnssdCompat qtbase ];
nativeBuildInputs = [ cmake wrapGAppsHook ];
postFixup = '' postFixup = ''
substituteInPlace "$out/share/applications/barrier.desktop" --replace "Exec=barrier" "Exec=$out/bin/barrier" substituteInPlace "$out/share/applications/barrier.desktop" --replace "Exec=barrier" "Exec=$out/bin/barrier"
''; '';
qtWrapperArgs = [
''--prefix PATH : ${stdenv.lib.makeBinPath [ openssl ]}''
];
meta = { meta = {
description = "Open-source KVM software"; description = "Open-source KVM software";
longDescription = '' longDescription = ''

View File

@ -26,6 +26,11 @@ in stdenv.mkDerivation rec {
sha256 = "0n09jd7yqj18mx6zqbg7kab4idg5llr15g6avafj74fpg1h7iimj"; sha256 = "0n09jd7yqj18mx6zqbg7kab4idg5llr15g6avafj74fpg1h7iimj";
}; };
postPatch = ''
# fix build with gettext 0.20
sed -i 's/AM_GNU_GETTEXT/AM_GNU_GETTEXT([external])/' configure.in
'';
nativeBuildInputs = [ autoreconfHook libtool pkgconfig ]; nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
buildInputs = [ file gtk2 libGLU gtkglarea ]; buildInputs = [ file gtk2 libGLU gtkglarea ];

View File

@ -1,11 +1,11 @@
{ stdenv, lib, fetchgit, pkgconfig, libssh2 { stdenv, lib, fetchFromGitHub, fetchFromGitiles, pkgconfig, libssh2
, qtbase, qtdeclarative, qtgraphicaleffects, qtimageformats, qtquickcontrols , qtbase, qtdeclarative, qtgraphicaleffects, qtimageformats, qtquickcontrols
, qtsvg, qttools, qtquick1, qtcharts , qtsvg, qttools, qtquick1, qtcharts
, qmake , qmake
}: }:
let let
breakpad_lss = fetchgit { breakpad_lss = fetchFromGitiles {
url = "https://chromium.googlesource.com/linux-syscall-support"; url = "https://chromium.googlesource.com/linux-syscall-support";
rev = "08056836f2b4a5747daff75435d10d649bed22f6"; rev = "08056836f2b4a5747daff75435d10d649bed22f6";
sha256 = "1ryshs2nyxwa0kn3rlbnd5b3fhna9vqm560yviddcfgdm2jyg0hz"; sha256 = "1ryshs2nyxwa0kn3rlbnd5b3fhna9vqm560yviddcfgdm2jyg0hz";
@ -17,10 +17,11 @@ stdenv.mkDerivation rec {
pname = "redis-desktop-manager"; pname = "redis-desktop-manager";
version = "0.9.1"; version = "0.9.1";
src = fetchgit { src = fetchFromGitHub {
url = "https://github.com/uglide/RedisDesktopManager.git"; owner = "uglide";
repo = "RedisDesktopManager";
fetchSubmodules = true; fetchSubmodules = true;
rev = "refs/tags/${version}"; rev = version;
sha256 = "0yd4i944d4blw8jky0nxl7sfkkj975q4d328rdcbhizwvf6dx81f"; sha256 = "0yd4i944d4blw8jky0nxl7sfkkj975q4d328rdcbhizwvf6dx81f";
}; };

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub }: { stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec { buildGoModule rec {
pname = "helm"; pname = "helm";
@ -16,6 +16,13 @@ buildGoModule rec {
subPackages = [ "cmd/helm" ]; subPackages = [ "cmd/helm" ];
buildFlagsArray = [ "-ldflags=-w -s -X helm.sh/helm/v3/internal/version.gitCommit=v${version}" ]; buildFlagsArray = [ "-ldflags=-w -s -X helm.sh/helm/v3/internal/version.gitCommit=v${version}" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
$out/bin/helm completion bash > helm.bash
$out/bin/helm completion zsh > helm.zsh
installShellCompletion helm.{bash,zsh}
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/kubernetes/helm; homepage = https://github.com/kubernetes/helm;
description = "A package manager for kubernetes"; description = "A package manager for kubernetes";

View File

@ -0,0 +1,33 @@
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoModule rec {
pname = "hydroxide";
version = "0.2.11";
src = fetchFromGitHub {
owner = "emersion";
repo = pname;
rev = "v${version}";
sha256 = "0rn35iyli80kgj3yn93lrx0ybgc8fhvmkvx1d18ill7r4cmavand";
};
modSha256 = "0b19rcif8yiyvhrsjd3q5nsvr580lklamlphx4dk47n456ckcqfp";
# FIXME: remove with next release
patches = [
(fetchpatch {
url = "https://github.com/emersion/hydroxide/commit/80e0fa6f3e0154338fb0af8a82ca32ae6281dd15.patch";
sha256 = "1xi0clzgz14a7sxnwr0li7sz9p05sfh3zh5iqg2qz5f415k9jknj";
})
];
subPackages = [ "cmd/hydroxide" ];
meta = with lib; {
description = "A third-party, open-source ProtonMail bridge";
homepage = "https://github.com/emersion/hydroxide";
license = licenses.mit;
maintainers = with maintainers; [ filalex77 ];
platforms = platforms.unix;
};
}

View File

@ -35,7 +35,7 @@ in stdenv.mkDerivation {
# provide desktop item and icon # provide desktop item and icon
cp -r usr/share $out cp -r usr/share $out
substituteInPlace $out/share/applications/franz.desktop \ substituteInPlace $out/share/applications/franz.desktop \
--replace Exec=\"/opt/Franz/franz\" Exec=franz --replace /opt/Franz/franz franz
''; '';
dontWrapGApps = true; dontWrapGApps = true;

View File

@ -2,7 +2,7 @@
"name": "riot-web", "name": "riot-web",
"productName": "Riot", "productName": "Riot",
"main": "src/electron-main.js", "main": "src/electron-main.js",
"version": "1.5.5", "version": "1.5.6",
"description": "A feature-rich client for Matrix.org", "description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.", "author": "New Vector Ltd.",
"dependencies": { "dependencies": {

View File

@ -6,12 +6,12 @@
let let
executableName = "riot-desktop"; executableName = "riot-desktop";
version = "1.5.5"; version = "1.5.6";
riot-web-src = fetchFromGitHub { riot-web-src = fetchFromGitHub {
owner = "vector-im"; owner = "vector-im";
repo = "riot-web"; repo = "riot-web";
rev = "v${version}"; rev = "v${version}";
sha256 = "18xhqniwxp1sv49qcd9ah8nyy2n2yliy3wg613raxjl16qvvzxmc"; sha256 = "148rg6wc84xy53bj16v5riw78s999ridid59x6v9jas827l0bdpk";
}; };
in mkYarnPackage rec { in mkYarnPackage rec {

View File

@ -5,11 +5,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "riot-web"; pname = "riot-web";
version = "1.5.5"; version = "1.5.6";
src = fetchurl { src = fetchurl {
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz"; url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
sha256 = "0isln25sl5jvvlqvh822w73a4i82x75g1ywf3p9n5m1a5sr9f537"; sha256 = "063ynbil038y201skyldj2ysr0hwgwq981w1iw104xd17x31zmn0";
}; };
installPhase = let installPhase = let

View File

@ -59,7 +59,7 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "signal-desktop"; pname = "signal-desktop";
version = "1.29.0"; # Please backport all updates to the stable channel. version = "1.29.1"; # Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release. # All releases have a limited lifetime and "expire" 90 days after the release.
# When releases "expire" the application becomes unusable until an update is # When releases "expire" the application becomes unusable until an update is
# applied. The expiration date for the current release can be extracted with: # applied. The expiration date for the current release can be extracted with:
@ -69,7 +69,7 @@ in stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb"; url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
sha256 = "1zbj0z4bhmg6zf975bn67wpr1kdi0h05d90aniijnh5wqgnwhfqn"; sha256 = "12n17d8b31si7gngvv8bhbcid46n18kznv875nyy34i6b97zavmh";
}; };
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];

View File

@ -1,7 +1,7 @@
{ theme ? null, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo, { theme ? null, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk-pixbuf, cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk-pixbuf,
libappindicator-gtk3, libnotify, libxcb, nspr, nss, pango , systemd, xorg, libappindicator-gtk3, libnotify, libxcb, nspr, nss, pango , systemd, xorg,
at-spi2-atk, at-spi2-core, libuuid, nodePackages, libpulseaudio at-spi2-atk, at-spi2-core, libuuid, nodePackages, libpulseaudio, xdg_utils
}: }:
let let
@ -93,7 +93,8 @@ in stdenv.mkDerivation {
# Replace the broken bin/slack symlink with a startup wrapper # Replace the broken bin/slack symlink with a startup wrapper
rm $out/bin/slack rm $out/bin/slack
makeWrapper $out/lib/slack/slack $out/bin/slack \ makeWrapper $out/lib/slack/slack $out/bin/slack \
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
--prefix PATH : ${xdg_utils}/bin
# Fix the desktop link # Fix the desktop link
substituteInPlace $out/share/applications/slack.desktop \ substituteInPlace $out/share/applications/slack.desktop \

View File

@ -4,7 +4,7 @@
, pcre, libdbusmenu-gtk3, libappindicator-gtk3 , pcre, libdbusmenu-gtk3, libappindicator-gtk3
, libvncserver, libpthreadstubs, libXdmcp, libxkbcommon , libvncserver, libpthreadstubs, libXdmcp, libxkbcommon
, libsecret, libsoup, spice-protocol, spice-gtk, epoxy, at-spi2-core , libsecret, libsoup, spice-protocol, spice-gtk, epoxy, at-spi2-core
, openssl, gsettings-desktop-schemas, json-glib , openssl, gsettings-desktop-schemas, json-glib, libsodium, webkitgtk, harfbuzz
# The themes here are soft dependencies; only icons are missing without them. # The themes here are soft dependencies; only icons are missing without them.
, gnome3 , gnome3
}: }:
@ -13,13 +13,13 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "remmina"; pname = "remmina";
version = "1.3.4"; version = "1.3.7";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "Remmina"; owner = "Remmina";
repo = "Remmina"; repo = "Remmina";
rev = "v${version}"; rev = "v${version}";
sha256 = "18p6v2lalpiba0r318grlc2bvqh2qlpjw811i0934g33faviyfj1"; sha256 = "076vz6nzs8v4d44dklsfgmwyhp48c2iywixg032znz193anjcgqn";
}; };
nativeBuildInputs = [ cmake ninja pkgconfig wrapGAppsHook ]; nativeBuildInputs = [ cmake ninja pkgconfig wrapGAppsHook ];
@ -30,7 +30,8 @@ stdenv.mkDerivation rec {
pcre libdbusmenu-gtk3 libappindicator-gtk3 pcre libdbusmenu-gtk3 libappindicator-gtk3
libvncserver libpthreadstubs libXdmcp libxkbcommon libvncserver libpthreadstubs libXdmcp libxkbcommon
libsecret libsoup spice-protocol spice-gtk epoxy at-spi2-core libsecret libsoup spice-protocol spice-gtk epoxy at-spi2-core
openssl gnome3.adwaita-icon-theme json-glib openssl gnome3.adwaita-icon-theme json-glib libsodium webkitgtk
harfbuzz
]; ];
cmakeFlags = [ cmakeFlags = [

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "bedtools"; pname = "bedtools";
version = "2.29.1"; version = "2.29.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "arq5x"; owner = "arq5x";
repo = "bedtools2"; repo = "bedtools2";
rev = "v${version}"; rev = "v${version}";
sha256 = "1vbpjvzl4ppzkan9qgm84bkn9kl3h3m5xz92y18wn1sksxcdq50x"; sha256 = "015qq3pwrwgnyxyi959niijjlswl231b3wxlsm3l8msv6fdhmkz8";
}; };
buildInputs = [ zlib python bzip2 lzma ]; buildInputs = [ zlib python bzip2 lzma ];

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ zlib python2 ]; buildInputs = [ zlib python2 ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ];
preConfigure = '' preConfigure = ''
sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py
patchShebangs . patchShebangs .
@ -33,7 +35,6 @@ stdenv.mkDerivation rec {
homepage = https://github.com/Illumina/strelka; homepage = https://github.com/Illumina/strelka;
maintainers = with maintainers; [ jbedo ]; maintainers = with maintainers; [ jbedo ];
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
broken = true;
}; };
} }

View File

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "lab"; pname = "lab";
version = "0.17.1"; version = "0.17.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "zaquestion"; owner = "zaquestion";
repo = "lab"; repo = "lab";
rev = "v${version}"; rev = "v${version}";
sha256 = "1z83v1dl9c5f99jvvc23ijkwrfrv489la05rlsrc3r4zzza1hx1f"; sha256 = "0zkwvmzgj7h8lc8jkg2a81392b28c8hkwqzj6dds6q4asbmymx5c";
}; };
subPackages = [ "." ]; subPackages = [ "." ];

View File

@ -0,0 +1,15 @@
diff --git a/src/main.rs b/src/main.rs
index 81f20a7..481ebd7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -158,7 +158,9 @@ impl Default for Config {
wayland_dmabuf: false,
shared_dirs: Vec::new(),
sandbox: !cfg!(feature = "default-no-sandbox"),
- seccomp_policy_dir: PathBuf::from(SECCOMP_POLICY_DIR),
+ seccomp_policy_dir: PathBuf::from(
+ option_env!("DEFAULT_SECCOMP_POLICY_DIR").unwrap_or(SECCOMP_POLICY_DIR),
+ ),
seccomp_log_failures: false,
cras_audio: false,
cras_capture: false,

View File

@ -0,0 +1,83 @@
{ stdenv, rustPlatform, fetchgit, runCommand, symlinkJoin
, pkgconfig, minijail, dtc, libusb1, libcap
}:
let
upstreamInfo = with builtins; fromJSON (readFile ./upstream-info.json);
arch = with stdenv.hostPlatform;
if isAarch64 then "arm"
else if isx86_64 then "x86_64"
else throw "no seccomp policy files available for host platform";
# used to turn symlinks into real files because write permissions are necessary for the vendoring process
delink = src: runCommand "${src.name}-delinked" {
preferLocalBuild = true;
allowSubstitutes = false;
} ''
cp -prL --reflink=auto ${src} $out
'';
# used to place subtrees into the location they have in the Chromium monorepo
move = src: target: runCommand "moved-${src.name}" {
preferLocalBuild = true;
allowSubstitutes = false;
} ''
mkdir -p $(dirname $out/${target})
ln -s ${src} $out/${target}
'';
# used to check out subtrees from the Chromium monorepo
chromiumSource = name: subtrees: delink (symlinkJoin {
inherit name;
paths = stdenv.lib.mapAttrsToList (
location: { url, rev, sha256, fetchSubmodules, ... }:
move (fetchgit {
inherit url rev sha256 fetchSubmodules;
}) location) subtrees;
});
in
rustPlatform.buildRustPackage rec {
pname = "crosvm";
inherit (upstreamInfo) version;
src = chromiumSource "${pname}-sources" upstreamInfo.components;
sourceRoot = "${src.name}/chromiumos/platform/crosvm";
patches = [
./default-seccomp-policy-dir.patch
];
cargoSha256 = "16cfp79c13ng5jjcrvz00h3cg7cc9ywhjiq02vsm757knn9jgr1v";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dtc libcap libusb1 minijail ];
postPatch = ''
sed -i "s|/usr/share/policy/crosvm/|$out/share/policy/|g" \
seccomp/*/*.policy
'';
preBuild = ''
export DEFAULT_SECCOMP_POLICY_DIR=$out/share/policy
'';
postInstall = ''
mkdir -p $out/share/policy/
cp seccomp/${arch}/* $out/share/policy/
'';
passthru.updateScript = ./update.py;
meta = with stdenv.lib; {
description = "A secure virtual machine monitor for KVM";
homepage = "https://chromium.googlesource.com/chromiumos/platform/crosvm/";
license = licenses.bsd3;
platforms = [ "aarch64-linux" "x86_64-linux" ];
};
}

View File

@ -0,0 +1,85 @@
#! /usr/bin/env nix-shell
#! nix-shell -p python3 -p nix-prefetch-git -i python
import base64
import csv
import json
import re
import subprocess
import xml.etree.ElementTree as ElementTree
from codecs import iterdecode
from operator import itemgetter
from os.path import dirname, splitext
from urllib.request import urlopen
# ChromiumOS components required to build crosvm.
components = ['chromiumos/platform/crosvm', 'chromiumos/third_party/adhd']
git_root = 'https://chromium.googlesource.com/'
manifest_versions = f'{git_root}chromiumos/manifest-versions'
buildspecs_url = f'{manifest_versions}/+/refs/heads/master/paladin/buildspecs/'
# CrOS version numbers look like this:
# [<chrome-major-version>.]<tip-build>.<branch-build>.<branch-branch-build>
#
# As far as I can tell, branches are where internal Google
# modifications are added to turn Chromium OS into Chrome OS, and
# branch branches are used for fixes for specific devices. So for
# Chromium OS they will always be 0. This is a best guess, and is not
# documented.
with urlopen('https://cros-omahaproxy.appspot.com/all') as resp:
versions = csv.DictReader(iterdecode(resp, 'utf-8'))
stables = filter(lambda v: v['track'] == 'stable-channel', versions)
stable = sorted(stables, key=itemgetter('chrome_version'), reverse=True)[0]
chrome_major_version = re.match(r'\d+', stable['chrome_version'])[0]
chromeos_tip_build = re.match(r'\d+', stable['chromeos_version'])[0]
# Find the most recent buildspec for the stable Chrome version and
# Chromium OS build number. Its branch build and branch branch build
# numbers will (almost?) certainly be 0. It will then end with an rc
# number -- presumably these are release candidates, one of which
# becomes the final release. Presumably the one with the highest rc
# number.
with urlopen(f'{buildspecs_url}{chrome_major_version}/?format=TEXT') as resp:
listing = base64.decodebytes(resp.read()).decode('utf-8')
buildspecs = [(line.split('\t', 1)[1]) for line in listing.splitlines()]
buildspecs = [s for s in buildspecs if s.startswith(chromeos_tip_build)]
buildspecs.sort(reverse=True)
buildspec = splitext(buildspecs[0])[0]
revisions = {}
# Read the buildspec, and extract the git revisions for each component.
with urlopen(f'{buildspecs_url}{chrome_major_version}/{buildspec}.xml?format=TEXT') as resp:
xml = base64.decodebytes(resp.read()).decode('utf-8')
root = ElementTree.fromstring(xml)
for project in root.findall('project'):
revisions[project.get('name')] = project.get('revision')
# Initialize the data that will be output from this script. Leave the
# rc number in buildspec so nobody else is subject to the same level
# of confusion I have been.
data = {'version': f'{chrome_major_version}.{buildspec}', 'components': {}}
# Fill in the 'components' dictionary with the output from
# nix-prefetch-git, which can be passed straight to fetchGit when
# imported by Nix.
for component in components:
argv = ['nix-prefetch-git',
'--url', git_root + component,
'--rev', revisions[component]]
output = subprocess.check_output(argv)
data['components'][component] = json.loads(output.decode('utf-8'))
# Find the path to crosvm's default.nix, so the srcs data can be
# written into the same directory.
argv = ['nix-instantiate', '--eval', '--json', '-A', 'crosvm.meta.position']
position = json.loads(subprocess.check_output(argv).decode('utf-8'))
filename = re.match(r'[^:]*', position)[0]
# Finally, write the output.
with open(dirname(filename) + '/upstream-info.json', 'w') as out:
json.dump(data, out, indent=2)
out.write('\n')

View File

@ -0,0 +1,19 @@
{
"version": "77.12371.0.0-rc1",
"components": {
"chromiumos/platform/crosvm": {
"url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
"rev": "f5285c647acacb4f25ef8cf9334254b976e71686",
"date": "2019-07-25T22:15:48+00:00",
"sha256": "1ccjd540xmpad082w9ri13q78wkg95xxmq38b8ybcrj4f7lsxm6w",
"fetchSubmodules": false
},
"chromiumos/third_party/adhd": {
"url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
"rev": "a1c0d93d991daffb042b979ac807bbe9c1f9a3ee",
"date": "2019-07-25T20:38:50-07:00",
"sha256": "11bijqd876adarq96syywn6znfbiflqssgb2j4w032iw2vfnnsyy",
"fetchSubmodules": false
}
}
}

View File

@ -287,10 +287,16 @@ rec {
# unless there are more paths than $maxLayers. In that case, create # unless there are more paths than $maxLayers. In that case, create
# $maxLayers-1 for the most popular layers, and smush the remainaing # $maxLayers-1 for the most popular layers, and smush the remainaing
# store paths in to one final layer. # store paths in to one final layer.
#
# NOTE: the `closures` parameter is a list of closures to include.
# The TOP LEVEL store paths themselves will never be present in the
# resulting image. At this time (2019-12-16) none of these layers
# are appropriate to include, as they are all created as
# implementation details of dockerTools.
mkManyPureLayers = { mkManyPureLayers = {
name, name,
# Files to add to the layer. # Files to add to the layer.
closure, closures,
configJson, configJson,
# Docker has a 125-layer maximum, we pick 100 to ensure there is # Docker has a 125-layer maximum, we pick 100 to ensure there is
# plenty of room for extension. # plenty of room for extension.
@ -303,10 +309,12 @@ rec {
isExecutable = true; isExecutable = true;
src = ./store-path-to-layer.sh; src = ./store-path-to-layer.sh;
}; };
overallClosure = writeText "closure" (lib.concatStringsSep " " closures);
in in
runCommand "${name}-granular-docker-layers" { runCommand "${name}-granular-docker-layers" {
inherit maxLayers; inherit maxLayers;
paths = referencesByPopularity closure; paths = referencesByPopularity overallClosure;
nativeBuildInputs = [ jshon rsync tarsum ]; nativeBuildInputs = [ jshon rsync tarsum ];
enableParallelBuilding = true; enableParallelBuilding = true;
} }
@ -317,15 +325,20 @@ rec {
| jshon -d config \ | jshon -d config \
| jshon -s "1970-01-01T00:00:01Z" -i created > generic.json | jshon -s "1970-01-01T00:00:01Z" -i created > generic.json
# WARNING! # WARNING!
# The following code is fiddly w.r.t. ensuring every layer is # The following code is fiddly w.r.t. ensuring every layer is
# created, and that no paths are missed. If you change the # created, and that no paths are missed. If you change the
# following head and tail call lines, double-check that your # following head and tail call lines, double-check that your
# code behaves properly when the number of layers equals: # code behaves properly when the number of layers equals:
# maxLayers-1, maxLayers, and maxLayers+1 # maxLayers-1, maxLayers, and maxLayers+1
head -n $((maxLayers - 1)) $paths | cat -n | xargs -P$NIX_BUILD_CORES -n2 ${storePathToLayer} paths() {
if [ $(cat $paths | wc -l) -ge $maxLayers ]; then cat $paths ${lib.concatMapStringsSep " " (path: "| grep -v ${path}") (closures ++ [ overallClosure ])}
tail -n+$maxLayers $paths | xargs ${storePathToLayer} $maxLayers }
paths | head -n $((maxLayers - 1)) | cat -n | xargs -P$NIX_BUILD_CORES -n2 ${storePathToLayer}
if [ $(paths | wc -l) -ge $maxLayers ]; then
paths | tail -n+$maxLayers | xargs ${storePathToLayer} $maxLayers
fi fi
echo "Finished building layer '$name'" echo "Finished building layer '$name'"
@ -534,7 +547,12 @@ rec {
}: }:
let let
baseName = baseNameOf name; baseName = baseNameOf name;
contentsEnv = symlinkJoin { name = "bulk-layers"; paths = (if builtins.isList contents then contents else [ contents ]); }; contentsEnv = symlinkJoin {
name = "bulk-layers";
paths = if builtins.isList contents
then contents
else [ contents ];
};
configJson = let configJson = let
pure = writeText "${baseName}-config.json" (builtins.toJSON { pure = writeText "${baseName}-config.json" (builtins.toJSON {
@ -551,7 +569,7 @@ rec {
bulkLayers = mkManyPureLayers { bulkLayers = mkManyPureLayers {
name = baseName; name = baseName;
closure = writeText "closure" "${contentsEnv} ${configJson}"; closures = [ contentsEnv configJson ];
# One layer will be taken up by the customisationLayer, so # One layer will be taken up by the customisationLayer, so
# take up one less. # take up one less.
maxLayers = maxLayers - 1; maxLayers = maxLayers - 1;

View File

@ -0,0 +1,10 @@
{ fetchzip, lib }:
{ url, rev, name ? "source", ... } @ args:
fetchzip ({
inherit name;
url = "${url}/+archive/${rev}.tar.gz";
stripRoot = false;
meta.homepage = url;
} // removeAttrs args [ "url" "rev" ]) // { inherit rev; }

View File

@ -0,0 +1,29 @@
{ stdenv, fetchFromGitHub, fontforge }:
stdenv.mkDerivation rec {
pname = "gubbi-font";
version = "1.3";
src = fetchFromGitHub {
owner = "aravindavk";
repo = "gubbi";
rev = "v${version}";
sha256 = "10w9i3pmjvs1b3xclrgn4q5a95ss4ipldbxbqrys2dmfivx7i994";
};
nativeBuildInputs = [ fontforge ];
dontConfigure = true;
preBuild = "patchShebangs generate.pe";
installPhase = "install -Dm444 -t $out/share/fonts/truetype/ Gubbi.ttf";
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "A Kannada font";
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ ehmry ];
};
}

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "sierra-gtk-theme"; pname = "sierra-gtk-theme";
version = "2019-05-07"; version = "2019-12-16";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vinceliuice"; owner = "vinceliuice";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "0rm9lcwp89ljxqrya9bi882qcs339pc1l945cr1xq2rganqyk9cq"; sha256 = "14hlz8kbrjypyd6wyrwmnj2wm9w3kc8y00ms35ard7x8lmhs56hr";
}; };
nativeBuildInputs = [ libxml2 ]; nativeBuildInputs = [ libxml2 ];

View File

@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
packageName = "gnome-session"; packageName = "gnome-session";
attrPath = "gnome3.gnome-session"; attrPath = "gnome3.gnome-session";
}; };
providedSessions = [ "gnome" "gnome-xorg" ];
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,30 +0,0 @@
{ stdenv, fetchFromGitHub, glib }:
stdenv.mkDerivation rec {
pname = "gnome-shell-workspace-grid";
version = "0f3a430e7d04bb5465a17c1225aab0f574426d6b";
src = fetchFromGitHub {
owner = "zakkak";
repo = "workspace-grid-gnome-shell-extension";
rev = version;
sha256 = "0503b7lmydrbblfvf9b56pv5hpmykzgyc6v8y99rckg58h2jhs69";
};
buildInputs = [
glib
];
installPhase = ''
cp -r ${uuid} $out
'';
uuid = "workspace-grid@mathematical.coffee.gmail.com";
meta = with stdenv.lib; {
description = "Arranges workspaces in a configurable grid";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ aneeshusa ];
homepage = https://github.com/zakkak/workspace-grid-gnome-shell-extension;
};
}

View File

@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, findutils, glib }:
stdenv.mkDerivation rec {
pname = "gnome-shell-extension-workspace-matrix";
version = "3.0.0";
src = fetchFromGitHub {
owner = "mzur";
repo = "gnome-shell-wsmatrix";
rev = "v${version}";
sha256 = "1fgyzmd16kklcca7600bwg8w8pbb4klmapqsvmahlwa99vmkhfkn";
};
uuid = "wsmatrix@martin.zurowietz.de";
nativeBuildInputs = [
findutils
glib
];
buildFlags = "schemas";
installPhase = ''
mkdir -p $out/share/gnome-shell/extensions
cp -r ${uuid} $out/share/gnome-shell/extensions
'';
meta = with stdenv.lib; {
description = "Arrange workspaces in a two dimensional grid with workspace thumbnails";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ chkno ];
homepage = https://github.com/mzur/gnome-shell-wsmatrix;
};
}

View File

@ -141,6 +141,8 @@ let
Type=Application Type=Application
DesktopNames=GNOME-Flashback;GNOME; DesktopNames=GNOME-Flashback;GNOME;
''; '';
} // {
providedSessions = [ "gnome-flashback-${wmName}" ];
}; };
mkSystemdTargetForWm = { wmName }: mkSystemdTargetForWm = { wmName }:

View File

@ -131,6 +131,7 @@ stdenv.mkDerivation rec {
inherit repoName; inherit repoName;
attrPath = pname; attrPath = pname;
}; };
providedSessions = [ "pantheon" ];
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -16,13 +16,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "granite"; pname = "granite";
version = "5.2.5"; version = "5.3.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "elementary"; owner = "elementary";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "0z40vhcp2w8s8rnc56pzvjc4s77bln8k84rwwypivjmk3lhpw1vi"; sha256 = "1gvrk8gh959bmq8w0kaym7sx13v763lk8x5hck00msgmyrsarfwa";
}; };
passthru = { passthru = {

View File

@ -43,6 +43,10 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=${placeholder "out"}" ]; makeFlags = [ "PREFIX=${placeholder "out"}" ];
passthru = {
providedSessions = [ "surf-display" ];
};
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Kiosk browser session manager based on the surf browser"; description = "Kiosk browser session manager based on the surf browser";
homepage = "https://code.it-zukunft-schule.de/cgit/surf-display/"; homepage = "https://code.it-zukunft-schule.de/cgit/surf-display/";

View File

@ -61,6 +61,7 @@ stdenv.mkDerivation {
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/16.1.2-getcwd.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/16.1.2-getcwd.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
sha256 = "1fbi8gn7rv8nqff5mpaijsrch3k3z7qc5cn4h1vl8qrr8xwqlqhb"; sha256 = "1fbi8gn7rv8nqff5mpaijsrch3k3z7qc5cn4h1vl8qrr8xwqlqhb";
}) })
./ecl-1.16.2-libffi-3.3-abi.patch
]; ];
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View File

@ -35,6 +35,10 @@ stdenv.mkDerivation {
inherit (s) url sha256; inherit (s) url sha256;
}; };
patches = [
./libffi-3.3-abi.patch
];
configureFlags = [ configureFlags = [
(if threadSupport then "--enable-threads" else "--disable-threads") (if threadSupport then "--enable-threads" else "--disable-threads")
"--with-gmp-prefix=${gmp.dev}" "--with-gmp-prefix=${gmp.dev}"

View File

@ -0,0 +1,15 @@
diff --git a/src/c/ffi.d b/src/c/ffi.d
index 8861303e..8a959c23 100644
--- a/src/c/ffi.d
+++ b/src/c/ffi.d
@@ -145,8 +145,8 @@ static struct {
#elif defined(X86_WIN64)
{@':win64', FFI_WIN64},
#elif defined(X86_ANY) || defined(X86) || defined(X86_64)
- {@':cdecl', FFI_SYSV},
- {@':sysv', FFI_SYSV},
+ {@':cdecl', FFI_UNIX64},
+ {@':sysv', FFI_UNIX64},
{@':unix64', FFI_UNIX64},
#endif
};

View File

@ -0,0 +1,15 @@
diff --git a/src/c/ffi.d b/src/c/ffi.d
index 8174977a..caa69f39 100644
--- a/src/c/ffi.d
+++ b/src/c/ffi.d
@@ -133,8 +133,8 @@ static struct {
#elif defined(X86_WIN64)
{@':win64', FFI_WIN64},
#elif defined(X86_ANY) || defined(X86) || defined(X86_64)
- {@':cdecl', FFI_SYSV},
- {@':sysv', FFI_SYSV},
+ {@':cdecl', FFI_UNIX64},
+ {@':sysv', FFI_UNIX64},
{@':unix64', FFI_UNIX64},
#endif
};

View File

@ -0,0 +1,24 @@
{ stdenv, rustPlatform, fetchFromGitHub, Security }:
rustPlatform.buildRustPackage rec {
pname = "gleam";
version = "0.5.0";
src = fetchFromGitHub {
owner = "lpil";
repo = pname;
rev = "v${version}";
sha256 = "17h573fm5b1f71ivyipl76p0vw7injm7j3cbg6plkfizcb1j5m7f";
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
cargoSha256 = "04v1gj5nmmcizyrsg6b87qsfzw2zqi57vf1zlnq8680yc54qdah9";
meta = with stdenv.lib; {
description = "A statically typed language for the Erlang VM";
homepage = "https://gleam.run/";
license = licenses.asl20;
maintainers = with maintainers; [ filalex77 ];
};
}

View File

@ -4,11 +4,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gauche"; pname = "gauche";
version = "0.9.8"; version = "0.9.9";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/gauche/Gauche-${version}.tgz"; url = "mirror://sourceforge/gauche/Gauche-${version}.tgz";
sha256 = "0jxp1ladpy8kvfvk561c64spf1c3d6giqla6zscqkd6qa480vcry"; sha256 = "1yzpszhw52vkpr65r5d4khf3489mnnvnw58dd2wsvvx7499k5aac";
}; };
nativeBuildInputs = [ pkgconfig texinfo ]; nativeBuildInputs = [ pkgconfig texinfo ];

View File

@ -1,6 +1,6 @@
{ {
mkDerivation, lib, mkDerivation, lib,
extra-cmake-modules, gettext, python, extra-cmake-modules, gettext, python3,
qtbase, qtdeclarative, qtscript, qtbase, qtdeclarative, qtscript,
}: }:
@ -11,6 +11,6 @@ mkDerivation {
broken = builtins.compareVersions qtbase.version "5.7.0" < 0; broken = builtins.compareVersions qtbase.version "5.7.0" < 0;
}; };
nativeBuildInputs = [ extra-cmake-modules ]; nativeBuildInputs = [ extra-cmake-modules ];
propagatedNativeBuildInputs = [ gettext python ]; propagatedNativeBuildInputs = [ gettext python3 ];
buildInputs = [ qtdeclarative qtscript ]; buildInputs = [ qtdeclarative qtscript ];
} }

View File

@ -1,18 +1,20 @@
{stdenv, lib, fetchurl, gettext, perlPackages, intltool, pkgconfig, glib, { stdenv, lib, fetchurl, gettext, perlPackages, intltool, pkgconfig, glib,
libxml2, sqlite, zlib, sg3_utils, gdk-pixbuf, taglib, libxml2, sqlite, zlib, sg3_utils, gdk-pixbuf, taglib,
libimobiledevice, python3Packages, mutagen, libimobiledevice, mutagen,
monoSupport ? false, mono, gtk-sharp-2_0 monoSupport ? false, mono, gtk-sharp-2_0
}: }:
let
inherit (python3Packages) python pygobject2; stdenv.mkDerivation rec {
in stdenv.mkDerivation rec {
name = "libgpod-0.8.3"; name = "libgpod-0.8.3";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/gtkpod/${name}.tar.bz2"; url = "mirror://sourceforge/gtkpod/${name}.tar.bz2";
sha256 = "0pcmgv1ra0ymv73mlj4qxzgyir026z9jpl5s5bkg35afs1cpk2k3"; sha256 = "0pcmgv1ra0ymv73mlj4qxzgyir026z9jpl5s5bkg35afs1cpk2k3";
}; };
outputs = [ "out" "dev" ];
preConfigure = "configureFlagsArray=( --with-udev-dir=$out/lib/udev )"; preConfigure = "configureFlagsArray=( --with-udev-dir=$out/lib/udev )";
configureFlags = [ configureFlags = [
@ -23,7 +25,7 @@ in stdenv.mkDerivation rec {
dontStrip = true; dontStrip = true;
propagatedBuildInputs = [ glib libxml2 sqlite zlib sg3_utils propagatedBuildInputs = [ glib libxml2 sqlite zlib sg3_utils
gdk-pixbuf taglib libimobiledevice python pygobject2 mutagen ]; gdk-pixbuf taglib libimobiledevice mutagen ];
nativeBuildInputs = [ gettext intltool pkgconfig ] nativeBuildInputs = [ gettext intltool pkgconfig ]
++ (with perlPackages; [ perl XMLParser ]) ++ (with perlPackages; [ perl XMLParser ])

View File

@ -2,16 +2,15 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libminc"; pname = "libminc";
name = "${pname}-2018-01-17"; version = "2.4.03";
owner = "BIC-MNI"; owner = "BIC-MNI";
# current master is significantly ahead of most recent release, so use Git version:
src = fetchFromGitHub { src = fetchFromGitHub {
inherit owner; inherit owner;
repo = pname; repo = pname;
rev = "a9cbe1353eae9791b7d5b03af16e0f86922ce40b"; rev = "release-${version}";
sha256 = "0mn4n3ihzcr1jw2g1vy6c8p4lkc88jwljk04argmj7k4djrgpxpa"; sha256 = "0kpmqs9df836ywsqj749qbsfavf5bnldblxrmnmxqq9pywc8yfrm";
}; };
postPatch = '' postPatch = ''
@ -27,7 +26,7 @@ stdenv.mkDerivation rec {
"-DLIBMINC_USE_SYSTEM_NIFTI=ON" "-DLIBMINC_USE_SYSTEM_NIFTI=ON"
]; ];
doCheck = true; doCheck = !stdenv.isDarwin;
checkPhase = '' checkPhase = ''
export LD_LIBRARY_PATH="$(pwd)" # see #22060 export LD_LIBRARY_PATH="$(pwd)" # see #22060
ctest -E 'ezminc_rw_test|minc_conversion' --output-on-failure ctest -E 'ezminc_rw_test|minc_conversion' --output-on-failure

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "randomX"; pname = "randomX";
version = "1.1.6"; version = "1.1.7";
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
owner = "tevador"; owner = "tevador";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "1qd0rbzgxdy87wwy0n6ca29bcq25j5ndnfgmx8iyf225m4rcwngf"; sha256 = "1d42dw4zrd7mzfqs6gwk27jj6lsh6pwv85p1ckx9dxy8mw3m52ah";
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -0,0 +1,31 @@
{ config
, fetchFromGitHub
, stdenv
, lib
, cmake
, gperftools
}:
stdenv.mkDerivation rec {
pname = "sentencepiece";
version = "0.1.84";
src = fetchFromGitHub {
owner = "google";
repo = pname;
rev = "v${version}";
sha256 = "144y25nj4rwxmgvzqbr7al9fjwh3539ssjswvzrx4gsgfk62lsm0";
};
enableParallelBuilding = true;
nativeBuildInputs = [ cmake gperftools ];
meta = with stdenv.lib; {
homepage = https://github.com/google/sentencepiece;
description = "Unsupervised text tokenizer for Neural Network-based text generation";
license = licenses.asl20;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ pashashocky ];
};
}

View File

@ -2,19 +2,17 @@
, cmake , cmake
, fetchurl , fetchurl
, python , python
, liblapack , openblas
, gfortran , gfortran
, lapackSupport ? true }: , lapackSupport ? true }:
let liblapackShared = liblapack.override { let openblas32 = openblas.override { blas64 = false; };
shared = true;
};
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "sundials"; pname = "sundials";
version = "5.0.0"; version = "5.0.0";
buildInputs = [ python ] ++ stdenv.lib.optionals (lapackSupport) [ gfortran ]; buildInputs = [ python ] ++ stdenv.lib.optionals (lapackSupport) [ gfortran openblas32 ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
src = fetchurl { src = fetchurl {
@ -40,7 +38,7 @@ in stdenv.mkDerivation rec {
] ++ stdenv.lib.optionals (lapackSupport) [ ] ++ stdenv.lib.optionals (lapackSupport) [
"-DSUNDIALS_INDEX_TYPE=int32_t" "-DSUNDIALS_INDEX_TYPE=int32_t"
"-DLAPACK_ENABLE=ON" "-DLAPACK_ENABLE=ON"
"-DLAPACK_LIBRARIES=${liblapackShared}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary};${liblapackShared}/lib/libblas${stdenv.hostPlatform.extensions.sharedLibrary}" "-DLAPACK_LIBRARIES=${openblas32}/lib/libopenblas${stdenv.hostPlatform.extensions.sharedLibrary}"
]; ];
doCheck = true; doCheck = true;

View File

@ -49,12 +49,12 @@ let
}; };
in { in {
wt3 = generic { wt3 = generic {
version = "3.4.2"; version = "3.5.0";
sha256 = "03mwr4yv3705y74pdh19lmh8szad6gk2x2m23f4pr0wrmqg73307"; sha256 = "1xcwzldbval5zrf7f3n2gkpscagg51cw2jp6p3q1yh6bi59haida";
}; };
wt4 = generic { wt4 = generic {
version = "4.1.2"; version = "4.2.0";
sha256 = "06bnadpgflg8inikzynnz4l4r6w1bphjwlva4pzf51w648vpkknl"; sha256 = "0zrrdjz0sa8hrmybjp4aap1lcqcqvsicd7dj49zj1m5k8gnfpm4v";
}; };
} }

View File

@ -1,7 +1,7 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
CFPropertyList (3.0.1) CFPropertyList (3.0.2)
activesupport (4.2.11.1) activesupport (4.2.11.1)
i18n (~> 0.7) i18n (~> 0.7)
minitest (~> 5.1) minitest (~> 5.1)
@ -12,10 +12,10 @@ GEM
json (>= 1.5.1) json (>= 1.5.1)
atomos (0.1.3) atomos (0.1.3)
claide (1.0.3) claide (1.0.3)
cocoapods (1.8.4) cocoapods (1.9.0.beta.1)
activesupport (>= 4.0.2, < 5) activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0) claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.8.4) cocoapods-core (= 1.9.0.beta.1)
cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0)
@ -30,15 +30,17 @@ GEM
molinillo (~> 0.6.6) molinillo (~> 0.6.6)
nap (~> 1.0) nap (~> 1.0)
ruby-macho (~> 1.4) ruby-macho (~> 1.4)
xcodeproj (>= 1.11.1, < 2.0) xcodeproj (>= 1.14.0, < 2.0)
cocoapods-core (1.8.4) cocoapods-core (1.9.0.beta.1)
activesupport (>= 4.0.2, < 6) activesupport (>= 4.0.2, < 6)
algoliasearch (~> 1.0) algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1) concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4) fuzzy_match (~> 2.0.4)
nap (~> 1.0) nap (~> 1.0)
netrc (~> 0.11)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4) cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.2.2) cocoapods-downloader (1.3.0)
cocoapods-plugins (1.0.0) cocoapods-plugins (1.0.0)
nap nap
cocoapods-search (1.0.0) cocoapods-search (1.0.0)
@ -50,23 +52,28 @@ GEM
colored2 (3.1.2) colored2 (3.1.2)
concurrent-ruby (1.1.5) concurrent-ruby (1.1.5)
escape (0.0.4) escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
ffi (1.11.3)
fourflusher (2.3.1) fourflusher (2.3.1)
fuzzy_match (2.0.4) fuzzy_match (2.0.4)
gh_inspector (1.1.3) gh_inspector (1.1.3)
httpclient (2.8.3) httpclient (2.8.3)
i18n (0.9.5) i18n (0.9.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
json (2.2.0) json (2.3.0)
minitest (5.12.2) minitest (5.13.0)
molinillo (0.6.6) molinillo (0.6.6)
nanaimo (0.2.6) nanaimo (0.2.6)
nap (1.1.0) nap (1.1.0)
netrc (0.11.0) netrc (0.11.0)
ruby-macho (1.4.0) ruby-macho (1.4.0)
thread_safe (0.3.6) thread_safe (0.3.6)
typhoeus (1.3.1)
ethon (>= 0.9.0)
tzinfo (1.2.5) tzinfo (1.2.5)
thread_safe (~> 0.1) thread_safe (~> 0.1)
xcodeproj (1.13.0) xcodeproj (1.14.0)
CFPropertyList (>= 2.3.3, < 4.0) CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3) atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0) claide (>= 1.0.2, < 2.0)
@ -80,4 +87,4 @@ DEPENDENCIES
cocoapods (>= 1.7.0.beta.1)! cocoapods (>= 1.7.0.beta.1)!
BUNDLED WITH BUNDLED WITH
1.17.2 1.17.3

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