diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index e8cf15479c0..be87fb1d069 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -131,6 +131,12 @@ rec { armhf-embedded = { config = "arm-none-eabihf"; libc = "newlib"; + # GCC8+ does not build without this + # (https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg552339.html): + gcc = { + arch = "armv5t"; + fpu = "vfp"; + }; }; aarch64-embedded = { diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index d1cf7d05c1b..72eb9fcfaa6 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -63,6 +63,15 @@ in ''; }; + hardware.nvidia.powerManagement.finegrained = mkOption { + type = types.bool; + default = false; + description = '' + Experimental power management of PRIME offload. For more information, see + the NVIDIA docs, chapter 22. PCI-Express runtime power management. + ''; + }; + hardware.nvidia.modesetting.enable = mkOption { type = types.bool; default = false; @@ -96,6 +105,16 @@ in ''; }; + hardware.nvidia.prime.amdgpuBusId = mkOption { + type = types.str; + default = ""; + example = "PCI:4:0:0"; + description = '' + Bus ID of the AMD APU. You can find it using lspci; for example if lspci + shows the AMD APU at "04:00.0", set this option to "PCI:4:0:0". + ''; + }; + hardware.nvidia.prime.sync.enable = mkOption { type = types.bool; default = false; @@ -153,7 +172,10 @@ in }; }; - config = mkIf enabled { + config = let + igpuDriver = if pCfg.intelBusId != "" then "modesetting" else "amdgpu"; + igpuBusId = if pCfg.intelBusId != "" then pCfg.intelBusId else pCfg.amdgpuBusId; + in mkIf enabled { assertions = [ { assertion = with config.services.xserver.displayManager; gdm.nvidiaWayland -> cfg.modesetting.enable; @@ -161,7 +183,13 @@ in } { - assertion = primeEnabled -> pCfg.nvidiaBusId != "" && pCfg.intelBusId != ""; + assertion = primeEnabled -> pCfg.intelBusId == "" || pCfg.amdgpuBusId == ""; + message = '' + You cannot configure both an Intel iGPU and an AMD APU. Pick the one corresponding to your processor. + ''; + } + { + assertion = primeEnabled -> pCfg.nvidiaBusId != "" && (pCfg.intelBusId != "" || pCfg.amdgpuBusId != ""); message = '' When NVIDIA PRIME is enabled, the GPU bus IDs must configured. ''; @@ -174,6 +202,14 @@ in assertion = !(syncCfg.enable && offloadCfg.enable); message = "Only one NVIDIA PRIME solution may be used at a time."; } + { + assertion = !(syncCfg.enable && cfg.powerManagement.finegrained); + message = "Sync precludes powering down the NVIDIA GPU."; + } + { + assertion = cfg.powerManagement.enable -> offloadCfg.enable; + message = "Fine-grained power management requires offload to be enabled."; + } ]; # If Optimus/PRIME is enabled, we: @@ -183,18 +219,22 @@ in # "nvidia" driver, in order to allow the X server to start without any outputs. # - Add a separate Device section for the Intel GPU, using the "modesetting" # driver and with the configured BusID. + # - OR add a separate Device section for the AMD APU, using the "amdgpu" + # driver and with the configures BusID. # - Reference that Device section from the ServerLayout section as an inactive # device. # - Configure the display manager to run specific `xrandr` commands which will - # configure/enable displays connected to the Intel GPU. + # configure/enable displays connected to the Intel iGPU / AMD APU. services.xserver.useGlamor = mkDefault offloadCfg.enable; - services.xserver.drivers = optional primeEnabled { - name = "modesetting"; + services.xserver.drivers = let + in optional primeEnabled { + name = igpuDriver; display = offloadCfg.enable; + modules = optional (igpuDriver == "amdgpu") [ pkgs.xorg.xf86videoamdgpu ]; deviceSection = '' - BusID "${pCfg.intelBusId}" + BusID "${igpuBusId}" ${optionalString syncCfg.enable ''Option "AccelMethod" "none"''} ''; } ++ singleton { @@ -205,6 +245,7 @@ in '' BusID "${pCfg.nvidiaBusId}" ${optionalString syncCfg.allowExternalGpu "Option \"AllowExternalGpus\""} + ${optionalString cfg.powerManagement.finegrained "Option \"NVreg_DynamicPowerManagement=0x02\""} ''; screenSection = '' @@ -214,14 +255,14 @@ in }; services.xserver.serverLayoutSection = optionalString syncCfg.enable '' - Inactive "Device-modesetting[0]" + Inactive "Device-${igpuDriver}[0]" '' + optionalString offloadCfg.enable '' Option "AllowNVIDIAGPUScreens" ''; services.xserver.displayManager.setupCommands = optionalString syncCfg.enable '' # Added by nvidia configuration module for Optimus/PRIME. - ${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource modesetting NVIDIA-0 + ${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource ${igpuDriver} NVIDIA-0 ${pkgs.xorg.xrandr}/bin/xrandr --auto ''; @@ -292,16 +333,37 @@ in boot.kernelParams = optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1" ++ optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1"; - # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded. services.udev.extraRules = '' + # Create /dev/nvidia-uvm when the nvidia-uvm module is loaded. KERNEL=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'" KERNEL=="nvidia_modeset", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'" KERNEL=="card*", SUBSYSTEM=="drm", DRIVERS=="nvidia", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia%n c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) %n'" KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'" KERNEL=="nvidia_uvm", RUN+="${pkgs.runtimeShell} -c 'mknod -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'" + '' + optionalString cfg.powerManagement.finegrained '' + # Remove NVIDIA USB xHCI Host Controller devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1" + + # Remove NVIDIA USB Type-C UCSI devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1" + + # Remove NVIDIA Audio devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1" + + # Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind + ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto" + ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto" + + # Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind + ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on" + ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on" ''; + boot.extraModprobeConfig = mkIf cfg.powerManagement.finegrained '' + options nvidia "NVreg_DynamicPowerManagement=0x02" + ''; + boot.blacklistedKernelModules = [ "nouveau" "nvidiafb" ]; services.acpid.enable = true; diff --git a/nixos/modules/security/acme.xml b/nixos/modules/security/acme.xml index b34cbdafb2d..a78ff05f2ea 100644 --- a/nixos/modules/security/acme.xml +++ b/nixos/modules/security/acme.xml @@ -115,15 +115,18 @@ services.nginx = { = true; = "admin+acme@example.com"; + +# /var/lib/acme/.challenges must be writable by the ACME user +# and readable by the Nginx user. The easiest way to achieve +# this is to add the Nginx user to the ACME group. +users.users.nginx.extraGroups = [ "acme" ]; + services.nginx = { enable = true; virtualHosts = { "acmechallenge.example.com" = { # Catchall vhost, will redirect users to HTTPS for all vhosts serverAliases = [ "*.example.com" ]; - # /var/lib/acme/.challenges must be writable by the ACME user - # and readable by the Nginx user. - # By default, this is the case. locations."/.well-known/acme-challenge" = { root = "/var/lib/acme/.challenges"; }; @@ -134,6 +137,7 @@ services.nginx = { }; } # Alternative config for Apache +users.users.wwwrun.extraGroups = [ "acme" ]; services.httpd = { enable = true; virtualHosts = { diff --git a/nixos/modules/services/development/hoogle.nix b/nixos/modules/services/development/hoogle.nix index 6d6c88b9b2a..bd55483f46d 100644 --- a/nixos/modules/services/development/hoogle.nix +++ b/nixos/modules/services/development/hoogle.nix @@ -41,6 +41,7 @@ in { haskellPackages = mkOption { description = "Which haskell package set to use."; default = pkgs.haskellPackages; + type = types.package; defaultText = "pkgs.haskellPackages"; }; diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix index e9569b2ba6b..f719ff59cc7 100644 --- a/nixos/modules/services/networking/hostapd.nix +++ b/nixos/modules/services/networking/hostapd.nix @@ -68,6 +68,7 @@ in interface = mkOption { default = ""; example = "wlp2s0"; + type = types.str; description = '' The interfaces hostapd will use. ''; diff --git a/nixos/modules/services/web-servers/caddy.nix b/nixos/modules/services/web-servers/caddy.nix index 297b7327339..6ecfc113ca2 100644 --- a/nixos/modules/services/web-servers/caddy.nix +++ b/nixos/modules/services/web-servers/caddy.nix @@ -20,8 +20,24 @@ let --config ${configFile} --adapter ${cfg.adapter} > $out ''; tlsJSON = pkgs.writeText "tls.json" (builtins.toJSON tlsConfig); - configJSON = pkgs.runCommand "caddy-config.json" { } '' - ${pkgs.jq}/bin/jq -s '.[0] * .[1]' ${adaptedConfig} ${tlsJSON} > $out + + # merge the TLS config options we expose with the ones originating in the Caddyfile + configJSON = + let tlsConfigMerge = '' + {"apps": + {"tls": + {"automation": + {"policies": + (if .[0].apps.tls.automation.policies == .[1]?.apps.tls.automation.policies + then .[0].apps.tls.automation.policies + else (.[0].apps.tls.automation.policies + .[1]?.apps.tls.automation.policies) + end) + } + } + } + }''; + in pkgs.runCommand "caddy-config.json" { } '' + ${pkgs.jq}/bin/jq -s '.[0] * ${tlsConfigMerge}' ${adaptedConfig} ${tlsJSON} > $out ''; in { imports = [ diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix index 7eb52e3d021..64e106036ab 100644 --- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix +++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix @@ -1,10 +1,9 @@ -{ pkgs, configTxt }: +{ pkgs, configTxt, firmware ? pkgs.raspberrypifw }: pkgs.substituteAll { src = ./raspberrypi-builder.sh; isExecutable = true; inherit (pkgs) bash; path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep]; - firmware = pkgs.raspberrypifw; - inherit configTxt; + inherit firmware configTxt; } diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index abc1a0af48a..5b39f34200c 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -2,6 +2,13 @@ targetRoot=/mnt-root console=tty1 +verbose="@verbose@" + +info() { + if [[ -n "$verbose" ]]; then + echo "$@" + fi +} extraUtils="@extraUtils@" export LD_LIBRARY_PATH=@extraUtils@/lib @@ -55,7 +62,7 @@ EOF echo "Rebooting..." reboot -f else - echo "Continuing..." + info "Continuing..." fi } @@ -63,9 +70,9 @@ trap 'fail' 0 # Print a greeting. -echo -echo "<<< NixOS Stage 1 >>>" -echo +info +info "<<< NixOS Stage 1 >>>" +info # Make several required directories. mkdir -p /etc/udev @@ -210,14 +217,14 @@ ln -s @modulesClosure@/lib/modules /lib/modules ln -s @modulesClosure@/lib/firmware /lib/firmware echo @extraUtils@/bin/modprobe > /proc/sys/kernel/modprobe for i in @kernelModules@; do - echo "loading module $(basename $i)..." + info "loading module $(basename $i)..." modprobe $i done # Create device nodes in /dev. @preDeviceCommands@ -echo "running udev..." +info "running udev..." ln -sfn /proc/self/fd /dev/fd ln -sfn /proc/self/fd/0 /dev/stdin ln -sfn /proc/self/fd/1 /dev/stdout @@ -235,8 +242,7 @@ udevadm settle # XXX: Use case usb->lvm will still fail, usb->luks->lvm is covered @preLVMCommands@ - -echo "starting device mapper and LVM..." +info "starting device mapper and LVM..." lvm vgchange -ay if test -n "$debug1devices"; then fail; fi @@ -379,7 +385,7 @@ mountFS() { done fi - echo "mounting $device on $mountPoint..." + info "mounting $device on $mountPoint..." mkdir -p "/mnt-root$mountPoint" diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index cb9735ae04f..44287f3cf09 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -280,7 +280,7 @@ let inherit (config.system.build) earlyMountScript; - inherit (config.boot.initrd) checkJournalingFS + inherit (config.boot.initrd) checkJournalingFS verbose preLVMCommands preDeviceCommands postDeviceCommands postMountCommands preFailCommands kernelModules; resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}") @@ -565,6 +565,23 @@ in description = "Names of supported filesystem types in the initial ramdisk."; }; + boot.initrd.verbose = mkOption { + default = true; + type = types.bool; + description = + '' + Verbosity of the initrd. Please note that disabling verbosity removes + only the mandatory messages generated by the NixOS scripts. For a + completely silent boot, you might also want to set the two following + configuration options: + + + boot.consoleLogLevel = 0; + boot.kernelParams = [ "quiet" "udev.log_priority=3" ]; + + ''; + }; + boot.loader.supportsInitrdSecrets = mkOption { internal = true; default = false; diff --git a/nixos/modules/virtualisation/oci-containers.nix b/nixos/modules/virtualisation/oci-containers.nix index ee9fe62187d..2dd15e3aba4 100644 --- a/nixos/modules/virtualisation/oci-containers.nix +++ b/nixos/modules/virtualisation/oci-containers.nix @@ -217,7 +217,7 @@ let environment = proxy_env; path = - if cfg.backend == "docker" then [ pkgs.docker ] + if cfg.backend == "docker" then [ config.virtualisation.docker.package ] else if cfg.backend == "podman" then [ config.virtualisation.podman.package ] else throw "Unhandled backend: ${cfg.backend}"; @@ -227,29 +227,30 @@ let ${cfg.backend} load -i ${container.imageFile} ''} ''; + + script = concatStringsSep " \\\n " ([ + "exec ${cfg.backend} run" + "--rm" + "--name=${escapeShellArg name}" + "--log-driver=${container.log-driver}" + ] ++ optional (container.entrypoint != null) + "--entrypoint=${escapeShellArg container.entrypoint}" + ++ (mapAttrsToList (k: v: "-e ${escapeShellArg k}=${escapeShellArg v}") container.environment) + ++ map (p: "-p ${escapeShellArg p}") container.ports + ++ optional (container.user != null) "-u ${escapeShellArg container.user}" + ++ map (v: "-v ${escapeShellArg v}") container.volumes + ++ optional (container.workdir != null) "-w ${escapeShellArg container.workdir}" + ++ map escapeShellArg container.extraOptions + ++ [container.image] + ++ map escapeShellArg container.cmd + ); + + preStop = "[ $SERVICE_RESULT = success ] || ${cfg.backend} stop ${name}"; postStop = "${cfg.backend} rm -f ${name} || true"; serviceConfig = { StandardOutput = "null"; StandardError = "null"; - ExecStart = concatStringsSep " \\\n " ([ - "${config.system.path}/bin/${cfg.backend} run" - "--rm" - "--name=${name}" - "--log-driver=${container.log-driver}" - ] ++ optional (container.entrypoint != null) - "--entrypoint=${escapeShellArg container.entrypoint}" - ++ (mapAttrsToList (k: v: "-e ${escapeShellArg k}=${escapeShellArg v}") container.environment) - ++ map (p: "-p ${escapeShellArg p}") container.ports - ++ optional (container.user != null) "-u ${escapeShellArg container.user}" - ++ map (v: "-v ${escapeShellArg v}") container.volumes - ++ optional (container.workdir != null) "-w ${escapeShellArg container.workdir}" - ++ map escapeShellArg container.extraOptions - ++ [container.image] - ++ map escapeShellArg container.cmd - ); - - ExecStop = ''${pkgs.bash}/bin/sh -c "[ $SERVICE_RESULT = success ] || ${cfg.backend} stop ${name}"''; ### There is no generalized way of supporting `reload` for docker ### containers. Some containers may respond well to SIGHUP sent to their diff --git a/pkgs/applications/editors/emacs-modes/updater-emacs.nix b/pkgs/applications/editors/emacs-modes/updater-emacs.nix index bd965c8f128..4c321065445 100644 --- a/pkgs/applications/editors/emacs-modes/updater-emacs.nix +++ b/pkgs/applications/editors/emacs-modes/updater-emacs.nix @@ -1,7 +1,7 @@ let pkgs = import ../../../.. {}; - emacsEnv = pkgs.emacs.withPackages (epkgs: let + emacsEnv = pkgs.emacs.pkgs.withPackages (epkgs: let promise = epkgs.trivialBuild { pname = "promise"; diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix index 35130ab3393..36883faab14 100644 --- a/pkgs/applications/networking/browsers/qutebrowser/default.nix +++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix @@ -31,12 +31,12 @@ let in mkDerivationWith python3Packages.buildPythonApplication rec { pname = "qutebrowser"; - version = "1.14.1"; + version = "2.0.1"; # 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 = "15l7jphy1qjsh6y6kd5mgkxsl6ymm9564g1yypa946jbyrgi8k2m"; + sha256 = "0hmj19bp5dihzpphxz77377yfmygj498am0h23kxg5m3y5hqv65a"; }; # Needs tox @@ -55,13 +55,16 @@ in mkDerivationWith python3Packages.buildPythonApplication rec { docbook_xml_dtd_45 docbook_xsl libxml2 libxslt ]; - propagatedBuildInputs = with python3Packages; [ + propagatedBuildInputs = with python3Packages; ([ pyyaml backendPackage jinja2 pygments - pypeg2 cssutils pyopengl attrs setuptools # scripts and userscripts libs tldextract beautifulsoup4 pyreadability pykeepass stem - ]; + # extensive ad blocking + adblock + ] + ++ lib.optional (pythonOlder "3.9") importlib-resources + ); patches = [ ./fix-restart.patch ]; diff --git a/pkgs/data/documentation/scheme-manpages/default.nix b/pkgs/data/documentation/scheme-manpages/default.nix index 2915430d9f2..e9fa1b7e4f4 100644 --- a/pkgs/data/documentation/scheme-manpages/default.nix +++ b/pkgs/data/documentation/scheme-manpages/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "scheme-manpages-unstable"; - version = "2020-08-14"; + version = "2021-01-17"; src = fetchFromGitHub { owner = "schemedoc"; repo = "manpages"; - rev = "2e99a0aea9c0327e3c2dcfb9b7a2f8f528b4fe43"; - sha256 = "0ykj4i8mx50mgyz9q63glfnc0mw1lf89hwsflpnbizjda5b4s0fp"; + rev = "817798ccca81424e797fda0e218d53a95f50ded7"; + sha256 = "1amc0dmliz2a37pivlkx88jbc08ypfiwv3z477znx8khhc538glk"; }; dontBuild = true; diff --git a/pkgs/development/libraries/ayatana-ido/default.nix b/pkgs/development/libraries/ayatana-ido/default.nix index 60417426f76..03b89411168 100644 --- a/pkgs/development/libraries/ayatana-ido/default.nix +++ b/pkgs/development/libraries/ayatana-ido/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "ayatana-ido"; - version = "0.8.1"; + version = "0.8.2"; src = fetchFromGitHub { owner = "AyatanaIndicators"; repo = pname; rev = version; - sha256 = "1mcw6gmacrzx4cyg4223dpwcmj3qf8l30mxsg43292lajzwsm2hz"; + sha256 = "sha256-nJ4F2faK0XZPj9GzUk3Ueap5h6rALFXISHqFQ30RuoU="; }; nativeBuildInputs = [ pkg-config autoreconfHook gtk-doc vala gobject-introspection ]; diff --git a/pkgs/development/python-modules/aiocoap/default.nix b/pkgs/development/python-modules/aiocoap/default.nix new file mode 100644 index 00000000000..dd74a21bf9b --- /dev/null +++ b/pkgs/development/python-modules/aiocoap/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, python +}: + +buildPythonPackage rec { + pname = "aiocoap"; + version = "0.4b3"; + + src = fetchFromGitHub { + owner = "chrysn"; + repo = pname; + rev = version; + sha256 = "1zjg475xgvi19rqg7jmfgy5nfabq50aph0231p9jba211ps7cmxw"; + }; + + checkPhase = '' + ${python.interpreter} -m aiocoap.cli.defaults + ${python.interpreter} -m unittest discover -v + ''; + + pythonImportsCheck = [ "aiocoap" ]; + + meta = with lib; { + description = "Python CoAP library"; + homepage = "https://aiocoap.readthedocs.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/boto3/default.nix b/pkgs/development/python-modules/boto3/default.nix index 81c8e957814..41d0ed5f81d 100644 --- a/pkgs/development/python-modules/boto3/default.nix +++ b/pkgs/development/python-modules/boto3/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "boto3"; - version = "1.16.61"; # N.B: if you change this, change botocore too + version = "1.16.62"; # N.B: if you change this, change botocore too src = fetchPypi { inherit pname version; - sha256 = "sha256-OPUD8FAqukJR3/TRkFfDGnud0PVDM99VIfiTHuTGXiY="; + sha256 = "sha256-u5H+z5guG7+2i7a9LJoMzjyErG+X3TONHvnkd4BnkJE="; }; propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ]; diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix index 8727b672a72..1b0f2a347d0 100644 --- a/pkgs/development/python-modules/botocore/default.nix +++ b/pkgs/development/python-modules/botocore/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "botocore"; - version = "1.19.61"; # N.B: if you change this, change boto3 and awscli to a matching version + version = "1.19.62"; # N.B: if you change this, change boto3 and awscli to a matching version src = fetchPypi { inherit pname version; - sha256 = "sha256-MkXJ6ZYUO8/epz0QUUXKcz/NfVr+dEqHYGEvxEnD+BA="; + sha256 = "sha256-KbS5vltA85KgM5JsCMAEwBvWRxOE728S6qSe44cKAQw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/plugwise/default.nix b/pkgs/development/python-modules/plugwise/default.nix new file mode 100644 index 00000000000..f4be0e5140b --- /dev/null +++ b/pkgs/development/python-modules/plugwise/default.nix @@ -0,0 +1,66 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, aiohttp +, async-timeout +, crcmod +, defusedxml +, pyserial +, pytz +, python-dateutil +, semver +, jsonpickle +, mypy +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "plugwise"; + version = "0.8.5"; + + src = fetchFromGitHub { + owner = pname; + repo = "python-plugwise"; + rev = version; + sha256 = "1gviyy31l1j8z0if2id3m13r43kw4mcgd8921813yfhmf174piq4"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + crcmod + defusedxml + pyserial + pytz + python-dateutil + semver + ]; + + checkInputs = [ + jsonpickle + mypy + pytest-aiohttp + pytest-asyncio + pytest-cov + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "plugwise" ]; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Python module for Plugwise Smiles, Stretch and USB stick"; + longDescription = '' + XKNX is an asynchronous Python library for reading and writing KNX/IP + packets. It provides support for KNX/IP routing and tunneling devices. + ''; + homepage = "https://github.com/plugwise/python-plugwise"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/regenmaschine/default.nix b/pkgs/development/python-modules/regenmaschine/default.nix new file mode 100644 index 00000000000..3380ef99f18 --- /dev/null +++ b/pkgs/development/python-modules/regenmaschine/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, aresponses +, asynctest +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytest-mock +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "regenmaschine"; + version = "3.1.1"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "0m6i7vspp8ssdk2k32kznql1j8gkp300kzb7pk67hzvpijdy3mca"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ aiohttp ]; + + checkInputs = [ + aresponses + asynctest + pytest-aiohttp + pytest-asyncio + pytest-cov + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "regenmaschine" ]; + + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Python library for interacting with RainMachine smart sprinkler controllers"; + homepage = "https://github.com/bachya/regenmaschine"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix index adfc6a2580a..d9eef5e3c4e 100644 --- a/pkgs/development/tools/continuous-integration/jenkins/default.nix +++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix @@ -1,13 +1,13 @@ -{ lib, stdenv, fetchurl, common-updater-scripts, coreutils, git, gnused, nix, nixfmt -, writeScript, nixosTests, jq, cacert, curl }: +{ lib, stdenv, fetchurl, common-updater-scripts, coreutils, git, gnused, nix +, nixfmt, writeScript, nixosTests, jq, cacert, curl }: stdenv.mkDerivation rec { pname = "jenkins"; - version = "2.263.2"; + version = "2.263.3"; src = fetchurl { url = "http://mirrors.jenkins.io/war-stable/${version}/jenkins.war"; - sha256 = "13l7y1307iv54z2zsjy0slzv2hpqv9i35qb15xa8s6sl7lcm9l49"; + sha256 = "0lyzmv378yjz4p4dlpm1nwdq4p781nycvspdik82xbxg4s6gamd3"; }; buildCommand = '' diff --git a/pkgs/development/tools/rust/cargo-c/default.nix b/pkgs/development/tools/rust/cargo-c/default.nix index 7b9aa5cf610..c468ad0f4e1 100644 --- a/pkgs/development/tools/rust/cargo-c/default.nix +++ b/pkgs/development/tools/rust/cargo-c/default.nix @@ -5,7 +5,7 @@ rustPlatform.buildRustPackage rec { pname = "cargo-c"; - version = "0.7.1"; + version = "0.7.2"; src = stdenv.mkDerivation rec { name = "${pname}-source-${version}"; @@ -14,11 +14,11 @@ rustPlatform.buildRustPackage rec { owner = "lu-zero"; repo = pname; rev = "v${version}"; - sha256 = "1a348ys4lbgsr23px81kw985i5bp8z75wgzl9l2jv9sdzirpb8k4"; + sha256 = "1rgwj3kf31n4rz0b7jw67wsgyapdycfic7plm5gm4n9rlslp5ax5"; }; cargoLock = fetchurl { url = "https://github.com/lu-zero/${pname}/releases/download/v${version}/Cargo.lock"; - sha256 = "1f78wlid8jx26pqybmafzcl1656nnp87hdiib0v1p5k73mk4ymvy"; + sha256 = "0jnawnkf4m7cqcq9iahnxa53l61a5riax400n96vxrqf3fa752c6"; }; installPhase = '' @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { ''; }; - cargoSha256 = "1nj54igm57h9d8hhqdgkay2nnblcdxhpnha68jqvjazd8a0bq3la"; + cargoSha256 = "0svmhq64aqw1vidq8jmw7w4xhhnyp04vcs9yzhjyz25c4cn9grsf"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] diff --git a/pkgs/misc/emulators/mednaffe/default.nix b/pkgs/misc/emulators/mednaffe/default.nix index dbbbe4da557..7d0d6c6f68e 100644 --- a/pkgs/misc/emulators/mednaffe/default.nix +++ b/pkgs/misc/emulators/mednaffe/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "mednaffe"; - version = "0.8.8"; + version = "0.9.0"; src = fetchFromGitHub { owner = "AmatCoder"; repo = "mednaffe"; rev = version; - sha256 = "15qk3a3l1phr8bap2ayh3c0vyvw2jwhny1iz1ajq2adyjpm9fhr7"; + sha256 = "sha256-BS/GNnRYj9klc4RRj7LwNikgApNttv4IyWPL694j+gM="; }; nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ]; diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 051f7032bd5..fc01fee85b8 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -621,7 +621,7 @@ "plaato" = ps: with ps; [ aiohttp-cors ]; "plant" = ps: with ps; [ sqlalchemy ]; "plex" = ps: with ps; [ aiohttp-cors plexapi plexauth plexwebsocket pysonos ]; - "plugwise" = ps: with ps; [ ]; # missing inputs: plugwise + "plugwise" = ps: with ps; [ plugwise ]; "plum_lightpad" = ps: with ps; [ ]; # missing inputs: plumlightpad "pocketcasts" = ps: with ps; [ ]; # missing inputs: pycketcasts "point" = ps: with ps; [ aiohttp-cors ]; # missing inputs: pypoint @@ -659,7 +659,7 @@ "rainbird" = ps: with ps; [ ]; # missing inputs: pyrainbird "raincloud" = ps: with ps; [ ]; # missing inputs: raincloudy "rainforest_eagle" = ps: with ps; [ ]; # missing inputs: eagle200_reader uEagle - "rainmachine" = ps: with ps; [ ]; # missing inputs: regenmaschine + "rainmachine" = ps: with ps; [ regenmaschine ]; "random" = ps: with ps; [ ]; "raspihats" = ps: with ps; [ smbus-cffi ]; # missing inputs: raspihats "raspyrfm" = ps: with ps; [ ]; # missing inputs: raspyrfm-client diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix index 590aa6f2b6b..f3f7a4a6911 100644 --- a/pkgs/servers/sql/postgresql/ext/postgis.nix +++ b/pkgs/servers/sql/postgresql/ext/postgis.nix @@ -15,13 +15,13 @@ }: stdenv.mkDerivation rec { pname = "postgis"; - version = "3.1.0"; + version = "3.1.1"; outputs = [ "out" "doc" ]; src = fetchurl { url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"; - sha256 = "008280ijd6m9h35y9lcpql0fk0h9f3zkc1pfkdm0rkbnd12y41ns"; + sha256 = "0z9a39243fv37mansbbjq5mmxpnhr7xzn8pv92fr7dkdb3psz5hf"; }; buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ] diff --git a/pkgs/tools/admin/awscli/default.nix b/pkgs/tools/admin/awscli/default.nix index a945e3eedd5..587ceb3a8a6 100644 --- a/pkgs/tools/admin/awscli/default.nix +++ b/pkgs/tools/admin/awscli/default.nix @@ -28,11 +28,11 @@ let in with py.pkgs; buildPythonApplication rec { pname = "awscli"; - version = "1.18.221"; # N.B: if you change this, change botocore to a matching version too + version = "1.18.222"; # N.B: if you change this, change botocore to a matching version too src = fetchPypi { inherit pname version; - sha256 = "sha256-G8HonN02eFcfMRhj9+cporugVsF7nDeHEopuHnbS1Is="; + sha256 = "sha256-nVBQ2Lj5+zyvj3g0W3Rxh+CZwG7sbqKehvg6vAhHexs="; }; # https://github.com/aws/aws-cli/issues/4837 diff --git a/pkgs/tools/networking/acme-client/default.nix b/pkgs/tools/networking/acme-client/default.nix index c669a3a3be2..6de95b34e62 100644 --- a/pkgs/tools/networking/acme-client/default.nix +++ b/pkgs/tools/networking/acme-client/default.nix @@ -10,11 +10,11 @@ with lib; stdenv.mkDerivation rec { pname = "acme-client"; - version = "1.0.1"; + version = "1.1.0"; src = fetchurl { url = "https://data.wolfsden.cz/sources/acme-client-${version}.tar.xz"; - sha256 = "0gmdvmyw8a61w08hrxllypf7rpnqg0fxipbk3zmvsxj7m5i6iysj"; + sha256 = "sha256-AYI7WfRTb5R0/hDX5Iqkq5nrLZ4gQecAGObSajSA+vw="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/tools/system/bpytop/default.nix b/pkgs/tools/system/bpytop/default.nix index b59222200c1..6754d0806b6 100644 --- a/pkgs/tools/system/bpytop/default.nix +++ b/pkgs/tools/system/bpytop/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "bpytop"; - version = "1.0.59"; + version = "1.0.61"; src = fetchFromGitHub { owner = "aristocratos"; repo = pname; rev = "v${version}"; - sha256 = "sha256-RlrUUIbZRNTvxU8LVW0/ZcARlKDVvSMlkN0+6BgAink="; + sha256 = "sha256-E6blMhDkZa3Wbdbsw7f8jdHwHFINOQ48XC5pQdkVPtQ="; }; buildInputs = [ makeWrapper ]; diff --git a/pkgs/tools/system/inxi/default.nix b/pkgs/tools/system/inxi/default.nix index 1ef871c9d30..7f24be893bf 100644 --- a/pkgs/tools/system/inxi/default.nix +++ b/pkgs/tools/system/inxi/default.nix @@ -22,13 +22,13 @@ let ++ recommendedDisplayInformationPrograms; in stdenv.mkDerivation rec { pname = "inxi"; - version = "3.2.02-2"; + version = "3.3.00-1"; src = fetchFromGitHub { owner = "smxi"; repo = "inxi"; rev = version; - sha256 = "sha256-WHfW0empveOxC3jvYq46jlvVZDb8JLne5JHPtFE6nTs="; + sha256 = "sha256-P1AYo4Ao9lDxJXyZd64wBxNgQIvEcT00ThjtcB2v52I="; }; buildInputs = [ perl makeWrapper ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1dbe9c81cbf..e2bf63d4764 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -204,6 +204,8 @@ in { aioamqp = callPackage ../development/python-modules/aioamqp { }; + aiocoap = callPackage ../development/python-modules/aiocoap { }; + aioconsole = callPackage ../development/python-modules/aioconsole { }; aiocontextvars = callPackage ../development/python-modules/aiocontextvars { }; @@ -4911,6 +4913,8 @@ in { pluginbase = callPackage ../development/python-modules/pluginbase { }; + plugwise = callPackage ../development/python-modules/plugwise { }; + plumbum = callPackage ../development/python-modules/plumbum { }; ply = callPackage ../development/python-modules/ply { }; @@ -6652,6 +6656,8 @@ in { reflink = callPackage ../development/python-modules/reflink { }; + regenmaschine = callPackage ../development/python-modules/regenmaschine { }; + regex = callPackage ../development/python-modules/regex { }; regional = callPackage ../development/python-modules/regional { };