mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
Merge staging-next into staging
This commit is contained in:
commit
39037a3431
159 changed files with 2727 additions and 787 deletions
|
@ -105,6 +105,17 @@ stdenv.mkDerivation {
|
|||
</para>
|
||||
</listitem>
|
||||
</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>
|
||||
<term>
|
||||
<literal>fetchFromBitbucket</literal>
|
||||
|
|
|
@ -1034,7 +1034,10 @@ Create this `default.nix` file, together with a `requirements.txt` and simply ex
|
|||
|
||||
```nix
|
||||
with import <nixpkgs> {};
|
||||
with python27Packages;
|
||||
|
||||
let
|
||||
pythonPackages = python27Packages;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "impurePythonEnv";
|
||||
|
@ -1044,9 +1047,8 @@ stdenv.mkDerivation {
|
|||
buildInputs = [
|
||||
# these packages are required for virtualenv and pip to work:
|
||||
#
|
||||
python27Full
|
||||
python27Packages.virtualenv
|
||||
python27Packages.pip
|
||||
pythonPackages.virtualenv
|
||||
pythonPackages.pip
|
||||
# the following packages are related to the dependencies of your python
|
||||
# project.
|
||||
# In this particular example the python modules listed in the
|
||||
|
@ -1059,14 +1061,13 @@ stdenv.mkDerivation {
|
|||
libxml2
|
||||
libxslt
|
||||
libzip
|
||||
stdenv
|
||||
zlib
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# set SOURCE_DATE_EPOCH so that we can use python wheels
|
||||
SOURCE_DATE_EPOCH=$(date +%s)
|
||||
virtualenv --no-setuptools venv
|
||||
virtualenv --python=${pythonPackages.python.interpreter} --no-setuptools venv
|
||||
export PATH=$PWD/venv/bin:$PATH
|
||||
pip install -r requirements.txt
|
||||
'';
|
||||
|
|
|
@ -5239,6 +5239,12 @@
|
|||
githubId = 20792;
|
||||
name = "Sebastian Galkin";
|
||||
};
|
||||
pashashocky = {
|
||||
email = "pashashocky@gmail.com";
|
||||
github = "pashashocky";
|
||||
githubId = 673857;
|
||||
name = "Pash Shocky";
|
||||
};
|
||||
pashev = {
|
||||
email = "pashev.igor@gmail.com";
|
||||
github = "ip1981";
|
||||
|
|
|
@ -83,8 +83,7 @@
|
|||
desktop environment. If you wanted no desktop environment and i3 as your your
|
||||
window manager, you'd define:
|
||||
<programlisting>
|
||||
<xref linkend="opt-services.xserver.desktopManager.default"/> = "none";
|
||||
<xref linkend="opt-services.xserver.windowManager.default"/> = "i3";
|
||||
<xref linkend="opt-services.xserver.displayManager.defaultSession"/> = "none+i3";
|
||||
</programlisting>
|
||||
And, finally, to enable auto-login for a user <literal>johndoe</literal>:
|
||||
<programlisting>
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
<para>
|
||||
To enable the Xfce Desktop Environment, set
|
||||
<programlisting>
|
||||
<link linkend="opt-services.xserver.desktopManager.default">services.xserver.desktopManager</link> = {
|
||||
<link linkend="opt-services.xserver.desktopManager.xfce.enable">xfce.enable</link> = true;
|
||||
<link linkend="opt-services.xserver.desktopManager.default">default</link> = "xfce";
|
||||
<xref linkend="opt-services.xserver.desktopManager.xfce.enable" /> = true;
|
||||
<xref linkend="opt-services.xserver.displayManager.defaultSession" /> = "xfce";
|
||||
};
|
||||
</programlisting>
|
||||
</para>
|
||||
|
|
|
@ -119,4 +119,13 @@ Defined by:
|
|||
bug, please report to Nicolas Pierron.
|
||||
</para>
|
||||
</refsection>
|
||||
<refsection>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>configuration.nix</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry>
|
||||
</para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
|
|
|
@ -55,6 +55,19 @@
|
|||
and adding a <option>--all</option> option which prints all options and their values.
|
||||
</para>
|
||||
</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>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -262,9 +262,8 @@ in rec {
|
|||
virtualisation.memorySize = 1024;
|
||||
services.xserver.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.desktopManager.default = "none";
|
||||
};
|
||||
in
|
||||
runInMachine ({
|
||||
|
|
|
@ -249,9 +249,8 @@ in rec {
|
|||
virtualisation.memorySize = 1024;
|
||||
services.xserver.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.desktopManager.default = "none";
|
||||
};
|
||||
in
|
||||
runInMachine ({
|
||||
|
|
|
@ -443,6 +443,7 @@
|
|||
./services/misc/logkeys.nix
|
||||
./services/misc/leaps.nix
|
||||
./services/misc/lidarr.nix
|
||||
./services/misc/mame.nix
|
||||
./services/misc/mathics.nix
|
||||
./services/misc/matrix-synapse.nix
|
||||
./services/misc/mbpfan.nix
|
||||
|
|
|
@ -24,6 +24,7 @@ let
|
|||
swayJoined = pkgs.symlinkJoin {
|
||||
name = "sway-joined";
|
||||
paths = [ swayWrapped swayPackage ];
|
||||
passthru.providedSessions = [ "sway" ];
|
||||
};
|
||||
in {
|
||||
options.programs.sway = {
|
||||
|
@ -88,7 +89,7 @@ in {
|
|||
fonts.enableDefaultFonts = mkDefault true;
|
||||
programs.dconf.enable = mkDefault true;
|
||||
# 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 ];
|
||||
|
|
|
@ -111,6 +111,7 @@ in
|
|||
Restart = "always";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
KillSignal = "SIGKILL";
|
||||
PIDFile = "${cfg.dataDir}.config/oxidized/pid";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
67
nixos/modules/services/misc/mame.nix
Normal file
67
nixos/modules/services/misc/mame.nix
Normal 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 ];
|
||||
}
|
|
@ -86,23 +86,14 @@ in
|
|||
};
|
||||
|
||||
default = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "none";
|
||||
description = "Default desktop manager loaded if none have been chosen.";
|
||||
apply = defaultDM:
|
||||
if defaultDM == "" && cfg.session.list != [] then
|
||||
(head cfg.session.list).name
|
||||
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;
|
||||
description = ''
|
||||
<emphasis role="strong">Deprecated</emphasis>, please use <xref linkend="opt-services.xserver.displayManager.defaultSession"/> instead.
|
||||
|
||||
Default desktop manager loaded if none have been chosen.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -144,7 +144,7 @@ in
|
|||
services.gnome3.core-shell.enable = 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 = ''
|
||||
${concatMapStrings (p: ''
|
||||
|
@ -171,7 +171,7 @@ in
|
|||
})
|
||||
|
||||
(mkIf flashbackEnabled {
|
||||
services.xserver.displayManager.extraSessionFilePackages = map
|
||||
services.xserver.displayManager.sessionPackages = map
|
||||
(wm: pkgs.gnome3.gnome-flashback.mkSessionForWm {
|
||||
inherit (wm) wmName wmLabel wmCommand;
|
||||
}) (optional cfg.flashback.enableMetacity {
|
||||
|
|
|
@ -69,7 +69,7 @@ in
|
|||
|
||||
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
|
||||
# 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;
|
||||
|
||||
# If not set manually Pantheon session cannot be started
|
||||
# Known issue of https://github.com/NixOS/nixpkgs/pull/43992
|
||||
services.xserver.desktopManager.default = mkForce "pantheon";
|
||||
# Without this, Elementary LightDM greeter will pre-select non-existent `default` session
|
||||
# https://github.com/elementary/greeter/issues/368
|
||||
services.xserver.displayManager.defaultSession = "pantheon";
|
||||
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then
|
||||
|
|
|
@ -118,7 +118,7 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.displayManager.extraSessionFilePackages = [
|
||||
services.xserver.displayManager.sessionPackages = [
|
||||
pkgs.surf-display
|
||||
];
|
||||
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
}
|
|
@ -27,16 +27,7 @@ let
|
|||
Xft.hintstyle: hintslight
|
||||
'';
|
||||
|
||||
mkCases = session:
|
||||
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
|
||||
# file provided by services.xserver.displayManager.sessionData.wrapper
|
||||
xsessionWrapper = pkgs.writeScript "xsession-wrapper"
|
||||
''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
|
@ -116,94 +107,44 @@ let
|
|||
# Run the supplied session command. Remove any double quotes with eval.
|
||||
eval exec "$@"
|
||||
else
|
||||
# Fall back to the default window/desktopManager
|
||||
exec ${cfg.displayManager.session.script}
|
||||
# TODO: Do we need this? Should not the session always exist?
|
||||
echo "error: unknown session $1" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
# file provided by services.xserver.displayManager.session.script
|
||||
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"
|
||||
installedSessions = pkgs.runCommand "desktops"
|
||||
{ # trivial derivation
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
''
|
||||
mkdir -p "$out/share/xsessions"
|
||||
${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}
|
||||
mkdir -p "$out/share/"{xsessions,wayland-sessions}
|
||||
|
||||
${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
|
||||
${xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions
|
||||
fi
|
||||
'') cfg.displayManager.extraSessionFilePackages}
|
||||
|
||||
${concatMapStrings (pkg: ''
|
||||
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
|
||||
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
|
||||
|
||||
{
|
||||
|
@ -261,11 +202,24 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
extraSessionFilePackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
sessionPackages = mkOption {
|
||||
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 = [];
|
||||
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,18 +250,50 @@ in
|
|||
inside the display manager with the desktop 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;
|
||||
};
|
||||
|
||||
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 = {
|
||||
|
||||
preStart = mkOption {
|
||||
|
@ -356,6 +342,27 @@ in
|
|||
};
|
||||
|
||||
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";
|
||||
|
||||
systemd.user.targets.graphical-session = {
|
||||
|
@ -364,6 +371,67 @@ in
|
|||
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 = [
|
||||
|
@ -371,6 +439,7 @@ in
|
|||
"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" "logToJournal" ] [ "services" "xserver" "displayManager" "job" "logToJournal" ])
|
||||
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "extraSessionFilesPackages" ] [ "services" "xserver" "displayManager" "sessionPackages" ])
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -31,44 +31,9 @@ let
|
|||
load-module module-position-event-sounds
|
||||
'';
|
||||
|
||||
dmDefault = config.services.xserver.desktopManager.default;
|
||||
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
|
||||
'';
|
||||
};
|
||||
defaultSessionName = config.services.xserver.displayManager.defaultSession;
|
||||
|
||||
setSessionScript = pkgs.callPackage ./account-service-util.nix { };
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -186,7 +151,7 @@ in
|
|||
environment = {
|
||||
GDM_X_SERVER_EXTRA_ARGS = toString
|
||||
(filter (arg: arg != "-terminate") cfg.xserverArgs);
|
||||
XDG_DATA_DIRS = "${cfg.session.desktops}/share/";
|
||||
XDG_DATA_DIRS = "${cfg.sessionData.desktops}/share/";
|
||||
} // optionalAttrs (xSessionWrapper != null) {
|
||||
# Make GDM use this wrapper before running the session, which runs the
|
||||
# configured setupCommands. This relies on a patched GDM which supports
|
||||
|
@ -204,16 +169,19 @@ in
|
|||
cat - > /run/gdm/.config/gnome-initial-setup-done <<- EOF
|
||||
yes
|
||||
EOF
|
||||
''
|
||||
# TODO: Make setSessionScript aware of previously used sessions
|
||||
# + optionalString hasDefaultUserSession ''
|
||||
# ${setSessionScript}/bin/set-session ${defaultSessionName}
|
||||
# ''
|
||||
;
|
||||
'' + optionalString (defaultSessionName != null) ''
|
||||
# Set default session in session chooser to a specified values – basically ignore session history.
|
||||
${setSessionScript}/bin/set-session ${cfg.sessionData.autologinSession}
|
||||
'';
|
||||
};
|
||||
|
||||
# Because sd_login_monitor_new requires /run/systemd/machines
|
||||
systemd.services.display-manager.wants = [ "systemd-machined.service" ];
|
||||
systemd.services.display-manager.wants = [
|
||||
# Because sd_login_monitor_new requires /run/systemd/machines
|
||||
"systemd-machined.service"
|
||||
# setSessionScript wants AccountsService
|
||||
"accounts-daemon.service"
|
||||
];
|
||||
|
||||
systemd.services.display-manager.after = [
|
||||
"rc-local.service"
|
||||
"systemd-machined.service"
|
||||
|
@ -329,7 +297,7 @@ in
|
|||
${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
|
||||
security.pam.services = {
|
||||
|
|
|
@ -53,9 +53,8 @@ in
|
|||
Whether to enable lightdm-mini-greeter as the lightdm greeter.
|
||||
|
||||
Note that this greeter starts only the default X session.
|
||||
You can configure the default X session by
|
||||
<option>services.xserver.desktopManager.default</option> and
|
||||
<option>services.xserver.windowManager.default</option>.
|
||||
You can configure the default X session using
|
||||
<xref linkend="opt-services.xserver.displayManager.defaultSession"/>.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -8,10 +8,9 @@ let
|
|||
dmcfg = xcfg.displayManager;
|
||||
xEnv = config.systemd.services.display-manager.environment;
|
||||
cfg = dmcfg.lightdm;
|
||||
sessionData = dmcfg.sessionData;
|
||||
|
||||
dmDefault = xcfg.desktopManager.default;
|
||||
wmDefault = xcfg.windowManager.default;
|
||||
hasDefaultUserSession = dmDefault != "none" || wmDefault != "none";
|
||||
setSessionScript = pkgs.callPackage ./account-service-util.nix { };
|
||||
|
||||
inherit (pkgs) lightdm writeScript writeText;
|
||||
|
||||
|
@ -45,22 +44,19 @@ let
|
|||
greeter-user = ${config.users.users.lightdm.name}
|
||||
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}
|
||||
|
||||
[Seat:*]
|
||||
xserver-command = ${xserverWrapper}
|
||||
session-wrapper = ${dmcfg.session.wrapper}
|
||||
session-wrapper = ${dmcfg.sessionData.wrapper}
|
||||
${optionalString cfg.greeter.enable ''
|
||||
greeter-session = ${cfg.greeter.name}
|
||||
''}
|
||||
${optionalString cfg.autoLogin.enable ''
|
||||
autologin-user = ${cfg.autoLogin.user}
|
||||
autologin-user-timeout = ${toString cfg.autoLogin.timeout}
|
||||
autologin-session = ${defaultSessionName}
|
||||
''}
|
||||
${optionalString hasDefaultUserSession ''
|
||||
user-session=${defaultSessionName}
|
||||
autologin-session = ${sessionData.autologinSession}
|
||||
''}
|
||||
${optionalString (dmcfg.setupCommands != "") ''
|
||||
display-setup-script=${pkgs.writeScript "lightdm-display-setup" ''
|
||||
|
@ -71,7 +67,6 @@ let
|
|||
${cfg.extraSeatDefaults}
|
||||
'';
|
||||
|
||||
defaultSessionName = dmDefault + optionalString (wmDefault != "none") ("+" + wmDefault);
|
||||
in
|
||||
{
|
||||
# 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
|
||||
'';
|
||||
}
|
||||
{ assertion = cfg.autoLogin.enable -> dmDefault != "none" || wmDefault != "none";
|
||||
{ assertion = cfg.autoLogin.enable -> sessionData.autologinSession != null;
|
||||
message = ''
|
||||
LightDM auto-login requires that services.xserver.desktopManager.default and
|
||||
services.xserver.windowManager.default are set to valid values. The current
|
||||
default session: ${defaultSessionName} is not valid.
|
||||
LightDM auto-login requires that services.xserver.displayManager.defaultSession is set.
|
||||
'';
|
||||
}
|
||||
{ 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
|
||||
services.xserver.displayManager.job.execCmd = ''
|
||||
export PATH=${lightdm}/sbin:$PATH
|
||||
|
|
|
@ -50,8 +50,8 @@ let
|
|||
MinimumVT=${toString (if xcfg.tty != null then xcfg.tty else 7)}
|
||||
ServerPath=${xserverWrapper}
|
||||
XephyrPath=${pkgs.xorg.xorgserver.out}/bin/Xephyr
|
||||
SessionCommand=${dmcfg.session.wrapper}
|
||||
SessionDir=${dmcfg.session.desktops}/share/xsessions
|
||||
SessionCommand=${dmcfg.sessionData.wrapper}
|
||||
SessionDir=${dmcfg.sessionData.desktops}/share/xsessions
|
||||
XauthPath=${pkgs.xorg.xauth}/bin/xauth
|
||||
DisplayCommand=${Xsetup}
|
||||
DisplayStopCommand=${Xstop}
|
||||
|
@ -59,23 +59,19 @@ let
|
|||
|
||||
[Wayland]
|
||||
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 ''
|
||||
[Autologin]
|
||||
User=${cfg.autoLogin.user}
|
||||
Session=${defaultSessionName}.desktop
|
||||
Session=${autoLoginSessionName}.desktop
|
||||
Relogin=${boolToString cfg.autoLogin.relogin}
|
||||
''}
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
defaultSessionName =
|
||||
let
|
||||
dm = xcfg.desktopManager.default;
|
||||
wm = xcfg.windowManager.default;
|
||||
in dm + optionalString (wm != "none") ("+" + wm);
|
||||
autoLoginSessionName = dmcfg.sessionData.autologinSession;
|
||||
|
||||
in
|
||||
{
|
||||
|
@ -210,11 +206,9 @@ in
|
|||
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 = ''
|
||||
SDDM auto-login requires that services.xserver.desktopManager.default and
|
||||
services.xserver.windowManager.default are set to valid values. The current
|
||||
default session: ${defaultSessionName} is not valid.
|
||||
SDDM auto-login requires that services.xserver.displayManager.defaultSession is set.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
|
|
@ -59,15 +59,14 @@ in
|
|||
};
|
||||
|
||||
default = mkOption {
|
||||
type = types.str;
|
||||
default = "none";
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "wmii";
|
||||
description = "Default window manager loaded if none have been chosen.";
|
||||
apply = defaultWM:
|
||||
if any (w: w.name == defaultWM) cfg.session then
|
||||
defaultWM
|
||||
else
|
||||
throw "Default window manager (${defaultWM}) not found.";
|
||||
description = ''
|
||||
<emphasis role="strong">Deprecated</emphasis>, please use <xref linkend="opt-services.xserver.displayManager.defaultSession"/> instead.
|
||||
|
||||
Default window manager loaded if none have been chosen.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{ services.xserver.enable = true;
|
||||
|
||||
# Automatically log in.
|
||||
services.xserver.displayManager.auto.enable = true;
|
||||
|
||||
# Use IceWM as the window manager.
|
||||
services.xserver.windowManager.default = "icewm";
|
||||
services.xserver.windowManager.icewm.enable = true;
|
||||
|
||||
# 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;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
||||
services.xserver.displayManager.lightdm.autoLogin.user = "alice";
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
services.xserver.desktopManager.default = "gnome-xorg";
|
||||
services.xserver.displayManager.defaultSession = "gnome-xorg";
|
||||
|
||||
virtualisation.memorySize = 1024;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ../make-test.nix ({...}: {
|
||||
import ../make-test-python.nix ({...}: {
|
||||
nodes = {
|
||||
namenode = {pkgs, ...}: {
|
||||
services.hadoop = {
|
||||
|
@ -35,20 +35,20 @@ import ../make-test.nix ({...}: {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll
|
||||
start_all()
|
||||
|
||||
$namenode->waitForUnit("hdfs-namenode");
|
||||
$namenode->waitForUnit("network.target");
|
||||
$namenode->waitForOpenPort(8020);
|
||||
$namenode->waitForOpenPort(9870);
|
||||
namenode.wait_for_unit("hdfs-namenode")
|
||||
namenode.wait_for_unit("network.target")
|
||||
namenode.wait_for_open_port(8020)
|
||||
namenode.wait_for_open_port(9870)
|
||||
|
||||
$datanode->waitForUnit("hdfs-datanode");
|
||||
$datanode->waitForUnit("network.target");
|
||||
$datanode->waitForOpenPort(9864);
|
||||
$datanode->waitForOpenPort(9866);
|
||||
$datanode->waitForOpenPort(9867);
|
||||
datanode.wait_for_unit("hdfs-datanode")
|
||||
datanode.wait_for_unit("network.target")
|
||||
datanode.wait_for_open_port(9864)
|
||||
datanode.wait_for_open_port(9866)
|
||||
datanode.wait_for_open_port(9867)
|
||||
|
||||
$namenode->succeed("curl http://namenode:9870");
|
||||
$datanode->succeed("curl http://datanode:9864");
|
||||
namenode.succeed("curl http://namenode:9870")
|
||||
datanode.succeed("curl http://datanode:9864")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ../make-test.nix ({...}: {
|
||||
import ../make-test-python.nix ({...}: {
|
||||
nodes = {
|
||||
resourcemanager = {pkgs, ...}: {
|
||||
services.hadoop.package = pkgs.hadoop_3_1;
|
||||
|
@ -28,19 +28,19 @@ import ../make-test.nix ({...}: {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$resourcemanager->waitForUnit("yarn-resourcemanager");
|
||||
$resourcemanager->waitForUnit("network.target");
|
||||
$resourcemanager->waitForOpenPort(8031);
|
||||
$resourcemanager->waitForOpenPort(8088);
|
||||
resourcemanager.wait_for_unit("yarn-resourcemanager")
|
||||
resourcemanager.wait_for_unit("network.target")
|
||||
resourcemanager.wait_for_open_port(8031)
|
||||
resourcemanager.wait_for_open_port(8088)
|
||||
|
||||
$nodemanager->waitForUnit("yarn-nodemanager");
|
||||
$nodemanager->waitForUnit("network.target");
|
||||
$nodemanager->waitForOpenPort(8042);
|
||||
$nodemanager->waitForOpenPort(8041);
|
||||
nodemanager.wait_for_unit("yarn-nodemanager")
|
||||
nodemanager.wait_for_unit("network.target")
|
||||
nodemanager.wait_for_open_port(8042)
|
||||
nodemanager.wait_for_open_port(8041)
|
||||
|
||||
$resourcemanager->succeed("curl http://localhost:8088");
|
||||
$nodemanager->succeed("curl http://localhost:8042");
|
||||
resourcemanager.succeed("curl http://localhost:8088")
|
||||
nodemanager.succeed("curl http://localhost:8042")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ...}: {
|
||||
import ./make-test-python.nix ({ pkgs, ...}: {
|
||||
name = "haproxy";
|
||||
nodes = {
|
||||
machine = { ... }: {
|
||||
|
@ -33,11 +33,13 @@ import ./make-test.nix ({ pkgs, ...}: {
|
|||
};
|
||||
};
|
||||
testScript = ''
|
||||
startAll;
|
||||
$machine->waitForUnit('multi-user.target');
|
||||
$machine->waitForUnit('haproxy.service');
|
||||
$machine->waitForUnit('httpd.service');
|
||||
$machine->succeed('curl -k http://localhost:80/index.txt | grep "We are all good!"');
|
||||
$machine->succeed('curl -k http://localhost:80/metrics | grep haproxy_process_pool_allocated_bytes');
|
||||
start_all()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.wait_for_unit("haproxy.service")
|
||||
machine.wait_for_unit("httpd.service")
|
||||
assert "We are all good!" in machine.succeed("curl -k http://localhost:80/index.txt")
|
||||
assert "haproxy_process_pool_allocated_bytes" in machine.succeed(
|
||||
"curl -k http://localhost:80/metrics"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ../make-test.nix ({ pkgs, ... }:
|
||||
import ../make-test-python.nix ({ pkgs, ... }:
|
||||
{
|
||||
name = "hitch";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
|
@ -23,11 +23,11 @@ import ../make-test.nix ({ pkgs, ... }:
|
|||
|
||||
testScript =
|
||||
''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$machine->waitForUnit('multi-user.target');
|
||||
$machine->waitForUnit('hitch.service');
|
||||
$machine->waitForOpenPort(443);
|
||||
$machine->succeed('curl -k https://localhost:443/index.txt | grep "We are all good!"');
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.wait_for_unit("hitch.service")
|
||||
machine.wait_for_open_port(443)
|
||||
assert "We are all good!" in machine.succeed("curl -k https://localhost:443/index.txt")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -7,7 +7,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
machine = { lib, ... }: {
|
||||
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||
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;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "initrd-network";
|
||||
|
||||
meta.maintainers = [ pkgs.stdenv.lib.maintainers.eelco ];
|
||||
|
@ -15,8 +15,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
|
||||
testScript =
|
||||
''
|
||||
startAll;
|
||||
$machine->waitForUnit("multi-user.target");
|
||||
$machine->succeed("ip link >&2");
|
||||
start_all()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("ip link >&2")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ... }:
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "leaps";
|
||||
|
@ -22,9 +22,11 @@ import ./make-test.nix ({ pkgs, ... }:
|
|||
|
||||
testScript =
|
||||
''
|
||||
startAll;
|
||||
$server->waitForOpenPort(6666);
|
||||
$client->waitForUnit("network.target");
|
||||
$client->succeed("${pkgs.curl}/bin/curl http://server:6666/leaps/ | grep -i 'leaps'");
|
||||
start_all()
|
||||
server.wait_for_open_port(6666)
|
||||
client.wait_for_unit("network.target")
|
||||
assert "leaps" in client.succeed(
|
||||
"${pkgs.curl}/bin/curl http://server:6666/leaps/"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ lib, ... }:
|
||||
import ./make-test-python.nix ({ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -11,8 +11,10 @@ with lib;
|
|||
{ services.lidarr.enable = true; };
|
||||
|
||||
testScript = ''
|
||||
$machine->waitForUnit('lidarr.service');
|
||||
$machine->waitForOpenPort('8686');
|
||||
$machine->succeed("curl --fail http://localhost:8686/");
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("lidarr.service")
|
||||
machine.wait_for_open_port("8686")
|
||||
machine.succeed("curl --fail http://localhost:8686/")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -8,9 +8,8 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
imports = [ ./common/user-account.nix ];
|
||||
services.xserver.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.desktopManager.default = "none";
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ lib, ... }:
|
||||
import ./make-test-python.nix ({ lib, ... }:
|
||||
|
||||
{
|
||||
name = "mailcatcher";
|
||||
|
@ -16,11 +16,15 @@ import ./make-test.nix ({ lib, ... }:
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$machine->waitForUnit('mailcatcher.service');
|
||||
$machine->waitForOpenPort('1025');
|
||||
$machine->succeed('echo "this is the body of the email" | mail -s "subject" root@example.org');
|
||||
$machine->succeed('curl http://localhost:1080/messages/1.source') =~ /this is the body of the email/ or die;
|
||||
machine.wait_for_unit("mailcatcher.service")
|
||||
machine.wait_for_open_port("1025")
|
||||
machine.succeed(
|
||||
'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"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ lib, ... } : {
|
||||
import ./make-test-python.nix ({ lib, ... } : {
|
||||
name = "paperless";
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ earvstedt ];
|
||||
|
@ -13,17 +13,24 @@ import ./make-test.nix ({ lib, ... } : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
$machine->waitForUnit("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.wait_for_unit("paperless-consumer.service")
|
||||
|
||||
$machine->waitForUnit("paperless-server.service");
|
||||
# Wait until server accepts connections
|
||||
$machine->waitUntilSucceeds("curl -s localhost:28981");
|
||||
# Wait until document is consumed
|
||||
$machine->waitUntilSucceeds('(($(curl -s localhost:28981/api/documents/ | jq .count) == 1))');
|
||||
$machine->succeed("curl -s localhost:28981/api/documents/ | jq '.results | .[0] | .created'")
|
||||
=~ /2005-10-16/ or die;
|
||||
# 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
|
||||
machine.wait_until_succeeds("curl -s localhost:28981")
|
||||
|
||||
with subtest("Test document is consumed"):
|
||||
machine.wait_until_succeeds(
|
||||
"(($(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'"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ... }: {
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "powerdns";
|
||||
|
||||
nodes.server = { ... }: {
|
||||
|
@ -6,7 +6,7 @@ import ./make-test.nix ({ pkgs, ... }: {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
$server->waitForUnit("pdns-recursor");
|
||||
$server->waitForOpenPort("53");
|
||||
server.wait_for_unit("pdns-recursor")
|
||||
server.wait_for_open_port("53")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# This test runs peerflix and checks if peerflix starts
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "peerflix";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ offline ];
|
||||
|
@ -15,9 +15,9 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$peerflix->waitForUnit("peerflix.service");
|
||||
$peerflix->waitUntilSucceeds("curl localhost:9000");
|
||||
peerflix.wait_for_unit("peerflix.service")
|
||||
peerflix.wait_until_succeeds("curl localhost:9000")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ... } :
|
||||
import ./make-test-python.nix ({ pkgs, ... } :
|
||||
let
|
||||
role = "test";
|
||||
password = "secret";
|
||||
|
@ -29,11 +29,13 @@ in
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$one->waitForUnit("default.target");
|
||||
$one->requireActiveUnit("pgmanage.service");
|
||||
start_all()
|
||||
one.wait_for_unit("default.target")
|
||||
one.require_unit_state("pgmanage.service", "active")
|
||||
|
||||
# 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"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
let testString = "can-use-subgroups"; in
|
||||
|
||||
import ./make-test.nix ({ ...}: {
|
||||
import ./make-test-python.nix ({ ...}: {
|
||||
name = "php-httpd-pcre-jit-test";
|
||||
machine = { lib, pkgs, ... }: {
|
||||
time.timeZone = "UTC";
|
||||
|
@ -31,9 +31,10 @@ import ./make-test.nix ({ ...}: {
|
|||
};
|
||||
testScript = { ... }:
|
||||
''
|
||||
$machine->waitForUnit('httpd.service');
|
||||
machine.wait_for_unit("httpd.service")
|
||||
# Ensure php evaluation by matching on the var_dump syntax
|
||||
$machine->succeed('curl -vvv -s http://127.0.0.1:80/index.php \
|
||||
| grep "string(${toString (builtins.stringLength testString)}) \"${testString}\""');
|
||||
assert 'string(${toString (builtins.stringLength testString)}) "${testString}"' in machine.succeed(
|
||||
"curl -vvv -s http://127.0.0.1:80/index.php"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -12,8 +12,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
|||
imports = [ ./common/user-account.nix ];
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.defaultSession = "plasma5";
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
services.xserver.desktopManager.default = "plasma5";
|
||||
services.xserver.displayManager.sddm.autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "postgis";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ lsix ];
|
||||
|
@ -20,10 +20,10 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$master->waitForUnit("postgresql");
|
||||
$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_topology;'");
|
||||
start_all()
|
||||
master.wait_for_unit("postgresql")
|
||||
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_topology;'")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
# All interfaces are in OSPF Area 0.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ... }:
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
let
|
||||
|
||||
ifAddr = node: iface: (pkgs.lib.head node.config.networking.interfaces.${iface}.ipv4.addresses).address;
|
||||
|
@ -74,23 +74,23 @@ import ./make-test.nix ({ pkgs, ... }:
|
|||
testScript =
|
||||
{ ... }:
|
||||
''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
# 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
|
||||
for my $gw ($router1, $router2) {
|
||||
$gw->waitForUnit("ospfd");
|
||||
$gw->waitUntilSucceeds("vtysh -c 'show ip ospf neighbor' | grep Full");
|
||||
$gw->waitUntilSucceeds("vtysh -c 'show ip route' | grep '^O>'");
|
||||
}
|
||||
with subtest("Wait for OSPF to form adjacencies"):
|
||||
for gw in router1, router2:
|
||||
gw.wait_for_unit("ospfd")
|
||||
gw.wait_until_succeeds("vtysh -c 'show ip ospf neighbor' | grep Full")
|
||||
gw.wait_until_succeeds("vtysh -c 'show ip route' | grep '^O>'")
|
||||
|
||||
# Test ICMP.
|
||||
$client->succeed("ping -c 3 server >&2");
|
||||
with subtest("Test ICMP"):
|
||||
client.wait_until_succeeds("ping -c 3 server >&2")
|
||||
|
||||
# Test whether HTTP works.
|
||||
$server->waitForUnit("httpd");
|
||||
$client->succeed("curl --fail http://server/ >&2");
|
||||
with subtest("Test whether HTTP works"):
|
||||
server.wait_for_unit("httpd")
|
||||
client.succeed("curl --fail http://server/ >&2")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -16,9 +16,8 @@ let
|
|||
imports = [ ./common/user-account.nix ];
|
||||
services.xserver.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.desktopManager.default = "none";
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
@ -52,9 +51,8 @@ let
|
|||
user = "alice";
|
||||
};
|
||||
};
|
||||
services.xserver.windowManager.default = "icewm";
|
||||
services.xserver.displayManager.defaultSession = "none+icewm";
|
||||
services.xserver.windowManager.icewm.enable = true;
|
||||
services.xserver.desktopManager.default = "none";
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: let
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import ./make-test.nix ({ lib, ... }:
|
||||
import ./make-test-python.nix ({ lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -11,8 +11,8 @@ with lib;
|
|||
{ services.sonarr.enable = true; };
|
||||
|
||||
testScript = ''
|
||||
$machine->waitForUnit('sonarr.service');
|
||||
$machine->waitForOpenPort('8989');
|
||||
$machine->succeed("curl --fail http://localhost:8989/");
|
||||
machine.wait_for_unit("sonarr.service")
|
||||
machine.wait_for_open_port("8989")
|
||||
machine.succeed("curl --fail http://localhost:8989/")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Test configuration switching.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "switch-test";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ gleber ];
|
||||
|
@ -28,7 +28,11 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
exec env -i "$@" | tee /dev/stderr
|
||||
'';
|
||||
in ''
|
||||
$machine->succeed("${stderrRunner} ${originalSystem}/bin/switch-to-configuration test");
|
||||
$machine->succeed("${stderrRunner} ${otherSystem}/bin/switch-to-configuration test");
|
||||
machine.succeed(
|
||||
"${stderrRunner} ${originalSystem}/bin/switch-to-configuration test"
|
||||
)
|
||||
machine.succeed(
|
||||
"${stderrRunner} ${otherSystem}/bin/switch-to-configuration test"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Regression test for systemd-timesync having moved the state directory without
|
||||
# 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, ... }: {
|
||||
# override the `false` value from the qemu-vm base profile
|
||||
services.timesyncd.enable = lib.mkForce true;
|
||||
|
@ -25,28 +25,28 @@ in {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$current->succeed('systemctl status systemd-timesyncd.service');
|
||||
start_all()
|
||||
current.succeed("systemctl status systemd-timesyncd.service")
|
||||
# on a new install with a recent systemd there should not be any
|
||||
# leftovers from the dynamic user mess
|
||||
$current->succeed('test -e /var/lib/systemd/timesync');
|
||||
$current->succeed('test ! -L /var/lib/systemd/timesync');
|
||||
current.succeed("test -e /var/lib/systemd/timesync")
|
||||
current.succeed("test ! -L /var/lib/systemd/timesync")
|
||||
|
||||
# timesyncd should be running on the upgrading system since we fixed the
|
||||
# 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
|
||||
$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
|
||||
$pre1909->succeed('test -e /var/lib/systemd/timesync');
|
||||
$pre1909->succeed('test ! -L /var/lib/systemd/timesync');
|
||||
pre1909.succeed("test -e /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
|
||||
# scripts and cause the boot to fail..
|
||||
$pre1909->shutdown;
|
||||
$pre1909->start;
|
||||
$pre1909->succeed('systemctl status systemd-timesyncd.service');
|
||||
pre1909.shutdown()
|
||||
pre1909.start()
|
||||
pre1909.succeed("systemctl status systemd-timesyncd.service")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -13,7 +13,7 @@ let
|
|||
|
||||
in
|
||||
|
||||
import ../make-test.nix ({ pkgs, ...} : {
|
||||
import ../make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "wireguard-with-namespaces";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ asymmetric ];
|
||||
|
@ -65,16 +65,14 @@ import ../make-test.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
testScript = ''
|
||||
startAll();
|
||||
start_all()
|
||||
|
||||
$peer0->waitForUnit("wireguard-wg0.service");
|
||||
$peer1->waitForUnit("wireguard-wg0.service");
|
||||
$peer2->waitForUnit("wireguard-wg0.service");
|
||||
$peer3->waitForUnit("wireguard-wg0.service");
|
||||
for machine in peer0, peer1, peer2, peer3:
|
||||
machine.wait_for_unit("wireguard-wg0.service")
|
||||
|
||||
$peer0->succeed("ip -n ${socketNamespace} link show wg0");
|
||||
$peer1->succeed("ip -n ${interfaceNamespace} link show wg0");
|
||||
$peer2->succeed("ip -n ${interfaceNamespace} link show wg0");
|
||||
$peer3->succeed("ip link show wg0");
|
||||
peer0.succeed("ip -n ${socketNamespace} link show wg0")
|
||||
peer1.succeed("ip -n ${interfaceNamespace} link show wg0")
|
||||
peer2.succeed("ip -n ${interfaceNamespace} link show wg0")
|
||||
peer3.succeed("ip link show wg0")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -4,10 +4,10 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
machine = { lib, pkgs, ... }: {
|
||||
machine = { pkgs, ... }: {
|
||||
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||
services.xserver.displayManager.auto.user = "alice";
|
||||
services.xserver.windowManager.default = lib.mkForce "xmonad";
|
||||
services.xserver.displayManager.defaultSession = "none+xmonad";
|
||||
services.xserver.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchFromGitHub, python3, python3Packages, intltool
|
||||
, glibcLocales, gnome3, gtk3, wrapGAppsHook
|
||||
, ipodSupport ? false, libgpod, gobject-introspection
|
||||
, gobject-introspection
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
|
@ -50,7 +50,7 @@ python3Packages.buildPythonApplication rec {
|
|||
podcastparser
|
||||
html5lib
|
||||
gtk3
|
||||
] ++ stdenv.lib.optional ipodSupport libgpod;
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
pname = "Mopidy-Iris";
|
||||
version = "3.42.2";
|
||||
version = "3.43.0";
|
||||
|
||||
src = pythonPackages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1v1dy857kxxn1si0x7p3qz63l1af5pln1jji1f7fis6id8iy7wfm";
|
||||
sha256 = "1qg9xyjf27dp0810h4kdliyfb8r3kvi37lq8r93d01xwfphdzs05";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -13,9 +13,9 @@ let
|
|||
sha256Hash = "1nsm4d3vdx90szqd78a8mjq65xc9m5ipd35cqrlx3c3ny900sqxg";
|
||||
};
|
||||
betaVersion = {
|
||||
version = "3.6.0.17"; # "Android Studio 3.6 Beta 5"
|
||||
build = "192.6018865";
|
||||
sha256Hash = "0qlrdf7a6f5585mrni1aa2chic4n7b9c8lgrj8br6q929hc2f5d9";
|
||||
version = "3.6.0.18"; # "Android Studio 3.6 RC 1"
|
||||
build = "192.6071332";
|
||||
sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "4.0.0.6"; # "Android Studio 4.0 Canary 6"
|
||||
|
|
|
@ -10,11 +10,11 @@ with stdenv.lib;
|
|||
|
||||
perlPackages.buildPerlPackage rec {
|
||||
pname = "gscan2pdf";
|
||||
version = "2.5.6";
|
||||
version = "2.6.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gscan2pdf/${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0wp81nsi5jfypabwmjqiamxr739jq5ij79n5fzn5pbw1hg5gcmfz";
|
||||
sha256 = "0z35lglf4anfczizynjp8sd1jpix5mkmm1nh39n1v94l7ahjxsww";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
|
|
@ -138,6 +138,7 @@ let
|
|||
konquest = callPackage ./konquest.nix {};
|
||||
konqueror = callPackage ./konqueror.nix {};
|
||||
korganizer = callPackage ./korganizer.nix {};
|
||||
kpat = callPackage ./kpat.nix {};
|
||||
kpimtextedit = callPackage ./kpimtextedit.nix {};
|
||||
ksmtp = callPackage ./ksmtp {};
|
||||
kqtquickcharts = callPackage ./kqtquickcharts.nix {};
|
||||
|
|
25
pkgs/applications/kde/kpat.nix
Normal file
25
pkgs/applications/kde/kpat.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, curl, xorg, avahi, qtbase, mkDerivation,
|
||||
openssl, wrapGAppsHook,
|
||||
avahiWithLibdnssdCompat ? avahi.override { withLibdnssdCompat = true; }
|
||||
}:
|
||||
|
||||
|
@ -13,12 +14,17 @@ mkDerivation rec {
|
|||
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 = ''
|
||||
substituteInPlace "$out/share/applications/barrier.desktop" --replace "Exec=barrier" "Exec=$out/bin/barrier"
|
||||
'';
|
||||
|
||||
qtWrapperArgs = [
|
||||
''--prefix PATH : ${stdenv.lib.makeBinPath [ openssl ]}''
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Open-source KVM software";
|
||||
longDescription = ''
|
||||
|
|
|
@ -26,6 +26,11 @@ in stdenv.mkDerivation rec {
|
|||
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 ];
|
||||
buildInputs = [ file gtk2 libGLU gtkglarea ];
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ stdenv, lib, fetchgit, pkgconfig, libssh2
|
||||
{ stdenv, lib, fetchFromGitHub, fetchFromGitiles, pkgconfig, libssh2
|
||||
, qtbase, qtdeclarative, qtgraphicaleffects, qtimageformats, qtquickcontrols
|
||||
, qtsvg, qttools, qtquick1, qtcharts
|
||||
, qmake
|
||||
}:
|
||||
|
||||
let
|
||||
breakpad_lss = fetchgit {
|
||||
breakpad_lss = fetchFromGitiles {
|
||||
url = "https://chromium.googlesource.com/linux-syscall-support";
|
||||
rev = "08056836f2b4a5747daff75435d10d649bed22f6";
|
||||
sha256 = "1ryshs2nyxwa0kn3rlbnd5b3fhna9vqm560yviddcfgdm2jyg0hz";
|
||||
|
@ -17,10 +17,11 @@ stdenv.mkDerivation rec {
|
|||
pname = "redis-desktop-manager";
|
||||
version = "0.9.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/uglide/RedisDesktopManager.git";
|
||||
src = fetchFromGitHub {
|
||||
owner = "uglide";
|
||||
repo = "RedisDesktopManager";
|
||||
fetchSubmodules = true;
|
||||
rev = "refs/tags/${version}";
|
||||
rev = version;
|
||||
sha256 = "0yd4i944d4blw8jky0nxl7sfkkj975q4d328rdcbhizwvf6dx81f";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, buildGoModule, fetchFromGitHub }:
|
||||
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "helm";
|
||||
|
@ -16,6 +16,13 @@ buildGoModule rec {
|
|||
subPackages = [ "cmd/helm" ];
|
||||
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; {
|
||||
homepage = https://github.com/kubernetes/helm;
|
||||
description = "A package manager for kubernetes";
|
||||
|
|
33
pkgs/applications/networking/hydroxide/default.nix
Normal file
33
pkgs/applications/networking/hydroxide/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -35,7 +35,7 @@ in stdenv.mkDerivation {
|
|||
# provide desktop item and icon
|
||||
cp -r usr/share $out
|
||||
substituteInPlace $out/share/applications/franz.desktop \
|
||||
--replace Exec=\"/opt/Franz/franz\" Exec=franz
|
||||
--replace /opt/Franz/franz franz
|
||||
'';
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"main": "src/electron-main.js",
|
||||
"version": "1.5.5",
|
||||
"version": "1.5.6",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"dependencies": {
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
let
|
||||
executableName = "riot-desktop";
|
||||
version = "1.5.5";
|
||||
version = "1.5.6";
|
||||
riot-web-src = fetchFromGitHub {
|
||||
owner = "vector-im";
|
||||
repo = "riot-web";
|
||||
rev = "v${version}";
|
||||
sha256 = "18xhqniwxp1sv49qcd9ah8nyy2n2yliy3wg613raxjl16qvvzxmc";
|
||||
sha256 = "148rg6wc84xy53bj16v5riw78s999ridid59x6v9jas827l0bdpk";
|
||||
};
|
||||
|
||||
in mkYarnPackage rec {
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "riot-web";
|
||||
version = "1.5.5";
|
||||
version = "1.5.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
||||
sha256 = "0isln25sl5jvvlqvh822w73a4i82x75g1ywf3p9n5m1a5sr9f537";
|
||||
sha256 = "063ynbil038y201skyldj2ysr0hwgwq981w1iw104xd17x31zmn0";
|
||||
};
|
||||
|
||||
installPhase = let
|
||||
|
|
|
@ -59,7 +59,7 @@ let
|
|||
|
||||
in stdenv.mkDerivation rec {
|
||||
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.
|
||||
# When releases "expire" the application becomes unusable until an update is
|
||||
# applied. The expiration date for the current release can be extracted with:
|
||||
|
@ -69,7 +69,7 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
|
||||
sha256 = "1zbj0z4bhmg6zf975bn67wpr1kdi0h05d90aniijnh5wqgnwhfqn";
|
||||
sha256 = "12n17d8b31si7gngvv8bhbcid46n18kznv875nyy34i6b97zavmh";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ theme ? null, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
|
||||
cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk-pixbuf,
|
||||
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
|
||||
|
@ -93,7 +93,8 @@ in stdenv.mkDerivation {
|
|||
# Replace the broken bin/slack symlink with a startup wrapper
|
||||
rm $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
|
||||
substituteInPlace $out/share/applications/slack.desktop \
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
, pcre, libdbusmenu-gtk3, libappindicator-gtk3
|
||||
, libvncserver, libpthreadstubs, libXdmcp, libxkbcommon
|
||||
, 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.
|
||||
, gnome3
|
||||
}:
|
||||
|
@ -13,13 +13,13 @@ with stdenv.lib;
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "remmina";
|
||||
version = "1.3.4";
|
||||
version = "1.3.7";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "Remmina";
|
||||
repo = "Remmina";
|
||||
rev = "v${version}";
|
||||
sha256 = "18p6v2lalpiba0r318grlc2bvqh2qlpjw811i0934g33faviyfj1";
|
||||
sha256 = "076vz6nzs8v4d44dklsfgmwyhp48c2iywixg032znz193anjcgqn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ninja pkgconfig wrapGAppsHook ];
|
||||
|
@ -30,7 +30,8 @@ stdenv.mkDerivation rec {
|
|||
pcre libdbusmenu-gtk3 libappindicator-gtk3
|
||||
libvncserver libpthreadstubs libXdmcp libxkbcommon
|
||||
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 = [
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bedtools";
|
||||
version = "2.29.1";
|
||||
version = "2.29.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arq5x";
|
||||
repo = "bedtools2";
|
||||
rev = "v${version}";
|
||||
sha256 = "1vbpjvzl4ppzkan9qgm84bkn9kl3h3m5xz92y18wn1sksxcdq50x";
|
||||
sha256 = "015qq3pwrwgnyxyi959niijjlswl231b3wxlsm3l8msv6fdhmkz8";
|
||||
};
|
||||
|
||||
buildInputs = [ zlib python bzip2 lzma ];
|
||||
|
|
|
@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ zlib python2 ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i 's|/usr/bin/env python|${python2}/bin/python|' src/python/lib/makeRunScript.py
|
||||
patchShebangs .
|
||||
|
@ -33,7 +35,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = https://github.com/Illumina/strelka;
|
||||
maintainers = with maintainers; [ jbedo ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
broken = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "lab";
|
||||
version = "0.17.1";
|
||||
version = "0.17.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zaquestion";
|
||||
repo = "lab";
|
||||
rev = "v${version}";
|
||||
sha256 = "1z83v1dl9c5f99jvvc23ijkwrfrv489la05rlsrc3r4zzza1hx1f";
|
||||
sha256 = "0zkwvmzgj7h8lc8jkg2a81392b28c8hkwqzj6dds6q4asbmymx5c";
|
||||
};
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
|
|
@ -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,
|
83
pkgs/applications/virtualization/crosvm/default.nix
Normal file
83
pkgs/applications/virtualization/crosvm/default.nix
Normal 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" ];
|
||||
};
|
||||
}
|
85
pkgs/applications/virtualization/crosvm/update.py
Executable file
85
pkgs/applications/virtualization/crosvm/update.py
Executable 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')
|
19
pkgs/applications/virtualization/crosvm/upstream-info.json
Normal file
19
pkgs/applications/virtualization/crosvm/upstream-info.json
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -287,10 +287,16 @@ rec {
|
|||
# unless there are more paths than $maxLayers. In that case, create
|
||||
# $maxLayers-1 for the most popular layers, and smush the remainaing
|
||||
# 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 = {
|
||||
name,
|
||||
# Files to add to the layer.
|
||||
closure,
|
||||
closures,
|
||||
configJson,
|
||||
# Docker has a 125-layer maximum, we pick 100 to ensure there is
|
||||
# plenty of room for extension.
|
||||
|
@ -303,10 +309,12 @@ rec {
|
|||
isExecutable = true;
|
||||
src = ./store-path-to-layer.sh;
|
||||
};
|
||||
|
||||
overallClosure = writeText "closure" (lib.concatStringsSep " " closures);
|
||||
in
|
||||
runCommand "${name}-granular-docker-layers" {
|
||||
inherit maxLayers;
|
||||
paths = referencesByPopularity closure;
|
||||
paths = referencesByPopularity overallClosure;
|
||||
nativeBuildInputs = [ jshon rsync tarsum ];
|
||||
enableParallelBuilding = true;
|
||||
}
|
||||
|
@ -317,15 +325,20 @@ rec {
|
|||
| jshon -d config \
|
||||
| jshon -s "1970-01-01T00:00:01Z" -i created > generic.json
|
||||
|
||||
|
||||
# WARNING!
|
||||
# The following code is fiddly w.r.t. ensuring every layer is
|
||||
# created, and that no paths are missed. If you change the
|
||||
# following head and tail call lines, double-check that your
|
||||
# code behaves properly when the number of layers equals:
|
||||
# maxLayers-1, maxLayers, and maxLayers+1
|
||||
head -n $((maxLayers - 1)) $paths | cat -n | xargs -P$NIX_BUILD_CORES -n2 ${storePathToLayer}
|
||||
if [ $(cat $paths | wc -l) -ge $maxLayers ]; then
|
||||
tail -n+$maxLayers $paths | xargs ${storePathToLayer} $maxLayers
|
||||
paths() {
|
||||
cat $paths ${lib.concatMapStringsSep " " (path: "| grep -v ${path}") (closures ++ [ overallClosure ])}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
echo "Finished building layer '$name'"
|
||||
|
@ -534,7 +547,12 @@ rec {
|
|||
}:
|
||||
let
|
||||
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
|
||||
pure = writeText "${baseName}-config.json" (builtins.toJSON {
|
||||
|
@ -551,7 +569,7 @@ rec {
|
|||
|
||||
bulkLayers = mkManyPureLayers {
|
||||
name = baseName;
|
||||
closure = writeText "closure" "${contentsEnv} ${configJson}";
|
||||
closures = [ contentsEnv configJson ];
|
||||
# One layer will be taken up by the customisationLayer, so
|
||||
# take up one less.
|
||||
maxLayers = maxLayers - 1;
|
||||
|
|
10
pkgs/build-support/fetchgitiles/default.nix
Normal file
10
pkgs/build-support/fetchgitiles/default.nix
Normal 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; }
|
29
pkgs/data/fonts/gubbi/default.nix
Normal file
29
pkgs/data/fonts/gubbi/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sierra-gtk-theme";
|
||||
version = "2019-05-07";
|
||||
version = "2019-12-16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vinceliuice";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0rm9lcwp89ljxqrya9bi882qcs339pc1l945cr1xq2rganqyk9cq";
|
||||
sha256 = "14hlz8kbrjypyd6wyrwmnj2wm9w3kc8y00ms35ard7x8lmhs56hr";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ libxml2 ];
|
||||
|
|
|
@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
|
|||
packageName = "gnome-session";
|
||||
attrPath = "gnome3.gnome-session";
|
||||
};
|
||||
providedSessions = [ "gnome" "gnome-xorg" ];
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -141,6 +141,8 @@ let
|
|||
Type=Application
|
||||
DesktopNames=GNOME-Flashback;GNOME;
|
||||
'';
|
||||
} // {
|
||||
providedSessions = [ "gnome-flashback-${wmName}" ];
|
||||
};
|
||||
|
||||
mkSystemdTargetForWm = { wmName }:
|
||||
|
|
|
@ -131,6 +131,7 @@ stdenv.mkDerivation rec {
|
|||
inherit repoName;
|
||||
attrPath = pname;
|
||||
};
|
||||
providedSessions = [ "pantheon" ];
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "granite";
|
||||
version = "5.2.5";
|
||||
version = "5.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elementary";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0z40vhcp2w8s8rnc56pzvjc4s77bln8k84rwwypivjmk3lhpw1vi";
|
||||
sha256 = "1gvrk8gh959bmq8w0kaym7sx13v763lk8x5hck00msgmyrsarfwa";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
|
|
|
@ -43,6 +43,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
passthru = {
|
||||
providedSessions = [ "surf-display" ];
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Kiosk browser session manager based on the surf browser";
|
||||
homepage = "https://code.it-zukunft-schule.de/cgit/surf-display/";
|
||||
|
|
|
@ -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";
|
||||
sha256 = "1fbi8gn7rv8nqff5mpaijsrch3k3z7qc5cn4h1vl8qrr8xwqlqhb";
|
||||
})
|
||||
./ecl-1.16.2-libffi-3.3-abi.patch
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
|
|
@ -35,6 +35,10 @@ stdenv.mkDerivation {
|
|||
inherit (s) url sha256;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./libffi-3.3-abi.patch
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
(if threadSupport then "--enable-threads" else "--disable-threads")
|
||||
"--with-gmp-prefix=${gmp.dev}"
|
||||
|
|
|
@ -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
|
||||
};
|
15
pkgs/development/compilers/ecl/libffi-3.3-abi.patch
Normal file
15
pkgs/development/compilers/ecl/libffi-3.3-abi.patch
Normal 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
|
||||
};
|
24
pkgs/development/compilers/gleam/default.nix
Normal file
24
pkgs/development/compilers/gleam/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gauche";
|
||||
version = "0.9.8";
|
||||
version = "0.9.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gauche/Gauche-${version}.tgz";
|
||||
sha256 = "0jxp1ladpy8kvfvk561c64spf1c3d6giqla6zscqkd6qa480vcry";
|
||||
sha256 = "1yzpszhw52vkpr65r5d4khf3489mnnvnw58dd2wsvvx7499k5aac";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig texinfo ];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
mkDerivation, lib,
|
||||
extra-cmake-modules, gettext, python,
|
||||
extra-cmake-modules, gettext, python3,
|
||||
qtbase, qtdeclarative, qtscript,
|
||||
}:
|
||||
|
||||
|
@ -11,6 +11,6 @@ mkDerivation {
|
|||
broken = builtins.compareVersions qtbase.version "5.7.0" < 0;
|
||||
};
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedNativeBuildInputs = [ gettext python ];
|
||||
propagatedNativeBuildInputs = [ gettext python3 ];
|
||||
buildInputs = [ qtdeclarative qtscript ];
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
libimobiledevice, python3Packages, mutagen,
|
||||
libimobiledevice, mutagen,
|
||||
monoSupport ? false, mono, gtk-sharp-2_0
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python3Packages) python pygobject2;
|
||||
in stdenv.mkDerivation rec {
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libgpod-0.8.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gtkpod/${name}.tar.bz2";
|
||||
sha256 = "0pcmgv1ra0ymv73mlj4qxzgyir026z9jpl5s5bkg35afs1cpk2k3";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
preConfigure = "configureFlagsArray=( --with-udev-dir=$out/lib/udev )";
|
||||
|
||||
configureFlags = [
|
||||
|
@ -23,7 +25,7 @@ in stdenv.mkDerivation rec {
|
|||
dontStrip = true;
|
||||
|
||||
propagatedBuildInputs = [ glib libxml2 sqlite zlib sg3_utils
|
||||
gdk-pixbuf taglib libimobiledevice python pygobject2 mutagen ];
|
||||
gdk-pixbuf taglib libimobiledevice mutagen ];
|
||||
|
||||
nativeBuildInputs = [ gettext intltool pkgconfig ]
|
||||
++ (with perlPackages; [ perl XMLParser ])
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, zlib, netcdf, nifticlib, hdf5 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libminc";
|
||||
name = "${pname}-2018-01-17";
|
||||
pname = "libminc";
|
||||
version = "2.4.03";
|
||||
|
||||
owner = "BIC-MNI";
|
||||
|
||||
# current master is significantly ahead of most recent release, so use Git version:
|
||||
src = fetchFromGitHub {
|
||||
inherit owner;
|
||||
repo = pname;
|
||||
rev = "a9cbe1353eae9791b7d5b03af16e0f86922ce40b";
|
||||
sha256 = "0mn4n3ihzcr1jw2g1vy6c8p4lkc88jwljk04argmj7k4djrgpxpa";
|
||||
rev = "release-${version}";
|
||||
sha256 = "0kpmqs9df836ywsqj749qbsfavf5bnldblxrmnmxqq9pywc8yfrm";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -27,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||
"-DLIBMINC_USE_SYSTEM_NIFTI=ON"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = !stdenv.isDarwin;
|
||||
checkPhase = ''
|
||||
export LD_LIBRARY_PATH="$(pwd)" # see #22060
|
||||
ctest -E 'ezminc_rw_test|minc_conversion' --output-on-failure
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "randomX";
|
||||
version = "1.1.6";
|
||||
version = "1.1.7";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
|
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
|||
owner = "tevador";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1qd0rbzgxdy87wwy0n6ca29bcq25j5ndnfgmx8iyf225m4rcwngf";
|
||||
sha256 = "1d42dw4zrd7mzfqs6gwk27jj6lsh6pwv85p1ckx9dxy8mw3m52ah";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
31
pkgs/development/libraries/sentencepiece/default.nix
Normal file
31
pkgs/development/libraries/sentencepiece/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -2,19 +2,17 @@
|
|||
, cmake
|
||||
, fetchurl
|
||||
, python
|
||||
, liblapack
|
||||
, openblas
|
||||
, gfortran
|
||||
, lapackSupport ? true }:
|
||||
|
||||
let liblapackShared = liblapack.override {
|
||||
shared = true;
|
||||
};
|
||||
let openblas32 = openblas.override { blas64 = false; };
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "sundials";
|
||||
version = "5.0.0";
|
||||
|
||||
buildInputs = [ python ] ++ stdenv.lib.optionals (lapackSupport) [ gfortran ];
|
||||
buildInputs = [ python ] ++ stdenv.lib.optionals (lapackSupport) [ gfortran openblas32 ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
src = fetchurl {
|
||||
|
@ -40,7 +38,7 @@ in stdenv.mkDerivation rec {
|
|||
] ++ stdenv.lib.optionals (lapackSupport) [
|
||||
"-DSUNDIALS_INDEX_TYPE=int32_t"
|
||||
"-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;
|
||||
|
|
|
@ -49,12 +49,12 @@ let
|
|||
};
|
||||
in {
|
||||
wt3 = generic {
|
||||
version = "3.4.2";
|
||||
sha256 = "03mwr4yv3705y74pdh19lmh8szad6gk2x2m23f4pr0wrmqg73307";
|
||||
version = "3.5.0";
|
||||
sha256 = "1xcwzldbval5zrf7f3n2gkpscagg51cw2jp6p3q1yh6bi59haida";
|
||||
};
|
||||
|
||||
wt4 = generic {
|
||||
version = "4.1.2";
|
||||
sha256 = "06bnadpgflg8inikzynnz4l4r6w1bphjwlva4pzf51w648vpkknl";
|
||||
version = "4.2.0";
|
||||
sha256 = "0zrrdjz0sa8hrmybjp4aap1lcqcqvsicd7dj49zj1m5k8gnfpm4v";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.1)
|
||||
CFPropertyList (3.0.2)
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
|
@ -12,10 +12,10 @@ GEM
|
|||
json (>= 1.5.1)
|
||||
atomos (0.1.3)
|
||||
claide (1.0.3)
|
||||
cocoapods (1.8.4)
|
||||
cocoapods (1.9.0.beta.1)
|
||||
activesupport (>= 4.0.2, < 5)
|
||||
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-downloader (>= 1.2.2, < 2.0)
|
||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
||||
|
@ -30,15 +30,17 @@ GEM
|
|||
molinillo (~> 0.6.6)
|
||||
nap (~> 1.0)
|
||||
ruby-macho (~> 1.4)
|
||||
xcodeproj (>= 1.11.1, < 2.0)
|
||||
cocoapods-core (1.8.4)
|
||||
xcodeproj (>= 1.14.0, < 2.0)
|
||||
cocoapods-core (1.9.0.beta.1)
|
||||
activesupport (>= 4.0.2, < 6)
|
||||
algoliasearch (~> 1.0)
|
||||
concurrent-ruby (~> 1.1)
|
||||
fuzzy_match (~> 2.0.4)
|
||||
nap (~> 1.0)
|
||||
netrc (~> 0.11)
|
||||
typhoeus (~> 1.0)
|
||||
cocoapods-deintegrate (1.0.4)
|
||||
cocoapods-downloader (1.2.2)
|
||||
cocoapods-downloader (1.3.0)
|
||||
cocoapods-plugins (1.0.0)
|
||||
nap
|
||||
cocoapods-search (1.0.0)
|
||||
|
@ -50,23 +52,28 @@ GEM
|
|||
colored2 (3.1.2)
|
||||
concurrent-ruby (1.1.5)
|
||||
escape (0.0.4)
|
||||
ethon (0.12.0)
|
||||
ffi (>= 1.3.0)
|
||||
ffi (1.11.3)
|
||||
fourflusher (2.3.1)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.1.3)
|
||||
httpclient (2.8.3)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
json (2.2.0)
|
||||
minitest (5.12.2)
|
||||
json (2.3.0)
|
||||
minitest (5.13.0)
|
||||
molinillo (0.6.6)
|
||||
nanaimo (0.2.6)
|
||||
nap (1.1.0)
|
||||
netrc (0.11.0)
|
||||
ruby-macho (1.4.0)
|
||||
thread_safe (0.3.6)
|
||||
typhoeus (1.3.1)
|
||||
ethon (>= 0.9.0)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
xcodeproj (1.13.0)
|
||||
xcodeproj (1.14.0)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
|
@ -80,4 +87,4 @@ DEPENDENCIES
|
|||
cocoapods (>= 1.7.0.beta.1)!
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.2
|
||||
1.17.3
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue