diff --git a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix index 37b46db059c0..005f75476e9a 100644 --- a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix +++ b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix @@ -10,7 +10,6 @@ with lib; system.build.cloudstackImage = import ../../../lib/make-disk-image.nix { inherit lib config pkgs; - diskSize = 8192; format = "qcow2"; configFile = pkgs.writeText "configuration.nix" '' diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix index 0ecf07669a11..653744986d13 100644 --- a/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -40,8 +40,9 @@ in { }; sizeMB = mkOption { - type = types.int; - default = if config.ec2.hvm then 2048 else 8192; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 8192; description = "The size in MB of the image"; }; diff --git a/nixos/maintainers/scripts/openstack/openstack-image.nix b/nixos/maintainers/scripts/openstack/openstack-image.nix index 4c464f43f61d..3255e7f3d44d 100644 --- a/nixos/maintainers/scripts/openstack/openstack-image.nix +++ b/nixos/maintainers/scripts/openstack/openstack-image.nix @@ -12,8 +12,8 @@ with lib; system.build.openstackImage = import ../../../lib/make-disk-image.nix { inherit lib config; + additionalSpace = "1024M"; pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package - diskSize = 8192; format = "qcow2"; configFile = pkgs.writeText "configuration.nix" '' diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 2b6a61e9a80e..567a8b6f3b97 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -6,6 +6,12 @@ let ids = config.ids; cfg = config.users; + isPasswdCompatible = str: !(hasInfix ":" str || hasInfix "\n" str); + passwdEntry = type: lib.types.addCheck type isPasswdCompatible // { + name = "passwdEntry ${type.name}"; + description = "${type.description}, not containing newlines or colons"; + }; + # Check whether a password hash will allow login. allowsLogin = hash: hash == "" # login without password @@ -54,7 +60,7 @@ let options = { name = mkOption { - type = types.str; + type = passwdEntry types.str; apply = x: assert (builtins.stringLength x < 32 || abort "Username '${x}' is longer than 31 characters which is not allowed!"); x; description = '' The name of the user account. If undefined, the name of the @@ -63,7 +69,7 @@ let }; description = mkOption { - type = types.str; + type = passwdEntry types.str; default = ""; example = "Alice Q. User"; description = '' @@ -128,7 +134,7 @@ let }; home = mkOption { - type = types.path; + type = passwdEntry types.path; default = "/var/empty"; description = "The user's home directory."; }; @@ -157,7 +163,7 @@ let }; shell = mkOption { - type = types.nullOr (types.either types.shellPackage types.path); + type = types.nullOr (types.either types.shellPackage (passwdEntry types.path)); default = pkgs.shadow; defaultText = "pkgs.shadow"; example = literalExample "pkgs.bashInteractive"; @@ -217,7 +223,7 @@ let }; hashedPassword = mkOption { - type = with types; nullOr str; + type = with types; nullOr (passwdEntry str); default = null; description = '' Specifies the hashed password for the user. @@ -251,7 +257,7 @@ let }; initialHashedPassword = mkOption { - type = with types; nullOr str; + type = with types; nullOr (passwdEntry str); default = null; description = '' Specifies the initial hashed password for the user, i.e. the @@ -323,7 +329,7 @@ let options = { name = mkOption { - type = types.str; + type = passwdEntry types.str; description = '' The name of the group. If undefined, the name of the attribute set will be used. @@ -340,7 +346,7 @@ let }; members = mkOption { - type = with types; listOf str; + type = with types; listOf (passwdEntry str); default = []; description = '' The user names of the group members, added to the diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index ecd3a3c1a166..0cd0659d1dad 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -770,7 +770,6 @@ ./services/networking/prayer.nix ./services/networking/privoxy.nix ./services/networking/prosody.nix - ./services/networking/quagga.nix ./services/networking/quassel.nix ./services/networking/quorum.nix ./services/networking/quicktun.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 9f1efc462798..233e3ee848be 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -18,6 +18,7 @@ with lib; # Completely removed modules (mkRemovedOptionModule [ "fonts" "fontconfig" "penultimate" ] "The corresponding package has removed from nixpkgs.") + (mkRemovedOptionModule [ "services" "quagga" ] "the corresponding package has been removed from nixpkgs") (mkRemovedOptionModule [ "services" "chronos" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "deepin" ] "The corresponding packages were removed from nixpkgs.") (mkRemovedOptionModule [ "services" "firefox" "syncserver" "user" ] "") diff --git a/nixos/modules/services/networking/quagga.nix b/nixos/modules/services/networking/quagga.nix deleted file mode 100644 index 001a5c2b0ce8..000000000000 --- a/nixos/modules/services/networking/quagga.nix +++ /dev/null @@ -1,185 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - cfg = config.services.quagga; - - services = [ "babel" "bgp" "isis" "ospf6" "ospf" "pim" "rip" "ripng" ]; - allServices = services ++ [ "zebra" ]; - - isEnabled = service: cfg.${service}.enable; - - daemonName = service: if service == "zebra" then service else "${service}d"; - - configFile = service: - let - scfg = cfg.${service}; - in - if scfg.configFile != null then scfg.configFile - else pkgs.writeText "${daemonName service}.conf" - '' - ! Quagga ${daemonName service} configuration - ! - hostname ${config.networking.hostName} - log syslog - service password-encryption - ! - ${scfg.config} - ! - end - ''; - - serviceOptions = service: - { - enable = mkEnableOption "the Quagga ${toUpper service} routing protocol"; - - configFile = mkOption { - type = types.nullOr types.path; - default = null; - example = "/etc/quagga/${daemonName service}.conf"; - description = '' - Configuration file to use for Quagga ${daemonName service}. - By default the NixOS generated files are used. - ''; - }; - - config = mkOption { - type = types.lines; - default = ""; - example = - let - examples = { - rip = '' - router rip - network 10.0.0.0/8 - ''; - - ospf = '' - router ospf - network 10.0.0.0/8 area 0 - ''; - - bgp = '' - router bgp 65001 - neighbor 10.0.0.1 remote-as 65001 - ''; - }; - in - examples.${service} or ""; - description = '' - ${daemonName service} configuration statements. - ''; - }; - - vtyListenAddress = mkOption { - type = types.str; - default = "127.0.0.1"; - description = '' - Address to bind to for the VTY interface. - ''; - }; - - vtyListenPort = mkOption { - type = types.nullOr types.int; - default = null; - description = '' - TCP Port to bind to for the VTY interface. - ''; - }; - }; - -in - -{ - - ###### interface - imports = [ - { - options.services.quagga = { - zebra = (serviceOptions "zebra") // { - enable = mkOption { - type = types.bool; - default = any isEnabled services; - description = '' - Whether to enable the Zebra routing manager. - - The Zebra routing manager is automatically enabled - if any routing protocols are configured. - ''; - }; - }; - }; - } - { options.services.quagga = (genAttrs services serviceOptions); } - ]; - - ###### implementation - - config = mkIf (any isEnabled allServices) { - - environment.systemPackages = [ - pkgs.quagga # for the vtysh tool - ]; - - users.users.quagga = { - description = "Quagga daemon user"; - isSystemUser = true; - group = "quagga"; - }; - - users.groups = { - quagga = {}; - # Members of the quaggavty group can use vtysh to inspect the Quagga daemons - quaggavty = { members = [ "quagga" ]; }; - }; - - systemd.services = - let - quaggaService = service: - let - scfg = cfg.${service}; - daemon = daemonName service; - in - nameValuePair daemon ({ - wantedBy = [ "multi-user.target" ]; - restartTriggers = [ (configFile service) ]; - - serviceConfig = { - Type = "forking"; - PIDFile = "/run/quagga/${daemon}.pid"; - ExecStart = "@${pkgs.quagga}/libexec/quagga/${daemon} ${daemon} -d -f ${configFile service}" - + optionalString (scfg.vtyListenAddress != "") " -A ${scfg.vtyListenAddress}" - + optionalString (scfg.vtyListenPort != null) " -P ${toString scfg.vtyListenPort}"; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - Restart = "on-abort"; - }; - } // ( - if service == "zebra" then - { - description = "Quagga Zebra routing manager"; - unitConfig.Documentation = "man:zebra(8)"; - after = [ "network.target" ]; - preStart = '' - install -m 0755 -o quagga -g quagga -d /run/quagga - - ${pkgs.iproute2}/bin/ip route flush proto zebra - ''; - } - else - { - description = "Quagga ${toUpper service} routing daemon"; - unitConfig.Documentation = "man:${daemon}(8) man:zebra(8)"; - bindsTo = [ "zebra.service" ]; - after = [ "network.target" "zebra.service" ]; - } - )); - in - listToAttrs (map quaggaService (filter isEnabled allServices)); - - }; - - meta.maintainers = with lib.maintainers; [ ]; - -} diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix index 60fed3222ef3..03dd3c051309 100644 --- a/nixos/modules/virtualisation/azure-image.nix +++ b/nixos/modules/virtualisation/azure-image.nix @@ -9,8 +9,9 @@ in options = { virtualisation.azureImage.diskSize = mkOption { - type = with types; int; - default = 2048; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 2048; description = '' Size of disk image. Unit is MB. ''; diff --git a/nixos/modules/virtualisation/digital-ocean-image.nix b/nixos/modules/virtualisation/digital-ocean-image.nix index b582e235d435..0ff2ee591f24 100644 --- a/nixos/modules/virtualisation/digital-ocean-image.nix +++ b/nixos/modules/virtualisation/digital-ocean-image.nix @@ -10,8 +10,9 @@ in options = { virtualisation.digitalOceanImage.diskSize = mkOption { - type = with types; int; - default = 4096; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 4096; description = '' Size of disk image. Unit is MB. ''; diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix index e2332df611aa..79c3921669ed 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -18,8 +18,9 @@ in options = { virtualisation.googleComputeImage.diskSize = mkOption { - type = with types; int; - default = 1536; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 1536; description = '' Size of disk image. Unit is MB. ''; diff --git a/nixos/modules/virtualisation/hyperv-image.nix b/nixos/modules/virtualisation/hyperv-image.nix index fabc9113dfc4..6845d6750092 100644 --- a/nixos/modules/virtualisation/hyperv-image.nix +++ b/nixos/modules/virtualisation/hyperv-image.nix @@ -9,8 +9,9 @@ in { options = { hyperv = { baseImageSize = mkOption { - type = types.int; - default = 2048; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 2048; description = '' The size of the hyper-v base image in MiB. ''; diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index fa580e8b42d6..071edda82693 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -11,8 +11,9 @@ in { options = { virtualbox = { baseImageSize = mkOption { - type = types.int; - default = 50 * 1024; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 50 * 1024; description = '' The size of the VirtualBox base image in MiB. ''; diff --git a/nixos/modules/virtualisation/vmware-image.nix b/nixos/modules/virtualisation/vmware-image.nix index 9da9e145f7a9..f6cd12e2bb79 100644 --- a/nixos/modules/virtualisation/vmware-image.nix +++ b/nixos/modules/virtualisation/vmware-image.nix @@ -18,8 +18,9 @@ in { options = { vmware = { baseImageSize = mkOption { - type = types.int; - default = 2048; + type = with types; either (enum [ "auto" ]) int; + default = "auto"; + example = 2048; description = '' The size of the VMWare base image in MiB. ''; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 6656d287a426..1ce55e1eac4e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -343,7 +343,6 @@ in proxy = handleTest ./proxy.nix {}; pt2-clone = handleTest ./pt2-clone.nix {}; qboot = handleTestOn ["x86_64-linux" "i686-linux"] ./qboot.nix {}; - quagga = handleTest ./quagga.nix {}; quorum = handleTest ./quorum.nix {}; rabbitmq = handleTest ./rabbitmq.nix {}; radarr = handleTest ./radarr.nix {}; diff --git a/nixos/tests/quagga.nix b/nixos/tests/quagga.nix deleted file mode 100644 index 1067f9eebb20..000000000000 --- a/nixos/tests/quagga.nix +++ /dev/null @@ -1,96 +0,0 @@ -# This test runs Quagga and checks if OSPF routing works. -# -# Network topology: -# [ client ]--net1--[ router1 ]--net2--[ router2 ]--net3--[ server ] -# -# All interfaces are in OSPF Area 0. - -import ./make-test-python.nix ({ pkgs, ... }: - let - - ifAddr = node: iface: (pkgs.lib.head node.config.networking.interfaces.${iface}.ipv4.addresses).address; - - ospfConf = '' - interface eth2 - ip ospf hello-interval 1 - ip ospf dead-interval 5 - ! - router ospf - network 192.168.0.0/16 area 0 - ''; - - in - { - name = "quagga"; - - meta = with pkgs.lib.maintainers; { - maintainers = [ ]; - }; - - nodes = { - - client = - { nodes, ... }: - { - virtualisation.vlans = [ 1 ]; - networking.defaultGateway = ifAddr nodes.router1 "eth1"; - }; - - router1 = - { ... }: - { - virtualisation.vlans = [ 1 2 ]; - boot.kernel.sysctl."net.ipv4.ip_forward" = "1"; - networking.firewall.extraCommands = "iptables -A nixos-fw -i eth2 -p ospf -j ACCEPT"; - services.quagga.ospf = { - enable = true; - config = ospfConf; - }; - }; - - router2 = - { ... }: - { - virtualisation.vlans = [ 3 2 ]; - boot.kernel.sysctl."net.ipv4.ip_forward" = "1"; - networking.firewall.extraCommands = "iptables -A nixos-fw -i eth2 -p ospf -j ACCEPT"; - services.quagga.ospf = { - enable = true; - config = ospfConf; - }; - }; - - server = - { nodes, ... }: - { - virtualisation.vlans = [ 3 ]; - networking.defaultGateway = ifAddr nodes.router2 "eth1"; - networking.firewall.allowedTCPPorts = [ 80 ]; - services.httpd.enable = true; - services.httpd.adminAddr = "foo@example.com"; - }; - }; - - testScript = - { ... }: - '' - start_all() - - # Wait for the networking to start on all machines - for machine in client, router1, router2, server: - machine.wait_for_unit("network.target") - - with subtest("Wait for OSPF to form adjacencies"): - for gw in router1, router2: - gw.wait_for_unit("ospfd") - gw.wait_until_succeeds("vtysh -c 'show ip ospf neighbor' | grep Full") - gw.wait_until_succeeds("vtysh -c 'show ip route' | grep '^O>'") - - with subtest("Test ICMP"): - client.wait_until_succeeds("ping -c 3 server >&2") - - with subtest("Test whether HTTP works"): - server.wait_for_unit("httpd") - client.succeed("curl --fail http://server/ >&2") - ''; - }) diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 6ecf462d54d9..4edc034720c4 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -55,6 +55,7 @@ let majorVersion = "8"; patches = optional (targetPlatform != hostPlatform) ../libstdc++-target.patch + ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch ++ optional noSysDirs ../no-sys-dirs.patch /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02"; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 7f35f5c7bb99..ca92a8f48450 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -70,6 +70,7 @@ let majorVersion = "9"; # This patch can most likely be removed by a post 9.3.0-release. [ ./avoid-cycling-subreg-reloads.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch + ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch ++ optional noSysDirs ../no-sys-dirs.patch /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02"; diff --git a/pkgs/development/libraries/libxc/default.nix b/pkgs/development/libraries/libxc/default.nix index f78cd09c0ae0..d4f6391fe6f4 100644 --- a/pkgs/development/libraries/libxc/default.nix +++ b/pkgs/development/libraries/libxc/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }: let - version = "5.1.2"; + version = "5.1.3"; in stdenv.mkDerivation { pname = "libxc"; @@ -11,7 +11,7 @@ in stdenv.mkDerivation { owner = "libxc"; repo = "libxc"; rev = version; - sha256 = "1bcj7x0kaal62m41v9hxb4h1d2cxs2ynvsfqqg7c5yi7829nvapb"; + sha256 = "14czspifznsmvvix5hcm1rk18iy590qk8p5m00p0y032gmn9i2zj"; }; buildInputs = [ gfortran ]; @@ -28,7 +28,6 @@ in stdenv.mkDerivation { ''; doCheck = true; - enableParallelBuilding = true; meta = with lib; { description = "Library of exchange-correlation functionals for density-functional theory"; diff --git a/pkgs/development/python-modules/brother/default.nix b/pkgs/development/python-modules/brother/default.nix index e4f9d63bd6b1..9f41ed5756f5 100644 --- a/pkgs/development/python-modules/brother/default.nix +++ b/pkgs/development/python-modules/brother/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "brother"; - version = "0.2.2"; + version = "1.0.0"; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "bieniu"; repo = pname; rev = version; - sha256 = "sha256-vIefcL3K3ZbAUxMFM7gbbTFdrnmufWZHcq4OA19SYXE="; + sha256 = "sha256-0NfqPlQiOkNhR+H55E9LE4dGa9R8vcSyPNbbIeiRJV8="; }; postPatch = '' diff --git a/pkgs/development/python-modules/telfhash/default.nix b/pkgs/development/python-modules/telfhash/default.nix new file mode 100644 index 000000000000..a7aca8866ed7 --- /dev/null +++ b/pkgs/development/python-modules/telfhash/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, capstone +, pyelftools +, tlsh +, nose +}: +buildPythonPackage { + pname = "telfhash"; + version = "unstable-2021-01-29"; + + src = fetchFromGitHub { + owner = "trendmicro"; + repo = "telfhash"; + rev = "b5e398e59dc25a56a28861751c1fccc74ef71617"; + sha256 = "jNu6qm8Q/UyJVaCqwFOPX02xAR5DwvCK3PaH6Fvmakk="; + }; + + # The tlsh library's name is just "tlsh" + postPatch = '' + substituteInPlace requirements.txt --replace "python-tlsh" "tlsh" + ''; + + propagatedBuildInputs = [ + capstone + pyelftools + tlsh + ]; + + checkInputs = [ + nose + ]; + + checkPhase = '' + nosetests + ''; + + pythonImportsCheck = [ + "telfhash" + ]; + + meta = with lib; { + description = "Symbol hash for ELF files"; + homepage = "https://github.com/trendmicro/telfhash"; + license = licenses.asl20; + maintainers = teams.determinatesystems.members; + }; +} diff --git a/pkgs/development/python-modules/zwave-js-server-python/default.nix b/pkgs/development/python-modules/zwave-js-server-python/default.nix new file mode 100644 index 000000000000..61dba04a79e1 --- /dev/null +++ b/pkgs/development/python-modules/zwave-js-server-python/default.nix @@ -0,0 +1,40 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "zwave-js-server-python"; + version = "0.23.1"; + disabled = pythonOlder "3.8"; + + + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = pname; + rev = version; + sha256 = "0kmmhn357k22ana0ysd8jlz1fyfaqlc8k74ryaik0rrw7nmn1n11"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytest-aiohttp + pytestCheckHook + ]; + + pythonImportsCheck = [ "zwave_js_server" ]; + + meta = with lib; { + description = "Python wrapper for zwave-js-server"; + homepage = "https://github.com/home-assistant-libs/zwave-js-server-python"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/tools/gotestsum/default.nix b/pkgs/development/tools/gotestsum/default.nix index 6c6d6343d437..e9bc48b0dcf2 100644 --- a/pkgs/development/tools/gotestsum/default.nix +++ b/pkgs/development/tools/gotestsum/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "gotestsum"; - version = "1.6.3"; + version = "1.6.4"; src = fetchFromGitHub { owner = "gotestyourself"; repo = "gotestsum"; rev = "v${version}"; - sha256 = "sha256-xUDhJLTO3JZ7rlUUzcypUev60qmRK9zOlO2VYeXqT4o="; + sha256 = "sha256-5iSUk/J73enbc/N3bn7M4oj2A0yoF1jTWpnXD380hFI="; }; vendorSha256 = "sha256-sHi8iW+ZV/coeAwDUYnSH039UNtUO9HK0Bhz9Gmtv8k="; diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index 0ce151f65071..293b8bb095a7 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -71,6 +71,35 @@ let in lib.mapAttrs change grammars; + # Usage: + # pkgs.tree-sitter.withPlugins (p: [ p.tree-sitter-c p.tree-sitter-java ... ]) + # + # or for all grammars: + # pkgs.tree-sitter.withPlugins (_: allGrammars) + # which is equivalent to + # pkgs.tree-sitter.withPlugins (p: builtins.attrValues p) + withPlugins = grammarFn: + let + grammars = grammarFn builtGrammars; + in + linkFarm "grammars" + (map + (drv: + let + name = lib.strings.getName drv; + in + { + name = + (lib.strings.removePrefix "tree-sitter-" + (lib.strings.removeSuffix "-grammar" name)) + + stdenv.hostPlatform.extensions.sharedLibrary; + path = "${drv}/parser"; + } + ) + grammars); + + allGrammars = builtins.attrValues builtGrammars; + in rustPlatform.buildRustPackage { pname = "tree-sitter"; @@ -111,7 +140,7 @@ rustPlatform.buildRustPackage { updater = { inherit update-all-grammars; }; - inherit grammars builtGrammars; + inherit grammars builtGrammars withPlugins allGrammars; tests = { # make sure all grammars build diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index a2e286d8bc56..4586477293b5 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -5,6 +5,7 @@ , rust , rustPlatform , installShellFiles +, libiconv , libobjc , Security , CoreServices @@ -28,7 +29,7 @@ rustPlatform.buildRustPackage rec { # Install completions post-install nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals stdenv.isDarwin [ libobjc Security CoreServices Metal Foundation ]; + buildInputs = lib.optionals stdenv.isDarwin [ libiconv libobjc Security CoreServices Metal Foundation ]; # The rusty_v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and place it in the locations it will require it in advance diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index 7e12d083c32f..3e352977d56e 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -50,6 +50,9 @@ , CoreFoundation , CoreServices +# nvim-treesitter dependencies +, tree-sitter + # sved dependencies , glib , gobject-introspection @@ -364,6 +367,24 @@ self: super: { dependencies = with super; [ popfix ]; }); + # Usage: + # pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [ p.tree-sitter-c p.tree-sitter-java ... ]) + # or for all grammars: + # pkgs.vimPlugins.nvim-treesitter.withPlugins (_: tree-sitter.allGrammars) + nvim-treesitter = super.nvim-treesitter.overrideAttrs (old: { + passthru.withPlugins = + grammarFn: self.nvim-treesitter.overrideAttrs (_: { + postPatch = + let + grammars = tree-sitter.withPlugins grammarFn; + in + '' + rm -r parser + ln -s ${grammars} parser + ''; + }); + }); + onehalf = super.onehalf.overrideAttrs (old: { configurePhase = "cd vim"; }); diff --git a/pkgs/os-specific/linux/displaylink/default.nix b/pkgs/os-specific/linux/displaylink/default.nix index bd50852bd9d4..ca3e38c2e707 100644 --- a/pkgs/os-specific/linux/displaylink/default.nix +++ b/pkgs/os-specific/linux/displaylink/default.nix @@ -20,17 +20,17 @@ let in stdenv.mkDerivation rec { pname = "displaylink"; - version = "5.3.1.34"; + version = "5.4.0-55.153"; src = requireFile rec { name = "displaylink.zip"; - sha256 = "1c1kbjgpb71f73qnyl44rvwi6l4ivddq789rwvvh0ahw2jm324hy"; + sha256 = "1m2l3bnlfwfp94w7khr05npsbysg9mcyi7hi85n78xkd0xdcxml8"; message = '' In order to install the DisplayLink drivers, you must first comply with DisplayLink's EULA and download the binaries and sources from here: - https://www.displaylink.com/downloads/file?id=1576 + https://www.synaptics.com/node/3751 Once you have downloaded the file, please use the following commands and re-run the installation: diff --git a/pkgs/os-specific/linux/evdi/default.nix b/pkgs/os-specific/linux/evdi/default.nix index 0f56d0e95ca6..a8a0445e955d 100644 --- a/pkgs/os-specific/linux/evdi/default.nix +++ b/pkgs/os-specific/linux/evdi/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "evdi"; - version = "v1.7.2"; + version = "unstable-20210401"; src = fetchFromGitHub { owner = "DisplayLink"; repo = pname; - rev = version; - sha256 = "074j0xh037n8mc4isihfz9lap57wvxaxib32pvy6jhjl3wyik632"; + rev = "b0b3d131b26df62664ca33775679eea7b70c47b1"; + sha256 = "09apbvdc78bbqzja9z3b1wrwmqkv3k7cn3lll5gsskxjnqbhxk9y"; }; nativeBuildInputs = kernel.moduleBuildDependencies; @@ -33,6 +33,6 @@ stdenv.mkDerivation rec { platforms = platforms.linux; license = with licenses; [ lgpl21 gpl2 ]; homepage = "https://www.displaylink.com/"; - broken = versionOlder kernel.version "4.9" || stdenv.isAarch64; + broken = versionOlder kernel.version "4.19" || stdenv.isAarch64; }; } diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4d86e743d151..d900ec7d743c 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -984,6 +984,6 @@ "zone" = ps: with ps; [ ]; "zoneminder" = ps: with ps; [ zm-py ]; "zwave" = ps: with ps; [ aiohttp-cors homeassistant-pyozw paho-mqtt pydispatcher python-openzwave-mqtt ]; - "zwave_js" = ps: with ps; [ aiohttp-cors ]; # missing inputs: zwave-js-server-python + "zwave_js" = ps: with ps; [ aiohttp-cors zwave-js-server-python ]; }; } diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 9ba5f2c17a9a..1186f52697a0 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -27,6 +27,19 @@ let (mkOverride "astral" "1.10.1" "d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1") + # Pinned due to API changes in brother>=1.0, remove >= 2021.5 + (self: super: { + brother = super.brother.overridePythonAttrs (oldAttrs: rec { + version = "0.2.2"; + src = fetchFromGitHub { + owner = "bieniu"; + repo = "brother"; + rev = version; + sha256 = "sha256-vIefcL3K3ZbAUxMFM7gbbTFdrnmufWZHcq4OA19SYXE="; + }; + }); + }) + # Pinned due to API changes in iaqualink>=2.0, remove after # https://github.com/home-assistant/core/pull/48137 was merged (self: super: { @@ -213,6 +226,7 @@ in with py.pkgs; buildPythonApplication rec { "axis" "bayesian" "binary_sensor" + "brother" "caldav" "calendar" "camera" @@ -389,6 +403,7 @@ in with py.pkgs; buildPythonApplication rec { "zha" "zone" "zwave" + "zwave_js" ]; pytestFlagsArray = [ diff --git a/pkgs/servers/monitoring/alertmanager-irc-relay/default.nix b/pkgs/servers/monitoring/alertmanager-irc-relay/default.nix index c3c60e1d4a2c..50cf5a00164c 100644 --- a/pkgs/servers/monitoring/alertmanager-irc-relay/default.nix +++ b/pkgs/servers/monitoring/alertmanager-irc-relay/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "alertmanager-irc-relay"; - version = "0.3.1"; + version = "0.4.1"; src = fetchFromGitHub { owner = "google"; repo = "alertmanager-irc-relay"; rev = "v${version}"; - sha256 = "sha256-IlWXsQZtDXG8sJBV+82BzEFj+JtUbfTOZyqYOrZFTXA="; + sha256 = "sha256-02uEvcxT5+0OJtqOyuQjgkqL0fZnN7umCSxBqAVPT9U="; }; vendorSha256 = "sha256-VLG15IXS/fXFMTCJKEqGW6qZ9aOLPhazidVsOywG+w4="; diff --git a/pkgs/servers/quagga/default.nix b/pkgs/servers/quagga/default.nix deleted file mode 100644 index 2e2fac575a62..000000000000 --- a/pkgs/servers/quagga/default.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ lib, stdenv, fetchurl, libcap, libnl, readline, net-snmp, less, perl, texinfo, - pkg-config, c-ares }: - -stdenv.mkDerivation rec { - pname = "quagga"; - version = "1.2.4"; - - src = fetchurl { - url = "mirror://savannah/quagga/${pname}-${version}.tar.gz"; - sha256 = "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"; - }; - - buildInputs = - [ readline net-snmp c-ares ] - ++ lib.optionals stdenv.isLinux [ libcap libnl ]; - - nativeBuildInputs = [ pkg-config perl texinfo ]; - - configureFlags = [ - "--sysconfdir=/etc/quagga" - "--localstatedir=/run/quagga" - "--sbindir=$(out)/libexec/quagga" - "--disable-exampledir" - "--enable-user=quagga" - "--enable-group=quagga" - "--enable-configfile-mask=0640" - "--enable-logfile-mask=0640" - "--enable-vtysh" - "--enable-vty-group=quaggavty" - "--enable-snmp" - "--enable-multipath=64" - "--enable-rtadv" - "--enable-irdp" - "--enable-opaque-lsa" - "--enable-ospf-te" - "--enable-pimd" - "--enable-isis-topology" - ]; - - preConfigure = '' - substituteInPlace vtysh/vtysh.c --replace \"more\" \"${less}/bin/less\" - ''; - - postInstall = '' - rm -f $out/bin/test_igmpv3_join - mv -f $out/libexec/quagga/ospfclient $out/bin/ - ''; - - enableParallelBuilding = true; - - meta = with lib; { - description = "Quagga BGP/OSPF/ISIS/RIP/RIPNG routing daemon suite"; - longDescription = '' - GNU Quagga is free software which manages TCP/IP based routing protocols. - It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, and RIPng as - well as the IPv6 versions of these. - - As the predecessor Zebra has been considered orphaned, the Quagga project - has been formed by members of the zebra mailing list and the former - zebra-pj project to continue developing. - - Quagga uses threading if the kernel supports it, but can also run on - kernels that do not support threading. Each protocol has its own daemon. - - It is more than a routed replacement, it can be used as a Route Server and - a Route Reflector. - ''; - homepage = "https://www.nongnu.org/quagga/"; - license = licenses.gpl2; - platforms = platforms.unix; - maintainers = with maintainers; [ ]; - }; -} diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 3f88c0e0c993..6ab9f8ed8dd1 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -773,6 +773,14 @@ self: super: "--with-launchdaemons-dir=\${out}/LaunchDaemons" "--with-launchagents-dir=\${out}/LaunchAgents" ]; + patches = [ + # don't unset DBUS_SESSION_BUS_ADDRESS in startx + (fetchpatch { + name = "dont-unset-DBUS_SESSION_BUS_ADDRESS.patch"; + url = "https://git.archlinux.org/svntogit/packages.git/plain/repos/extra-x86_64/fs46369.patch?h=packages/xorg-xinit&id=40f3ac0a31336d871c76065270d3f10e922d06f3"; + sha256 = "18kb88i3s9nbq2jxl7l2hyj6p56c993hivk8mzxg811iqbbawkp7"; + }) + ]; propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xauth ] ++ lib.optionals isDarwin [ self.libX11 self.xorgproto ]; postFixup = '' diff --git a/pkgs/tools/admin/exoscale-cli/default.nix b/pkgs/tools/admin/exoscale-cli/default.nix index c098fa278b3d..3f0aca33d61d 100644 --- a/pkgs/tools/admin/exoscale-cli/default.nix +++ b/pkgs/tools/admin/exoscale-cli/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { pname = "exoscale-cli"; - version = "1.27.2"; + version = "1.28.0"; src = fetchFromGitHub { owner = "exoscale"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-Wq3CWKYuF4AaOVpe0sGn9BzLx/6rSPFN6rFc2jUUVEA="; + sha256 = "sha256-YbWh4ZIlcxAD/8F/fsYIWjv5hKaHNNi+sNrD7Ax/xDw="; }; goPackagePath = "github.com/exoscale/cli"; diff --git a/pkgs/tools/graphics/agi/default.nix b/pkgs/tools/graphics/agi/default.nix index 3fe6698846e5..aca53c254619 100644 --- a/pkgs/tools/graphics/agi/default.nix +++ b/pkgs/tools/graphics/agi/default.nix @@ -14,11 +14,11 @@ stdenv.mkDerivation rec { pname = "agi"; - version = "1.1.0-dev-20210413"; + version = "1.1.0-dev-20210421"; src = fetchzip { url = "https://github.com/google/agi-dev-releases/releases/download/v${version}/agi-${version}-linux.zip"; - sha256 = "13i6n95d0cjrhx68qsich6xzk5f9ga0y3m19k4z2d58s164rnh0v"; + sha256 = "sha256-2IgGvQy6omDEwrzQDfa/OLi3f+Q2zarvJVGk6ZhsjSA="; }; nativeBuildInputs = [ diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a4e0597310a7..e4a8fee3076e 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -608,6 +608,7 @@ mapAliases ({ phonon = throw "phonon: Please use libsForQt5.phonon, as Qt4 support in this package has been removed."; # added 2019-11-22 pynagsystemd = throw "pynagsystemd was removed as it was unmaintained and incompatible with recent systemd versions. Instead use its fork check_systemd."; # added 2020-10-24 python2nix = throw "python2nix has been removed as it is outdated. Use e.g. nixpkgs-pytools instead."; # added 2021-03-08 + quagga = throw "quagga is no longer maintained upstream"; # added 2021-04-22 qca-qt5 = libsForQt5.qca-qt5; # added 2015-12-19 qcsxcad = libsForQt5.qcsxcad; # added 2020-11-05 qmk_firmware = throw "qmk_firmware has been removed because it was broken"; # added 2021-04-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f7fb5070725b..130d93cb3b54 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19142,8 +19142,6 @@ in qremotecontrol-server = callPackage ../servers/misc/qremotecontrol-server { }; - quagga = callPackage ../servers/quagga { }; - rabbitmq-server = callPackage ../servers/amqp/rabbitmq-server { inherit (darwin.apple_sdk.frameworks) AppKit Carbon Cocoa; elixir = beam_nox.interpreters.elixir_1_8; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 82a94a27acf3..4e24fc95c7dd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7743,6 +7743,8 @@ in { telethon-session-sqlalchemy = callPackage ../development/python-modules/telethon-session-sqlalchemy { }; + telfhash = callPackage ../development/python-modules/telfhash { }; + tempita = callPackage ../development/python-modules/tempita { }; tempora = callPackage ../development/python-modules/tempora { }; @@ -8754,5 +8756,7 @@ in { zulip = callPackage ../development/python-modules/zulip { }; + zwave-js-server-python = callPackage ../development/python-modules/zwave-js-server-python { }; + zxcvbn = callPackage ../development/python-modules/zxcvbn { }; }