Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-09-04 06:00:57 +00:00 committed by GitHub
commit da2be4f90e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 994 additions and 849 deletions

View File

@ -6,6 +6,8 @@
- Support for WiFi6 (IEEE 802.11ax) and WPA3-SAE-PK was enabled in the `hostapd` package, along with a significant rework of the hostapd module.
- LXD now supports virtual machine instances to complement the existing container support
## New Services {#sec-release-23.11-new-services}
- [MCHPRS](https://github.com/MCHPR/MCHPRS), a multithreaded Minecraft server built for redstone. Available as [services.mchprs](#opt-services.mchprs.enable).
@ -34,6 +36,8 @@
- [sitespeed-io](https://sitespeed.io), a tool that can generate metrics (timings, diagnostics) for websites. Available as [services.sitespeed-io](#opt-services.sitespeed-io.enable).
- [stalwart-mail](https://stalw.art), an all-in-one email server (SMTP, IMAP, JMAP). Available as [services.stalwart-mail](#opt-services.stalwart-mail.enable).
- [Jool](https://nicmx.github.io/Jool/en/index.html), an Open Source implementation of IPv4/IPv6 translation on Linux. Available as [networking.jool.enable](#opt-networking.jool.enable).
- [Apache Guacamole](https://guacamole.apache.org/), a cross-platform, clientless remote desktop gateway. Available as [services.guacamole-server](#opt-services.guacamole-server.enable) and [services.guacamole-client](#opt-services.guacamole-client.enable) services.

View File

@ -0,0 +1,20 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
imports =
[
# Include the default lxd configuration.
../../../modules/virtualisation/lxc-container.nix
# Include the container-specific autogenerated configuration.
./lxd.nix
];
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
system.stateVersion = "21.05"; # Did you read the comment?
}

View File

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }:
{ lib, pkgs, ... }:
{
imports = [
@ -16,8 +16,8 @@
system.activationScripts.config = ''
if [ ! -e /etc/nixos/configuration.nix ]; then
mkdir -p /etc/nixos
cat ${./lxd-image-inner.nix} > /etc/nixos/configuration.nix
sed 's|../../../modules/virtualisation/lxc-container.nix|<nixpkgs/nixos/modules/virtualisation/lxc-container.nix>|g' -i /etc/nixos/configuration.nix
cat ${./lxd-container-image-inner.nix} > /etc/nixos/configuration.nix
${lib.getExe pkgs.gnused} 's|../../../modules/virtualisation/lxc-container.nix|<nixpkgs/nixos/modules/virtualisation/lxc-container.nix>|g' -i /etc/nixos/configuration.nix
fi
'';

View File

@ -1,95 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the default lxd configuration.
../../../modules/virtualisation/lxc-container.nix
# Include the container-specific autogenerated configuration.
./lxd.nix
];
# networking.hostName = mkForce "nixos"; # Overwrite the hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
# users.users.alice = {
# isNormalUser = true;
# extraGroups = [ "wheel" ]; # Enable sudo for the user.
# };
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
# firefox
# ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
}

View File

@ -0,0 +1,20 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
imports =
[
# Include the default lxd configuration.
../../../modules/virtualisation/lxd-virtual-machine.nix
# Include the container-specific autogenerated configuration.
./lxd.nix
];
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
system.stateVersion = "23.05"; # Did you read the comment?
}

View File

@ -0,0 +1,27 @@
{ lib, pkgs, ... }:
{
imports = [
../../../modules/virtualisation/lxd-virtual-machine.nix
];
virtualisation.lxc.templates.nix = {
enable = true;
target = "/etc/nixos/lxd.nix";
template = ./nix.tpl;
when = ["create" "copy"];
};
# copy the config for nixos-rebuild
system.activationScripts.config = ''
if [ ! -e /etc/nixos/configuration.nix ]; then
mkdir -p /etc/nixos
cat ${./lxd-virtual-machine-image-inner.nix} > /etc/nixos/configuration.nix
${lib.getExe pkgs.gnused} 's|../../../modules/virtualisation/lxd-virtual-machine.nix|<nixpkgs/nixos/modules/virtualisation/lxd-virtual-machine.nix>|g' -i /etc/nixos/configuration.nix
fi
'';
# Network
networking.useDHCP = false;
networking.interfaces.enp5s0.useDHCP = true;
}

View File

@ -594,6 +594,7 @@
./services/mail/rss2email.nix
./services/mail/schleuder.nix
./services/mail/spamassassin.nix
./services/mail/stalwart-mail.nix
./services/mail/sympa.nix
./services/mail/zeyple.nix
./services/matrix/appservice-discord.nix

View File

@ -0,0 +1,106 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.stalwart-mail;
configFormat = pkgs.formats.toml { };
configFile = configFormat.generate "stalwart-mail.toml" cfg.settings;
dataDir = "/var/lib/stalwart-mail";
in {
options.services.stalwart-mail = {
enable = mkEnableOption (mdDoc "the Stalwart all-in-one email server");
package = mkPackageOptionMD pkgs "stalwart-mail" { };
settings = mkOption {
inherit (configFormat) type;
default = { };
description = mdDoc ''
Configuration options for the Stalwart email server.
See <https://stalw.art/docs/> for available options.
By default, the module is configured to store everything locally.
'';
};
};
config = mkIf cfg.enable {
# Default config: all local
services.stalwart-mail.settings = {
global.tracing.method = mkDefault "stdout";
global.tracing.level = mkDefault "info";
queue.path = mkDefault "${dataDir}/queue";
report.path = mkDefault "${dataDir}/reports";
store.db.path = mkDefault "${dataDir}/data/index.sqlite3";
store.blob.type = mkDefault "local";
store.blob.local.path = mkDefault "${dataDir}/data/blobs";
resolver.type = mkDefault "system";
};
systemd.services.stalwart-mail = {
wantedBy = [ "multi-user.target" ];
after = [ "local-fs.target" "network.target" ];
preStart = ''
mkdir -p ${dataDir}/{queue,reports,data/blobs}
'';
serviceConfig = {
ExecStart =
"${cfg.package}/bin/stalwart-mail --config=${configFile}";
# Base from template resources/systemd/stalwart-mail.service
Type = "simple";
LimitNOFILE = 65536;
KillMode = "process";
KillSignal = "SIGINT";
Restart = "on-failure";
RestartSec = 5;
StandardOutput = "syslog";
StandardError = "syslog";
SyslogIdentifier = "stalwart-mail";
DynamicUser = true;
User = "stalwart-mail";
StateDirectory = "stalwart-mail";
# Bind standard privileged ports
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
# Hardening
DeviceAllow = [ "" ];
LockPersonality = true;
MemoryDenyWriteExecute = true;
PrivateDevices = true;
PrivateUsers = false; # incompatible with CAP_NET_BIND_SERVICE
ProcSubset = "pid";
PrivateTmp = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
SystemCallFilter = [ "@system-service" "~@privileged" ];
UMask = "0077";
};
};
# Make admin commands available in the shell
environment.systemPackages = [ cfg.package ];
};
meta = {
maintainers = with maintainers; [ happysalada pacien ];
};
}

View File

@ -1,96 +1,16 @@
{ lib, config, pkgs, ... }:
with lib;
let
templateSubmodule = { ... }: {
options = {
enable = mkEnableOption (lib.mdDoc "this template");
target = mkOption {
description = lib.mdDoc "Path in the container";
type = types.path;
};
template = mkOption {
description = lib.mdDoc ".tpl file for rendering the target";
type = types.path;
};
when = mkOption {
description = lib.mdDoc "Events which trigger a rewrite (create, copy)";
type = types.listOf (types.str);
};
properties = mkOption {
description = lib.mdDoc "Additional properties";
type = types.attrs;
default = {};
};
};
};
toYAML = name: data: pkgs.writeText name (generators.toYAML {} data);
cfg = config.virtualisation.lxc;
templates = if cfg.templates != {} then let
list = mapAttrsToList (name: value: { inherit name; } // value)
(filterAttrs (name: value: value.enable) cfg.templates);
in
{
files = map (tpl: {
source = tpl.template;
target = "/templates/${tpl.name}.tpl";
}) list;
properties = listToAttrs (map (tpl: nameValuePair tpl.target {
when = tpl.when;
template = "${tpl.name}.tpl";
properties = tpl.properties;
}) list);
}
else { files = []; properties = {}; };
in
{
in {
imports = [
../installer/cd-dvd/channel.nix
../profiles/clone-config.nix
../profiles/minimal.nix
./lxc-instance-common.nix
];
options = {
virtualisation.lxc = {
templates = mkOption {
description = lib.mdDoc "Templates for LXD";
type = types.attrsOf (types.submodule (templateSubmodule));
default = {};
example = literalExpression ''
{
# create /etc/hostname on container creation. also requires networking.hostName = "" to be set
"hostname" = {
enable = true;
target = "/etc/hostname";
template = builtins.toFile "hostname.tpl" "{{ container.name }}";
when = [ "create" ];
};
# create /etc/nixos/hostname.nix with a configuration for keeping the hostname applied
"hostname-nix" = {
enable = true;
target = "/etc/nixos/hostname.nix";
template = builtins.toFile "hostname-nix.tpl" "{ ... }: { networking.hostName = \"{{ container.name }}\"; }";
# copy keeps the file updated when the container is changed
when = [ "create" "copy" ];
};
# copy allow the user to specify a custom configuration.nix
"configuration-nix" = {
enable = true;
target = "/etc/nixos/configuration.nix";
template = builtins.toFile "configuration-nix" "{{ config_get(\"user.user-data\", properties.default) }}";
when = [ "create" ];
};
};
'';
};
privilegedContainer = mkOption {
type = types.bool;
privilegedContainer = lib.mkOption {
type = lib.types.bool;
default = false;
description = lib.mdDoc ''
Whether this LXC container will be running as a privileged container or not. If set to `true` then
@ -116,24 +36,6 @@ in
${config.nix.package.out}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
'';
system.build.metadata = pkgs.callPackage ../../lib/make-system-tarball.nix {
contents = [
{
source = toYAML "metadata.yaml" {
architecture = builtins.elemAt (builtins.match "^([a-z0-9_]+).+" (toString pkgs.system)) 0;
creation_date = 1;
properties = {
description = "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} ${pkgs.system}";
os = "${config.system.nixos.distroId}";
release = "${config.system.nixos.codeName}";
};
templates = templates.properties;
};
target = "/metadata.yaml";
}
] ++ templates.files;
};
# TODO: build rootfs as squashfs for faster unpack
system.build.tarball = pkgs.callPackage ../../lib/make-system-tarball.nix {
extraArgs = "--owner=0";
@ -180,7 +82,7 @@ in
ProtectKernelTunables=no
NoNewPrivileges=no
LoadCredential=
'' + optionalString cfg.privilegedContainer ''
'' + lib.optionalString cfg.privilegedContainer ''
# Additional settings for privileged containers
ProtectHome=no
ProtectSystem=no
@ -193,28 +95,8 @@ in
})
];
# Allow the user to login as root without password.
users.users.root.initialHashedPassword = mkOverride 150 "";
system.activationScripts.installInitScript = mkForce ''
system.activationScripts.installInitScript = lib.mkForce ''
ln -fs $systemConfig/init /sbin/init
'';
# Some more help text.
services.getty.helpLine =
''
Log in as "root" with an empty password.
'';
# Containers should be light-weight, so start sshd on demand.
services.openssh.enable = mkDefault true;
services.openssh.startWhenNeeded = mkDefault true;
# As this is intended as a standalone image, undo some of the minimal profile stuff
environment.noXlibs = false;
documentation.enable = true;
documentation.nixos.enable = true;
services.logrotate.enable = true;
};
}

View File

@ -0,0 +1,104 @@
{ lib, config, pkgs, ... }:
let
templateSubmodule = {...}: {
options = {
enable = lib.mkEnableOption "this template";
target = lib.mkOption {
description = "Path in the container";
type = lib.types.path;
};
template = lib.mkOption {
description = ".tpl file for rendering the target";
type = lib.types.path;
};
when = lib.mkOption {
description = "Events which trigger a rewrite (create, copy)";
type = lib.types.listOf (lib.types.str);
};
properties = lib.mkOption {
description = "Additional properties";
type = lib.types.attrs;
default = {};
};
};
};
toYAML = name: data: pkgs.writeText name (lib.generators.toYAML {} data);
cfg = config.virtualisation.lxc;
templates = if cfg.templates != {} then let
list = lib.mapAttrsToList (name: value: { inherit name; } // value)
(lib.filterAttrs (name: value: value.enable) cfg.templates);
in
{
files = map (tpl: {
source = tpl.template;
target = "/templates/${tpl.name}.tpl";
}) list;
properties = lib.listToAttrs (map (tpl: lib.nameValuePair tpl.target {
when = tpl.when;
template = "${tpl.name}.tpl";
properties = tpl.properties;
}) list);
}
else { files = []; properties = {}; };
in {
options = {
virtualisation.lxc = {
templates = lib.mkOption {
description = "Templates for LXD";
type = lib.types.attrsOf (lib.types.submodule templateSubmodule);
default = {};
example = lib.literalExpression ''
{
# create /etc/hostname on container creation
"hostname" = {
enable = true;
target = "/etc/hostname";
template = builtins.writeFile "hostname.tpl" "{{ container.name }}";
when = [ "create" ];
};
# create /etc/nixos/hostname.nix with a configuration for keeping the hostname applied
"hostname-nix" = {
enable = true;
target = "/etc/nixos/hostname.nix";
template = builtins.writeFile "hostname-nix.tpl" "{ ... }: { networking.hostName = "{{ container.name }}"; }";
# copy keeps the file updated when the container is changed
when = [ "create" "copy" ];
};
# copy allow the user to specify a custom configuration.nix
"configuration-nix" = {
enable = true;
target = "/etc/nixos/configuration.nix";
template = builtins.writeFile "configuration-nix" "{{ config_get(\"user.user-data\", properties.default) }}";
when = [ "create" ];
};
};
'';
};
};
};
config = {
system.build.metadata = pkgs.callPackage ../../lib/make-system-tarball.nix {
contents = [
{
source = toYAML "metadata.yaml" {
architecture = builtins.elemAt (builtins.match "^([a-z0-9_]+).+" (toString pkgs.system)) 0;
creation_date = 1;
properties = {
description = "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} ${pkgs.system}";
os = "${config.system.nixos.distroId}";
release = "${config.system.nixos.codeName}";
};
templates = templates.properties;
};
target = "/metadata.yaml";
}
] ++ templates.files;
};
};
}

View File

@ -0,0 +1,30 @@
{lib, ...}:
{
imports = [
./lxc-image-metadata.nix
../installer/cd-dvd/channel.nix
../profiles/clone-config.nix
../profiles/minimal.nix
];
# Allow the user to login as root without password.
users.users.root.initialHashedPassword = lib.mkOverride 150 "";
# Some more help text.
services.getty.helpLine = ''
Log in as "root" with an empty password.
'';
# Containers should be light-weight, so start sshd on demand.
services.openssh.enable = lib.mkDefault true;
services.openssh.startWhenNeeded = lib.mkDefault true;
# As this is intended as a standalone image, undo some of the minimal profile stuff
environment.noXlibs = false;
documentation.enable = true;
documentation.nixos.enable = true;
services.logrotate.enable = true;
}

View File

@ -0,0 +1,46 @@
{ config, lib, pkgs, ... }:
let
serialDevice =
if pkgs.stdenv.hostPlatform.isx86
then "ttyS0"
else "ttyAMA0"; # aarch64
in {
imports = [
./lxc-instance-common.nix
../profiles/qemu-guest.nix
];
config = {
system.build.qemuImage = import ../../lib/make-disk-image.nix {
inherit pkgs lib config;
partitionTableType = "efi";
format = "qcow2-compressed";
copyChannel = true;
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
};
boot.growPartition = true;
boot.loader.systemd-boot.enable = true;
# image building needs to know what device to install bootloader on
boot.loader.grub.device = "/dev/vda";
boot.kernelParams = ["console=tty1" "console=${serialDevice}"];
virtualisation.lxd.agent.enable = lib.mkDefault true;
};
}

View File

@ -196,7 +196,7 @@ in {
"kernel.keys.maxkeys" = 2000;
};
boot.kernelModules = [ "veth" "xt_comment" "xt_CHECKSUM" "xt_MASQUERADE" ]
boot.kernelModules = [ "veth" "xt_comment" "xt_CHECKSUM" "xt_MASQUERADE" "vhost_vsock" ]
++ optionals (!config.networking.nftables.enable) [ "iptable_mangle" ];
};
}

View File

@ -313,7 +313,7 @@ in rec {
);
# An image that can be imported into lxd and used for container creation
lxdImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
lxdContainerImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
with import ./.. { inherit system; };
@ -322,14 +322,14 @@ in rec {
modules =
[ configuration
versionModule
./maintainers/scripts/lxd/lxd-image.nix
./maintainers/scripts/lxd/lxd-container-image.nix
];
}).config.system.build.tarball)
);
# Metadata for the lxd image
lxdMeta = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
lxdContainerMeta = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
with import ./.. { inherit system; };
@ -338,7 +338,39 @@ in rec {
modules =
[ configuration
versionModule
./maintainers/scripts/lxd/lxd-image.nix
./maintainers/scripts/lxd/lxd-container-image.nix
];
}).config.system.build.metadata)
);
# An image that can be imported into lxd and used for container creation
lxdVirtualMachineImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
with import ./.. { inherit system; };
hydraJob ((import lib/eval-config.nix {
inherit system;
modules =
[ configuration
versionModule
./maintainers/scripts/lxd/lxd-virtual-machine-image.nix
];
}).config.system.build.qemuImage)
);
# Metadata for the lxd image
lxdVirtualMachineImageMeta = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
with import ./.. { inherit system; };
hydraJob ((import lib/eval-config.nix {
inherit system;
modules =
[ configuration
versionModule
./maintainers/scripts/lxd/lxd-virtual-machine-image.nix
];
}).config.system.build.metadata)

View File

@ -728,6 +728,7 @@ in {
sslh = handleTest ./sslh.nix {};
sssd = handleTestOn ["x86_64-linux"] ./sssd.nix {};
sssd-ldap = handleTestOn ["x86_64-linux"] ./sssd-ldap.nix {};
stalwart-mail = handleTest ./stalwart-mail.nix {};
stargazer = runTest ./web-servers/stargazer.nix;
starship = handleTest ./starship.nix {};
static-web-server = handleTest ./web-servers/static-web-server.nix {};

View File

@ -1,7 +1,7 @@
import ../make-test-python.nix ({ pkgs, lib, ... } :
let
lxd-image = import ../../release.nix {
releases = import ../../release.nix {
configuration = {
# Building documentation makes the test unnecessarily take a longer time:
documentation.enable = lib.mkForce false;
@ -11,14 +11,14 @@ let
};
};
lxd-image-metadata = lxd-image.lxdMeta.${pkgs.stdenv.hostPlatform.system};
lxd-image-rootfs = lxd-image.lxdImage.${pkgs.stdenv.hostPlatform.system};
lxd-image-metadata = releases.lxdContainerMeta.${pkgs.stdenv.hostPlatform.system};
lxd-image-rootfs = releases.lxdContainerImage.${pkgs.stdenv.hostPlatform.system};
in {
name = "lxd";
name = "lxd-container";
meta = with pkgs.lib.maintainers; {
maintainers = [ patryk27 ];
maintainers = [ patryk27 adamcstephens ];
};
nodes.machine = { lib, ... }: {

View File

@ -6,4 +6,5 @@
container = import ./container.nix {inherit system pkgs;};
nftables = import ./nftables.nix {inherit system pkgs;};
ui = import ./ui.nix {inherit system pkgs;};
virtual-machine = import ./virtual-machine.nix { inherit system pkgs; };
}

View File

@ -0,0 +1,64 @@
import ../make-test-python.nix ({ pkgs, lib, ... }:
let
releases = import ../../release.nix {
configuration = {
# Building documentation makes the test unnecessarily take a longer time:
documentation.enable = lib.mkForce false;
# Our tests require `grep` & friends:
environment.systemPackages = with pkgs; [busybox];
};
};
lxd-image-metadata = releases.lxdVirtualMachineImageMeta.${pkgs.stdenv.hostPlatform.system};
lxd-image-disk = releases.lxdVirtualMachineImage.${pkgs.stdenv.hostPlatform.system};
instance-name = "instance1";
in {
name = "lxd-virtual-machine";
meta = with pkgs.lib.maintainers; {
maintainers = [adamcstephens];
};
nodes.machine = {lib, ...}: {
virtualisation = {
diskSize = 4096;
cores = 2;
# Ensure we have enough memory for the nested virtual machine
memorySize = 1024;
lxc.lxcfs.enable = true;
lxd.enable = true;
};
};
testScript = ''
def instance_is_up(_) -> bool:
status, _ = machine.execute("lxc exec ${instance-name} --disable-stdin --force-interactive /run/current-system/sw/bin/true")
return status == 0
machine.wait_for_unit("sockets.target")
machine.wait_for_unit("lxd.service")
machine.wait_for_file("/var/lib/lxd/unix.socket")
# Wait for lxd to settle
machine.succeed("lxd waitready")
machine.succeed("lxd init --minimal")
with subtest("virtual-machine image can be imported"):
machine.succeed("lxc image import ${lxd-image-metadata}/*/*.tar.xz ${lxd-image-disk}/nixos.qcow2 --alias nixos")
with subtest("virtual-machine can be launched and become available"):
machine.succeed("lxc launch nixos ${instance-name} --vm --config limits.memory=512MB --config security.secureboot=false")
with machine.nested("Waiting for instance to start and be usable"):
retry(instance_is_up)
with subtest("lxd-agent is started"):
machine.succeed("lxc exec ${instance-name} systemctl is-active lxd-agent")
'';
})

View File

@ -0,0 +1,117 @@
# Rudimentary test checking that the Stalwart email server can:
# - receive some message through SMTP submission, then
# - serve this message through IMAP.
let
certs = import ./common/acme/server/snakeoil-certs.nix;
domain = certs.domain;
in import ./make-test-python.nix ({ lib, ... }: {
name = "stalwart-mail";
nodes.main = { pkgs, ... }: {
security.pki.certificateFiles = [ certs.ca.cert ];
services.stalwart-mail = {
enable = true;
settings = {
server.hostname = domain;
certificate."snakeoil" = {
cert = "file://${certs.${domain}.cert}";
private-key = "file://${certs.${domain}.key}";
};
server.tls = {
certificate = "snakeoil";
enable = true;
implicit = false;
};
server.listener = {
"smtp-submission" = {
bind = [ "[::]:587" ];
protocol = "smtp";
};
"imap" = {
bind = [ "[::]:143" ];
protocol = "imap";
};
};
session.auth.mechanisms = [ "PLAIN" ];
session.auth.directory = "in-memory";
jmap.directory = "in-memory"; # shared with imap
session.rcpt.directory = "in-memory";
queue.outbound.next-hop = [ "local" ];
directory."in-memory" = {
type = "memory";
users = [
{
name = "alice";
secret = "foobar";
email = [ "alice@${domain}" ];
}
{
name = "bob";
secret = "foobar";
email = [ "bob@${domain}" ];
}
];
};
};
};
environment.systemPackages = [
(pkgs.writers.writePython3Bin "test-smtp-submission" { } ''
from smtplib import SMTP
with SMTP('localhost', 587) as smtp:
smtp.starttls()
smtp.login('alice', 'foobar')
smtp.sendmail(
'alice@${domain}',
'bob@${domain}',
"""
From: alice@${domain}
To: bob@${domain}
Subject: Some test message
This is a test message.
""".strip()
)
'')
(pkgs.writers.writePython3Bin "test-imap-read" { } ''
from imaplib import IMAP4
with IMAP4('localhost') as imap:
imap.starttls()
imap.login('bob', 'foobar')
imap.select('"All Mail"')
status, [ref] = imap.search(None, 'ALL')
assert status == 'OK'
[msgId] = ref.split()
status, msg = imap.fetch(msgId, 'BODY[TEXT]')
assert status == 'OK'
assert msg[0][1].strip() == b'This is a test message.'
'')
];
};
testScript = /* python */ ''
main.wait_for_unit("stalwart-mail.service")
main.wait_for_open_port(587)
main.wait_for_open_port(143)
main.succeed("test-smtp-submission")
main.succeed("test-imap-read")
'';
meta = {
maintainers = with lib.maintainers; [ happysalada pacien ];
};
})

View File

@ -0,0 +1,29 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
}:
buildNpmPackage rec {
pname = "alloy";
version = "2.0.2";
src = fetchFromGitHub {
owner = "tidev";
repo = "alloy";
rev = version;
hash = "sha256-s1hAbbUy7k/GacBIk8OMD48/1IUcRcpV3LnrCCZim1A=";
};
npmDepsHash = "sha256-YNyFrO6+oFluyk3TlUf/0vdHrgTJ3l5DN801wnpBa6s=";
dontNpmBuild = true;
meta = {
changelog = "https://github.com/tidev/alloy/blob/${src.rev}/CHANGELOG.md";
description = "MVC framework for the Appcelerator Titanium SDK";
homepage = "https://github.com/tidev/alloy";
license = lib.licenses.asl20;
mainProgram = "alloy";
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -0,0 +1,29 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
}:
buildNpmPackage rec {
pname = "titanium";
version = "6.1.1";
src = fetchFromGitHub {
owner = "tidev";
repo = "titanium-cli";
rev = "v${version}";
hash = "sha256-eJHf4vbapCaIVk0Xc0sml14jkFCsS/Gv7ftaFakB5rI=";
};
npmDepsHash = "sha256-60r+zqUCSDvQgrjg5SGfZiv87AoGx1XcnbW1ki1sbCM=";
dontNpmBuild = true;
meta = {
changelog = "https://github.com/tidev/titanium-cli/blob/${src.rev}/CHANGELOG.md";
description = "Command Line Tool for creating and building Titanium Mobile applications and modules";
homepage = "https://github.com/tidev/titanium-cli";
license = lib.licenses.asl20;
mainProgram = "titanium";
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -12,8 +12,8 @@ rec {
};
buildApp = import ./build-app.nix {
inherit (pkgs) stdenv lib python which file jdk nodejs;
inherit (pkgs.nodePackages) alloy titanium;
inherit (pkgs) stdenv lib python which file jdk nodejs titanium;
alloy = pkgs.titanium-alloy;
inherit (androidenv) composeAndroidPackages;
inherit (xcodeenv) composeXcodeWrapper;
inherit titaniumsdk;

View File

@ -46,6 +46,7 @@ mapAliases {
"@maizzle/cli" = pkgs.maizzle; # added 2023-08-17
"@medable/mdctl-cli" = throw "@medable/mdctl-cli was removed because it was broken"; # added 2023-08-21
"@nestjs/cli" = pkgs.nest-cli; # Added 2023-05-06
alloy = pkgs.titanium-alloy; # added 2023-08-17
antennas = pkgs.antennas; # added 2023-07-30
inherit (pkgs) asar; # added 2023-08-26
balanceofsatoshis = pkgs.balanceofsatoshis; # added 2023-07-31
@ -102,6 +103,7 @@ mapAliases {
ssb-server = throw "ssb-server was removed because it was broken"; # added 2023-08-21
stf = throw "stf was removed because it was broken"; # added 2023-08-21
thelounge = pkgs.thelounge; # Added 2023-05-22
inherit (pkgs) titanium; # added 2023-08-17
triton = pkgs.triton; # Added 2023-05-06
typescript = pkgs.typescript; # Added 2023-06-21
inherit (pkgs) ungit; # added 2023-08-20

View File

@ -24,7 +24,6 @@
, {"@webassemblyjs/wasm-text-gen": "1.11.1"}
, {"@webassemblyjs/wast-refmt": "1.11.1"}
, "alex"
, "alloy"
, "audiosprite"
, "autoprefixer"
, "auto-changelog"
@ -308,7 +307,6 @@
, "thelounge-theme-zenburn-sourcecodepro"
, "three"
, "tiddlywiki"
, "titanium"
, "tsun"
, "ts-node"
, "ttf2eot"

View File

@ -75380,158 +75380,6 @@ in
bypassCache = true;
reconstructLock = true;
};
alloy = nodeEnv.buildNodePackage {
name = "alloy";
packageName = "alloy";
version = "2.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/alloy/-/alloy-2.0.2.tgz";
sha512 = "FhZLGIKAewqzsJ50H44NU/PTAW2vt00M8dMkO6BFgCH7Z925+8bfcQ9PCBAufynDQXrAR6h7Kd9Im4YXyizbIA==";
};
dependencies = [
sources."@ampproject/remapping-2.2.1"
sources."@babel/code-frame-7.22.10"
sources."@babel/compat-data-7.22.9"
sources."@babel/core-7.22.10"
sources."@babel/generator-7.22.10"
sources."@babel/helper-compilation-targets-7.22.10"
sources."@babel/helper-environment-visitor-7.22.5"
sources."@babel/helper-function-name-7.22.5"
sources."@babel/helper-hoist-variables-7.22.5"
sources."@babel/helper-module-imports-7.22.5"
sources."@babel/helper-module-transforms-7.22.9"
sources."@babel/helper-simple-access-7.22.5"
sources."@babel/helper-split-export-declaration-7.22.6"
sources."@babel/helper-string-parser-7.22.5"
sources."@babel/helper-validator-identifier-7.22.5"
sources."@babel/helper-validator-option-7.22.5"
sources."@babel/helpers-7.22.10"
sources."@babel/highlight-7.22.10"
sources."@babel/parser-7.22.10"
sources."@babel/template-7.22.5"
sources."@babel/traverse-7.22.10"
sources."@babel/types-7.22.10"
sources."@jridgewell/gen-mapping-0.3.3"
sources."@jridgewell/resolve-uri-3.1.1"
sources."@jridgewell/set-array-1.1.2"
sources."@jridgewell/sourcemap-codec-1.4.15"
sources."@jridgewell/trace-mapping-0.3.19"
sources."@xmldom/xmldom-0.8.10"
sources."JSV-4.0.2"
sources."ansi-styles-3.2.1"
sources."array-unique-0.3.2"
sources."async-3.2.4"
sources."balanced-match-1.0.2"
sources."brace-expansion-2.0.1"
sources."browserslist-4.21.10"
sources."caniuse-lite-1.0.30001522"
sources."chalk-2.4.2"
sources."color-convert-1.9.3"
sources."color-name-1.1.3"
sources."colors-1.4.0"
sources."commander-8.3.0"
sources."concat-map-0.0.1"
sources."convert-source-map-1.9.0"
sources."debug-4.3.4"
sources."ejs-3.1.6"
sources."electron-to-chromium-1.4.499"
sources."ensure-posix-path-1.1.1"
sources."escalade-3.1.1"
sources."escape-string-regexp-1.0.5"
(sources."filelist-1.0.4" // {
dependencies = [
sources."minimatch-5.1.6"
];
})
sources."fs-extra-5.0.0"
sources."function-bind-1.1.1"
sources."gensync-1.0.0-beta.2"
(sources."global-modules-0.2.3" // {
dependencies = [
sources."is-windows-0.2.0"
];
})
sources."global-paths-1.0.0"
(sources."global-prefix-0.1.5" // {
dependencies = [
sources."is-windows-0.2.0"
];
})
sources."globals-11.12.0"
sources."graceful-fs-4.2.11"
sources."has-1.0.3"
sources."has-color-0.1.7"
sources."has-flag-3.0.0"
sources."homedir-polyfill-1.0.3"
sources."ini-1.3.8"
sources."is-3.3.0"
sources."is-core-module-2.13.0"
sources."is-windows-1.0.2"
sources."isexe-2.0.0"
(sources."jake-10.8.7" // {
dependencies = [
sources."ansi-styles-4.3.0"
sources."chalk-4.1.2"
sources."color-convert-2.0.1"
sources."color-name-1.1.4"
sources."has-flag-4.0.0"
sources."supports-color-7.2.0"
];
})
sources."js-tokens-4.0.0"
sources."jsesc-2.5.2"
sources."json5-2.2.3"
sources."jsonfile-4.0.0"
sources."jsonlint-1.6.3"
sources."lodash-4.17.21"
sources."lru-cache-5.1.1"
sources."matcher-collection-1.1.2"
(sources."minimatch-3.1.2" // {
dependencies = [
sources."brace-expansion-1.1.11"
];
})
sources."moment-2.29.1"
sources."ms-2.1.2"
sources."node-releases-2.0.13"
sources."node.extend-2.0.2"
(sources."nomnom-1.8.1" // {
dependencies = [
sources."ansi-styles-1.0.0"
sources."chalk-0.4.0"
];
})
sources."parse-passwd-1.0.0"
sources."path-parse-1.0.7"
sources."picocolors-1.0.0"
sources."pkginfo-0.4.1"
sources."resolve-1.22.4"
sources."sax-0.5.8"
sources."semver-6.3.1"
sources."source-map-0.7.4"
sources."strip-ansi-0.1.1"
sources."supports-color-5.5.0"
sources."supports-preserve-symlinks-flag-1.0.0"
sources."to-fast-properties-2.0.0"
sources."underscore-1.6.0"
sources."universalify-0.1.2"
sources."update-browserslist-db-1.0.11"
sources."walk-sync-0.3.4"
sources."which-1.3.1"
sources."xml2js-0.2.8"
sources."xml2tss-0.0.5"
sources."yallist-3.1.1"
];
buildInputs = globalBuildInputs;
meta = {
description = "TiDev Titanium MVC Framework";
homepage = "https://github.com/tidev/alloy#readme";
license = "Apache-2.0";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
audiosprite = nodeEnv.buildNodePackage {
name = "audiosprite";
packageName = "audiosprite";
@ -114185,160 +114033,6 @@ in
bypassCache = true;
reconstructLock = true;
};
titanium = nodeEnv.buildNodePackage {
name = "titanium";
packageName = "titanium";
version = "6.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/titanium/-/titanium-6.1.1.tgz";
sha512 = "jz1pZ1jDB72H63SaHYUYLbiBBVmaGPIprSKQr2rbuoNPNasp9EerMouqSUiVdnvaKElpnW/sWiMmPs4XINmo0w==";
};
dependencies = [
sources."@sindresorhus/is-4.6.0"
sources."@szmarczak/http-timer-4.0.6"
sources."@types/cacheable-request-6.0.3"
sources."@types/http-cache-semantics-4.0.1"
sources."@types/keyv-3.1.4"
sources."@types/node-20.5.3"
sources."@types/responselike-1.0.0"
sources."@xmldom/xmldom-0.8.10"
sources."ajv-6.12.6"
sources."asn1-0.2.6"
sources."assert-plus-1.0.0"
sources."async-3.2.4"
sources."asynckit-0.4.0"
sources."at-least-node-1.0.0"
sources."aws-sign2-0.7.0"
sources."aws4-1.12.0"
sources."balanced-match-1.0.2"
sources."bcrypt-pbkdf-1.0.2"
sources."brace-expansion-1.1.11"
sources."buffer-crc32-0.2.13"
sources."cacheable-lookup-5.0.4"
sources."cacheable-request-7.0.4"
sources."caseless-0.12.0"
sources."clone-response-1.0.3"
sources."colors-1.4.0"
sources."combined-stream-1.0.8"
sources."concat-map-0.0.1"
sources."core-util-is-1.0.2"
sources."cycle-1.0.3"
sources."dashdash-1.14.1"
(sources."decompress-response-6.0.0" // {
dependencies = [
sources."mimic-response-3.1.0"
];
})
sources."defer-to-connect-2.0.1"
sources."delayed-stream-1.0.0"
sources."ecc-jsbn-0.1.2"
sources."end-of-stream-1.4.4"
sources."extend-3.0.2"
sources."extsprintf-1.3.0"
sources."eyes-0.1.8"
sources."fast-deep-equal-3.1.3"
sources."fast-json-stable-stringify-2.1.0"
sources."fd-slicer-1.1.0"
(sources."fields-0.1.24" // {
dependencies = [
sources."colors-0.6.2"
];
})
sources."forever-agent-0.6.1"
sources."form-data-2.3.3"
sources."fs-extra-9.1.0"
sources."fs.realpath-1.0.0"
sources."get-stream-5.2.0"
sources."getpass-0.1.7"
sources."glob-7.2.3"
sources."got-11.8.6"
sources."graceful-fs-4.2.11"
sources."har-schema-2.0.0"
sources."har-validator-5.1.5"
sources."http-cache-semantics-4.1.1"
sources."http-signature-1.2.0"
sources."http2-wrapper-1.0.3"
sources."humanize-0.0.9"
sources."inflight-1.0.6"
sources."inherits-2.0.4"
sources."is-typedarray-1.0.0"
sources."isstream-0.1.2"
sources."jsbn-0.1.1"
sources."json-buffer-3.0.1"
sources."json-schema-0.4.0"
sources."json-schema-traverse-0.4.1"
sources."json-stringify-safe-5.0.1"
sources."jsonfile-6.1.0"
sources."jsprim-1.4.2"
sources."keypress-0.2.1"
sources."keyv-4.5.3"
sources."lowercase-keys-2.0.0"
sources."lru-cache-6.0.0"
sources."mime-db-1.52.0"
sources."mime-types-2.1.35"
sources."mimic-response-1.0.1"
sources."minimatch-3.1.2"
sources."minimist-1.2.8"
sources."mkdirp-0.5.6"
sources."node-appc-1.1.6"
sources."normalize-url-6.1.0"
sources."oauth-sign-0.9.0"
sources."once-1.4.0"
sources."p-cancelable-2.1.1"
sources."path-is-absolute-1.0.1"
sources."pend-1.2.0"
sources."performance-now-2.1.0"
sources."psl-1.9.0"
sources."pump-3.0.0"
sources."punycode-2.3.0"
sources."qs-6.5.3"
sources."quick-lru-5.1.1"
(sources."request-2.88.2" // {
dependencies = [
sources."uuid-3.4.0"
];
})
sources."resolve-alpn-1.2.1"
sources."responselike-2.0.1"
sources."rimraf-2.6.3"
sources."safe-buffer-5.2.1"
sources."safer-buffer-2.1.2"
sources."semver-7.3.8"
sources."sprintf-0.1.5"
sources."sshpk-1.17.0"
sources."stack-trace-0.0.10"
sources."temp-0.9.4"
(sources."tmp-0.2.1" // {
dependencies = [
sources."rimraf-3.0.2"
];
})
sources."tough-cookie-2.5.0"
sources."tunnel-agent-0.6.0"
sources."tweetnacl-0.14.5"
sources."universalify-2.0.0"
sources."uri-js-4.4.1"
sources."uuid-9.0.0"
sources."verror-1.10.0"
(sources."winston-2.4.6" // {
dependencies = [
sources."colors-1.0.3"
];
})
sources."wrappy-1.0.2"
sources."yallist-4.0.0"
sources."yauzl-2.10.0"
];
buildInputs = globalBuildInputs;
meta = {
description = "TiDev Titanium Command line";
homepage = "https://github.com/tidev/titanium#readme";
license = "Apache-2.0";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
tsun = nodeEnv.buildNodePackage {
name = "tsun";
packageName = "tsun";

View File

@ -2,14 +2,14 @@
let
pname = "psysh";
version = "0.11.18";
version = "0.11.20";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";
sha256 = "sha256-roonJBpMXOAsa/IyPn3kR1VSHH/kUJFuUU6myVI7Y+A=";
sha256 = "sha256-1d07/qE6qamsmBkkuuxIY9YgYC7wgP21QDc5Iu9Ecv4=";
};
dontUnpack = true;

View File

@ -11,12 +11,12 @@
buildPythonPackage rec {
pname = "chat-downloader";
version = "0.2.7";
version = "0.2.8";
format = "setuptools";
src = fetchPypi {
inherit version pname;
hash = "sha256-FKdeuw4MEy1ZNeOCYllYxxFBUj2/fy0r/pxJv8FpOso=";
hash = "sha256-WBasBhefgRkOdMdz2K/agvS+cY6m3/33wiu+Jl4d1Cg=";
};
propagatedBuildInputs = [

View File

@ -23,7 +23,7 @@
buildPythonPackage rec {
pname = "openai";
version = "0.27.9";
version = "0.28.0";
format = "setuptools";
disabled = pythonOlder "3.7.1";
@ -32,7 +32,7 @@ buildPythonPackage rec {
owner = "openai";
repo = "openai-python";
rev = "refs/tags/v${version}";
hash = "sha256-vp85M9VZvbY4saG88WcR3Qw8z+A9nU1Oi3sf9yitsV4=";
hash = "sha256-NDIHOX0W1nERvOWxnGBD42v+EjrND/9u90SS7KJzOW8=";
};
propagatedBuildInputs = [

View File

@ -38,7 +38,7 @@ let
buildHashes = builtins.fromJSON (builtins.readFile ./hashes.json);
# our version of buck2; this should be a git tag
version = "2023-08-15";
version = "2023-09-01";
# the platform-specific, statically linked binary — which is also
# zstd-compressed
@ -63,7 +63,7 @@ let
# tooling
prelude-src =
let
prelude-hash = "40d6fffd01f224d25a62d982f4a3f00b275a5677";
prelude-hash = "3526cf5512668040e011d67e1e272da588264f3b";
name = "buck2-prelude-${version}.tar.gz";
hash = buildHashes."_prelude";
url = "https://github.com/facebook/buck2-prelude/archive/${prelude-hash}.tar.gz";

View File

@ -1,7 +1,7 @@
{ "_comment": "@generated by pkgs/development/tools/build-managers/buck2/update.sh"
, "_prelude": "sha256-TaQ31JvG4ihVn3n1HLuxf9D6Kq5KOb6xRMVMt2odoqY="
, "x86_64-linux": "sha256-3Ae0e/J4GI7qPZnN36Ss7qImY8JWmETkbSyKSuGbpbg="
, "x86_64-darwin": "sha256-GOMuNFTwX8uf65OJ5o54u14T/47MSp/5g6crTJDa6mk="
, "aarch64-linux": "sha256-4oZXiPDu0zlQtlFTH1uH7OHKaNVVUjiQeZYbtc39yi0="
, "aarch64-darwin": "sha256-vPgK9cYjBz0d41n56Cxqjly5FAnr/vr0GsoqUuOIVQo="
, "_prelude": "sha256-0ib3TuGLNy23wRHySOySBIc5ZHtM/vfb6GWmrq63v2o="
, "x86_64-linux": "sha256-Xykduicmmugp7iLyTm4r4JGp6k0IX2czTJq9Y1CkvRw="
, "x86_64-darwin": "sha256-v9a0WAlSUEpXsZouILEI4Pk0x/4MaVDgKVUzu26CIC8="
, "aarch64-linux": "sha256-3S2eih5sFUMFQD4QlBVONm7n3CFNkJHiK4xBjHjXvPs="
, "aarch64-darwin": "sha256-xGNaZayKVa1PToPNUPROV/UYRdw51xai60emNEC1lZ4="
}

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
}:
let
version = "0.3.4";
version = "0.3.6";
in
rustPlatform.buildRustPackage {
pname = "stalwart-mail";
@ -23,7 +23,7 @@ rustPlatform.buildRustPackage {
owner = "stalwartlabs";
repo = "mail-server";
rev = "v${version}";
hash = "sha256-SFHlcoc/8wCWPFGHOvU3SIVztBtW4nxU5/pvZzbjzsg=";
hash = "sha256-QZF51TkuV73EHWXABvqybEZ56CR4zXC/HrmWtVDuM0U=";
fetchSubmodules = true;
};
@ -35,8 +35,8 @@ rustPlatform.buildRustPackage {
"mail-auth-0.3.2" = "sha256-CTafQCXPo91ZUlfS9JUqU+RfUf4+6EbdG97+nIqQtNw=";
"mail-builder-0.3.1" = "sha256-r32iiHtQp0C94Qqc4Vspc08QaXZ+e1u7e39fNYoQGsY=";
"mail-parser-0.8.2" = "sha256-XvKEgzQ+HDoLI16CmqE/RRgApg0q9Au9sqOOEpZz6W0=";
"mail-send-0.4.0" = "sha256-bMPI871hBj/RvrW4kESGS9XzfnkSo8r2/9uUwgE12EU=";
"sieve-rs-0.3.1" = "sha256-FJBQorFRXQYhiCzprAqiv69Qae9YI5OAipjayooFDAw=";
"mail-send-0.4.0" = "sha256-czfzadxvrLQD4qhw/yVI45ajo5EAVu1Bj2lwBY1dVQY=";
"sieve-rs-0.3.1" = "sha256-JIhOklif2IuU3kUVxZb68BZvMV1dR0NtQe3UOayC+vM=";
"smtp-proto-0.1.1" = "sha256-HhKZQHQv3tMEfRZgCoAtyxVzwHbcB4FSjKlMoU1PkHg=";
};
};

View File

@ -1,21 +1,12 @@
From e97f418803c1db9a753fa755a9ee0cf04eabaed3 Mon Sep 17 00:00:00 2001
From: rembo10 <rembo10@users.noreply.github.com>
Date: Sun, 11 Sep 2022 13:00:29 +0530
Subject: [PATCH] Allow running on unsupported Python versions
---
sickgear.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sickgear.py b/sickgear.py
index 9d0440bb..6d65e65d 100755
index c37e2b01..d69704a3 100755
--- a/sickgear.py
+++ b/sickgear.py
@@ -43,10 +43,7 @@ versions = [((2, 7, 9), (2, 7, 18)), ((3, 7, 1), (3, 8, 14)),
((3, 9, 0), (3, 9, 2)), ((3, 9, 4), (3, 9, 14)),
((3, 10, 0), (3, 10, 7))] # inclusive version ranges
@@ -41,10 +41,7 @@ versions = [((3, 8, 0), (3, 8, 16)),
((3, 10, 0), (3, 11, 3))] # inclusive version ranges
if not any(list(map(lambda v: v[0] <= sys.version_info[:3] <= v[1], versions))) and not int(os.environ.get('PYT', 0)):
- print('Python %s.%s.%s detected.' % sys.version_info[:3])
major, minor, micro = sys.version_info[:3]
- print('Python %s.%s.%s detected.' % (major, minor, micro))
- print('Sorry, SickGear requires a Python version %s' % ', '.join(map(
- lambda r: '%s - %s' % tuple(map(lambda v: str(v).replace(',', '.')[1:-1], r)), versions)))
- sys.exit(1)
@ -23,6 +14,3 @@ index 9d0440bb..6d65e65d 100755
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
is_win = 'win' == sys.platform[0:3]
--
2.37.2

View File

@ -4,13 +4,13 @@ let
pythonEnv = python3.withPackages(ps: with ps; [ cheetah3 lxml ]);
in stdenv.mkDerivation rec {
pname = "sickgear";
version = "0.25.60";
version = "3.29.3";
src = fetchFromGitHub {
owner = "SickGear";
repo = "SickGear";
rev = "release_${version}";
sha256 = "sha256-5I6hJgUN2BdHc80RrcmWWxdq0iz6rcO4aX16CDtwu/g=";
hash = "sha256-aPpzWGVQS7waPJXHSdL/6cBhARgpE7/uIdvSadvsB0A=";
};
patches = [
@ -23,15 +23,12 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ pythonEnv libarchive ];
postPatch = ''
substituteInPlace sickgear.py --replace "/usr/bin/env python2" "/usr/bin/env python"
'';
installPhase = ''
mkdir -p $out/bin $out/opt/sickgear
cp -R {autoProcessTV,gui,lib,sickbeard,sickgear.py} $out/opt/sickgear/
cp -R {autoProcessTV,gui,lib,sickgear,sickgear.py} $out/opt/sickgear/
makeWrapper $out/opt/sickgear/sickgear.py $out/bin/sickgear
makeWrapper $out/opt/sickgear/sickgear.py $out/bin/sickgear \
--suffix PATH : ${lib.makeBinPath [ libarchive ]}
'';
meta = with lib; {

View File

@ -4126,6 +4126,10 @@ with pkgs;
supergfxctl = callPackage ../applications/system/supergfxctl { };
titanium = callPackage ../development/mobile/titanium { };
titanium-alloy = callPackage ../development/mobile/titanium-alloy { };
titaniumenv = callPackage ../development/mobile/titaniumenv { };
abootimg = callPackage ../development/mobile/abootimg { };