Merge master into staging-next
This commit is contained in:
commit
2d03d542c7
|
@ -4,6 +4,7 @@ from queue import Queue, Empty
|
|||
from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List, Iterable
|
||||
from xml.sax.saxutils import XMLGenerator
|
||||
from colorama import Style
|
||||
from pathlib import Path
|
||||
import queue
|
||||
import io
|
||||
import threading
|
||||
|
@ -11,7 +12,6 @@ import argparse
|
|||
import base64
|
||||
import codecs
|
||||
import os
|
||||
import pathlib
|
||||
import ptpython.repl
|
||||
import pty
|
||||
import re
|
||||
|
@ -239,8 +239,8 @@ class StartCommand:
|
|||
|
||||
def cmd(
|
||||
self,
|
||||
monitor_socket_path: pathlib.Path,
|
||||
shell_socket_path: pathlib.Path,
|
||||
monitor_socket_path: Path,
|
||||
shell_socket_path: Path,
|
||||
allow_reboot: bool = False, # TODO: unused, legacy?
|
||||
) -> str:
|
||||
display_opts = ""
|
||||
|
@ -272,8 +272,8 @@ class StartCommand:
|
|||
|
||||
@staticmethod
|
||||
def build_environment(
|
||||
state_dir: pathlib.Path,
|
||||
shared_dir: pathlib.Path,
|
||||
state_dir: Path,
|
||||
shared_dir: Path,
|
||||
) -> dict:
|
||||
# We make a copy to not update the current environment
|
||||
env = dict(os.environ)
|
||||
|
@ -288,10 +288,10 @@ class StartCommand:
|
|||
|
||||
def run(
|
||||
self,
|
||||
state_dir: pathlib.Path,
|
||||
shared_dir: pathlib.Path,
|
||||
monitor_socket_path: pathlib.Path,
|
||||
shell_socket_path: pathlib.Path,
|
||||
state_dir: Path,
|
||||
shared_dir: Path,
|
||||
monitor_socket_path: Path,
|
||||
shell_socket_path: Path,
|
||||
) -> subprocess.Popen:
|
||||
return subprocess.Popen(
|
||||
self.cmd(monitor_socket_path, shell_socket_path),
|
||||
|
@ -334,7 +334,7 @@ class LegacyStartCommand(StartCommand):
|
|||
self,
|
||||
netBackendArgs: Optional[str] = None,
|
||||
netFrontendArgs: Optional[str] = None,
|
||||
hda: Optional[Tuple[pathlib.Path, str]] = None,
|
||||
hda: Optional[Tuple[Path, str]] = None,
|
||||
cdrom: Optional[str] = None,
|
||||
usb: Optional[str] = None,
|
||||
bios: Optional[str] = None,
|
||||
|
@ -394,11 +394,11 @@ class Machine:
|
|||
the machine lifecycle with the help of a start script / command."""
|
||||
|
||||
name: str
|
||||
tmp_dir: pathlib.Path
|
||||
shared_dir: pathlib.Path
|
||||
state_dir: pathlib.Path
|
||||
monitor_path: pathlib.Path
|
||||
shell_path: pathlib.Path
|
||||
tmp_dir: Path
|
||||
shared_dir: Path
|
||||
state_dir: Path
|
||||
monitor_path: Path
|
||||
shell_path: Path
|
||||
|
||||
start_command: StartCommand
|
||||
keep_vm_state: bool
|
||||
|
@ -421,7 +421,7 @@ class Machine:
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
tmp_dir: pathlib.Path,
|
||||
tmp_dir: Path,
|
||||
start_command: StartCommand,
|
||||
name: str = "machine",
|
||||
keep_vm_state: bool = False,
|
||||
|
@ -463,7 +463,7 @@ class Machine:
|
|||
hda = None
|
||||
if args.get("hda"):
|
||||
hda_arg: str = args.get("hda", "")
|
||||
hda_arg_path: pathlib.Path = pathlib.Path(hda_arg)
|
||||
hda_arg_path: Path = Path(hda_arg)
|
||||
hda = (hda_arg_path, args.get("hdaInterface", ""))
|
||||
return LegacyStartCommand(
|
||||
netBackendArgs=args.get("netBackendArgs"),
|
||||
|
@ -814,12 +814,12 @@ class Machine:
|
|||
"""Copy a file from the host into the guest via the `shared_dir` shared
|
||||
among all the VMs (using a temporary directory).
|
||||
"""
|
||||
host_src = pathlib.Path(source)
|
||||
vm_target = pathlib.Path(target)
|
||||
host_src = Path(source)
|
||||
vm_target = Path(target)
|
||||
with tempfile.TemporaryDirectory(dir=self.shared_dir) as shared_td:
|
||||
shared_temp = pathlib.Path(shared_td)
|
||||
shared_temp = Path(shared_td)
|
||||
host_intermediate = shared_temp / host_src.name
|
||||
vm_shared_temp = pathlib.Path("/tmp/shared") / shared_temp.name
|
||||
vm_shared_temp = Path("/tmp/shared") / shared_temp.name
|
||||
vm_intermediate = vm_shared_temp / host_src.name
|
||||
|
||||
self.succeed(make_command(["mkdir", "-p", vm_shared_temp]))
|
||||
|
@ -836,11 +836,11 @@ class Machine:
|
|||
all the VMs (using a temporary directory).
|
||||
"""
|
||||
# Compute the source, target, and intermediate shared file names
|
||||
out_dir = pathlib.Path(os.environ.get("out", os.getcwd()))
|
||||
vm_src = pathlib.Path(source)
|
||||
out_dir = Path(os.environ.get("out", os.getcwd()))
|
||||
vm_src = Path(source)
|
||||
with tempfile.TemporaryDirectory(dir=self.shared_dir) as shared_td:
|
||||
shared_temp = pathlib.Path(shared_td)
|
||||
vm_shared_temp = pathlib.Path("/tmp/shared") / shared_temp.name
|
||||
shared_temp = Path(shared_td)
|
||||
vm_shared_temp = Path("/tmp/shared") / shared_temp.name
|
||||
vm_intermediate = vm_shared_temp / vm_src.name
|
||||
intermediate = shared_temp / vm_src.name
|
||||
# Copy the file to the shared directory inside VM
|
||||
|
@ -911,12 +911,12 @@ class Machine:
|
|||
|
||||
self.log("starting vm")
|
||||
|
||||
def clear(path: pathlib.Path) -> pathlib.Path:
|
||||
def clear(path: Path) -> Path:
|
||||
if path.exists():
|
||||
path.unlink()
|
||||
return path
|
||||
|
||||
def create_socket(path: pathlib.Path) -> socket.socket:
|
||||
def create_socket(path: Path) -> socket.socket:
|
||||
s = socket.socket(family=socket.AF_UNIX, type=socket.SOCK_STREAM)
|
||||
s.bind(str(path))
|
||||
s.listen(1)
|
||||
|
@ -1061,7 +1061,7 @@ class VLan:
|
|||
"""
|
||||
|
||||
nr: int
|
||||
socket_dir: pathlib.Path
|
||||
socket_dir: Path
|
||||
|
||||
process: subprocess.Popen
|
||||
pid: int
|
||||
|
@ -1070,7 +1070,7 @@ class VLan:
|
|||
def __repr__(self) -> str:
|
||||
return f"<Vlan Nr. {self.nr}>"
|
||||
|
||||
def __init__(self, nr: int, tmp_dir: pathlib.Path):
|
||||
def __init__(self, nr: int, tmp_dir: Path):
|
||||
self.nr = nr
|
||||
self.socket_dir = tmp_dir / f"vde{self.nr}.ctl"
|
||||
|
||||
|
@ -1123,7 +1123,7 @@ class Driver:
|
|||
):
|
||||
self.tests = tests
|
||||
|
||||
tmp_dir = pathlib.Path(os.environ.get("TMPDIR", tempfile.gettempdir()))
|
||||
tmp_dir = Path(os.environ.get("TMPDIR", tempfile.gettempdir()))
|
||||
tmp_dir.mkdir(mode=0o700, exist_ok=True)
|
||||
|
||||
with rootlog.nested("start all VLans"):
|
||||
|
@ -1183,9 +1183,11 @@ class Driver:
|
|||
serial_stdout_on=self.serial_stdout_on,
|
||||
Machine=Machine, # for typing
|
||||
)
|
||||
machine_symbols = {
|
||||
m.name: self.machines[idx] for idx, m in enumerate(self.machines)
|
||||
}
|
||||
machine_symbols = {m.name: m for m in self.machines}
|
||||
# If there's exactly one machine, make it available under the name
|
||||
# "machine", even if it's not called that.
|
||||
if len(self.machines) == 1:
|
||||
(machine_symbols["machine"],) = self.machines
|
||||
vlan_symbols = {
|
||||
f"vlan{v.nr}": self.vlans[idx] for idx, v in enumerate(self.vlans)
|
||||
}
|
||||
|
@ -1230,7 +1232,7 @@ class Driver:
|
|||
"Using legacy create_machine(), please instantiate the"
|
||||
"Machine class directly, instead"
|
||||
)
|
||||
tmp_dir = pathlib.Path(os.environ.get("TMPDIR", tempfile.gettempdir()))
|
||||
tmp_dir = Path(os.environ.get("TMPDIR", tempfile.gettempdir()))
|
||||
tmp_dir.mkdir(mode=0o700, exist_ok=True)
|
||||
|
||||
if args.get("startCommand"):
|
||||
|
@ -1316,7 +1318,7 @@ if __name__ == "__main__":
|
|||
action=EnvDefault,
|
||||
envvar="testScript",
|
||||
help="the test script to run",
|
||||
type=pathlib.Path,
|
||||
type=Path,
|
||||
)
|
||||
|
||||
args = arg_parser.parse_args()
|
||||
|
|
|
@ -134,7 +134,9 @@ rec {
|
|||
vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes);
|
||||
vms = map (m: m.config.system.build.vm) (lib.attrValues nodes);
|
||||
|
||||
nodeHostNames = map (c: c.config.system.name) (lib.attrValues nodes);
|
||||
nodeHostNames = let
|
||||
nodesList = map (c: c.config.system.name) (lib.attrValues nodes);
|
||||
in nodesList ++ lib.optional (lib.length nodesList == 1) "machine";
|
||||
|
||||
# TODO: This is an implementation error and needs fixing
|
||||
# the testing famework cannot legitimately restrict hostnames further
|
||||
|
|
|
@ -489,7 +489,7 @@ in
|
|||
victoriametrics = handleTest ./victoriametrics.nix {};
|
||||
vikunja = handleTest ./vikunja.nix {};
|
||||
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
|
||||
vscodium = handleTest ./vscodium.nix {};
|
||||
vscodium = discoverTests (import ./vscodium.nix);
|
||||
wasabibackend = handleTest ./wasabibackend.nix {};
|
||||
wiki-js = handleTest ./wiki-js.nix {};
|
||||
wireguard = handleTest ./wireguard {};
|
||||
|
|
14
nixos/tests/common/wayland-cage.nix
Normal file
14
nixos/tests/common/wayland-cage.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./user-account.nix ];
|
||||
services.cage = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
memorySize = 1024;
|
||||
qemu.options = [ "-vga virtio" ];
|
||||
};
|
||||
}
|
|
@ -1,47 +1,69 @@
|
|||
import ./make-test-python.nix ({ pkgs, ...} :
|
||||
let
|
||||
tests = {
|
||||
wayland = { pkgs, ... }: {
|
||||
imports = [ ./common/wayland-cage.nix ];
|
||||
|
||||
{
|
||||
name = "vscodium";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ turion ];
|
||||
services.cage.program = ''
|
||||
${pkgs.vscodium}/bin/codium \
|
||||
--enable-features=UseOzonePlatform \
|
||||
--ozone-platform=wayland
|
||||
'';
|
||||
|
||||
fonts.fonts = with pkgs; [ dejavu_fonts ];
|
||||
};
|
||||
xorg = { pkgs, ... }: {
|
||||
imports = [ ./common/user-account.nix ./common/x11.nix ];
|
||||
|
||||
virtualisation.memorySize = 2047;
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${pkgs.vscodium}/bin/codium
|
||||
'';
|
||||
test-support.displayManager.auto.user = "alice";
|
||||
};
|
||||
};
|
||||
|
||||
machine = { ... }:
|
||||
mkTest = name: machine:
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
inherit name;
|
||||
|
||||
{
|
||||
imports = [
|
||||
./common/user-account.nix
|
||||
./common/x11.nix
|
||||
];
|
||||
nodes = { "${name}" = machine; };
|
||||
|
||||
virtualisation.memorySize = 2047;
|
||||
services.xserver.enable = true;
|
||||
test-support.displayManager.auto.user = "alice";
|
||||
environment.systemPackages = with pkgs; [
|
||||
vscodium
|
||||
];
|
||||
};
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ synthetica turion ];
|
||||
};
|
||||
enableOCR = true;
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
enableOCR = true;
|
||||
machine.wait_for_unit('graphical.target')
|
||||
machine.wait_until_succeeds('pgrep -x codium')
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
# Start up X
|
||||
start_all()
|
||||
machine.wait_for_x()
|
||||
# Wait until vscodium is visible. "File" is in the menu bar.
|
||||
machine.wait_for_text('File')
|
||||
machine.screenshot('start_screen')
|
||||
|
||||
# Start VSCodium with a file that doesn't exist yet
|
||||
machine.fail("ls /home/alice/foo.txt")
|
||||
machine.succeed("su - alice -c 'codium foo.txt' >&2 &")
|
||||
test_string = 'testfile'
|
||||
|
||||
# Wait for the window to appear
|
||||
machine.wait_for_text("VSCodium")
|
||||
# Create a new file
|
||||
machine.send_key('ctrl-n')
|
||||
machine.wait_for_text('Untitled')
|
||||
machine.screenshot('empty_editor')
|
||||
|
||||
# Save file
|
||||
machine.send_key("ctrl-s")
|
||||
# Type a string
|
||||
machine.send_chars(test_string)
|
||||
machine.wait_for_text(test_string)
|
||||
machine.screenshot('editor')
|
||||
|
||||
# Wait until the file has been saved
|
||||
machine.wait_for_file("/home/alice/foo.txt")
|
||||
# Save the file
|
||||
machine.send_key('ctrl-s')
|
||||
machine.wait_for_text('Save')
|
||||
machine.screenshot('save_window')
|
||||
machine.send_key('ret')
|
||||
|
||||
machine.screenshot("VSCodium")
|
||||
'';
|
||||
})
|
||||
# (the default filename is the first line of the file)
|
||||
machine.wait_for_file(f'/home/alice/{test_string}')
|
||||
'';
|
||||
});
|
||||
|
||||
in builtins.mapAttrs (k: v: mkTest k v { }) tests
|
||||
|
|
|
@ -81,7 +81,8 @@ stdenv.mkDerivation rec {
|
|||
export LD_LIBRARY_PATH=$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option";
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option"
|
||||
+ lib.optionalString stdenv.isAarch64 "-Wno-error=format-security";
|
||||
|
||||
enableParallelBuilds = true;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# for the curious, "tod" means "Touch OEM Drivers" meaning it can load
|
||||
# external .so's.
|
||||
libfprint.overrideAttrs ({ postPatch ? "", mesonFlags ? [], ... }: let
|
||||
version = "1.94.1+tod1";
|
||||
version = "1.90.7+git20210222+tod1";
|
||||
in {
|
||||
pname = "libfprint-tod";
|
||||
inherit version;
|
||||
|
@ -16,7 +16,7 @@ in {
|
|||
owner = "3v1n0";
|
||||
repo = "libfprint";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-IVeTQlZjea4xgbG/N7OTHAj6RT4WutfvQhV8qFEvkKo=";
|
||||
sha256 = "0cj7iy5799pchyzqqncpkhibkq012g3bdpn18pfb19nm43svhn4j";
|
||||
};
|
||||
|
||||
mesonFlags = mesonFlags ++ [
|
||||
|
|
|
@ -10,6 +10,7 @@ in
|
|||
deployAndroidPackage {
|
||||
inherit package os;
|
||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
||||
autoPatchelfIgnoreMissingDeps = true;
|
||||
buildInputs = lib.optional (os == "linux") [ pkgs.glibc pkgs.stdenv.cc.cc pkgs.python2 pkgs.ncurses5 pkgs.zlib pkgs.libcxx.out pkgs.libxml2 ];
|
||||
patchInstructions = lib.optionalString (os == "linux") (''
|
||||
patchShebangs .
|
||||
|
|
40
pkgs/development/python-modules/aiohwenergy/default.nix
Normal file
40
pkgs/development/python-modules/aiohwenergy/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ lib
|
||||
, aiohttp
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiohwenergy";
|
||||
version = "0.4.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DCSBL";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "Rs7kD+jN/z0j4KmkitquB+cm2UcYG87YHczZR0A4axI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
];
|
||||
|
||||
# Project has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"aiohwenergy"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library to interact with the HomeWizard Energy devices API";
|
||||
homepage = "https://github.com/DCSBL/aiohwenergy";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -58,7 +58,7 @@
|
|||
, termcolor
|
||||
, unicodecsv
|
||||
, werkzeug
|
||||
, pytest
|
||||
, pytestCheckHook
|
||||
, freezegun
|
||||
, mkYarnPackage
|
||||
}:
|
||||
|
@ -171,7 +171,7 @@ buildPythonPackage rec {
|
|||
|
||||
checkInputs = [
|
||||
freezegun
|
||||
pytest
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
INSTALL_PROVIDERS_FROM_SOURCES = "true";
|
||||
|
@ -199,12 +199,16 @@ buildPythonPackage rec {
|
|||
|
||||
substituteInPlace tests/core/test_core.py \
|
||||
--replace "/bin/bash" "${stdenv.shell}"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# Fix failing test on Hydra
|
||||
substituteInPlace airflow/utils/db.py \
|
||||
--replace "/tmp/sqlite_default.db" "$TMPDIR/sqlite_default.db"
|
||||
'';
|
||||
|
||||
# allow for gunicorn processes to have access to python packages
|
||||
makeWrapperArgs = [ "--prefix PYTHONPATH : $PYTHONPATH" ];
|
||||
|
||||
checkPhase = ''
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
export AIRFLOW_HOME=$HOME
|
||||
export AIRFLOW__CORE__UNIT_TEST_MODE=True
|
||||
|
@ -214,10 +218,16 @@ buildPythonPackage rec {
|
|||
airflow version
|
||||
airflow db init
|
||||
airflow db reset -y
|
||||
|
||||
pytest tests/core/test_core.py
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [
|
||||
"tests/core/test_core.py"
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals stdenv.isDarwin [
|
||||
"bash_operator_kill" # psutil.AccessDenied
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp -rv ${airflow-frontend}/static/dist $out/lib/${python.libPrefix}/site-packages/airflow/www/static
|
||||
'';
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "2.3.2";
|
||||
pname = "elementpath";
|
||||
version = "2.4.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
|
@ -14,13 +15,15 @@ buildPythonPackage rec {
|
|||
owner = "sissaschool";
|
||||
repo = "elementpath";
|
||||
rev = "v${version}";
|
||||
sha256 = "01h68v077xbcnqn9v52i8d6s6i7ds3zycn3ddn11hc074m4gg3af";
|
||||
sha256 = "1f3w5zyvrkl4gab81i5z9b41ybs54b37znj5r7hrcf25x8hrqgvv";
|
||||
};
|
||||
|
||||
# avoid circular dependency with xmlschema which directly depends on this
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "elementpath" ];
|
||||
pythonImportsCheck = [
|
||||
"elementpath"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml";
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "faraday-plugins";
|
||||
version = "1.5.6";
|
||||
version = "1.5.7";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "infobyte";
|
||||
repo = "faraday_plugins";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-RTHhCSOqtdPsgZgeziAYm+9NoR72Jfm+42fyyKqjFpA=";
|
||||
sha256 = "sha256-EW9p5r7RwWohNGwbITtDrEd1FYLtOwWXhVWFgPCG+Po=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, editdistance-s
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, editdistance-s
|
||||
, pythonOlder
|
||||
, ukkonen
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "identify";
|
||||
version = "2.3.7";
|
||||
version = "2.4.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
@ -17,12 +18,13 @@ buildPythonPackage rec {
|
|||
owner = "pre-commit";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-L71Zi0SWFh7K4BRwF57prdrIdxLp8Igs0k/gc6k1+Mo=";
|
||||
sha256 = "sha256-0J3P3RawafVAfOUhK9qSz5K8y0goMqTjMh5PL60sqME=";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
editdistance-s
|
||||
pytestCheckHook
|
||||
ukkonen
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
|
36
pkgs/development/python-modules/luxtronik/default.nix
Normal file
36
pkgs/development/python-modules/luxtronik/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "luxtronik";
|
||||
version = "0.3.9";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Bouni";
|
||||
repo = "python-luxtronik";
|
||||
rev = version;
|
||||
sha256 = "mScdTQ82tV5fyy1S0YDDOz1UC4VB0OmSXD5gHp53WsE=";
|
||||
};
|
||||
|
||||
# Project has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"luxtronik"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library to interact with Luxtronik heatpump controllers";
|
||||
homepage = "https://github.com/Bouni/python-luxtronik";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -9,14 +9,16 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "millheater";
|
||||
version = "0.8.1";
|
||||
version = "0.9.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Danielhiversen";
|
||||
repo = "pymill";
|
||||
rev = version;
|
||||
sha256 = "0269lhb6y4c13n6krsl2b66ldvzkd26jlax7bbnkvag2iv7g6hzj";
|
||||
sha256 = "sha256-ocPp9tRghlOb0vZrpELDkwOq8ue+JBCRf2uB0Q7CPF8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyatmo";
|
||||
version = "6.1.0";
|
||||
version = "6.2.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
|
@ -24,7 +25,7 @@ buildPythonPackage rec {
|
|||
owner = "jabesq";
|
||||
repo = "pyatmo";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Iscnv3hfYa8QFiXMUN334Muo0oGqnnK11RPNxQJggG0=";
|
||||
sha256 = "sha256-VBc2avJiIFQW1LYXQEvIZ/wZKMFJsCF9DDrxwL8dDnk=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
@ -54,7 +55,9 @@ buildPythonPackage rec {
|
|||
--replace "requests~=2.24" "requests"
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "pyatmo" ];
|
||||
pythonImportsCheck = [
|
||||
"pyatmo"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple API to access Netatmo weather station data";
|
||||
|
|
43
pkgs/development/python-modules/pyebus/default.nix
Normal file
43
pkgs/development/python-modules/pyebus/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, anytree
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytestCheckHook
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyebus";
|
||||
version = "1.2.4";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "i+p40s9SXey1lfXWW+PiXsA1kUF4o6Rk7QLmQ2ljN6g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
anytree
|
||||
];
|
||||
|
||||
# https://github.com/c0fec0de/pyebus/issues/3
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pyebus"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pythonic Interface to EBUS Daemon (ebusd)";
|
||||
homepage = "https://github.com/c0fec0de/pyebus";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -8,21 +8,29 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyupgrade";
|
||||
version = "2.29.0";
|
||||
version = "2.29.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "asottile";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Hq58DJe8ZLZSJdhqSxfTaZPnWae2aQFCe7lH+6Y6ABg=";
|
||||
sha256 = "sha256-fN0+4/EeoMD2c16OgepjDWuUhowMxzM7nB3mkL3iDjc=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ tokenize-rt ];
|
||||
propagatedBuildInputs = [
|
||||
tokenize-rt
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pyupgrade" ];
|
||||
pythonImportsCheck = [
|
||||
"pyupgrade"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool to automatically upgrade syntax for newer versions of the language";
|
||||
|
|
60
pkgs/development/python-modules/related/default.nix
Normal file
60
pkgs/development/python-modules/related/default.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{ lib
|
||||
, attrs
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, future
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, pyyaml
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "related";
|
||||
version = "0.7.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "w0XmNWh1xF08qitH22lQgTRNqO6qyYrYd2dc6x3Fop0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
attrs
|
||||
future
|
||||
python-dateutil
|
||||
pyyaml
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Remove outdated setup.cfg
|
||||
rm setup.cfg
|
||||
substituteInPlace setup.py \
|
||||
--replace "'pytest-runner'," ""
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# Source tarball doesn't contains all needed files
|
||||
"test_compose_from_yml"
|
||||
"test_yaml_roundtrip_with_empty_values"
|
||||
"test_compose_from_yml"
|
||||
"test_store_data_from_json"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"related"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Nested Object Models in Python";
|
||||
homepage = "https://github.com/genomoncology/related";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -11,20 +11,25 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "roombapy";
|
||||
version = "1.6.3";
|
||||
version = "1.6.4";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pschmitt";
|
||||
repo = "roombapy";
|
||||
rev = version;
|
||||
sha256 = "sha256-GkDfIC2jx4Mpguk/Wu45pZw0czhabJwTz58WYSLCOV8=";
|
||||
sha256 = "sha256-EN+em+lULAUplXlhcU409ZVPk9BfMmD2oNwO0ETuqoA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ paho-mqtt ];
|
||||
propagatedBuildInputs = [
|
||||
paho-mqtt
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
amqtt
|
||||
|
@ -37,12 +42,19 @@ buildPythonPackage rec {
|
|||
"tests/test_discovery.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "roombapy" ];
|
||||
disabledTests = [
|
||||
# Test want to connect to a local MQTT broker
|
||||
"test_roomba_connect"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"roombapy"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/pschmitt/roombapy";
|
||||
description = "Python program and library to control Wi-Fi enabled iRobot Roombas";
|
||||
maintainers = with maintainers; [ justinas ];
|
||||
homepage = "https://github.com/pschmitt/roombapy";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ justinas ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "tweepy";
|
||||
version = "4.3.0";
|
||||
version = "4.4.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
@ -21,7 +21,7 @@ buildPythonPackage rec {
|
|||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-lS/98DRpJH1UGGNzwqVVUJOeul+BX+I3e+ysmC0oL3I=";
|
||||
sha256 = "sha256-GUo8uvShyIOWWcO5T1JvV7DMC1W70YILx/hvHIGQg0o=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
41
pkgs/development/python-modules/ukkonen/default.nix
Normal file
41
pkgs/development/python-modules/ukkonen/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, cffi
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ukkonen";
|
||||
version = "1.0.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "asottile";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "jG6VP/P5sadrdrmneH36/ExSld9blyMAAG963QS9+p0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cffi
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"ukkonen"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python implementation of bounded Levenshtein distance (Ukkonen)";
|
||||
homepage = "https://github.com/asottile/ukkonen";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, pyopenssl
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "uonet-request-signer-hebe";
|
||||
version = "0.1.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "fidopnpAt5CXPsLbx+V8wrJCQQ/WIO6AqxpsYLDv8qM=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyopenssl
|
||||
];
|
||||
|
||||
# Source is not tagged
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"uonet_request_signer_hebe"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "UONET+ (hebe) request signer for Python";
|
||||
homepage = "https://github.com/wulkanowy/uonet-request-signer";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
57
pkgs/development/python-modules/vulcan-api/default.nix
Normal file
57
pkgs/development/python-modules/vulcan-api/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, aenum
|
||||
, aiodns
|
||||
, aiohttp
|
||||
, buildPythonPackage
|
||||
, cchardet
|
||||
, fetchFromGitHub
|
||||
, pyopenssl
|
||||
, pythonOlder
|
||||
, pytz
|
||||
, related
|
||||
, requests
|
||||
, uonet-request-signer-hebe
|
||||
, yarl
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "vulcan-api";
|
||||
version = "2.0.3";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kapi2289";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "YLt9yufOBlWRyo+le7HcaFD/s7V5WpvhMUrHJqyC3pY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aenum
|
||||
aiodns
|
||||
aiohttp
|
||||
cchardet
|
||||
pyopenssl
|
||||
pytz
|
||||
related
|
||||
requests
|
||||
uonet-request-signer-hebe
|
||||
yarl
|
||||
];
|
||||
|
||||
# Project has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"vulcan"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library for UONET+ e-register API";
|
||||
homepage = "https://vulcan-api.readthedocs.io/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "1.8.1";
|
||||
version = "1.8.2";
|
||||
pname = "xmlschema";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
@ -17,7 +17,7 @@ buildPythonPackage rec {
|
|||
owner = "sissaschool";
|
||||
repo = "xmlschema";
|
||||
rev = "v${version}";
|
||||
sha256 = "0vs4d9bnms4krxvplzf2p69g673pdw31z8p5alzj3pqnaw83rg1z";
|
||||
sha256 = "sha256-d7f19T17aAwdtNDjCrsXXY39u0aRgQo4vFPnxFNs2PQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -56,13 +56,13 @@ with py.pkgs;
|
|||
|
||||
buildPythonApplication rec {
|
||||
pname = "checkov";
|
||||
version = "2.0.587";
|
||||
version = "2.0.591";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bridgecrewio";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-uLH3g3UeWdIZsMsUwCYpTehgxDKGraPBlENdTz+QYLI=";
|
||||
sha256 = "sha256-p8pEw3vH3W62MmlZsSqWoUKf7QjEQhlV5bSjYr1Wwm0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with py.pkgs; [
|
||||
|
|
|
@ -1,22 +1,27 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "trivy";
|
||||
version = "0.20.2";
|
||||
version = "0.21.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aquasecurity";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ittOVWsM+1IaILCLCJNOeLxRbRHiiMN4qgLTS9gxV0w=";
|
||||
sha256 = "sha256-weLzW1pyv9q9VKvFxno+f/L29wlpvxlVUZJUwx6Gn2A=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-HrDj09gUJtkZhQ3nYfoj0K8+T62ib0CWAhhcuvg8cyc=";
|
||||
vendorSha256 = "sha256-1kQ2m8gFBHKznbjNPtYN0BVrRbxyCs2H1f7+XZqgVvc=";
|
||||
|
||||
excludedPackages = "misc";
|
||||
|
||||
ldflags = [
|
||||
"-s" "-w" "-X main.version=v${version}"
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=v${version}"
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
|
|
|
@ -15,6 +15,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ libuuid libselinux ];
|
||||
|
||||
# According to upstream, libmount should be detected automatically but the
|
||||
# build system fails to do this. This is likely a bug with their build system
|
||||
# hence it is explicitly enabled here.
|
||||
configureFlags = [ "--with-libmount" ];
|
||||
|
||||
installFlags = [
|
||||
"sysconfdir=${placeholder "out"}/etc"
|
||||
"root_sbindir=${placeholder "out"}/sbin"
|
||||
|
|
|
@ -17,6 +17,11 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-mnGC/moQANloR5ODwRjzJzBa55OEZ9QU+9WpAHxQE/g=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
# Fix broken install command
|
||||
substituteInPlace Makefile --replace "-pm755" "-pDm755"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||
|
||||
makeFlags = [
|
||||
|
|
|
@ -315,6 +315,8 @@ in {
|
|||
|
||||
aiohue = callPackage ../development/python-modules/aiohue { };
|
||||
|
||||
aiohwenergy = callPackage ../development/python-modules/aiohwenergy { };
|
||||
|
||||
aioimaplib = callPackage ../development/python-modules/aioimaplib { };
|
||||
|
||||
aioinflux = callPackage ../development/python-modules/aioinflux { };
|
||||
|
@ -4539,6 +4541,8 @@ in {
|
|||
|
||||
luftdaten = callPackage ../development/python-modules/luftdaten { };
|
||||
|
||||
luxtronik = callPackage ../development/python-modules/luxtronik { };
|
||||
|
||||
lupa = callPackage ../development/python-modules/lupa { };
|
||||
|
||||
lupupy = callPackage ../development/python-modules/lupupy { };
|
||||
|
@ -6372,6 +6376,8 @@ in {
|
|||
|
||||
pydyf = callPackage ../development/python-modules/pydyf { };
|
||||
|
||||
pyebus = callPackage ../development/python-modules/pyebus { };
|
||||
|
||||
pyechonest = callPackage ../development/python-modules/pyechonest { };
|
||||
|
||||
pyeclib = callPackage ../development/python-modules/pyeclib { };
|
||||
|
@ -8092,6 +8098,8 @@ in {
|
|||
|
||||
reikna = callPackage ../development/python-modules/reikna { };
|
||||
|
||||
related = callPackage ../development/python-modules/related { };
|
||||
|
||||
relatorio = callPackage ../development/python-modules/relatorio { };
|
||||
|
||||
remarshal = callPackage ../development/python-modules/remarshal { };
|
||||
|
@ -9584,6 +9592,8 @@ in {
|
|||
|
||||
ujson = callPackage ../development/python-modules/ujson { };
|
||||
|
||||
ukkonen = callPackage ../development/python-modules/ukkonen { };
|
||||
|
||||
ukpostcodeparser = callPackage ../development/python-modules/ukpostcodeparser { };
|
||||
|
||||
umalqurra = callPackage ../development/python-modules/umalqurra { };
|
||||
|
@ -9638,6 +9648,8 @@ in {
|
|||
|
||||
untokenize = callPackage ../development/python-modules/untokenize { };
|
||||
|
||||
uonet-request-signer-hebe = callPackage ../development/python-modules/uonet-request-signer-hebe { };
|
||||
|
||||
upass = callPackage ../development/python-modules/upass { };
|
||||
|
||||
upb-lib = callPackage ../development/python-modules/upb-lib { };
|
||||
|
@ -9809,6 +9821,8 @@ in {
|
|||
enablePython = true;
|
||||
});
|
||||
|
||||
vulcan-api = callPackage ../development/python-modules/vulcan-api { };
|
||||
|
||||
vultr = callPackage ../development/python-modules/vultr { };
|
||||
|
||||
vulture = callPackage ../development/python-modules/vulture { };
|
||||
|
|
Loading…
Reference in a new issue