Merge staging-next into staging
This commit is contained in:
commit
9f84415541
@ -25,14 +25,14 @@ avoided that by keeping all Haskell-related packages in a separate attribute
|
||||
set called `haskellPackages`, which the following command will list:
|
||||
```
|
||||
$ nix-env -f "<nixpkgs>" -qaP -A haskellPackages
|
||||
haskellPackages.a50 a50-0.5
|
||||
haskellPackages.abacate haskell-abacate-0.0.0.0
|
||||
haskellPackages.abcBridge haskell-abcBridge-0.12
|
||||
haskellPackages.afv afv-0.1.1
|
||||
haskellPackages.alex alex-3.1.4
|
||||
haskellPackages.Allure Allure-0.4.101.1
|
||||
haskellPackages.alms alms-0.6.7
|
||||
[... some 8000 entries omitted ...]
|
||||
haskellPackages.a50 a50-0.5
|
||||
haskellPackages.AAI AAI-0.2.0.1
|
||||
haskellPackages.abacate abacate-0.0.0.0
|
||||
haskellPackages.abc-puzzle abc-puzzle-0.2.1
|
||||
haskellPackages.abcBridge abcBridge-0.15
|
||||
haskellPackages.abcnotation abcnotation-1.9.0
|
||||
haskellPackages.abeson abeson-0.1.0.1
|
||||
[... some 14000 entries omitted ...]
|
||||
```
|
||||
|
||||
To install any of those packages into your profile, refer to them by their
|
||||
@ -101,19 +101,21 @@ to compile your Haskell packages with any GHC version you please. The following
|
||||
command displays the complete list of available compilers:
|
||||
```
|
||||
$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler
|
||||
haskell.compiler.ghc6104 ghc-6.10.4
|
||||
haskell.compiler.ghc6123 ghc-6.12.3
|
||||
haskell.compiler.ghc704 ghc-7.0.4
|
||||
haskell.compiler.ghc722 ghc-7.2.2
|
||||
haskell.compiler.ghc742 ghc-7.4.2
|
||||
haskell.compiler.ghc763 ghc-7.6.3
|
||||
haskell.compiler.ghc784 ghc-7.8.4
|
||||
haskell.compiler.ghc7102 ghc-7.10.2
|
||||
haskell.compiler.ghcHEAD ghc-7.11.20150402
|
||||
haskell.compiler.ghcNokinds ghc-nokinds-7.11.20150704
|
||||
haskell.compiler.ghcjs ghcjs-0.1.0
|
||||
haskell.compiler.jhc jhc-0.8.2
|
||||
haskell.compiler.uhc uhc-1.1.9.0
|
||||
haskell.compiler.ghc822 ghc-8.2.2
|
||||
haskell.compiler.integer-simple.ghc822 ghc-8.2.2
|
||||
haskell.compiler.ghc822Binary ghc-8.2.2-binary
|
||||
haskell.compiler.ghc844 ghc-8.4.4
|
||||
haskell.compiler.ghc863Binary ghc-8.6.3-binary
|
||||
haskell.compiler.ghc864 ghc-8.6.4
|
||||
haskell.compiler.integer-simple.ghc864 ghc-8.6.4
|
||||
haskell.compiler.ghc865 ghc-8.6.5
|
||||
haskell.compiler.integer-simple.ghc865 ghc-8.6.5
|
||||
haskell.compiler.ghc881 ghc-8.8.1
|
||||
haskell.compiler.integer-simple.ghc881 ghc-8.8.1
|
||||
haskell.compiler.ghcHEAD ghc-8.9.20190601
|
||||
haskell.compiler.integer-simple.ghcHEAD ghc-8.9.20190601
|
||||
haskell.compiler.ghcjs84 ghcjs-8.4.0.1
|
||||
haskell.compiler.ghcjs ghcjs-8.6.0.1
|
||||
```
|
||||
|
||||
We have no package sets for `jhc` or `uhc` yet, unfortunately, but for every
|
||||
|
||||
@ -244,7 +244,7 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Many packages assume that an unprefixed <command>ar</command> is available, but Nix doesn't provide one. It only provides a prefixed one, just as it only does for all the other binutils programs. It may be necessary to patch the package to fix the build system to use a prefixed `ar`.
|
||||
Many packages assume that an unprefixed <command>ar</command> is available, but Nix doesn't provide one. It only provides a prefixed one, just as it only does for all the other binutils programs. It may be necessary to patch the package to fix the build system to use a prefixed <command>ar</command>.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
@ -1717,7 +1717,7 @@ someVar=$(stripHash $name)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The most typical use of the setup hook is actually to add other hooks which are then run (i.e. after all the setup hooks) on each dependency. For example, the C compiler wrapper's setup hook feeds itself flags for each dependency that contains relevant libraries and headers. This is done by defining a bash function, and appending its name to one of <envar>envBuildBuildHooks</envar>`, <envar>envBuildHostHooks</envar>`, <envar>envBuildTargetHooks</envar>`, <envar>envHostHostHooks</envar>`, <envar>envHostTargetHooks</envar>`, or <envar>envTargetTargetHooks</envar>`. These 6 bash variables correspond to the 6 sorts of dependencies by platform (there's 12 total but we ignore the propagated/non-propagated axis).
|
||||
The most typical use of the setup hook is actually to add other hooks which are then run (i.e. after all the setup hooks) on each dependency. For example, the C compiler wrapper's setup hook feeds itself flags for each dependency that contains relevant libraries and headers. This is done by defining a bash function, and appending its name to one of <envar>envBuildBuildHooks</envar>, <envar>envBuildHostHooks</envar>, <envar>envBuildTargetHooks</envar>, <envar>envHostHostHooks</envar>, <envar>envHostTargetHooks</envar>, or <envar>envTargetTargetHooks</envar>. These 6 bash variables correspond to the 6 sorts of dependencies by platform (there's 12 total but we ignore the propagated/non-propagated axis).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
||||
@ -1484,6 +1484,16 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
d-goldin = {
|
||||
email = "dgoldin+github@protonmail.ch";
|
||||
github = "d-goldin";
|
||||
githubId = 43349662;
|
||||
name = "Dima";
|
||||
keys = [{
|
||||
longkeyid = "rsa4096/BAB1D15FB7B4D4CE";
|
||||
fingerprint = "1C4E F4FE 7F8E D8B7 1E88 CCDF BAB1 D15F B7B4 D4CE";
|
||||
}];
|
||||
};
|
||||
dadada = {
|
||||
name = "dadada";
|
||||
email = "dadada@dadada.li";
|
||||
@ -4491,6 +4501,12 @@
|
||||
githubId = 16974598;
|
||||
name = "Mike Playle";
|
||||
};
|
||||
mkaito = {
|
||||
email = "chris@mkaito.net";
|
||||
github = "mkaito";
|
||||
githubId = 20434;
|
||||
name = "Christian Höppner";
|
||||
};
|
||||
mkazulak = {
|
||||
email = "kazulakm@gmail.com";
|
||||
github = "mulderr";
|
||||
@ -4650,6 +4666,12 @@
|
||||
githubId = 2881922;
|
||||
name = "Francis St-Amour";
|
||||
};
|
||||
mtrsk = {
|
||||
email = "marcos.schonfinkel@protonmail.com";
|
||||
github = "mtrsk";
|
||||
githubId = 16356569;
|
||||
name = "Marcos Benevides";
|
||||
};
|
||||
mredaelli = {
|
||||
email = "massimo@typish.io";
|
||||
github = "mredaelli";
|
||||
|
||||
@ -186,6 +186,19 @@
|
||||
The osquery module has been removed.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Going forward, <literal>~/bin</literal> in the users home directory will no longer be in <literal>PATH</literal> by default.
|
||||
If you depend on this you should set the option <literal>environment.homeBinInPath</literal> to <literal>true</literal>.
|
||||
The aforementioned option was added this release.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>buildRustCrate</literal> infrastructure now produces <literal>lib</literal> outputs in addition to the <literal>out</literal> output.
|
||||
This has led to drastically reduced closed sizes for some rust crates since development dependencies are now in the <literal>lib</literal> output.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
||||
@ -122,7 +122,7 @@ in
|
||||
description = ''
|
||||
Include ~/bin/ in $PATH.
|
||||
'';
|
||||
default = true;
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
|
||||
@ -111,9 +111,10 @@ in
|
||||
config = mkIf enabled {
|
||||
assertions = [
|
||||
{
|
||||
assertion = with config.services.xserver.displayManager; gdm.enable -> !gdm.wayland;
|
||||
message = "NVIDIA drivers don't support wayland, set services.xserver.displayManager.gdm.wayland=false";
|
||||
assertion = with config.services.xserver.displayManager; gdm.nvidiaWayland -> cfg.modesetting.enable;
|
||||
message = "You cannot use wayland with GDM without modesetting enabled for NVIDIA drivers, set `hardware.nvidia.modesetting.enable = true`";
|
||||
}
|
||||
|
||||
{
|
||||
assertion = !optimusCfg.enable ||
|
||||
(optimusCfg.nvidiaBusId != "" && optimusCfg.intelBusId != "");
|
||||
|
||||
@ -307,6 +307,7 @@
|
||||
./services/desktops/gnome3/sushi.nix
|
||||
./services/desktops/gnome3/tracker.nix
|
||||
./services/desktops/gnome3/tracker-miners.nix
|
||||
./services/desktops/neard.nix
|
||||
./services/desktops/profile-sync-daemon.nix
|
||||
./services/desktops/system-config-printer.nix
|
||||
./services/desktops/telepathy.nix
|
||||
|
||||
@ -8,18 +8,16 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.networking.defaultMailServer;
|
||||
cfg = config.services.ssmtp;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
networking.defaultMailServer = {
|
||||
services.ssmtp = {
|
||||
|
||||
directDelivery = mkOption {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
@ -29,7 +27,7 @@ in
|
||||
<command>sendmail</command> or <command>postfix</command> on
|
||||
your machine, set this option to <literal>true</literal>, and
|
||||
set the option
|
||||
<option>networking.defaultMailServer.hostName</option> to the
|
||||
<option>services.ssmtp.hostName</option> to the
|
||||
host name of your preferred mail server.
|
||||
'';
|
||||
};
|
||||
@ -129,9 +127,9 @@ in
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.directDelivery {
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
networking.defaultMailServer.authPassFile = mkIf (cfg.authPass != "")
|
||||
services.ssmtp.authPassFile = mkIf (cfg.authPass != "")
|
||||
(mkDefault (toString (pkgs.writeTextFile {
|
||||
name = "ssmtp-authpass";
|
||||
text = cfg.authPass;
|
||||
|
||||
@ -11,6 +11,8 @@ with lib;
|
||||
(mkRenamedOptionModule [ "networking" "enableRTL8192cFirmware" ] [ "hardware" "enableRedistributableFirmware" ])
|
||||
(mkRenamedOptionModule [ "networking" "networkmanager" "useDnsmasq" ] [ "networking" "networkmanager" "dns" ])
|
||||
(mkRenamedOptionModule [ "networking" "connman" ] [ "services" "connman" ])
|
||||
(mkRenamedOptionModule [ "networking" "defaultMailServer" ] [ "services" "ssmtp" ])
|
||||
(mkRenamedOptionModule [ "services" "ssmtp" "directDelivery" ] [ "services" "ssmtp" "enable" ])
|
||||
(mkChangedOptionModule [ "services" "printing" "gutenprint" ] [ "services" "printing" "drivers" ]
|
||||
(config:
|
||||
let enabled = getAttrFromPath [ "services" "printing" "gutenprint" ] config;
|
||||
|
||||
@ -66,7 +66,8 @@ in {
|
||||
if cfg.user == "roon-server" then {
|
||||
isSystemUser = true;
|
||||
description = "Roon Server user";
|
||||
groups = [ cfg.group "audio" ];
|
||||
group = cfg.group;
|
||||
extraGroups = [ "audio" ];
|
||||
}
|
||||
else {};
|
||||
};
|
||||
|
||||
23
nixos/modules/services/desktops/neard.nix
Normal file
23
nixos/modules/services/desktops/neard.nix
Normal file
@ -0,0 +1,23 @@
|
||||
# neard service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.neard = {
|
||||
enable = mkEnableOption "neard, NFC daemon";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.neard.enable {
|
||||
environment.systemPackages = [ pkgs.neard ];
|
||||
|
||||
services.dbus.packages = [ pkgs.neard ];
|
||||
|
||||
systemd.packages = [ pkgs.neard ];
|
||||
};
|
||||
}
|
||||
@ -36,17 +36,25 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = with types; attrsOf (attrsOf (oneOf [ bool int str ]));
|
||||
example = {
|
||||
General = {
|
||||
ControllerMode = "bredr";
|
||||
};
|
||||
};
|
||||
description = "Set configuration for system-wide bluetooth (/etc/bluetooth/main.conf).";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
type = with types; nullOr lines;
|
||||
default = null;
|
||||
example = ''
|
||||
[General]
|
||||
ControllerMode = bredr
|
||||
'';
|
||||
description = ''
|
||||
Set additional configuration for system-wide bluetooth (/etc/bluetooth/main.conf).
|
||||
|
||||
NOTE: We already include [Policy], so any configuration under the Policy group should come first.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@ -56,16 +64,18 @@ in {
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
warnings = optional (cfg.extraConfig != null) "hardware.bluetooth.`extraConfig` is deprecated, please use hardware.bluetooth.`config`.";
|
||||
|
||||
hardware.bluetooth.config = {
|
||||
Policy = {
|
||||
AutoEnable = mkDefault cfg.powerOnBoot;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ bluez-bluetooth pkgs.openobex pkgs.obexftp ];
|
||||
|
||||
environment.etc = singleton {
|
||||
source = pkgs.writeText "main.conf" ''
|
||||
[Policy]
|
||||
AutoEnable=${lib.boolToString cfg.powerOnBoot}
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
source = pkgs.writeText "main.conf" (generators.toINI { } cfg.config + optionalString (cfg.extraConfig != null) cfg.extraConfig);
|
||||
target = "bluetooth/main.conf";
|
||||
};
|
||||
|
||||
|
||||
@ -197,6 +197,9 @@ in
|
||||
services.prometheus.exporters.minio.minioAccessSecret = mkDefault config.services.minio.secretKey;
|
||||
})] ++ [(mkIf config.services.rspamd.enable {
|
||||
services.prometheus.exporters.rspamd.url = mkDefault "http://localhost:11334/stat";
|
||||
})] ++ [(mkIf config.services.nginx.enable {
|
||||
systemd.services.prometheus-nginx-exporter.after = [ "nginx.service" ];
|
||||
systemd.services.prometheus-nginx-exporter.requires = [ "nginx.service" ];
|
||||
})] ++ (mapAttrsToList (name: conf:
|
||||
mkExporterConf {
|
||||
inherit name;
|
||||
|
||||
@ -115,7 +115,7 @@ in
|
||||
type = types.package;
|
||||
default = pkgs.samba;
|
||||
defaultText = "pkgs.samba";
|
||||
example = literalExample "pkgs.samba3";
|
||||
example = literalExample "pkgs.samba4Full";
|
||||
description = ''
|
||||
Defines which package should be used for the samba server.
|
||||
'';
|
||||
|
||||
@ -137,7 +137,7 @@ in
|
||||
];
|
||||
|
||||
services.pdns-recursor = mkIf cfgs.pdns-recursor.resolveDNSChainQueries {
|
||||
forwardZones =
|
||||
forwardZonesRecurse =
|
||||
{ bit = "127.0.0.1:${toString cfg.dns.port}";
|
||||
dns = "127.0.0.1:${toString cfg.dns.port}";
|
||||
};
|
||||
|
||||
@ -90,11 +90,19 @@ in {
|
||||
};
|
||||
|
||||
forwardZones = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
description = ''
|
||||
DNS zones to be forwarded to other authoritative servers.
|
||||
'';
|
||||
};
|
||||
|
||||
forwardZonesRecurse = mkOption {
|
||||
type = types.attrs;
|
||||
example = { eth = "127.0.0.1:5353"; };
|
||||
default = {};
|
||||
description = ''
|
||||
DNS zones to be forwarded to other servers.
|
||||
DNS zones to be forwarded to other recursive servers.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -158,7 +166,8 @@ in {
|
||||
webserver-port = cfg.api.port;
|
||||
webserver-allow-from = cfg.api.allowFrom;
|
||||
|
||||
forward-zones = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZones;
|
||||
forward-zones = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZones;
|
||||
forward-zones-recurse = mapAttrsToList (zone: uri: "${zone}.=${uri}") cfg.forwardZonesRecurse;
|
||||
export-etc-hosts = cfg.exportHosts;
|
||||
dnssec = cfg.dnssecValidation;
|
||||
serve-rfc1918 = cfg.serveRFC1918;
|
||||
|
||||
@ -236,9 +236,12 @@ in {
|
||||
${if ifaces == [] then ''
|
||||
for i in $(cd /sys/class/net && echo *); do
|
||||
DEVTYPE=
|
||||
source /sys/class/net/$i/uevent
|
||||
if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
|
||||
ifaces="$ifaces''${ifaces:+ -N} -i$i"
|
||||
UEVENT_PATH=/sys/class/net/$i/uevent
|
||||
if [ -e "$UEVENT_PATH" ]; then
|
||||
source "$UEVENT_PATH"
|
||||
if [ "$DEVTYPE" = "wlan" -o -e /sys/class/net/$i/wireless ]; then
|
||||
ifaces="$ifaces''${ifaces:+ -N} -i$i"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
'' else ''
|
||||
|
||||
@ -84,12 +84,6 @@ GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
|
||||
<title>Issues</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Matomo's file integrity check will warn you. This is due to the patches
|
||||
necessary for NixOS, you can safely ignore this.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Matomo will warn you that the JavaScript tracker is not writable. This is
|
||||
|
||||
@ -126,11 +126,21 @@ in
|
||||
wayland = mkOption {
|
||||
default = true;
|
||||
description = ''
|
||||
Allow GDM run on Wayland instead of Xserver
|
||||
Allow GDM to run on Wayland instead of Xserver.
|
||||
Note to enable Wayland with Nvidia you need to
|
||||
enable the <option>nvidiaWayland</option>.
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
nvidiaWayland = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to allow wayland to be used with the proprietary
|
||||
NVidia graphics driver.
|
||||
'';
|
||||
};
|
||||
|
||||
autoSuspend = mkOption {
|
||||
default = true;
|
||||
description = ''
|
||||
@ -237,6 +247,19 @@ in
|
||||
|
||||
services.dbus.packages = [ gdm ];
|
||||
|
||||
# We duplicate upstream's udev rules manually to make wayland with nvidia configurable
|
||||
services.udev.extraRules = ''
|
||||
# disable Wayland on Cirrus chipsets
|
||||
ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="${gdm}/libexec/gdm-disable-wayland"
|
||||
# disable Wayland on Hi1710 chipsets
|
||||
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="${gdm}/libexec/gdm-disable-wayland"
|
||||
${optionalString (!cfg.gdm.nvidiaWayland) ''
|
||||
DRIVER=="nvidia", RUN+="${gdm}/libexec/gdm-disable-wayland"
|
||||
''}
|
||||
# disable Wayland when modesetting is disabled
|
||||
IMPORT{cmdline}="nomodeset", RUN+="${gdm}/libexec/gdm-disable-wayland"
|
||||
'';
|
||||
|
||||
systemd.user.services.dbus.wantedBy = [ "default.target" ];
|
||||
|
||||
programs.dconf.profiles.gdm =
|
||||
|
||||
@ -214,7 +214,17 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
||||
# Reload the changed mount unit to force a remount.
|
||||
$unitsToReload{$unit} = 1;
|
||||
recordUnit($reloadListFile, $unit);
|
||||
} elsif ($unit =~ /\.socket$/ || $unit =~ /\.path$/ || $unit =~ /\.slice$/) {
|
||||
} elsif ($unit =~ /\.socket$/) {
|
||||
my $unitInfo = parseUnit($newUnitFile);
|
||||
# If a socket unit has been changed, the corresponding
|
||||
# service unit has to be stopped before the socket can
|
||||
# be restarted. The service will be started again on demand.
|
||||
my $serviceUnit = $unitInfo->{'Unit'} // "$baseName.service";
|
||||
$unitsToStop{$serviceUnit} = 1;
|
||||
$unitsToStop{$unit} = 1;
|
||||
$unitsToStart{$unit} = 1;
|
||||
recordUnit($startListFile, $unit);
|
||||
} elsif ($unit =~ /\.path$/ || $unit =~ /\.slice$/) {
|
||||
# FIXME: do something?
|
||||
} else {
|
||||
my $unitInfo = parseUnit($newUnitFile);
|
||||
|
||||
@ -63,8 +63,7 @@ in rec {
|
||||
|
||||
#(all nixos.tests.containers)
|
||||
(all nixos.tests.containers-imperative)
|
||||
(all nixos.tests.containers-ipv4)
|
||||
(all nixos.tests.containers-ipv6)
|
||||
(all nixos.tests.containers-ip)
|
||||
nixos.tests.chromium.x86_64-linux or []
|
||||
(all nixos.tests.firefox)
|
||||
(all nixos.tests.firewall)
|
||||
|
||||
@ -32,8 +32,7 @@ in rec {
|
||||
tests = {
|
||||
inherit (nixos'.tests)
|
||||
containers-imperative
|
||||
containers-ipv4
|
||||
containers-ipv6
|
||||
containers-ip
|
||||
firewall
|
||||
ipv6
|
||||
login
|
||||
|
||||
@ -53,8 +53,7 @@ in
|
||||
containers-extra_veth = handleTest ./containers-extra_veth.nix {};
|
||||
containers-hosts = handleTest ./containers-hosts.nix {};
|
||||
containers-imperative = handleTest ./containers-imperative.nix {};
|
||||
containers-ipv4 = handleTest ./containers-ipv4.nix {};
|
||||
containers-ipv6 = handleTest ./containers-ipv6.nix {};
|
||||
containers-ip = handleTest ./containers-ip.nix {};
|
||||
containers-macvlans = handleTest ./containers-macvlans.nix {};
|
||||
containers-physical_interfaces = handleTest ./containers-physical_interfaces.nix {};
|
||||
containers-restart_networking = handleTest ./containers-restart_networking.nix {};
|
||||
|
||||
@ -7,7 +7,7 @@ let
|
||||
containerIp6 = "fc00::2/7";
|
||||
in
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "containers-bridge";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||
@ -61,43 +61,42 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForUnit("default.target");
|
||||
$machine->succeed("nixos-container list") =~ /webserver/ or die;
|
||||
testScript = ''
|
||||
machine.wait_for_unit("default.target")
|
||||
assert "webserver" in machine.succeed("nixos-container list")
|
||||
|
||||
# Start the webserver container.
|
||||
$machine->succeed("nixos-container status webserver") =~ /up/ or die;
|
||||
with subtest("Start the webserver container"):
|
||||
assert "up" in machine.succeed("nixos-container status webserver")
|
||||
|
||||
# Check if bridges exist inside containers
|
||||
$machine->succeed("nixos-container run webserver -- ip link show eth0");
|
||||
$machine->succeed("nixos-container run web-noip -- ip link show eth0");
|
||||
with subtest("Bridges exist inside containers"):
|
||||
machine.succeed(
|
||||
"nixos-container run webserver -- ip link show eth0",
|
||||
"nixos-container run web-noip -- ip link show eth0",
|
||||
)
|
||||
|
||||
"${containerIp}" =~ /([^\/]+)\/([0-9+])/;
|
||||
my $ip = $1;
|
||||
chomp $ip;
|
||||
$machine->succeed("ping -n -c 1 $ip");
|
||||
$machine->succeed("curl --fail http://$ip/ > /dev/null");
|
||||
ip = "${containerIp}".split("/")[0]
|
||||
machine.succeed(f"ping -n -c 1 {ip}")
|
||||
machine.succeed(f"curl --fail http://{ip}/ > /dev/null")
|
||||
|
||||
"${containerIp6}" =~ /([^\/]+)\/([0-9+])/;
|
||||
my $ip6 = $1;
|
||||
chomp $ip6;
|
||||
$machine->succeed("ping -n -c 1 $ip6");
|
||||
$machine->succeed("curl --fail http://[$ip6]/ > /dev/null");
|
||||
ip6 = "${containerIp6}".split("/")[0]
|
||||
machine.succeed(f"ping -n -c 1 {ip6}")
|
||||
machine.succeed(f"curl --fail http://[{ip6}]/ > /dev/null")
|
||||
|
||||
# Check that nixos-container show-ip works in case of an ipv4 address with
|
||||
# subnetmask in CIDR notation.
|
||||
my $result = $machine->succeed("nixos-container show-ip webserver");
|
||||
chomp $result;
|
||||
$result eq $ip or die;
|
||||
with subtest(
|
||||
"nixos-container show-ip works in case of an ipv4 address "
|
||||
+ "with subnetmask in CIDR notation."
|
||||
):
|
||||
result = machine.succeed("nixos-container show-ip webserver").rstrip()
|
||||
assert result == ip
|
||||
|
||||
# Stop the container.
|
||||
$machine->succeed("nixos-container stop webserver");
|
||||
$machine->fail("curl --fail --connect-timeout 2 http://$ip/ > /dev/null");
|
||||
$machine->fail("curl --fail --connect-timeout 2 http://[$ip6]/ > /dev/null");
|
||||
|
||||
# Destroying a declarative container should fail.
|
||||
$machine->fail("nixos-container destroy webserver");
|
||||
'';
|
||||
with subtest("Stop the container"):
|
||||
machine.succeed("nixos-container stop webserver")
|
||||
machine.fail(
|
||||
f"curl --fail --connect-timeout 2 http://{ip}/ > /dev/null",
|
||||
f"curl --fail --connect-timeout 2 http://[{ip6}]/ > /dev/null",
|
||||
)
|
||||
|
||||
# Destroying a declarative container should fail.
|
||||
machine.fail("nixos-container destroy webserver")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Test for NixOS' container support.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "containers-ephemeral";
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
@ -16,10 +16,10 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts.localhost = {
|
||||
root = (pkgs.runCommand "localhost" {} ''
|
||||
root = pkgs.runCommand "localhost" {} ''
|
||||
mkdir "$out"
|
||||
echo hello world > "$out/index.html"
|
||||
'');
|
||||
'';
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
@ -28,29 +28,27 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
$machine->succeed("nixos-container list") =~ /webserver/ or die;
|
||||
assert "webserver" in machine.succeed("nixos-container list")
|
||||
|
||||
# Start the webserver container.
|
||||
$machine->succeed("nixos-container start webserver");
|
||||
machine.succeed("nixos-container start webserver")
|
||||
|
||||
# Check that container got its own root folder
|
||||
$machine->succeed("ls /run/containers/webserver");
|
||||
with subtest("Container got its own root folder"):
|
||||
machine.succeed("ls /run/containers/webserver")
|
||||
|
||||
# Check that container persistent directory is not created
|
||||
$machine->fail("ls /var/lib/containers/webserver");
|
||||
with subtest("Container persistent directory is not created"):
|
||||
machine.fail("ls /var/lib/containers/webserver")
|
||||
|
||||
# Since "start" returns after the container has reached
|
||||
# multi-user.target, we should now be able to access it.
|
||||
my $ip = $machine->succeed("nixos-container show-ip webserver");
|
||||
chomp $ip;
|
||||
$machine->succeed("ping -n -c1 $ip");
|
||||
$machine->succeed("curl --fail http://$ip/ > /dev/null");
|
||||
ip = machine.succeed("nixos-container show-ip webserver").rstrip()
|
||||
machine.succeed(f"ping -n -c1 {ip}")
|
||||
machine.succeed(f"curl --fail http://{ip}/ > /dev/null")
|
||||
|
||||
# Stop the container.
|
||||
$machine->succeed("nixos-container stop webserver");
|
||||
$machine->fail("curl --fail --connect-timeout 2 http://$ip/ > /dev/null");
|
||||
with subtest("Stop the container"):
|
||||
machine.succeed("nixos-container stop webserver")
|
||||
machine.fail(f"curl --fail --connect-timeout 2 http://{ip}/ > /dev/null")
|
||||
|
||||
# Check that container's root folder was removed
|
||||
$machine->fail("ls /run/containers/webserver");
|
||||
with subtest("Container's root folder was removed"):
|
||||
machine.fail("ls /run/containers/webserver")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Test for NixOS' container support.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "containers-hosts";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ montag451 ];
|
||||
@ -42,11 +42,11 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$machine->waitForUnit("default.target");
|
||||
start_all()
|
||||
machine.wait_for_unit("default.target")
|
||||
|
||||
# Ping the containers using the entries added in /etc/hosts
|
||||
$machine->succeed("ping -n -c 1 simple.containers");
|
||||
$machine->succeed("ping -n -c 1 netmask.containers");
|
||||
with subtest("Ping the containers using the entries added in /etc/hosts"):
|
||||
for host in "simple.containers", "netmask.containers":
|
||||
machine.succeed(f"ping -n -c 1 {host}")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Test for NixOS' container support.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "containers-imperative";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||
@ -36,95 +36,99 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
|
||||
testScript = let
|
||||
tmpfilesContainerConfig = pkgs.writeText "container-config-tmpfiles" ''
|
||||
{
|
||||
systemd.tmpfiles.rules = [ "d /foo - - - - -" ];
|
||||
systemd.services.foo = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = "ls -al /foo";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
''; in
|
||||
''
|
||||
# Make sure we have a NixOS tree (required by ‘nixos-container create’).
|
||||
$machine->succeed("PAGER=cat nix-env -qa -A nixos.hello >&2");
|
||||
tmpfilesContainerConfig = pkgs.writeText "container-config-tmpfiles" ''
|
||||
{
|
||||
systemd.tmpfiles.rules = [ "d /foo - - - - -" ];
|
||||
systemd.services.foo = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = "ls -al /foo";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
'';
|
||||
in ''
|
||||
with subtest("Make sure we have a NixOS tree (required by ‘nixos-container create’)"):
|
||||
machine.succeed("PAGER=cat nix-env -qa -A nixos.hello >&2")
|
||||
|
||||
# Create some containers imperatively.
|
||||
my $id1 = $machine->succeed("nixos-container create foo --ensure-unique-name");
|
||||
chomp $id1;
|
||||
$machine->log("created container $id1");
|
||||
id1, id2 = None, None
|
||||
|
||||
my $id2 = $machine->succeed("nixos-container create foo --ensure-unique-name");
|
||||
chomp $id2;
|
||||
$machine->log("created container $id2");
|
||||
with subtest("Create some containers imperatively"):
|
||||
id1 = machine.succeed("nixos-container create foo --ensure-unique-name").rstrip()
|
||||
machine.log(f"created container {id1}")
|
||||
|
||||
die if $id1 eq $id2;
|
||||
id2 = machine.succeed("nixos-container create foo --ensure-unique-name").rstrip()
|
||||
machine.log(f"created container {id2}")
|
||||
|
||||
# Put the root of $id2 into a bind mount.
|
||||
$machine->succeed(
|
||||
"mv /var/lib/containers/$id2 /id2-bindmount",
|
||||
"mount --bind /id2-bindmount /var/lib/containers/$id1"
|
||||
);
|
||||
assert id1 != id2
|
||||
|
||||
my $ip1 = $machine->succeed("nixos-container show-ip $id1");
|
||||
chomp $ip1;
|
||||
my $ip2 = $machine->succeed("nixos-container show-ip $id2");
|
||||
chomp $ip2;
|
||||
die if $ip1 eq $ip2;
|
||||
with subtest(f"Put the root of {id2} into a bind mount"):
|
||||
machine.succeed(
|
||||
f"mv /var/lib/containers/{id2} /id2-bindmount",
|
||||
f"mount --bind /id2-bindmount /var/lib/containers/{id1}",
|
||||
)
|
||||
|
||||
# Create a directory and a file we can later check if it still exists
|
||||
# after destruction of the container.
|
||||
$machine->succeed(
|
||||
"mkdir /nested-bindmount",
|
||||
"echo important data > /nested-bindmount/dummy",
|
||||
);
|
||||
ip1 = machine.succeed(f"nixos-container show-ip {id1}").rstrip()
|
||||
ip2 = machine.succeed(f"nixos-container show-ip {id2}").rstrip()
|
||||
assert ip1 != ip2
|
||||
|
||||
# Create a directory with a dummy file and bind-mount it into both
|
||||
# containers.
|
||||
foreach ($id1, $id2) {
|
||||
my $importantPath = "/var/lib/containers/$_/very/important/data";
|
||||
$machine->succeed(
|
||||
"mkdir -p $importantPath",
|
||||
"mount --bind /nested-bindmount $importantPath"
|
||||
);
|
||||
}
|
||||
with subtest(
|
||||
"Create a directory and a file we can later check if it still exists "
|
||||
+ "after destruction of the container"
|
||||
):
|
||||
machine.succeed("mkdir /nested-bindmount")
|
||||
machine.succeed("echo important data > /nested-bindmount/dummy")
|
||||
|
||||
# Start one of them.
|
||||
$machine->succeed("nixos-container start $id1");
|
||||
with subtest(
|
||||
"Create a directory with a dummy file and bind-mount it into both containers."
|
||||
):
|
||||
for id in id1, id2:
|
||||
important_path = f"/var/lib/containers/{id}/very/important/data"
|
||||
machine.succeed(
|
||||
f"mkdir -p {important_path}",
|
||||
f"mount --bind /nested-bindmount {important_path}",
|
||||
)
|
||||
|
||||
# Execute commands via the root shell.
|
||||
$machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/ or die;
|
||||
with subtest("Start one of them"):
|
||||
machine.succeed(f"nixos-container start {id1}")
|
||||
|
||||
# Execute a nix command via the root shell. (regression test for #40355)
|
||||
$machine->succeed("nixos-container run $id1 -- nix-instantiate -E 'derivation { name = \"empty\"; builder = \"false\"; system = \"false\"; }'");
|
||||
with subtest("Execute commands via the root shell"):
|
||||
assert "Linux" in machine.succeed(f"nixos-container run {id1} -- uname")
|
||||
|
||||
# Stop and start (regression test for #4989)
|
||||
$machine->succeed("nixos-container stop $id1");
|
||||
$machine->succeed("nixos-container start $id1");
|
||||
with subtest("Execute a nix command via the root shell. (regression test for #40355)"):
|
||||
machine.succeed(
|
||||
f"nixos-container run {id1} -- nix-instantiate -E "
|
||||
+ '\'derivation { name = "empty"; builder = "false"; system = "false"; }\' '
|
||||
)
|
||||
|
||||
# Ensure tmpfiles are present
|
||||
$machine->log("creating container tmpfiles");
|
||||
$machine->succeed("nixos-container create tmpfiles --config-file ${tmpfilesContainerConfig}");
|
||||
$machine->log("created, starting…");
|
||||
$machine->succeed("nixos-container start tmpfiles");
|
||||
$machine->log("done starting, investigating…");
|
||||
$machine->succeed("echo \$(nixos-container run tmpfiles -- systemctl is-active foo.service) | grep -q active;");
|
||||
$machine->succeed("nixos-container destroy tmpfiles");
|
||||
with subtest("Stop and start (regression test for #4989)"):
|
||||
machine.succeed(f"nixos-container stop {id1}")
|
||||
machine.succeed(f"nixos-container start {id1}")
|
||||
|
||||
# Execute commands via the root shell.
|
||||
$machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/ or die;
|
||||
with subtest("tmpfiles are present"):
|
||||
machine.log("creating container tmpfiles")
|
||||
machine.succeed(
|
||||
"nixos-container create tmpfiles --config-file ${tmpfilesContainerConfig}"
|
||||
)
|
||||
machine.log("created, starting…")
|
||||
machine.succeed("nixos-container start tmpfiles")
|
||||
machine.log("done starting, investigating…")
|
||||
machine.succeed(
|
||||
"echo $(nixos-container run tmpfiles -- systemctl is-active foo.service) | grep -q active;"
|
||||
)
|
||||
machine.succeed("nixos-container destroy tmpfiles")
|
||||
|
||||
# Destroy the containers.
|
||||
$machine->succeed("nixos-container destroy $id1");
|
||||
$machine->succeed("nixos-container destroy $id2");
|
||||
with subtest("Execute commands via the root shell"):
|
||||
assert "Linux" in machine.succeed(f"nixos-container run {id1} -- uname")
|
||||
|
||||
$machine->succeed(
|
||||
# Check whether destruction of any container has killed important data
|
||||
"grep -qF 'important data' /nested-bindmount/dummy",
|
||||
# Ensure that the container path is gone
|
||||
"test ! -e /var/lib/containers/$id1"
|
||||
);
|
||||
with subtest("Destroy the containers"):
|
||||
for id in id1, id2:
|
||||
machine.succeed(f"nixos-container destroy {id}")
|
||||
|
||||
with subtest("Check whether destruction of any container has killed important data"):
|
||||
machine.succeed("grep -qF 'important data' /nested-bindmount/dummy")
|
||||
|
||||
with subtest("Ensure that the container path is gone"):
|
||||
print(machine.succeed("ls -lsa /var/lib/containers"))
|
||||
machine.succeed(f"test ! -e /var/lib/containers/{id1}")
|
||||
'';
|
||||
|
||||
})
|
||||
|
||||
77
nixos/tests/containers-ip.nix
Normal file
77
nixos/tests/containers-ip.nix
Normal file
@ -0,0 +1,77 @@
|
||||
# Test for NixOS' container support.
|
||||
|
||||
let
|
||||
webserverFor = hostAddress: localAddress: {
|
||||
inherit hostAddress localAddress;
|
||||
privateNetwork = true;
|
||||
config = {
|
||||
services.httpd = {
|
||||
enable = true;
|
||||
adminAddr = "foo@example.org";
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
in import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "containers-ipv4-ipv6";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||
};
|
||||
|
||||
machine =
|
||||
{ pkgs, ... }: {
|
||||
imports = [ ../modules/installer/cd-dvd/channel.nix ];
|
||||
virtualisation = {
|
||||
writableStore = true;
|
||||
memorySize = 768;
|
||||
};
|
||||
|
||||
containers.webserver4 = webserverFor "10.231.136.1" "10.231.136.2";
|
||||
containers.webserver6 = webserverFor "fc00::2" "fc00::1";
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
import time
|
||||
|
||||
|
||||
def curl_host(ip):
|
||||
# put [] around ipv6 addresses for curl
|
||||
host = ip if ":" not in ip else f"[{ip}]"
|
||||
return f"curl --fail --connect-timeout 2 http://{host}/ > /dev/null"
|
||||
|
||||
|
||||
def get_ip(container):
|
||||
# need to distinguish because show-ip won't work for ipv6
|
||||
if container == "webserver4":
|
||||
ip = machine.succeed(f"nixos-container show-ip {container}").rstrip()
|
||||
assert ip == "${nodes.machine.config.containers.webserver4.localAddress}"
|
||||
return ip
|
||||
return "${nodes.machine.config.containers.webserver6.localAddress}"
|
||||
|
||||
|
||||
for container in "webserver4", "webserver6":
|
||||
assert container in machine.succeed("nixos-container list")
|
||||
|
||||
with subtest(f"Start container {container}"):
|
||||
machine.succeed(f"nixos-container start {container}")
|
||||
# wait 2s for container to start and network to be up
|
||||
time.sleep(2)
|
||||
|
||||
# Since "start" returns after the container has reached
|
||||
# multi-user.target, we should now be able to access it.
|
||||
|
||||
ip = get_ip(container)
|
||||
with subtest(f"{container} reacts to pings and HTTP requests"):
|
||||
machine.succeed(f"ping -n -c1 {ip}")
|
||||
machine.succeed(curl_host(ip))
|
||||
|
||||
with subtest(f"Stop container {container}"):
|
||||
machine.succeed(f"nixos-container stop {container}")
|
||||
machine.fail(curl_host(ip))
|
||||
|
||||
# Destroying a declarative container should fail.
|
||||
machine.fail(f"nixos-container destroy {container}")
|
||||
'';
|
||||
})
|
||||
@ -1,55 +0,0 @@
|
||||
# Test for NixOS' container support.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "containers-ipv4";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||
};
|
||||
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
{ imports = [ ../modules/installer/cd-dvd/channel.nix ];
|
||||
virtualisation.writableStore = true;
|
||||
virtualisation.memorySize = 768;
|
||||
|
||||
containers.webserver =
|
||||
{ privateNetwork = true;
|
||||
hostAddress = "10.231.136.1";
|
||||
localAddress = "10.231.136.2";
|
||||
config =
|
||||
{ services.httpd.enable = true;
|
||||
services.httpd.adminAddr = "foo@example.org";
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
system.stateVersion = "18.03";
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("nixos-container list") =~ /webserver/ or die;
|
||||
|
||||
# Start the webserver container.
|
||||
$machine->succeed("nixos-container start webserver");
|
||||
|
||||
# wait two seconds for the container to start and the network to be up
|
||||
sleep 2;
|
||||
|
||||
# Since "start" returns after the container has reached
|
||||
# multi-user.target, we should now be able to access it.
|
||||
my $ip = $machine->succeed("nixos-container show-ip webserver");
|
||||
chomp $ip;
|
||||
$machine->succeed("ping -n -c1 $ip");
|
||||
$machine->succeed("curl --fail http://$ip/ > /dev/null");
|
||||
|
||||
# Stop the container.
|
||||
$machine->succeed("nixos-container stop webserver");
|
||||
$machine->fail("curl --fail --connect-timeout 2 http://$ip/ > /dev/null");
|
||||
|
||||
# Destroying a declarative container should fail.
|
||||
$machine->fail("nixos-container destroy webserver");
|
||||
'';
|
||||
|
||||
})
|
||||
@ -1,60 +0,0 @@
|
||||
# Test for NixOS' container support.
|
||||
|
||||
let
|
||||
hostIp = "fc00::2";
|
||||
localIp = "fc00::1";
|
||||
in
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "containers-ipv6";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||
};
|
||||
|
||||
machine =
|
||||
{ pkgs, ... }:
|
||||
{ imports = [ ../modules/installer/cd-dvd/channel.nix ];
|
||||
virtualisation.writableStore = true;
|
||||
virtualisation.memorySize = 768;
|
||||
|
||||
containers.webserver =
|
||||
{ privateNetwork = true;
|
||||
hostAddress6 = hostIp;
|
||||
localAddress6 = localIp;
|
||||
config =
|
||||
{ services.httpd.enable = true;
|
||||
services.httpd.adminAddr = "foo@example.org";
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForUnit("default.target");
|
||||
$machine->succeed("nixos-container list") =~ /webserver/ or die;
|
||||
|
||||
# Start the webserver container.
|
||||
$machine->succeed("nixos-container start webserver");
|
||||
|
||||
# wait two seconds for the container to start and the network to be up
|
||||
sleep 2;
|
||||
|
||||
# Since "start" returns after the container has reached
|
||||
# multi-user.target, we should now be able to access it.
|
||||
my $ip = "${localIp}";
|
||||
chomp $ip;
|
||||
$machine->succeed("ping -n -c 1 $ip");
|
||||
$machine->succeed("curl --fail http://[$ip]/ > /dev/null");
|
||||
|
||||
# Stop the container.
|
||||
$machine->succeed("nixos-container stop webserver");
|
||||
$machine->fail("curl --fail --connect-timeout 2 http://[$ip]/ > /dev/null");
|
||||
|
||||
# Destroying a declarative container should fail.
|
||||
$machine->fail("nixos-container destroy webserver");
|
||||
'';
|
||||
|
||||
})
|
||||
@ -1,7 +1,7 @@
|
||||
import ./make-test.nix ({ pkgs, lib, ...} :
|
||||
import ./make-test-python.nix ({ pkgs, lib, ...} :
|
||||
let
|
||||
client_base = {
|
||||
|
||||
|
||||
containers.test1 = {
|
||||
autoStart = true;
|
||||
config = {
|
||||
@ -48,18 +48,25 @@ in {
|
||||
c1System = nodes.client_c1.config.system.build.toplevel;
|
||||
c2System = nodes.client_c2.config.system.build.toplevel;
|
||||
in ''
|
||||
$client->start();
|
||||
$client->waitForUnit("default.target");
|
||||
$client->succeed("[[ \$(nixos-container run test1 cat /etc/check) == client_base ]] >&2");
|
||||
client.start()
|
||||
client.wait_for_unit("default.target")
|
||||
|
||||
$client->succeed("${c1System}/bin/switch-to-configuration test >&2");
|
||||
$client->succeed("[[ \$(nixos-container run test1 cat /etc/check) == client_c1 ]] >&2");
|
||||
$client->succeed("systemctl status httpd -M test1 >&2");
|
||||
assert "client_base" in client.succeed("nixos-container run test1 cat /etc/check")
|
||||
|
||||
$client->succeed("${c2System}/bin/switch-to-configuration test >&2");
|
||||
$client->succeed("[[ \$(nixos-container run test1 cat /etc/check) == client_c2 ]] >&2");
|
||||
$client->fail("systemctl status httpd -M test1 >&2");
|
||||
$client->succeed("systemctl status nginx -M test1 >&2");
|
||||
with subtest("httpd is available after activating config1"):
|
||||
client.succeed(
|
||||
"${c1System}/bin/switch-to-configuration test >&2",
|
||||
"[[ $(nixos-container run test1 cat /etc/check) == client_c1 ]] >&2",
|
||||
"systemctl status httpd -M test1 >&2",
|
||||
)
|
||||
|
||||
with subtest("httpd is not available any longer after switching to config2"):
|
||||
client.succeed(
|
||||
"${c2System}/bin/switch-to-configuration test >&2",
|
||||
"[[ $(nixos-container run test1 cat /etc/check) == client_c2 ]] >&2",
|
||||
"systemctl status nginx -M test1 >&2",
|
||||
)
|
||||
client.fail("systemctl status httpd -M test1 >&2")
|
||||
'';
|
||||
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Test for NixOS' container support.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "containers-tmpfs";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ kampka ];
|
||||
@ -31,49 +31,63 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForUnit("default.target");
|
||||
$machine->succeed("nixos-container list") =~ /tmpfs/ or die;
|
||||
testScript = ''
|
||||
machine.wait_for_unit("default.target")
|
||||
assert "tmpfs" in machine.succeed("nixos-container list")
|
||||
|
||||
# Start the tmpfs container.
|
||||
#$machine->succeed("nixos-container status tmpfs") =~ /up/ or die;
|
||||
|
||||
# Verify that /var is mounted as a tmpfs
|
||||
#$machine->succeed("nixos-container run tmpfs -- systemctl status var.mount --no-pager 2>/dev/null") =~ /What: tmpfs/ or die;
|
||||
$machine->succeed("nixos-container run tmpfs -- mountpoint -q /var 2>/dev/null");
|
||||
|
||||
# Verify that /var/log is mounted as a tmpfs
|
||||
$machine->succeed("nixos-container run tmpfs -- systemctl status var-log.mount --no-pager 2>/dev/null") =~ /What: tmpfs/ or die;
|
||||
$machine->succeed("nixos-container run tmpfs -- mountpoint -q /var/log 2>/dev/null");
|
||||
|
||||
# Verify that /some/random/path is mounted as a tmpfs
|
||||
$machine->succeed("nixos-container run tmpfs -- systemctl status some-random-path.mount --no-pager 2>/dev/null") =~ /What: tmpfs/ or die;
|
||||
$machine->succeed("nixos-container run tmpfs -- mountpoint -q /some/random/path 2>/dev/null");
|
||||
|
||||
# Verify that files created in the container in a non-tmpfs directory are visible on the host.
|
||||
# This establishes legitimacy for the following tests
|
||||
$machine->succeed("nixos-container run tmpfs -- touch /root/test.file 2>/dev/null");
|
||||
$machine->succeed("nixos-container run tmpfs -- ls -l /root | grep -q test.file 2>/dev/null");
|
||||
$machine->succeed("test -e /var/lib/containers/tmpfs/root/test.file");
|
||||
with subtest("tmpfs container is up"):
|
||||
assert "up" in machine.succeed("nixos-container status tmpfs")
|
||||
|
||||
|
||||
# Verify that /some/random/path is writable and that files created there
|
||||
# are not in the hosts container dir but in the tmpfs
|
||||
$machine->succeed("nixos-container run tmpfs -- touch /some/random/path/test.file 2>/dev/null");
|
||||
$machine->succeed("nixos-container run tmpfs -- test -e /some/random/path/test.file 2>/dev/null");
|
||||
def tmpfs_cmd(command):
|
||||
return f"nixos-container run tmpfs -- {command} 2>/dev/null"
|
||||
|
||||
$machine->fail("test -e /var/lib/containers/tmpfs/some/random/path/test.file");
|
||||
|
||||
# Verify that files created in the hosts container dir in a path where a tmpfs file system has been mounted
|
||||
# are not visible to the container as the do not exist in the tmpfs
|
||||
$machine->succeed("touch /var/lib/containers/tmpfs/var/test.file");
|
||||
with subtest("/var is mounted as a tmpfs"):
|
||||
machine.succeed(tmpfs_cmd("mountpoint -q /var"))
|
||||
|
||||
$machine->succeed("test -e /var/lib/containers/tmpfs/var/test.file");
|
||||
$machine->succeed("ls -l /var/lib/containers/tmpfs/var/ | grep -q test.file 2>/dev/null");
|
||||
with subtest("/var/log is mounted as a tmpfs"):
|
||||
assert "What: tmpfs" in machine.succeed(
|
||||
tmpfs_cmd("systemctl status var-log.mount --no-pager")
|
||||
)
|
||||
machine.succeed(tmpfs_cmd("mountpoint -q /var/log"))
|
||||
|
||||
$machine->fail("nixos-container run tmpfs -- ls -l /var | grep -q test.file 2>/dev/null");
|
||||
with subtest("/some/random/path is mounted as a tmpfs"):
|
||||
assert "What: tmpfs" in machine.succeed(
|
||||
tmpfs_cmd("systemctl status some-random-path.mount --no-pager")
|
||||
)
|
||||
machine.succeed(tmpfs_cmd("mountpoint -q /some/random/path"))
|
||||
|
||||
with subtest(
|
||||
"files created in the container in a non-tmpfs directory are visible on the host."
|
||||
):
|
||||
# This establishes legitimacy for the following tests
|
||||
machine.succeed(
|
||||
tmpfs_cmd("touch /root/test.file"),
|
||||
tmpfs_cmd("ls -l /root | grep -q test.file"),
|
||||
"test -e /var/lib/containers/tmpfs/root/test.file",
|
||||
)
|
||||
|
||||
with subtest(
|
||||
"/some/random/path is writable and that files created there are not "
|
||||
+ "in the hosts container dir but in the tmpfs"
|
||||
):
|
||||
machine.succeed(
|
||||
tmpfs_cmd("touch /some/random/path/test.file"),
|
||||
tmpfs_cmd("test -e /some/random/path/test.file"),
|
||||
)
|
||||
machine.fail("test -e /var/lib/containers/tmpfs/some/random/path/test.file")
|
||||
|
||||
with subtest(
|
||||
"files created in the hosts container dir in a path where a tmpfs "
|
||||
+ "file system has been mounted are not visible to the container as "
|
||||
+ "the do not exist in the tmpfs"
|
||||
):
|
||||
machine.succeed(
|
||||
"touch /var/lib/containers/tmpfs/var/test.file",
|
||||
"test -e /var/lib/containers/tmpfs/var/test.file",
|
||||
"ls -l /var/lib/containers/tmpfs/var/ | grep -q test.file 2>/dev/null",
|
||||
)
|
||||
machine.fail(tmpfs_cmd("ls -l /var | grep -q test.file"))
|
||||
'';
|
||||
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, lib, ... }:
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@ -18,17 +18,16 @@ with lib;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
subtest "machine with iftop enabled", sub {
|
||||
$withIftop->waitForUnit("default.target");
|
||||
# limit to eth1 (eth0 is the test driver's control interface)
|
||||
# and don't try name lookups
|
||||
$withIftop->succeed("su -l alice -c 'iftop -t -s 1 -n -i eth1'");
|
||||
};
|
||||
subtest "machine without iftop", sub {
|
||||
$withoutIftop->waitForUnit("default.target");
|
||||
# check that iftop is there but user alice lacks capabilities
|
||||
$withoutIftop->succeed("iftop -t -s 1 -n -i eth1");
|
||||
$withoutIftop->fail("su -l alice -c 'iftop -t -s 1 -n -i eth1'");
|
||||
};
|
||||
with subtest("machine with iftop enabled"):
|
||||
withIftop.wait_for_unit("default.target")
|
||||
# limit to eth1 (eth0 is the test driver's control interface)
|
||||
# and don't try name lookups
|
||||
withIftop.succeed("su -l alice -c 'iftop -t -s 1 -n -i eth1'")
|
||||
|
||||
with subtest("machine without iftop"):
|
||||
withoutIftop.wait_for_unit("default.target")
|
||||
# check that iftop is there but user alice lacks capabilitie
|
||||
withoutIftop.succeed("iftop -t -s 1 -n -i eth1")
|
||||
withoutIftop.fail("su -l alice -c 'iftop -t -s 1 -n -i eth1'")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "kernel-latest";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
@ -11,7 +11,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("uname -s | grep 'Linux'");
|
||||
$machine->succeed("uname -a | grep '${pkgs.linuxPackages_latest.kernel.version}'");
|
||||
assert "Linux" in machine.succeed("uname -s")
|
||||
assert "${pkgs.linuxPackages_latest.kernel.version}" in machine.succeed("uname -a")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "kernel-lts";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
@ -11,7 +11,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("uname -s | grep 'Linux'");
|
||||
$machine->succeed("uname -a | grep '${pkgs.linuxPackages.kernel.version}'");
|
||||
assert "Linux" in machine.succeed("uname -s")
|
||||
assert "${pkgs.linuxPackages.kernel.version}" in machine.succeed("uname -a")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "kernel-testing";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
@ -11,7 +11,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("uname -s | grep 'Linux'");
|
||||
$machine->succeed("uname -a | grep '${pkgs.linuxPackages_testing.kernel.modDirVersion}'");
|
||||
assert "Linux" in machine.succeed("uname -s")
|
||||
assert "${pkgs.linuxPackages_testing.kernel.modDirVersion}" in machine.succeed("uname -a")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -9,8 +9,8 @@ import ./make-test.nix ({ lib, ... }:
|
||||
{
|
||||
services.mailcatcher.enable = true;
|
||||
|
||||
networking.defaultMailServer.directDelivery = true;
|
||||
networking.defaultMailServer.hostName = "localhost:1025";
|
||||
services.ssmtp.enable = true;
|
||||
services.ssmtp.hostName = "localhost:1025";
|
||||
|
||||
environment.systemPackages = [ pkgs.mailutils ];
|
||||
};
|
||||
|
||||
@ -1,28 +1,24 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "memcached";
|
||||
|
||||
nodes = {
|
||||
machine =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ../modules/profiles/minimal.nix ];
|
||||
services.memcached.enable = true;
|
||||
};
|
||||
machine = {
|
||||
imports = [ ../modules/profiles/minimal.nix ];
|
||||
services.memcached.enable = true;
|
||||
};
|
||||
|
||||
testScript = let
|
||||
testScript = pkgs.writeScript "testScript.py" ''
|
||||
#!${pkgs.python3.withPackages (p: [p.memcached])}/bin/python
|
||||
|
||||
testScript = pkgs.writers.writePython3 "test_memcache" {
|
||||
libraries = with pkgs.python3Packages; [ memcached ];
|
||||
} ''
|
||||
import memcache
|
||||
c = memcache.Client(['localhost:11211'])
|
||||
c.set('key', 'value')
|
||||
assert 'value' == c.get('key')
|
||||
'';
|
||||
in ''
|
||||
startAll;
|
||||
$machine->waitForUnit("memcached.service");
|
||||
$machine->waitForOpenPort("11211");
|
||||
$machine->succeed("${testScript}");
|
||||
machine.start()
|
||||
machine.wait_for_unit("memcached.service")
|
||||
machine.wait_for_open_port(11211)
|
||||
machine.succeed("${testScript}")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, lib, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, lib, ...} : {
|
||||
name = "ndppd";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ fpletz ];
|
||||
@ -52,9 +52,9 @@ import ./make-test.nix ({ pkgs, lib, ...} : {
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
$server->waitForUnit("multi-user.target");
|
||||
$upstream->waitForUnit("multi-user.target");
|
||||
$upstream->waitUntilSucceeds("ping -c5 fd42::2");
|
||||
start_all()
|
||||
server.wait_for_unit("multi-user.target")
|
||||
upstream.wait_for_unit("multi-user.target")
|
||||
upstream.wait_until_succeeds("ping -c5 fd42::2")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# This test runs netdata and checks for data via apps.plugin
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "netdata";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ cransom ];
|
||||
@ -16,23 +16,22 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
start_all()
|
||||
|
||||
$netdata->waitForUnit("netdata.service");
|
||||
netdata.wait_for_unit("netdata.service")
|
||||
|
||||
# wait for the service to listen before sending a request
|
||||
$netdata->waitForOpenPort(19999);
|
||||
netdata.wait_for_open_port(19999)
|
||||
|
||||
# check if the netdata main page loads.
|
||||
$netdata->succeed("curl --fail http://localhost:19999/");
|
||||
netdata.succeed("curl --fail http://localhost:19999/")
|
||||
|
||||
# check if netdata can read disk ops for root owned processes.
|
||||
# if > 0, successful. verifies both netdata working and
|
||||
# apps.plugin has elevated capabilities.
|
||||
my $cmd = <<'CMD';
|
||||
curl -s http://localhost:19999/api/v1/data\?chart=users.pwrites | \
|
||||
jq -e '[.data[range(10)][.labels | indices("root")[0]]] | add | . > 0'
|
||||
CMD
|
||||
$netdata->waitUntilSucceeds($cmd);
|
||||
url = "http://localhost:19999/api/v1/data\?chart=users.pwrites"
|
||||
filter = '[.data[range(10)][.labels | indices("root")[0]]] | add | . > 0'
|
||||
cmd = f"curl -s {url} | jq -e '{filter}'"
|
||||
netdata.wait_until_succeeds(cmd)
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ../make-test.nix ({ pkgs, ...}: let
|
||||
import ../make-test-python.nix ({ pkgs, ...}: let
|
||||
adminpass = "notproduction";
|
||||
adminuser = "root";
|
||||
in {
|
||||
@ -50,11 +50,15 @@ in {
|
||||
diff <(echo 'hi') <(${pkgs.rclone}/bin/rclone cat nextcloud:test-shared-file)
|
||||
'';
|
||||
in ''
|
||||
startAll();
|
||||
$nextcloud->waitForUnit("multi-user.target");
|
||||
$nextcloud->succeed("curl -sSf http://nextcloud/login");
|
||||
$nextcloud->succeed("${withRcloneEnv} ${copySharedFile}");
|
||||
$client->waitForUnit("multi-user.target");
|
||||
$client->succeed("${withRcloneEnv} ${diffSharedFile}");
|
||||
start_all()
|
||||
nextcloud.wait_for_unit("multi-user.target")
|
||||
nextcloud.succeed("curl -sSf http://nextcloud/login")
|
||||
nextcloud.succeed(
|
||||
"${withRcloneEnv} ${copySharedFile}"
|
||||
)
|
||||
client.wait_for_unit("multi-user.target")
|
||||
client.succeed(
|
||||
"${withRcloneEnv} ${diffSharedFile}"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ../make-test.nix ({ pkgs, ...}: let
|
||||
import ../make-test-python.nix ({ pkgs, ...}: let
|
||||
adminpass = "hunter2";
|
||||
adminuser = "root";
|
||||
in {
|
||||
@ -85,13 +85,16 @@ in {
|
||||
diff <(echo 'hi') <(${pkgs.rclone}/bin/rclone cat nextcloud:test-shared-file)
|
||||
'';
|
||||
in ''
|
||||
startAll();
|
||||
$nextcloud->waitForUnit("multi-user.target");
|
||||
$nextcloud->succeed("${configureMemcached}");
|
||||
$nextcloud->succeed("curl -sSf http://nextcloud/login");
|
||||
$nextcloud->succeed("${withRcloneEnv} ${copySharedFile}");
|
||||
$client->waitForUnit("multi-user.target");
|
||||
$client->succeed("${withRcloneEnv} ${diffSharedFile}");
|
||||
|
||||
start_all()
|
||||
nextcloud.wait_for_unit("multi-user.target")
|
||||
nextcloud.succeed("${configureMemcached}")
|
||||
nextcloud.succeed("curl -sSf http://nextcloud/login")
|
||||
nextcloud.succeed(
|
||||
"${withRcloneEnv} ${copySharedFile}"
|
||||
)
|
||||
client.wait_for_unit("multi-user.target")
|
||||
client.succeed(
|
||||
"${withRcloneEnv} ${diffSharedFile}"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ../make-test.nix ({ pkgs, ...}: let
|
||||
import ../make-test-python.nix ({ pkgs, ...}: let
|
||||
adminpass = "hunter2";
|
||||
adminuser = "custom-admin-username";
|
||||
in {
|
||||
@ -85,12 +85,16 @@ in {
|
||||
diff <(echo 'hi') <(${pkgs.rclone}/bin/rclone cat nextcloud:test-shared-file)
|
||||
'';
|
||||
in ''
|
||||
startAll();
|
||||
$nextcloud->waitForUnit("multi-user.target");
|
||||
$nextcloud->succeed("${configureRedis}");
|
||||
$nextcloud->succeed("curl -sSf http://nextcloud/login");
|
||||
$nextcloud->succeed("${withRcloneEnv} ${copySharedFile}");
|
||||
$client->waitForUnit("multi-user.target");
|
||||
$client->succeed("${withRcloneEnv} ${diffSharedFile}");
|
||||
start_all()
|
||||
nextcloud.wait_for_unit("multi-user.target")
|
||||
nextcloud.succeed("${configureRedis}")
|
||||
nextcloud.succeed("curl -sSf http://nextcloud/login")
|
||||
nextcloud.succeed(
|
||||
"${withRcloneEnv} ${copySharedFile}"
|
||||
)
|
||||
client.wait_for_unit("multi-user.target")
|
||||
client.succeed(
|
||||
"${withRcloneEnv} ${diffSharedFile}"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
||||
@ -28,7 +28,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
||||
|
||||
with subtest("Test we can see usernames in elementary-greeter"):
|
||||
machine.wait_for_text("${user.description}")
|
||||
machine.wait_for_text("${bob.description}")
|
||||
# OCR was struggling with this one.
|
||||
# machine.wait_for_text("${bob.description}")
|
||||
machine.screenshot("elementary_greeter_lightdm")
|
||||
|
||||
with subtest("Login with elementary-greeter"):
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
# This test runs rabbitmq and checks if rabbitmq is up and running.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ... }: {
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "rabbitmq";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ eelco offline ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
one = { ... }: {
|
||||
services.rabbitmq.enable = true;
|
||||
};
|
||||
machine = {
|
||||
services.rabbitmq.enable = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
machine.start()
|
||||
|
||||
$one->waitForUnit("rabbitmq.service");
|
||||
$one->waitUntilSucceeds("su -s ${pkgs.stdenv.shell} rabbitmq -c \"rabbitmqctl status\"");
|
||||
machine.wait_for_unit("rabbitmq.service")
|
||||
machine.wait_until_succeeds(
|
||||
'su -s ${pkgs.stdenv.shell} rabbitmq -c "rabbitmqctl status"'
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ../make-test.nix ({ pkgs, ... }: {
|
||||
import ../make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "ejabberd";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ ajs124 ];
|
||||
@ -248,13 +248,21 @@ import ../make-test.nix ({ pkgs, ... }: {
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
$server->waitForUnit('ejabberd.service');
|
||||
$server->succeed('su ejabberd -s $(which ejabberdctl) status|grep started') =~ /ejabberd is running/;
|
||||
$server->succeed('su ejabberd -s $(which ejabberdctl) register azurediamond example.com hunter2');
|
||||
$server->succeed('su ejabberd -s $(which ejabberdctl) register cthon98 example.com nothunter2');
|
||||
$server->fail('su ejabberd -s $(which ejabberdctl) register asdf wrong.domain');
|
||||
$client->succeed('send-message');
|
||||
$server->succeed('su ejabberd -s $(which ejabberdctl) unregister cthon98 example.com');
|
||||
$server->succeed('su ejabberd -s $(which ejabberdctl) unregister azurediamond example.com');
|
||||
ejabberd_prefix = "su ejabberd -s $(which ejabberdctl) "
|
||||
|
||||
server.wait_for_unit("ejabberd.service")
|
||||
|
||||
assert "status: started" in server.succeed(ejabberd_prefix + "status")
|
||||
|
||||
server.succeed(
|
||||
ejabberd_prefix + "register azurediamond example.com hunter2",
|
||||
ejabberd_prefix + "register cthon98 example.com nothunter2",
|
||||
)
|
||||
server.fail(ejabberd_prefix + "register asdf wrong.domain")
|
||||
client.succeed("send-message")
|
||||
server.succeed(
|
||||
ejabberd_prefix + "unregister cthon98 example.com",
|
||||
ejabberd_prefix + "unregister azurediamond example.com",
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, lib, ... }:
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@ -26,15 +26,19 @@ with lib;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
def perform_xsslock_test(machine, lockCmd):
|
||||
machine.start()
|
||||
machine.wait_for_x()
|
||||
machine.wait_for_unit("xss-lock.service", "alice")
|
||||
machine.fail(f"pgrep {lockCmd}")
|
||||
machine.succeed("su -l alice -c 'xset dpms force standby'")
|
||||
machine.wait_until_succeeds(f"pgrep {lockCmd}")
|
||||
|
||||
${concatStringsSep "\n" (mapAttrsToList (name: lockCmd: ''
|
||||
${"$"+name}->start;
|
||||
${"$"+name}->waitForX;
|
||||
${"$"+name}->waitForUnit("xss-lock.service", "alice");
|
||||
${"$"+name}->fail("pgrep ${lockCmd}");
|
||||
${"$"+name}->succeed("su -l alice -c 'xset dpms force standby'");
|
||||
${"$"+name}->waitUntilSucceeds("pgrep ${lockCmd}");
|
||||
'') { simple = "i3lock"; custom_lockcmd = "xlock"; })}
|
||||
|
||||
with subtest("simple"):
|
||||
perform_xsslock_test(simple, "i3lock")
|
||||
|
||||
with subtest("custom_cmd"):
|
||||
perform_xsslock_test(custom_lockcmd, "xlock")
|
||||
'';
|
||||
})
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "BSEQuencer";
|
||||
version = "0.4";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sjaehn";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0c3bm2z6z2bjjv1cy50383zr81h99rcb2frmxad0r7lhi27mjyqn";
|
||||
rev = "${version}";
|
||||
sha256 = "08xwz5v8wrar0rx7qdr9pkpjz2k9sw6bn5glhpn6sp6453fabf8q";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "BSlizr";
|
||||
version = "1.2.0";
|
||||
version = "1.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sjaehn";
|
||||
repo = pname;
|
||||
rev = "${version}";
|
||||
sha256 = "1xqhpppfj47nzmyksbqgfvvi5j807g96hqla544w2f752zz4yi0s";
|
||||
sha256 = "0q92ygz17iiriwzqylmaxd5ml2bhqy3n6c3f7g71n4hn9z3bl3s1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, mpd_clientlib, sphinx }:
|
||||
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, mpd_clientlib, sphinx, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mpc";
|
||||
version = "0.31";
|
||||
version = "0.33";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MusicPlayerDaemon";
|
||||
repo = "mpc";
|
||||
rev = "v${version}";
|
||||
sha256 = "06wn5f24bgkqmhh2p8rbizmqibzqr4x1q7c6zl0pfq7mdy49g5ds";
|
||||
sha256 = "1qbi0i9cq54rj8z2kapk8x8g1jkw2jz781niwb9i7kw4xfhvy5zx";
|
||||
};
|
||||
|
||||
buildInputs = [ mpd_clientlib ];
|
||||
buildInputs = [ mpd_clientlib ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkgconfig sphinx ];
|
||||
|
||||
|
||||
@ -11,17 +11,17 @@ let
|
||||
++ lib.optional withPortAudio "portaudio_backend";
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ncspot-unstable";
|
||||
version = "2019-10-12";
|
||||
pname = "ncspot";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hrkfdn";
|
||||
repo = "ncspot";
|
||||
rev = "4defded54646958268a20787917e4721ae96407d";
|
||||
sha256 = "1w3cmilwjzk3pfnq97qgz6hzxgjgi27dm8jq7maw87qyl3v17gyg";
|
||||
rev = "v${version}";
|
||||
sha256 = "0ldisr45w6ys1j62qv99ssqfg5q9dwrrzxh2maggyrx1zqdlsk6m";
|
||||
};
|
||||
|
||||
cargoSha256 = "1w1fk39pragfy2i2myw99mqf63w6fw4nr2kri8ily2iqc6g9xpgw";
|
||||
cargoSha256 = "0k765hinqxfm30li1z66m1chsv69v6hiz109q2zlkxzg937qbnjh";
|
||||
|
||||
cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];
|
||||
|
||||
|
||||
29
pkgs/applications/audio/noise-repellent/default.nix
Normal file
29
pkgs/applications/audio/noise-repellent/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, fftwFloat, lv2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "noise-repellent";
|
||||
version = "unstable-2018-12-29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lucianodato";
|
||||
repo = pname;
|
||||
rev = "9efdd0b41ec184a792087c87cbf5382f455e33ec";
|
||||
sha256 = "0pn9cxapfvb5l62q86bchyfll1290vi0rhrzarb1jpc4ix7kz53c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
mesonFlags = ("--prefix=${placeholder "out"}/lib/lv2");
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkgconfig ];
|
||||
buildInputs = [
|
||||
fftwFloat lv2
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An lv2 plugin for broadband noise reduction";
|
||||
homepage = https://github.com/lucianodato/noise-repellent;
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "i686-darwin" ];
|
||||
};
|
||||
}
|
||||
@ -4,13 +4,13 @@ let
|
||||
pythonPackages = python3Packages;
|
||||
in pythonPackages.buildPythonApplication rec {
|
||||
pname = "picard";
|
||||
version = "2.2.2";
|
||||
version = "2.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "metabrainz";
|
||||
repo = pname;
|
||||
rev = "release-${version}";
|
||||
sha256 = "1iibkvwpj862wcrl0fmyi6qhcgx4q5ay63yr0zyg0bkqgcka0gpr";
|
||||
sha256 = "0lb4pzl03mr5hrzrzva99rxqd5yfip62b7sjmlg4j0imw8mxaj16";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ];
|
||||
|
||||
@ -35,13 +35,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "strawberry";
|
||||
version = "0.6.5";
|
||||
version = "0.6.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jonaski";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1kqx0q99n1p5pm6skvqjihz11byhxdid1qw6gqp67dh2na62z1lm";
|
||||
sha256 = "113z2qdcg0fm6ff2k36nl5zbbj5wsidl94ca1sfnsv9bq9lkvck5";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@ -93,7 +93,7 @@ mkDerivation rec {
|
||||
changelog = "https://raw.githubusercontent.com/jonaski/strawberry/${version}/Changelog";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
# upstream says darwin should work but they lack maintainers as of 0.6.5
|
||||
# upstream says darwin should work but they lack maintainers as of 0.6.6
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchgit , boost, libX11, libGLU, libGL, liblo, libjack2, ladspaH, lv2, pkgconfig, rubberband, libsndfile, fftwFloat, libsamplerate }:
|
||||
{ stdenv, fetchgit , boost, libX11, libGL, liblo, libjack2, ladspaH, lv2, pkgconfig, rubberband, libsndfile, fftwFloat, libsamplerate }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "zam-plugins";
|
||||
@ -12,16 +12,18 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ boost libX11 libGLU libGL liblo libjack2 ladspaH lv2 rubberband libsndfile fftwFloat libsamplerate ];
|
||||
buildInputs = [ boost libX11 libGL liblo libjack2 ladspaH lv2 rubberband libsndfile fftwFloat libsamplerate ];
|
||||
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
patchShebangs ./dpf/utils/generate-ttl.sh
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"PREFIX=${placeholder ''out''}"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.zamaudio.com/?p=976;
|
||||
description = "A collection of LV2/LADSPA/VST/JACK audio plugins by ZamAudio";
|
||||
|
||||
@ -7,13 +7,13 @@ with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-abc-" + version;
|
||||
version = "0.20.5";
|
||||
version = "0.20.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bitcoin-ABC";
|
||||
repo = "bitcoin-abc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1adps3g99m7cxs58c48g2dgyihfv0v8d198klzcbbf4dq0s5v45c";
|
||||
sha256 = "1a65pykdjkiic67fcs8cg2qrvzzrqifa93r1bzza3gdyfdvgv3ww";
|
||||
};
|
||||
|
||||
patches = [ ./fix-bitcoin-qt-build.patch ];
|
||||
|
||||
@ -7,13 +7,13 @@
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dogecoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
||||
version = "1.14.1";
|
||||
version = "1.14.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dogecoin";
|
||||
repo = "dogecoin";
|
||||
rev = "v${version}";
|
||||
sha256 = "0nmbi5gmms16baqs3fmdp2xm0yf8wawnyz80gcmca4j5ph2zka1v";
|
||||
sha256 = "1gw46q63mjzwvb17ck6p1bap2xpdrap08szw2kjhasa3yvd5swyy";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
|
||||
@ -1,22 +1,39 @@
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub, libobjc, IOKit }:
|
||||
{ stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit }:
|
||||
|
||||
buildGoPackage rec {
|
||||
buildGoModule rec {
|
||||
pname = "go-ethereum";
|
||||
version = "1.9.7";
|
||||
|
||||
goPackagePath = "github.com/ethereum/go-ethereum";
|
||||
|
||||
# Fix for usb-related segmentation faults on darwin
|
||||
propagatedBuildInputs =
|
||||
stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
|
||||
version = "1.9.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ethereum";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "07110dj91wmkpwz7iy0lmxx3y9wjxjrhk3rhkfdil74cxm0wkkn2";
|
||||
sha256 = "0v4hchy6h3282347ps11iv7klcr60bmghha78rnp0iqpx2k8pqb4";
|
||||
};
|
||||
|
||||
modSha256 = "1l10p6a4qq77pfx7jmipkcg2qg6w3hg83q5a37yid3apily2scfa";
|
||||
|
||||
subPackages = [
|
||||
"cmd/abigen"
|
||||
"cmd/bootnode"
|
||||
"cmd/checkpoint-admin"
|
||||
"cmd/clef"
|
||||
"cmd/devp2p"
|
||||
"cmd/ethkey"
|
||||
"cmd/evm"
|
||||
"cmd/faucet"
|
||||
"cmd/geth"
|
||||
"cmd/p2psim"
|
||||
"cmd/puppeth"
|
||||
"cmd/rlpdump"
|
||||
"cmd/utils"
|
||||
"cmd/wnode"
|
||||
];
|
||||
|
||||
# Fix for usb-related segmentation faults on darwin
|
||||
propagatedBuildInputs =
|
||||
stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://geth.ethereum.org/";
|
||||
description = "Official golang implementation of the Ethereum protocol";
|
||||
|
||||
@ -12,13 +12,13 @@ with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "monero-gui";
|
||||
version = "0.15.0.0";
|
||||
version = "0.15.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "monero-project";
|
||||
repo = "monero-gui";
|
||||
rev = "v${version}";
|
||||
sha256 = "1shpnly2dym5jhvk8zk10p69mz062dihx979djg74q6hgkhhhqsh";
|
||||
sha256 = "08j8kkncdn57xql0bhmlzjpjkdfhqbpda1p07r797q8qi0nl4w8n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
|
||||
|
||||
@ -1,37 +1,29 @@
|
||||
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
|
||||
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
|
||||
, libsnark, withGui }:
|
||||
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost17x
|
||||
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent }:
|
||||
|
||||
let librustzcash = callPackage ./librustzcash {};
|
||||
in
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
name = "zcash" + (toString (optional (!withGui) "d")) + "-" + version;
|
||||
version = "1.0.13";
|
||||
pname = "zcash";
|
||||
version = "2.1.0-1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zcash";
|
||||
repo = "zcash";
|
||||
rev = "v${version}";
|
||||
sha256 = "05y7wxs66anxr5akbf05r36mmjfzqpwawn6vyh3jhpva51hzzzyz";
|
||||
sha256 = "05bnn4lxrrcv1ha3jdfrgwg4ar576161n3j9d4gpc14ww3zgf9vz";
|
||||
};
|
||||
|
||||
# Dependencies are underspecified: "make -C src gtest/zcash_gtest-test_merkletree.o"
|
||||
# fails with "fatal error: test/data/merkle_roots.json.h: No such file or directory"
|
||||
enableParallelBuilding = false;
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
buildInputs = [ gtest gmock gmp openssl wget db62 boost zlib
|
||||
protobuf libevent libsodium librustzcash libsnark ]
|
||||
++ optionals stdenv.isLinux [ utillinux ]
|
||||
++ optionals withGui [ qt4 qrencode ];
|
||||
buildInputs = [ gtest gmock gmp openssl wget db62 boost17x zlib
|
||||
protobuf libevent libsodium librustzcash ]
|
||||
++ optionals stdenv.isLinux [ utillinux ];
|
||||
|
||||
configureFlags = [ "--with-boost-libdir=${boost.out}/lib"
|
||||
] ++ optionals withGui [ "--with-gui=qt4" ];
|
||||
configureFlags = [ "--with-boost-libdir=${boost17x.out}/lib" ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i"" 's,-lboost_system-mt,-lboost_system,' configure.ac
|
||||
sed -i"" 's,-fvisibility=hidden,,g' src/Makefile.am
|
||||
'';
|
||||
|
||||
@ -42,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
meta = {
|
||||
description = "Peer-to-peer, anonymous electronic cash system";
|
||||
homepage = https://z.cash/;
|
||||
maintainers = with maintainers; [ rht ];
|
||||
maintainers = with maintainers; [ rht tkerber ];
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
@ -2,28 +2,30 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "librustzcash-unstable";
|
||||
version = "2017-03-17";
|
||||
version = "2018-10-27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zcash";
|
||||
repo = "librustzcash";
|
||||
rev = "91348647a86201a9482ad4ad68398152dc3d635e";
|
||||
sha256 = "02l1f46frpvw1r6k1wfh77mrsnmsdvifqx0vnscxz4xgb9ia9d1c";
|
||||
rev = "06da3b9ac8f278e5d4ae13088cf0a4c03d2c13f5";
|
||||
sha256 = "0md0pp3k97iv7kfjpfkg14pjanhrql4vafa8ggbxpkajv1j4xldv";
|
||||
};
|
||||
|
||||
cargoSha256 = "1xlq8vkzfyr5q8gxvzkwi8r1kxg4rg8l1ckdwfdxlkhnw0yscbra";
|
||||
cargoSha256 = "166v8cxlpfslbs5gljbh7wp0lxqakayw47ikxm9r9a39n7j36mq1";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp target/release/librustzcash.a $out/lib/
|
||||
mkdir -p $out/include
|
||||
cp include/librustzcash.h $out/include/
|
||||
cp librustzcash/include/librustzcash.h $out/include/
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Rust-language assets for Zcash";
|
||||
homepage = https://github.com/zcash/librustzcash;
|
||||
maintainers = with maintainers; [ rht ];
|
||||
maintainers = with maintainers; [ rht tkerber ];
|
||||
license = with licenses; [ mit asl20 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
@ -18,9 +18,9 @@ let
|
||||
sha256Hash = "0wyyr6r0jzb1l4rn1mfgp0nnzvgk3x62imq629z6vrdbymy8psf1";
|
||||
};
|
||||
latestVersion = { # canary & dev
|
||||
version = "4.0.0.3"; # "Android Studio 4.0 Canary 3"
|
||||
build = "192.5994236";
|
||||
sha256Hash = "14ig352anjs0df72f41v4r6jl7mlm2n4pn9syanmykaj87dm4kf4";
|
||||
version = "4.0.0.4"; # "Android Studio 4.0 Canary 4"
|
||||
build = "192.6008643";
|
||||
sha256Hash = "1z1srginlg1xnp911nlilhf515mbpmngwhln29q6lxsir8g2cw2z";
|
||||
};
|
||||
in {
|
||||
# Attributes are named by their corresponding release channels
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mle";
|
||||
version = "1.4.1";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adsr";
|
||||
repo = "mle";
|
||||
rev = "v${version}";
|
||||
sha256 = "15i5lzcp0zar2zh34ky9m6pvvi41zgdrl3hmylpgsqnnj4r87vqc";
|
||||
sha256 = "053zvxkjx2zwq6lwkycirxz1m9sjc3zi9ic8fvp3mjvbqfri1y3x";
|
||||
};
|
||||
|
||||
# Fix location of Lua 5.3 header and library
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "tiled";
|
||||
version = "1.2.5";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bjorn";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0sz8klz0nz60dhvz7pdn44zwr9q578pq50sxsbynz7irhrv02b52";
|
||||
sha256 = "1vhg8m1b7ccccrzlp0pyf3qskgvlf6sn1w956zsczmndrixbli9a";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig qmake ];
|
||||
|
||||
@ -5,11 +5,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "avocode";
|
||||
version = "3.9.6";
|
||||
version = "4.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip";
|
||||
sha256 = "0jnl461dg2s5panrw12707bv34g6wxc1pxc90awnja13yq0z6bfc";
|
||||
sha256 = "13jwxwvwb9nnjxcnh9vfi22n4c00bhdypl84wrpdg5xw9325zhvy";
|
||||
};
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath (with xorg; [
|
||||
|
||||
@ -9,11 +9,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kodelife";
|
||||
version = "0.8.6.101";
|
||||
version = "0.8.7.105";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://hexler.net/pub/${pname}/${pname}-${version}-linux-x86_64.zip";
|
||||
sha256 = "1ldab1famdcby2djfys657g85d46s8k96m6mr71riw4v336ar238";
|
||||
sha256 = "0ld4lwigzwlikx04qy3gskqqg0wzlk8m3ccrd704ifl8lsp46n5r";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
@ -1,8 +1,22 @@
|
||||
{ stdenv, fetchFromGitHub, gtk3, intltool, json_c, lcms2, libpng, librsvg, gobject-introspection
|
||||
, gdk-pixbuf, pkgconfig, python2Packages, scons, swig, wrapGAppsHook }:
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, gtk3
|
||||
, intltool
|
||||
, json_c
|
||||
, lcms2
|
||||
, libpng
|
||||
, librsvg
|
||||
, gobject-introspection
|
||||
, gdk-pixbuf
|
||||
, pkgconfig
|
||||
, python2
|
||||
, scons
|
||||
, swig
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python2Packages) python pycairo pygobject3 numpy;
|
||||
inherit (python2.pkgs) pycairo pygobject3 numpy;
|
||||
in stdenv.mkDerivation {
|
||||
pname = "mypaint";
|
||||
version = "1.2.1";
|
||||
@ -16,18 +30,32 @@ in stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
intltool pkgconfig scons swig wrapGAppsHook
|
||||
intltool
|
||||
pkgconfig
|
||||
scons
|
||||
swig
|
||||
wrapGAppsHook
|
||||
gobject-introspection # for setup hook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3 gdk-pixbuf json_c lcms2 libpng librsvg pycairo pygobject3 python
|
||||
gtk3
|
||||
gdk-pixbuf
|
||||
json_c
|
||||
lcms2
|
||||
libpng
|
||||
librsvg
|
||||
pycairo
|
||||
pygobject3
|
||||
python2
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ numpy ];
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
sed -i -e 's|/usr/bin/env python2.7|${python}/bin/python|' $out/bin/mypaint
|
||||
sed -i -e 's|/usr/bin/env python2.7|${python2}/bin/python|' $out/bin/mypaint
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
@ -36,7 +64,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A graphics application for digital painters";
|
||||
homepage = http://mypaint.org/;
|
||||
homepage = "http://mypaint.org/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ goibhniu jtojnar ];
|
||||
|
||||
@ -14,13 +14,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openimageio";
|
||||
version = "2.0.11";
|
||||
version = "2.0.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenImageIO";
|
||||
repo = "oiio";
|
||||
rev = "Release-${version}";
|
||||
sha256 = "1kasp9as81wjvys9qrx10mgdf9bjbdgryhdgjqn05zdmv2rs95nc";
|
||||
sha256 = "0v3k33jb0glb30jdhq3c732a9dxvnidaclz6b2wpqwik8l3658mj";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "out" "dev" "doc" ];
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "pdfcpu";
|
||||
version = "0.2.5";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pdfcpu";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0fgdq8byb9pp9wiq3dm0vxw32kbspczqnk41agxpzjf303zmv75y";
|
||||
sha256 = "03v4wc531dwmbjqgs3y3ncdn6g3xirv1w6h1mfgglb6sjll8jxp5";
|
||||
};
|
||||
|
||||
modSha256 = "1nagb3k2ghfw27g4vcmn7v8s5flg387jpf1l18gw6c44a1xjcivs";
|
||||
|
||||
@ -23,13 +23,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xournalpp";
|
||||
version = "1.0.15";
|
||||
version = "1.0.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xournalpp";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1q716hn2ajkxfba0dxp7vcnqfa31hx36ax09yz4d13sdw43rfjf4";
|
||||
sha256 = "1bdmxxkcqpjvkckizmrz2839b4yspw4xv69bqkrrgkcyvxsr804w";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gettext pkgconfig wrapGAppsHook ];
|
||||
|
||||
@ -52,16 +52,16 @@ let
|
||||
];
|
||||
in buildRustPackage rec {
|
||||
pname = "alacritty";
|
||||
version = "0.3.3";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jwilm";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1h9zid7bi19qga3a8a2d4x3ma9wf1njmj74s4xnw7nzqqf3dh750";
|
||||
sha256 = "0adaqdbma6gskb2g14yscrgr9gch5wf2g2clchplv72c2qr1k427";
|
||||
};
|
||||
|
||||
cargoSha256 = "1rxb5ljgvn881jkxm8772kf815mmp08ci7sqmn2x1jwdcrphhxr1";
|
||||
cargoSha256 = "1r267g8f986nxh8ms5yhp50qy1yl8gly2jr78p738qqc6frlxlhv";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
@ -76,10 +76,6 @@ in buildRustPackage rec {
|
||||
++ lib.optionals stdenv.isDarwin [ AppKit CoreGraphics CoreServices CoreText Foundation OpenGL ];
|
||||
|
||||
outputs = [ "out" "terminfo" ];
|
||||
postPatch = ''
|
||||
substituteInPlace alacritty_terminal/src/config/mouse.rs \
|
||||
--replace xdg-open ${xdg_utils}/bin/xdg-open
|
||||
'';
|
||||
|
||||
postBuild = lib.optionalString stdenv.isDarwin "make app";
|
||||
|
||||
@ -118,7 +114,7 @@ in buildRustPackage rec {
|
||||
description = "GPU-accelerated terminal emulator";
|
||||
homepage = https://github.com/jwilm/alacritty;
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
maintainers = with maintainers; [ filalex77 mic92 ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ mkDerivation rec {
|
||||
poppler_utils libpng imagemagick libjpeg
|
||||
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
|
||||
] ++ (with pypkgs; [
|
||||
apsw cssselect css-parser dateutil dnspython html5-parser lxml markdown netifaces pillow
|
||||
apsw cssselect css-parser dateutil dnspython feedparser html5-parser lxml markdown netifaces pillow
|
||||
python pyqt5_with_qtwebkit sip
|
||||
regex msgpack beautifulsoup4 html2text
|
||||
# the following are distributed with calibre, but we use upstream instead
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "gallery_dl";
|
||||
version = "1.10.6";
|
||||
version = "1.11.1";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0jbfp072rnb3pkqp10xds57bnlcn87vqjaz68nhpzkwvwhs3hr4w";
|
||||
sha256 = "08py1f48ylw83712h8313rxz55igbszxcwr2yxkchpr4233avzph";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "hugo";
|
||||
version = "0.58.3";
|
||||
version = "0.60.0";
|
||||
|
||||
goPackagePath = "github.com/gohugoio/hugo";
|
||||
|
||||
@ -10,10 +10,10 @@ buildGoModule rec {
|
||||
owner = "gohugoio";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "00dhb6xilkwr9yhncpyc6alzqw77ch3vd85dc7lzsmhw1c80n0lc";
|
||||
sha256 = "0g8rq79xp7c9p31xc0anfjyz7xp8n7qzv3vmvg2nmzl7nayg88aa";
|
||||
};
|
||||
|
||||
modSha256 = "0d6zc7hxb246zsvwsjz4ds6gdd2m95x6l3djh3mmciwfg9cd7prx";
|
||||
modSha256 = "12h1ik1hgs4lkmk699wpa34rnycnm03qyr2vp1y5lywz1h93by20";
|
||||
|
||||
buildFlags = "-tags extended";
|
||||
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "josm";
|
||||
version = "15390";
|
||||
version = "15492";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
|
||||
sha256 = "1wxncd3mjd4j14svgpmvrxc0nkzfkpn0xlci7m7wp9hfp1l81v9f";
|
||||
sha256 = "0x7ndcrlvrvk2fd4pyn10npr3778khcwg6xzzh19vdw4glh5zfcl";
|
||||
};
|
||||
|
||||
buildInputs = [ jdk11 makeWrapper ];
|
||||
|
||||
@ -34,13 +34,13 @@ with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "keepassxc";
|
||||
version = "2.5.0";
|
||||
version = "2.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "keepassxreboot";
|
||||
repo = "keepassxc";
|
||||
rev = version;
|
||||
sha256 = "053z6mzcn22w3vkf09i7kdi5p0c6zcd9g62v3p5i3yhd14cgviqr";
|
||||
sha256 = "0dkya9smx81c5cgcwk2gi2m1pabfff1v9gd3ngl42sdvyb63wgdq";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang [
|
||||
|
||||
@ -21,14 +21,14 @@
|
||||
with python3Packages;
|
||||
buildPythonApplication rec {
|
||||
pname = "kitty";
|
||||
version = "0.14.6";
|
||||
version = "0.15.0";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kovidgoyal";
|
||||
repo = "kitty";
|
||||
rev = "v${version}";
|
||||
sha256 = "1rb5ys9xsdhd2qa3kz5gqzz111c6b14za98va6hlglk69wqlmb51";
|
||||
sha256 = "1gh8lcyqpkwvmjxwiq5d43sd43bg3c49fyy2x8drqdzj34gc49qg";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -212,7 +212,7 @@
|
||||
@@ -217,7 +217,7 @@ def init_env(
|
||||
cflags = os.environ.get(
|
||||
'OVERRIDE_CFLAGS', (
|
||||
'-Wextra -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11'
|
||||
'-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std={}11'
|
||||
- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
|
||||
+ ' {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
|
||||
).format(
|
||||
float_conversion, std,
|
||||
optimize,
|
||||
' '.join(sanitize_args),
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mlterm";
|
||||
version = "3.8.8";
|
||||
version = "3.8.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/mlterm/01release/${pname}-${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1jq3fv2wqhszfipkzj8d0lykr6g0zzksn7xy4d3kwincmzfskv7k";
|
||||
sha256 = "1iy7wq953gcnygr1d04h5ddvhpmy8l575n5is2w0rj3ck31ihpqd";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoconf ];
|
||||
@ -86,8 +86,9 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Multi Lingual TERMinal emulator on X11";
|
||||
homepage = http://mlterm.sourceforge.net/;
|
||||
license = licenses.bsd2;
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ vrthra ramkromberg ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "osmium-tool";
|
||||
version = "1.11.0";
|
||||
version = "1.11.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "osmcode";
|
||||
repo = "osmium-tool";
|
||||
rev = "v${version}";
|
||||
sha256 = "164r1w539dzy67ir2rqh21kwdvkjv87isd18gp51qyxbsprz6kq5";
|
||||
sha256 = "199dvajik5d56nybk2061vdjyxwakngfd7frxj99wr2vsrp4aw2b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@ -1,23 +1,37 @@
|
||||
{ atomEnv, autoPatchelfHook, dpkg, fetchurl, makeDesktopItem, makeWrapper
|
||||
, stdenv, udev, wrapGAppsHook }:
|
||||
{ atomEnv
|
||||
, autoPatchelfHook
|
||||
, dpkg
|
||||
, fetchurl
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, stdenv
|
||||
, udev
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
|
||||
throwSystem = throw "Unsupported system: ${system}";
|
||||
|
||||
pname = "simplenote";
|
||||
|
||||
version = "1.9.1";
|
||||
version = "1.11.0";
|
||||
|
||||
sha256 = {
|
||||
x86_64-linux = "1zqrjh1xfdpkpj1fsri9r4qkazh9j89pbj8vjr474b39v56v693j";
|
||||
}.${system};
|
||||
x86_64-linux = "1ljam1yfiy1lh6lrknrq7cdqpj1q7f655mxjiiwv3izp98qr1f8s";
|
||||
}.${system} or throwSystem;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The simplest way to keep notes";
|
||||
homepage = "https://github.com/Automattic/simplenote-electron";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ kiwi ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [
|
||||
kiwi
|
||||
];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
};
|
||||
|
||||
linux = stdenv.mkDerivation rec {
|
||||
@ -31,14 +45,14 @@ let
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "simplenote";
|
||||
categories = "Development";
|
||||
comment = "Simplenote for Linux";
|
||||
desktopName = "Simplenote";
|
||||
exec = "simplenote %U";
|
||||
icon = "simplenote";
|
||||
type = "Application";
|
||||
name = "simplenote";
|
||||
startupNotify = "true";
|
||||
desktopName = "Simplenote";
|
||||
categories = "Development";
|
||||
type = "Application";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
@ -46,9 +60,14 @@ let
|
||||
dontPatchELF = true;
|
||||
dontWrapGApps = true;
|
||||
|
||||
buildInputs = atomEnv.packages;
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
dpkg
|
||||
makeWrapper
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook wrapGAppsHook ];
|
||||
buildInputs = atomEnv.packages;
|
||||
|
||||
unpackPhase = "dpkg-deb -x $src .";
|
||||
|
||||
@ -62,14 +81,15 @@ let
|
||||
cp "${desktopItem}/share/applications/"* "$out/share/applications"
|
||||
'';
|
||||
|
||||
runtimeDependencies = [ udev.lib ];
|
||||
runtimeDependencies = [
|
||||
udev.lib
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
ls -ahl $out
|
||||
makeWrapper $out/opt/Simplenote/simplenote $out/bin/simplenote \
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
linux
|
||||
linux
|
||||
|
||||
12
pkgs/applications/misc/slic3r/boost-compile-error.patch
Normal file
12
pkgs/applications/misc/slic3r/boost-compile-error.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/xs/src/libslic3r/GCodeSender.hpp b/xs/src/libslic3r/GCodeSender.hpp
|
||||
index cc0b2983..0f39f5a3 100644
|
||||
--- a/xs/src/libslic3r/GCodeSender.hpp
|
||||
+++ b/xs/src/libslic3r/GCodeSender.hpp
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
+#include <boost/core/noncopyable.hpp>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchgit, perl, makeWrapper, makeDesktopItem
|
||||
, which, perlPackages, boost
|
||||
{ lib, stdenv, fetchgit, perl, makeWrapper
|
||||
, makeDesktopItem, which, perlPackages, boost
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -40,6 +40,11 @@ stdenv.mkDerivation rec {
|
||||
sed -i 's|"/usr/include/asm-generic/ioctls.h"|<asm-generic/ioctls.h>|g' xs/src/libslic3r/GCodeSender.cpp
|
||||
'';
|
||||
|
||||
# note the boost-compile-error is fixed in
|
||||
# https://github.com/slic3r/Slic3r/commit/90f108ae8e7a4315f82e317f2141733418d86a68
|
||||
# this patch can be probably be removed in the next version after 1.3.0
|
||||
patches = lib.optional (lib.versionAtLeast boost.version "1.56.0") ./boost-compile-error.patch;
|
||||
|
||||
buildPhase = ''
|
||||
export SLIC3R_NO_AUTO=true
|
||||
export LD=$CXX
|
||||
|
||||
@ -20,14 +20,14 @@
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
version = "0.10.2";
|
||||
version = "0.10.3";
|
||||
pname = "syncthingtray";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Martchus";
|
||||
repo = "syncthingtray";
|
||||
rev = "v${version}";
|
||||
sha256 = "09iq1rr70wwy5xk0jmfnwzvnigq409hvs2viy1j0khn9jhvnk6z0";
|
||||
sha256 = "12s1v65h4z051k4gi1b5f3z4hpbgqnhkjnz2xv5bdwhs24zxrrif";
|
||||
};
|
||||
|
||||
buildInputs = [ qtbase cpp-utilities qtutilities ]
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
{ stdenv, gcc7, pkg-config
|
||||
, next
|
||||
, webkitgtk, gsettings-desktop-schemas
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "next-gtk-webkit";
|
||||
inherit (next) src version;
|
||||
|
||||
makeFlags = [ "gtk-webkit" "PREFIX=$(out)" ];
|
||||
installTargets = "install-gtk-webkit";
|
||||
|
||||
nativeBuildInputs = [ gcc7 pkg-config ];
|
||||
buildInputs = [
|
||||
webkitgtk
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
meta = with stdenv.lib; {
|
||||
description = "Infinitely extensible web-browser (user interface only)";
|
||||
homepage = https://next.atlas.engineer;
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.lewo ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
@ -1,86 +1,90 @@
|
||||
{ pkgs, stdenv, fetchFromGitHub
|
||||
, gcc7, pkg-config, makeWrapper
|
||||
, glib-networking
|
||||
, next-gtk-webkit
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, lispPackages
|
||||
, sbcl
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
# This is the wrapped webkitgtk platform port that we hardcode into the Lisp Core.
|
||||
# See https://github.com/atlas-engineer/next/tree/master/ports#next-platform-ports
|
||||
next-gtk-webkit = callPackage ./next-gtk-webkit.nix {};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "next";
|
||||
version = "1.3.4";
|
||||
pname = "next";
|
||||
version = "1.3.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "atlas-engineer";
|
||||
repo = "next";
|
||||
rev = version;
|
||||
sha256 = "00iqv4xarabl98gdl1rzqkc5v0vfljx1nawsxqsx9x3a9mnxmgxi";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "atlas-engineer";
|
||||
repo = "next";
|
||||
rev = version;
|
||||
sha256 = "00iqv4xarabl98gdl1rzqkc5v0vfljx1nawsxqsx9x3a9mnxmgxi";
|
||||
};
|
||||
|
||||
# Stripping destroys the generated SBCL image
|
||||
dontStrip = true;
|
||||
nativeBuildInputs = [
|
||||
sbcl
|
||||
] ++ (with lispPackages; [
|
||||
prove-asdf
|
||||
trivial-features
|
||||
]);
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace source/ports/gtk-webkit.lisp \
|
||||
--replace "next-gtk-webkit" "${next-gtk-webkit}/bin/next-gtk-webkit"
|
||||
'';
|
||||
buildInputs = with lispPackages; [
|
||||
alexandria
|
||||
bordeaux-threads
|
||||
cl-annot
|
||||
cl-ansi-text
|
||||
cl-css
|
||||
cl-hooks
|
||||
cl-json
|
||||
cl-markup
|
||||
cl-ppcre
|
||||
cl-ppcre-unicode
|
||||
cl-prevalence
|
||||
closer-mop
|
||||
dbus
|
||||
dexador
|
||||
ironclad
|
||||
local-time
|
||||
log4cl
|
||||
lparallel
|
||||
mk-string-metrics
|
||||
parenscript
|
||||
quri
|
||||
sqlite
|
||||
str
|
||||
swank
|
||||
trivia
|
||||
trivial-clipboard
|
||||
unix-opts
|
||||
];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ sbcl makeWrapper ] ++ (with lispPackages;
|
||||
[ prove-asdf trivial-features ]);
|
||||
prePatch = ''
|
||||
substituteInPlace source/ports/gtk-webkit.lisp \
|
||||
--replace "next-gtk-webkit" "${next-gtk-webkit}/bin/next-gtk-webkit"
|
||||
'';
|
||||
|
||||
buildInputs = with lispPackages; [
|
||||
alexandria
|
||||
bordeaux-threads
|
||||
cl-annot
|
||||
cl-ansi-text
|
||||
cl-css
|
||||
cl-hooks
|
||||
cl-json
|
||||
cl-markup
|
||||
cl-ppcre
|
||||
cl-ppcre-unicode
|
||||
cl-prevalence
|
||||
closer-mop
|
||||
dbus
|
||||
dexador
|
||||
ironclad
|
||||
local-time
|
||||
log4cl
|
||||
lparallel
|
||||
mk-string-metrics
|
||||
parenscript
|
||||
quri
|
||||
sqlite
|
||||
str
|
||||
swank
|
||||
trivia
|
||||
trivial-clipboard
|
||||
unix-opts
|
||||
];
|
||||
propagatedBuildInputs = [ next-gtk-webkit ];
|
||||
buildPhase = ''
|
||||
common-lisp.sh --eval "(require :asdf)" \
|
||||
--eval "(asdf:load-asd (truename \"next.asd\") :name \"next\")" \
|
||||
--eval '(asdf:make :next)' \
|
||||
--quit
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
common-lisp.sh --eval "(require :asdf)" \
|
||||
--eval "(asdf:load-asd (truename \"next.asd\") :name \"next\")" \
|
||||
--eval '(asdf:make :next)' \
|
||||
--quit
|
||||
'';
|
||||
installPhase = ''
|
||||
install -D -m0755 next $out/bin/next
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D -m0755 next $out/bin/next
|
||||
'';
|
||||
# Stripping destroys the generated SBCL image
|
||||
dontStrip = true;
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram $out/bin/next \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib-networking.out}/lib/gio/modules"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Infinitely extensible web-browser (with Lisp development files)";
|
||||
homepage = https://next.atlas.engineer;
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.lewo ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
meta = with stdenv.lib; {
|
||||
description = "Infinitely extensible web-browser (with Lisp development files using WebKitGTK platform port)";
|
||||
homepage = https://next.atlas.engineer;
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.lewo ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
# https://github.com/atlas-engineer/next/tree/master/ports/gtk-webkit
|
||||
|
||||
{ stdenv
|
||||
, pkg-config
|
||||
, next
|
||||
, webkitgtk
|
||||
, gtk3
|
||||
, glib
|
||||
, gsettings-desktop-schemas
|
||||
, glib-networking
|
||||
, gst_all_1
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "next-gtk-webkit";
|
||||
inherit (next) src version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
glib-networking
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
webkitgtk
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gstreamer
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"gtk-webkit"
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
installTargets = [
|
||||
"install-gtk-webkit"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Infinitely extensible web-browser (user interface only)";
|
||||
homepage = https://next.atlas.engineer;
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.lewo ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
@ -10,23 +10,23 @@ assert withMediaPlayback -> gst_all_1 != null;
|
||||
|
||||
let
|
||||
pdfjs = let
|
||||
version = "2.2.228";
|
||||
version = "2.3.200";
|
||||
in
|
||||
fetchzip rec {
|
||||
name = "pdfjs-${version}";
|
||||
url = "https://github.com/mozilla/pdf.js/releases/download/v${version}/${name}-dist.zip";
|
||||
sha256 = "0yik4vfnz46j844jfw1gq5cshgzry42kpy2d5rr7fbn9fjf98bw6";
|
||||
sha256 = "1fpxsw0hzahccyng08acvc7g0gk29j2x701p6w6fg1718mvcrm1q";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
in mkDerivationWith python3Packages.buildPythonApplication rec {
|
||||
pname = "qutebrowser";
|
||||
version = "1.8.1";
|
||||
version = "1.8.2";
|
||||
|
||||
# the release tarballs are different from the git checkout!
|
||||
src = fetchurl {
|
||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "0ckffbw2zlg0afz4rgyywzdprnqs74va5qj0xqlaqc14ziiypxnw";
|
||||
sha256 = "0walddppjb61k3dyq22cngkaw6alzn75k5npvnawla2l153irw5s";
|
||||
};
|
||||
|
||||
# Needs tox
|
||||
|
||||
@ -1,6 +1,23 @@
|
||||
{ stdenv, fetchFromGitHub, glib, gtk3, json-glib, sqlite, libsoup, gettext, vala
|
||||
, meson, ninja, pkgconfig, gnome3, gst_all_1, wrapGAppsHook, gobject-introspection
|
||||
, glib-networking, python3 }:
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, glib
|
||||
, gtk3
|
||||
, json-glib
|
||||
, sqlite
|
||||
, libsoup
|
||||
, gettext
|
||||
, gspell
|
||||
, vala
|
||||
, meson
|
||||
, ninja
|
||||
, pkgconfig
|
||||
, gnome3
|
||||
, gst_all_1
|
||||
, wrapGAppsHook
|
||||
, gobject-introspection
|
||||
, glib-networking
|
||||
, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.3.1";
|
||||
@ -14,13 +31,34 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja vala pkgconfig wrapGAppsHook python3
|
||||
meson
|
||||
ninja
|
||||
vala
|
||||
pkgconfig
|
||||
wrapGAppsHook
|
||||
python3
|
||||
gobject-introspection # for setup hook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib gtk3 json-glib sqlite libsoup gettext gnome3.dconf gnome3.gspell glib-networking
|
||||
] ++ (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-bad (gst-plugins-good.override { gtkSupport = true; }) gst-libav ]);
|
||||
glib
|
||||
gtk3
|
||||
json-glib
|
||||
sqlite
|
||||
libsoup
|
||||
gettext
|
||||
gnome3.dconf
|
||||
gspell
|
||||
glib-networking
|
||||
] ++ (with gst_all_1; [
|
||||
gstreamer
|
||||
gst-plugins-base
|
||||
gst-plugins-bad
|
||||
(gst-plugins-good.override {
|
||||
gtkSupport = true;
|
||||
})
|
||||
gst-libav
|
||||
]);
|
||||
|
||||
postPatch = ''
|
||||
chmod +x data/meson_post_install.py # patchShebangs requires executable file
|
||||
@ -30,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Native GTK Twitter client for the Linux desktop";
|
||||
longDescription = "Cawbird is a modern, easy and fun Twitter client. Fork of the discontinued Corebird.";
|
||||
homepage = https://ibboard.co.uk/cawbird/;
|
||||
homepage = "https://ibboard.co.uk/cawbird/";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ jonafato schmittlauch ];
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, qmake, qtwebengine, qttools, wrapGAppsHook }:
|
||||
{ stdenv, fetchFromGitHub, qmake, qtwebengine, qttools, wrapGAppsHook, wrapQtAppsHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rssguard";
|
||||
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs = [ qtwebengine qttools ];
|
||||
nativeBuildInputs = [ qmake wrapGAppsHook ];
|
||||
nativeBuildInputs = [ qmake wrapGAppsHook wrapQtAppsHook ];
|
||||
qmakeFlags = [ "CONFIG+=release" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
# This file has been generated by node2nix 1.7.0. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ./node-env.nix {
|
||||
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
|
||||
inherit nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
locpkgs =
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl fetchgit;
|
||||
inherit nodeEnv;
|
||||
globalBuildInputs = [
|
||||
locpkgs.node-pre-gyp
|
||||
];
|
||||
};
|
||||
in locpkgs
|
||||
@ -0,0 +1,27 @@
|
||||
{ stdenv, pkgs }:
|
||||
(import ./composition.nix {
|
||||
inherit pkgs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
})."package".override {
|
||||
postInstall = ''
|
||||
mkdir "$out/bin"
|
||||
echo '#!/bin/sh' >> "$out/bin/matrix-recorder"
|
||||
echo "'${pkgs.nodejs-12_x}/bin/node'" \
|
||||
"'$out/lib/node_modules/matrix-recorder/matrix-recorder.js'" \
|
||||
'"$@"' >> "$out/bin/matrix-recorder"
|
||||
echo '#!/bin/sh' >> "$out/bin/matrix-recorder-to-html"
|
||||
echo 'cd "$1"' >> "$out/bin/matrix-recorder-to-html"
|
||||
echo "test -d templates/ || ln -sfT '$out/lib/node_modules/matrix-recorder/templates' templates" >> "$out/bin/matrix-recorder-to-html"
|
||||
echo "'${pkgs.nodejs-12_x}/bin/node'" \
|
||||
"'$out/lib/node_modules/matrix-recorder/recorder-to-html.js'" \
|
||||
'.' >> "$out/bin/matrix-recorder-to-html"
|
||||
chmod a+x "$out/bin/matrix-recorder"
|
||||
chmod a+x "$out/bin/matrix-recorder-to-html"
|
||||
'';
|
||||
meta = {
|
||||
description = "Matrix message recorder";
|
||||
homepage = "https://gitlab.com/argit/matrix-recorder/";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = [ stdenv.lib.maintainers.raskin ];
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,540 @@
|
||||
# This file originates from node2nix
|
||||
|
||||
{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}:
|
||||
|
||||
let
|
||||
python = if nodejs ? python then nodejs.python else python2;
|
||||
|
||||
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
|
||||
tarWrapper = runCommand "tarWrapper" {} ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat > $out/bin/tar <<EOF
|
||||
#! ${stdenv.shell} -e
|
||||
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/tar
|
||||
'';
|
||||
|
||||
# Function that generates a TGZ file from a NPM project
|
||||
buildNodeSourceDist =
|
||||
{ name, version, src, ... }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "node-tarball-${name}-${version}";
|
||||
inherit src;
|
||||
buildInputs = [ nodejs ];
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts)
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/tarballs
|
||||
mv $tgzFile $out/tarballs
|
||||
mkdir -p $out/nix-support
|
||||
echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
};
|
||||
|
||||
includeDependencies = {dependencies}:
|
||||
stdenv.lib.optionalString (dependencies != [])
|
||||
(stdenv.lib.concatMapStrings (dependency:
|
||||
''
|
||||
# Bundle the dependencies of the package
|
||||
mkdir -p node_modules
|
||||
cd node_modules
|
||||
|
||||
# Only include dependencies if they don't exist. They may also be bundled in the package.
|
||||
if [ ! -e "${dependency.name}" ]
|
||||
then
|
||||
${composePackage dependency}
|
||||
fi
|
||||
|
||||
cd ..
|
||||
''
|
||||
) dependencies);
|
||||
|
||||
# Recursively composes the dependencies of a package
|
||||
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
|
||||
''
|
||||
DIR=$(pwd)
|
||||
cd $TMPDIR
|
||||
|
||||
unpackFile ${src}
|
||||
|
||||
# Make the base dir in which the target dependency resides first
|
||||
mkdir -p "$(dirname "$DIR/${packageName}")"
|
||||
|
||||
if [ -f "${src}" ]
|
||||
then
|
||||
# Figure out what directory has been unpacked
|
||||
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
|
||||
|
||||
# Restore write permissions to make building work
|
||||
find "$packageDir" -type d -exec chmod u+x {} \;
|
||||
chmod -R u+w "$packageDir"
|
||||
|
||||
# Move the extracted tarball into the output folder
|
||||
mv "$packageDir" "$DIR/${packageName}"
|
||||
elif [ -d "${src}" ]
|
||||
then
|
||||
# Get a stripped name (without hash) of the source directory.
|
||||
# On old nixpkgs it's already set internally.
|
||||
if [ -z "$strippedName" ]
|
||||
then
|
||||
strippedName="$(stripHash ${src})"
|
||||
fi
|
||||
|
||||
# Restore write permissions to make building work
|
||||
chmod -R u+w "$strippedName"
|
||||
|
||||
# Move the extracted directory into the output folder
|
||||
mv "$strippedName" "$DIR/${packageName}"
|
||||
fi
|
||||
|
||||
# Unset the stripped name to not confuse the next unpack step
|
||||
unset strippedName
|
||||
|
||||
# Include the dependencies of the package
|
||||
cd "$DIR/${packageName}"
|
||||
${includeDependencies { inherit dependencies; }}
|
||||
cd ..
|
||||
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
'';
|
||||
|
||||
pinpointDependencies = {dependencies, production}:
|
||||
let
|
||||
pinpointDependenciesFromPackageJSON = writeTextFile {
|
||||
name = "pinpointDependencies.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
function resolveDependencyVersion(location, name) {
|
||||
if(location == process.env['NIX_STORE']) {
|
||||
return null;
|
||||
} else {
|
||||
var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json");
|
||||
|
||||
if(fs.existsSync(dependencyPackageJSON)) {
|
||||
var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON));
|
||||
|
||||
if(dependencyPackageObj.name == name) {
|
||||
return dependencyPackageObj.version;
|
||||
}
|
||||
} else {
|
||||
return resolveDependencyVersion(path.resolve(location, ".."), name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function replaceDependencies(dependencies) {
|
||||
if(typeof dependencies == "object" && dependencies !== null) {
|
||||
for(var dependency in dependencies) {
|
||||
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
|
||||
|
||||
if(resolvedVersion === null) {
|
||||
process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n");
|
||||
} else {
|
||||
dependencies[dependency] = resolvedVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Read the package.json configuration */
|
||||
var packageObj = JSON.parse(fs.readFileSync('./package.json'));
|
||||
|
||||
/* Pinpoint all dependencies */
|
||||
replaceDependencies(packageObj.dependencies);
|
||||
if(process.argv[2] == "development") {
|
||||
replaceDependencies(packageObj.devDependencies);
|
||||
}
|
||||
replaceDependencies(packageObj.optionalDependencies);
|
||||
|
||||
/* Write the fixed package.json file */
|
||||
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
|
||||
'';
|
||||
};
|
||||
in
|
||||
''
|
||||
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
|
||||
|
||||
${stdenv.lib.optionalString (dependencies != [])
|
||||
''
|
||||
if [ -d node_modules ]
|
||||
then
|
||||
cd node_modules
|
||||
${stdenv.lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
|
||||
cd ..
|
||||
fi
|
||||
''}
|
||||
'';
|
||||
|
||||
# Recursively traverses all dependencies of a package and pinpoints all
|
||||
# dependencies in the package.json file to the versions that are actually
|
||||
# being used.
|
||||
|
||||
pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args:
|
||||
''
|
||||
if [ -d "${packageName}" ]
|
||||
then
|
||||
cd "${packageName}"
|
||||
${pinpointDependencies { inherit dependencies production; }}
|
||||
cd ..
|
||||
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
fi
|
||||
'';
|
||||
|
||||
# Extract the Node.js source code which is used to compile packages with
|
||||
# native bindings
|
||||
nodeSources = runCommand "node-sources" {} ''
|
||||
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
|
||||
mv node-* $out
|
||||
'';
|
||||
|
||||
# Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty)
|
||||
addIntegrityFieldsScript = writeTextFile {
|
||||
name = "addintegrityfields.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
function augmentDependencies(baseDir, dependencies) {
|
||||
for(var dependencyName in dependencies) {
|
||||
var dependency = dependencies[dependencyName];
|
||||
|
||||
// Open package.json and augment metadata fields
|
||||
var packageJSONDir = path.join(baseDir, "node_modules", dependencyName);
|
||||
var packageJSONPath = path.join(packageJSONDir, "package.json");
|
||||
|
||||
if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored
|
||||
console.log("Adding metadata fields to: "+packageJSONPath);
|
||||
var packageObj = JSON.parse(fs.readFileSync(packageJSONPath));
|
||||
|
||||
if(dependency.integrity) {
|
||||
packageObj["_integrity"] = dependency.integrity;
|
||||
} else {
|
||||
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
|
||||
}
|
||||
|
||||
if(dependency.resolved) {
|
||||
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
|
||||
} else {
|
||||
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
|
||||
}
|
||||
|
||||
if(dependency.from !== undefined) { // Adopt from property if one has been provided
|
||||
packageObj["_from"] = dependency.from;
|
||||
}
|
||||
|
||||
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
|
||||
}
|
||||
|
||||
// Augment transitive dependencies
|
||||
if(dependency.dependencies !== undefined) {
|
||||
augmentDependencies(packageJSONDir, dependency.dependencies);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(fs.existsSync("./package-lock.json")) {
|
||||
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
|
||||
|
||||
if(packageLock.lockfileVersion !== 1) {
|
||||
process.stderr.write("Sorry, I only understand lock file version 1!\n");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if(packageLock.dependencies !== undefined) {
|
||||
augmentDependencies(".", packageLock.dependencies);
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes
|
||||
reconstructPackageLock = writeTextFile {
|
||||
name = "addintegrityfields.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var packageObj = JSON.parse(fs.readFileSync("package.json"));
|
||||
|
||||
var lockObj = {
|
||||
name: packageObj.name,
|
||||
version: packageObj.version,
|
||||
lockfileVersion: 1,
|
||||
requires: true,
|
||||
dependencies: {}
|
||||
};
|
||||
|
||||
function augmentPackageJSON(filePath, dependencies) {
|
||||
var packageJSON = path.join(filePath, "package.json");
|
||||
if(fs.existsSync(packageJSON)) {
|
||||
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
|
||||
dependencies[packageObj.name] = {
|
||||
version: packageObj.version,
|
||||
integrity: "sha1-000000000000000000000000000=",
|
||||
dependencies: {}
|
||||
};
|
||||
processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies);
|
||||
}
|
||||
}
|
||||
|
||||
function processDependencies(dir, dependencies) {
|
||||
if(fs.existsSync(dir)) {
|
||||
var files = fs.readdirSync(dir);
|
||||
|
||||
files.forEach(function(entry) {
|
||||
var filePath = path.join(dir, entry);
|
||||
var stats = fs.statSync(filePath);
|
||||
|
||||
if(stats.isDirectory()) {
|
||||
if(entry.substr(0, 1) == "@") {
|
||||
// When we encounter a namespace folder, augment all packages belonging to the scope
|
||||
var pkgFiles = fs.readdirSync(filePath);
|
||||
|
||||
pkgFiles.forEach(function(entry) {
|
||||
if(stats.isDirectory()) {
|
||||
var pkgFilePath = path.join(filePath, entry);
|
||||
augmentPackageJSON(pkgFilePath, dependencies);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
augmentPackageJSON(filePath, dependencies);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
processDependencies("node_modules", lockObj.dependencies);
|
||||
|
||||
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
|
||||
'';
|
||||
};
|
||||
|
||||
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
|
||||
let
|
||||
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
|
||||
in
|
||||
''
|
||||
# Pinpoint the versions of all dependencies to the ones that are actually being used
|
||||
echo "pinpointing versions of dependencies..."
|
||||
source $pinpointDependenciesScriptPath
|
||||
|
||||
# Patch the shebangs of the bundled modules to prevent them from
|
||||
# calling executables outside the Nix store as much as possible
|
||||
patchShebangs .
|
||||
|
||||
# Deploy the Node.js package by running npm install. Since the
|
||||
# dependencies have been provided already by ourselves, it should not
|
||||
# attempt to install them again, which is good, because we want to make
|
||||
# it Nix's responsibility. If it needs to install any dependencies
|
||||
# anyway (e.g. because the dependency parameters are
|
||||
# incomplete/incorrect), it fails.
|
||||
#
|
||||
# The other responsibilities of NPM are kept -- version checks, build
|
||||
# steps, postprocessing etc.
|
||||
|
||||
export HOME=$TMPDIR
|
||||
cd "${packageName}"
|
||||
runHook preRebuild
|
||||
|
||||
${stdenv.lib.optionalString bypassCache ''
|
||||
${stdenv.lib.optionalString reconstructLock ''
|
||||
if [ -f package-lock.json ]
|
||||
then
|
||||
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
|
||||
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
|
||||
rm package-lock.json
|
||||
else
|
||||
echo "No package-lock.json file found, reconstructing..."
|
||||
fi
|
||||
|
||||
node ${reconstructPackageLock}
|
||||
''}
|
||||
|
||||
node ${addIntegrityFieldsScript}
|
||||
''}
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
|
||||
|
||||
if [ "$dontNpmInstall" != "1" ]
|
||||
then
|
||||
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
|
||||
rm -f npm-shrinkwrap.json
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
|
||||
fi
|
||||
'';
|
||||
|
||||
# Builds and composes an NPM package including all its dependencies
|
||||
buildNodePackage =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, preRebuild ? ""
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "node_${name}-${version}";
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ stdenv.lib.optional (stdenv.isLinux) utillinux
|
||||
++ stdenv.lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
|
||||
|
||||
compositionScript = composePackage args;
|
||||
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
|
||||
|
||||
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
|
||||
|
||||
installPhase = ''
|
||||
# Create and enter a root node_modules/ folder
|
||||
mkdir -p $out/lib/node_modules
|
||||
cd $out/lib/node_modules
|
||||
|
||||
# Compose the package and all its dependencies
|
||||
source $compositionScriptPath
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
|
||||
# Create symlink to the deployed executable folder, if applicable
|
||||
if [ -d "$out/lib/node_modules/.bin" ]
|
||||
then
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
fi
|
||||
|
||||
# Create symlinks to the deployed manual page folders, if applicable
|
||||
if [ -d "$out/lib/node_modules/${packageName}/man" ]
|
||||
then
|
||||
mkdir -p $out/share
|
||||
for dir in "$out/lib/node_modules/${packageName}/man/"*
|
||||
do
|
||||
mkdir -p $out/share/man/$(basename "$dir")
|
||||
for page in "$dir"/*
|
||||
do
|
||||
ln -s $page $out/share/man/$(basename "$dir")
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Run post install hook, if provided
|
||||
runHook postInstall
|
||||
'';
|
||||
} // extraArgs);
|
||||
|
||||
# Builds a development shell
|
||||
buildNodeShell =
|
||||
{ name
|
||||
, packageName
|
||||
, version
|
||||
, src
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
|
||||
|
||||
nodeDependencies = stdenv.mkDerivation ({
|
||||
name = "node-dependencies-${name}-${version}";
|
||||
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ stdenv.lib.optional (stdenv.isLinux) utillinux
|
||||
++ stdenv.lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall unpackPhase buildPhase;
|
||||
|
||||
includeScript = includeDependencies { inherit dependencies; };
|
||||
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
|
||||
|
||||
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/${packageName}
|
||||
cd $out/${packageName}
|
||||
|
||||
source $includeScriptPath
|
||||
|
||||
# Create fake package.json to make the npm commands work properly
|
||||
cp ${src}/package.json .
|
||||
chmod 644 package.json
|
||||
${stdenv.lib.optionalString bypassCache ''
|
||||
if [ -f ${src}/package-lock.json ]
|
||||
then
|
||||
cp ${src}/package-lock.json .
|
||||
fi
|
||||
''}
|
||||
|
||||
# Go to the parent folder to make sure that all packages are pinpointed
|
||||
cd ..
|
||||
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
|
||||
# Expose the executables that were installed
|
||||
cd ..
|
||||
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
|
||||
mv ${packageName} lib
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
'';
|
||||
} // extraArgs);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "node-shell-${name}-${version}";
|
||||
|
||||
buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/shell <<EOF
|
||||
#! ${stdenv.shell} -e
|
||||
$shellHook
|
||||
exec ${stdenv.shell}
|
||||
EOF
|
||||
chmod +x $out/bin/shell
|
||||
'';
|
||||
|
||||
# Provide the dependencies in a development shell through the NODE_PATH environment variable
|
||||
inherit nodeDependencies;
|
||||
shellHook = stdenv.lib.optionalString (dependencies != []) ''
|
||||
export NODE_PATH=$nodeDependencies/lib/node_modules
|
||||
export PATH="$nodeDependencies/bin:$PATH"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
buildNodeSourceDist = stdenv.lib.makeOverridable buildNodeSourceDist;
|
||||
buildNodePackage = stdenv.lib.makeOverridable buildNodePackage;
|
||||
buildNodeShell = stdenv.lib.makeOverridable buildNodeShell;
|
||||
}
|
||||
1426
pkgs/applications/networking/instant-messengers/matrix-recorder/node-packages.nix
generated
Normal file
1426
pkgs/applications/networking/instant-messengers/matrix-recorder/node-packages.nix
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "matrix-recorder",
|
||||
"version": "0.0.6",
|
||||
"description": "A recorder that can record Matrix rooms you are a member of (including E2E-encrypted rooms).",
|
||||
"author": "Hello Matrix <hello@hello-matrix.net>",
|
||||
"main": "matrix-recorder.js",
|
||||
"scripts": {
|
||||
"start": "node matrix-recorder.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/argit/matrix-recorder.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"marked": "^0.6.2",
|
||||
"matrix-js-sdk": "^0.7.13",
|
||||
"mime-types": "^2.1.14",
|
||||
"mustache": "^2.3.0",
|
||||
"node-fetch": "^1.6.3",
|
||||
"node-localstorage": "^1.3.0",
|
||||
"sqlite3": "^4.0.7",
|
||||
"olm": "https://packages.matrix.org/npm/olm/olm-2.3.0.tgz"
|
||||
},
|
||||
"license": "MIT",
|
||||
"optionalDependencies": {
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
{ stdenv, fetchgit
|
||||
, buildPythonApplication, buildPythonPackage
|
||||
, pygobject3, pytestrunner, requests, responses, pytest, python-olm
|
||||
, canonicaljson, olm
|
||||
}:
|
||||
let
|
||||
mainsrc = fetchgit {
|
||||
url = "https://github.com/saadnpq/matrixcli";
|
||||
rev = "61ebde173ca2f77185c261c2b7f6db297ca89863";
|
||||
sha256 = "0xcjjy2xwlcixr9fwgzcfjjkivqpk104h7dslfa7lz9jq9pzqzvq";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
sdk = buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "matrix-python-sdk-matrixcli";
|
||||
version = "0.0.2019-08-15";
|
||||
|
||||
src = "${mainsrc}/matrix-python-sdk/";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
requests responses olm python-olm canonicaljson
|
||||
pytestrunner pytest
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
|
||||
meta = {
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
description = "Fork of Matrix Python SDK";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "matrixcli";
|
||||
version = "0.0.2019-08-15";
|
||||
|
||||
src = mainsrc;
|
||||
|
||||
propagatedBuildInputs = [pygobject3 sdk];
|
||||
|
||||
meta = {
|
||||
description = "CLI client for Matrix";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
homepage = "https://github.com/saadnpq/matrixcli";
|
||||
};
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"main": "src/electron-main.js",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.5",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"dependencies": {
|
||||
|
||||
@ -6,12 +6,12 @@
|
||||
|
||||
let
|
||||
executableName = "riot-desktop";
|
||||
version = "1.5.0";
|
||||
version = "1.5.5";
|
||||
riot-web-src = fetchFromGitHub {
|
||||
owner = "vector-im";
|
||||
repo = "riot-web";
|
||||
rev = "v${version}";
|
||||
sha256 = "1xi5zg3602d7gdjxskpk2q3anpn2drrkxyirfvi9mzcfp2r05557";
|
||||
sha256 = "18xhqniwxp1sv49qcd9ah8nyy2n2yliy3wg613raxjl16qvvzxmc";
|
||||
};
|
||||
|
||||
in mkYarnPackage rec {
|
||||
|
||||
@ -5,11 +5,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "riot-web";
|
||||
version = "1.5.0";
|
||||
version = "1.5.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
||||
sha256 = "08r9473ncfy3wzqhnds729s77fq82jjgz8w3yya07aahcxzasi94";
|
||||
sha256 = "0isln25sl5jvvlqvh822w73a4i82x75g1ywf3p9n5m1a5sr9f537";
|
||||
};
|
||||
|
||||
installPhase = let
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user