diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 89cac575c67d3..0ebaeba7bd897 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -13,6 +13,7 @@ rec { isx86_64 = { cpu = { family = "x86"; bits = 64; }; }; isPowerPC = { cpu = cpuTypes.powerpc; }; isPower = { cpu = { family = "power"; }; }; + isPower64 = { cpu = { family = "power"; bits = 64; }; }; isx86 = { cpu = { family = "x86"; }; }; isAarch32 = { cpu = { family = "arm"; bits = 32; }; }; isAarch64 = { cpu = { family = "arm"; bits = 64; }; }; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 132416d865f4b..dcd9bb8aff1d0 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -459,6 +459,7 @@ ./services/hardware/udisks2.nix ./services/hardware/upower.nix ./services/hardware/usbmuxd.nix + ./services/hardware/usbrelayd.nix ./services/hardware/thermald.nix ./services/hardware/undervolt.nix ./services/hardware/vdr.nix diff --git a/nixos/modules/services/hardware/usbrelayd.nix b/nixos/modules/services/hardware/usbrelayd.nix new file mode 100644 index 0000000000000..c0322e89e6b12 --- /dev/null +++ b/nixos/modules/services/hardware/usbrelayd.nix @@ -0,0 +1,44 @@ +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.services.usbrelayd; +in +{ + options.services.usbrelayd = with types; { + enable = mkEnableOption "USB Relay MQTT daemon"; + + broker = mkOption { + type = str; + description = "Hostname or IP address of your MQTT Broker."; + default = "127.0.0.1"; + example = [ + "mqtt" + "192.168.1.1" + ]; + }; + + clientName = mkOption { + type = str; + description = "Name, your client connects as."; + default = "MyUSBRelay"; + }; + }; + + config = mkIf cfg.enable { + + # TODO: Rename to .conf in upcomming release + environment.etc."usbrelayd.ini".text = '' + [MQTT] + BROKER = ${cfg.broker} + CLIENTNAME = ${cfg.clientName} + ''; + + services.udev.packages = [ pkgs.usbrelayd ]; + systemd.packages = [ pkgs.usbrelayd ]; + users.users.usbrelay = { + isSystemUser = true; + group = "usbrelay"; + }; + users.groups.usbrelay = { }; + }; +} diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index cd3af80f1e5f5..ea2060109c3ed 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -21,10 +21,10 @@ "owner": "aiven", "provider-source-address": "registry.terraform.io/aiven/aiven", "repo": "terraform-provider-aiven", - "rev": "v2.7.1", - "sha256": "sha256-tXg9VpP3kj32Q9ktU5FrcQStIRlDtMLXYzn0RvLQCRk=", - "vendorSha256": "sha256-1Eenm7dgQc4jCPm7BfuiXR2B3IJRBAYdGD7CSs49koo=", - "version": "2.7.1" + "rev": "v2.7.2", + "sha256": "sha256-1Y3m431KlWU+0cgZsU644WEO1i/9Gp1HomXvuCesVNU=", + "vendorSha256": "sha256-nBVLgOrtINrDziQLdqo5rFWfeY/cOdBW/XVDjtNaNhE=", + "version": "2.7.2" }, "akamai": { "owner": "akamai", @@ -40,10 +40,10 @@ "owner": "aliyun", "provider-source-address": "registry.terraform.io/aliyun/alicloud", "repo": "terraform-provider-alicloud", - "rev": "v1.164.0", - "sha256": "sha256-UZ+/l8eBpzo0KBW6x8koLzBt0QniHjP73zdjKIw8ByI=", + "rev": "v1.165.0", + "sha256": "sha256-Mq0Ob6U2v3onn5wIvAzXhbSBzjUCP4kF6irbwREdGFI=", "vendorSha256": "sha256-xxq+VOG6FkX1perAcXOiFtL/bjsHl9IWIJb5dfaIkpY=", - "version": "1.164.0" + "version": "1.165.0" }, "ansible": { "owner": "nbering", @@ -94,28 +94,28 @@ "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/aws", "repo": "terraform-provider-aws", - "rev": "v4.10.0", - "sha256": "sha256-FhW7+Ot1cVxTdDFuwP+Xq9LCfogRTJ7wlTU5TR98UPA=", - "vendorSha256": "sha256-91SSNiWHFcNWg6Ssr8XA+uiOoAbuBpivDPmkzWlFvPk=", - "version": "4.10.0" + "rev": "v4.11.0", + "sha256": "sha256-d7edKXwjktpHGMxL/sAowOjiGdsAk9cdGVMgj0uIVIg=", + "vendorSha256": "sha256-xQ9EbzwLfRZuBzytJ4SpoEIYJ9DuN+eWPy7RRg4jPkU=", + "version": "4.11.0" }, "azuread": { "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/azuread", "repo": "terraform-provider-azuread", - "rev": "v2.20.0", - "sha256": "sha256-x1tSrejqsw3A/1n+PbG9wWx7q7qRciCjdwPAFT4lc2E=", + "rev": "v2.21.0", + "sha256": "sha256-H2G9n9pvDF1VKXC773ubRFzGYZJeAj+t/V89omxmcps=", "vendorSha256": null, - "version": "2.20.0" + "version": "2.21.0" }, "azurerm": { "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/azurerm", "repo": "terraform-provider-azurerm", - "rev": "v3.2.0", - "sha256": "sha256-GKI6d2zSaaEaKnt6MLqzEbLjLYdrIOa+aeIlFPa5hM4=", + "rev": "v3.3.0", + "sha256": "sha256-ZkyuZ2q9V2CKuXGUcDI5X3O21y8xtZiYGPnl5mIjuZc=", "vendorSha256": null, - "version": "3.2.0" + "version": "3.3.0" }, "azurestack": { "owner": "hashicorp", @@ -194,10 +194,10 @@ "owner": "cloudflare", "provider-source-address": "registry.terraform.io/cloudflare/cloudflare", "repo": "terraform-provider-cloudflare", - "rev": "v3.12.2", - "sha256": "sha256-vshZlMLfyRxbzsk6H34PZb5+RowpEJEvWhNVYzrySeg=", - "vendorSha256": "sha256-v6fUzYwrYt4rk5LT0LyNd8e9X79r3dwtd3s1QIV/w/s=", - "version": "3.12.2" + "rev": "v3.13.0", + "sha256": "sha256-ZG8F6cbJOmQdtudkVUGjKsq2Hs4uYlb/pxrF6Fkk4w0=", + "vendorSha256": "sha256-4usFr3aseHGGUa/bseSRAjE1NTZxh8UXPd66HG3hwOM=", + "version": "3.13.0" }, "cloudfoundry": { "owner": "cloudfoundry-community", @@ -258,10 +258,10 @@ "owner": "DataDog", "provider-source-address": "registry.terraform.io/DataDog/datadog", "repo": "terraform-provider-datadog", - "rev": "v3.10.0", - "sha256": "sha256-M9Pbvcg6HJY4S7Syu3XFsyjsCfeZxS17Ke2FpN+2HV4=", - "vendorSha256": "sha256-IJ8K2pRfvajdPkM3EjJe1B9PstJozETMert+O6Xpa88=", - "version": "3.10.0" + "rev": "v3.11.0", + "sha256": "sha256-9ugNj/D6VPaERckV0cCPlBjNtzS9tLJj+rc/8MhxCVU=", + "vendorSha256": "sha256-XxOOOljx+p4onI6SF8UY+gy7x7G2pduEqODT1UX4zfg=", + "version": "3.11.0" }, "dhall": { "owner": "awakesecurity", @@ -321,10 +321,10 @@ "owner": "dome9", "provider-source-address": "registry.terraform.io/dome9/dome9", "repo": "terraform-provider-dome9", - "rev": "v1.24.5", - "sha256": "0a4q5lf11xxfc9ndicdmjir77rdsiq5a8fwb6065879qaamvaxqi", + "rev": "v1.25.2", + "sha256": "sha256-6AtJEeAoOfqGwLC687aMTBg4yRXIDYqDbkXyXuiV8aQ=", "vendorSha256": null, - "version": "1.24.5" + "version": "1.25.2" }, "elasticsearch": { "owner": "phillbaker", @@ -339,10 +339,10 @@ "owner": "exoscale", "provider-source-address": "registry.terraform.io/exoscale/exoscale", "repo": "terraform-provider-exoscale", - "rev": "v0.34.0", - "sha256": "sha256-GDN3cN+zNiTxJlKeQr4PGOFybIrVLL31VBMRhZ9PDQ4=", + "rev": "v0.35.0", + "sha256": "sha256-iIClnbCldGnihpML9xF0kyR4viXZzAsTF8MFT53wg+A=", "vendorSha256": null, - "version": "0.34.0" + "version": "0.35.0" }, "external": { "owner": "hashicorp", @@ -412,20 +412,20 @@ "provider-source-address": "registry.terraform.io/hashicorp/google", "proxyVendor": true, "repo": "terraform-provider-google", - "rev": "v4.17.0", - "sha256": "sha256-7yGZpCErpriLrqHpCnXmkJkrGMQPkD70NmzuZ0ghF7o=", + "rev": "v4.18.0", + "sha256": "sha256-/s0O2ZBNPfBNffZp9sdG2omfXKDgwLaX4cJZs553WLU=", "vendorSha256": "sha256-l2OviwplP/Sg2ShaEA88pMwVTkREnLkFAzterjr2kvU=", - "version": "4.17.0" + "version": "4.18.0" }, "google-beta": { "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/google-beta", "proxyVendor": true, "repo": "terraform-provider-google-beta", - "rev": "v4.17.0", - "sha256": "sha256-JaZZRjQR9+aH9KTJrazLXlbQ1drIOfE8sOVYi29F1fs=", + "rev": "v4.18.0", + "sha256": "sha256-mVuo+dFDNcmWIh9WJNkkpowF7lI3mQy8scgij6jM9Zw=", "vendorSha256": "sha256-l2OviwplP/Sg2ShaEA88pMwVTkREnLkFAzterjr2kvU=", - "version": "4.17.0" + "version": "4.18.0" }, "grafana": { "owner": "grafana", @@ -494,10 +494,10 @@ "owner": "huaweicloud", "provider-source-address": "registry.terraform.io/huaweicloud/huaweicloud", "repo": "terraform-provider-huaweicloud", - "rev": "v1.35.1", - "sha256": "sha256-EC2o+olQaGCAX/0JGlXNMF8QE1k6BjC/4SttbGOxFFw=", + "rev": "v1.35.2", + "sha256": "sha256-D1ZaYz+leYU2UNq9c589KVISSNdcjFnDO4JccSVRPYw=", "vendorSha256": null, - "version": "1.35.1" + "version": "1.35.2" }, "huaweicloudstack": { "owner": "huaweicloud", @@ -521,10 +521,10 @@ "owner": "IBM-Cloud", "provider-source-address": "registry.terraform.io/IBM-Cloud/ibm", "repo": "terraform-provider-ibm", - "rev": "v1.40.1", - "sha256": "sha256-7NdpMWEpkcqEwi7xAedc/NPJ6e+RZZ4HdrKtmb/H6xU=", - "vendorSha256": "sha256-rVV6oeqIj4o9qxw2V67G3cgERJaccejaAAtEOJVLm4U=", - "version": "1.40.1" + "rev": "v1.41.0-beta0", + "sha256": "sha256-0SANOw6mSXnH/bLRZRjG2R9aPTsp8jZvqYNNtNsiYPw=", + "vendorSha256": "sha256-8s32A0qgODZZy3rSrHnnBkQyKLBj0fcCBJ9ja9gXc5Q=", + "version": "1.41.0-beta0" }, "icinga2": { "owner": "Icinga", @@ -737,10 +737,10 @@ "owner": "newrelic", "provider-source-address": "registry.terraform.io/newrelic/newrelic", "repo": "terraform-provider-newrelic", - "rev": "v2.42.1", - "sha256": "sha256-3lrO3BOP3X6Pr9wPnWsuQenesRTEDHzlkenIia6YiS8=", - "vendorSha256": "sha256-G/GWIE+XeLiHW0xxyjbIpncAnpBmC/+iZnI8MFmi80k=", - "version": "2.42.1" + "rev": "v2.43.3", + "sha256": "sha256-RSE0JHhIKR0Xst2iol3L02OZnEHwkVoaN32Yu2YZy7s=", + "vendorSha256": "sha256-4C8OWJSaUp4W8ScERveGYJ0m8avl6HHeTtGleJa5mdk=", + "version": "2.43.3" }, "nomad": { "owner": "hashicorp", @@ -792,19 +792,19 @@ "owner": "oracle", "provider-source-address": "registry.terraform.io/oracle/oci", "repo": "terraform-provider-oci", - "rev": "v4.71.0", - "sha256": "sha256-8v9zfYlWqeKQlk1hNL7iif/AfEjI5lC0clUwgpA132U=", + "rev": "v4.72.0", + "sha256": "sha256-ztlMhwcRraPdR95iZGiEKJAKe7PZeE4ABLBNVo2maUQ=", "vendorSha256": null, - "version": "4.71.0" + "version": "4.72.0" }, "okta": { "owner": "okta", "provider-source-address": "registry.terraform.io/okta/okta", "repo": "terraform-provider-okta", - "rev": "v3.23.0", - "sha256": "sha256-azqWTQA4FW79U+GrdCBO4BWA5c+Cce3ELANS2Os5bSs=", + "rev": "v3.24.0", + "sha256": "sha256-nP42jYvdXmW4gz1fRcEm3Cmv7RXlpk6l2qL5dImIvAw=", "vendorSha256": "sha256-S4HVfl/PbgpgWFedkWM+EGyYAL5P0cdkLMYL+y+aX8w=", - "version": "3.23.0" + "version": "3.24.0" }, "oktaasa": { "owner": "oktadeveloper", @@ -846,10 +846,10 @@ "owner": "opentelekomcloud", "provider-source-address": "registry.terraform.io/opentelekomcloud/opentelekomcloud", "repo": "terraform-provider-opentelekomcloud", - "rev": "v1.29.1", - "sha256": "sha256-c7kRS3c+n/5oN3PDKsJzkiK8ravRjBTJHhhqLHy9nhQ=", + "rev": "v1.29.2-alpha.1", + "sha256": "sha256-OAbsX7GMGeDvc22xj4V/Jfap2ROg7ECTFf+FJTm0aDM=", "vendorSha256": "sha256-kSZvxbovF2/oCqFY/0zpGmAhLFuCw6nWG3B4ppyxzLY=", - "version": "1.29.1" + "version": "1.29.2-alpha.1" }, "opsgenie": { "owner": "opsgenie", @@ -882,10 +882,10 @@ "owner": "PagerDuty", "provider-source-address": "registry.terraform.io/PagerDuty/pagerduty", "repo": "terraform-provider-pagerduty", - "rev": "v2.4.0", - "sha256": "sha256-pWfpist6nG6lQ1ep+Aje6LQgN/1ab5FtSoJKkoLDxAs=", + "rev": "v2.4.1", + "sha256": "sha256-2Ot6TxWN+t33EfT5wmkkPjj9DUrPum9whl5wimgjAp0=", "vendorSha256": null, - "version": "2.4.0" + "version": "2.4.1" }, "panos": { "owner": "PaloAltoNetworks", @@ -918,10 +918,10 @@ "owner": "pan-net", "provider-source-address": "registry.terraform.io/pan-net/powerdns", "repo": "terraform-provider-powerdns", - "rev": "v1.4.1", - "sha256": "1v1qs042jpin5454yqbdfp2xsgf68cgwlsqfah5hqy1qnq5zbl3z", + "rev": "v1.5.0", + "sha256": "sha256-NtJs2oNJbjUYNFsbrfo2RYhqOlKA15GJt9gi1HuTIw0=", "vendorSha256": null, - "version": "1.4.1" + "version": "1.5.0" }, "rabbitmq": { "owner": "cyrilgdn", @@ -945,10 +945,10 @@ "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/random", "repo": "terraform-provider-random", - "rev": "v3.1.2", - "sha256": "sha256-Yk1CPR9gN70E+Qpc20vBQG2MY/RCO5cvaNtD8N++d5A=", - "vendorSha256": "sha256-/IjOv7/kQlGuV9+9Vhc7zUrr6hbcoxZyKi+q52YA/kk=", - "version": "3.1.2" + "rev": "v3.1.3", + "sha256": "sha256-q4j3DXbLiVeSyWGywwLiJspmE08ip3zL8vabfVDWnUo=", + "vendorSha256": "sha256-sg89QS0ncCrBGoLvsWFlyCYwNZHNG6iadNJIHWRmhXE=", + "version": "3.1.3" }, "rundeck": { "owner": "rundeck", @@ -1008,10 +1008,10 @@ "owner": "splunk-terraform", "provider-source-address": "registry.terraform.io/splunk-terraform/signalfx", "repo": "terraform-provider-signalfx", - "rev": "v6.12.0", - "sha256": "sha256-mTPiJc2AbtSAHM5J9Wr9fb/M/GDFMCIHod0DAT9DDvI=", + "rev": "v6.12.1", + "sha256": "sha256-JmkuYv3vDCSUuD69+dw8fG4EvuDMhfImlfmZslp8AfQ=", "vendorSha256": "sha256-hI0yz796+xxAFQg+O/2g5ueNx/wrx/40DlQyxtx11aQ=", - "version": "6.12.0" + "version": "6.12.1" }, "skytap": { "owner": "skytap", @@ -1026,10 +1026,10 @@ "owner": "chanzuckerberg", "provider-source-address": "registry.terraform.io/chanzuckerberg/snowflake", "repo": "terraform-provider-snowflake", - "rev": "v0.31.0", - "sha256": "sha256-KYgvtdGkzju1qpECVX5vtY7U8JNa8anSmaTq8PwJEl8=", + "rev": "v0.32.0", + "sha256": "sha256-Y4apbAQ4Up1VoQxB9w/4EYwhFX9sqYNLLBVxyOqmffE=", "vendorSha256": "sha256-l++IzY3/W4qsdFJY7ik0xF6tZWluLb4EcW5KQtBVY5s=", - "version": "0.31.0" + "version": "0.32.0" }, "sops": { "owner": "carlpett", @@ -1044,10 +1044,10 @@ "owner": "spotinst", "provider-source-address": "registry.terraform.io/spotinst/spotinst", "repo": "terraform-provider-spotinst", - "rev": "v1.72.0", - "sha256": "sha256-h70Tcp+VODMgUDBBcR4Vhqvln76rhwgnfKjIK2+hphw=", - "vendorSha256": "sha256-pI9jX/Wp6Nu1ix82ZE2CBZYu0j4S+HH2+dD5G679VrE=", - "version": "1.72.0" + "rev": "v1.73.1", + "sha256": "sha256-tA80gL0IJVO0g+sXdXLYgW1a0hLP0rnQCUtLAS9Y614=", + "vendorSha256": "sha256-25h8VMeXKWth06+5ZBibDWvjWyJmKM64k0zhkUsIYeM=", + "version": "1.73.1" }, "stackpath": { "owner": "stackpath", @@ -1062,10 +1062,10 @@ "owner": "StatusCakeDev", "provider-source-address": "registry.terraform.io/StatusCakeDev/statuscake", "repo": "terraform-provider-statuscake", - "rev": "v2.0.1-pre", - "sha256": "sha256-/SWmGy6kMAt4TAswlpmfs4rVAa/DZBFoE1Yv+EcWfGo=", - "vendorSha256": "sha256-sFKhbOsE2eQ4Qxfbtab19nZRIKhJXNdsg274tWRjoVg=", - "version": "2.0.1-pre" + "rev": "v2.0.2-pre", + "sha256": "sha256-a8F6jDSYDal6U0Uu/iXprUb2lrwwUMOOkIZDftIiaLI=", + "vendorSha256": "sha256-E6DvzloOaamSX3jLKUQQmIccGiI6sFo4oNwU86td05E=", + "version": "2.0.2-pre" }, "sumologic": { "owner": "SumoLogic", @@ -1089,19 +1089,19 @@ "owner": "tencentcloudstack", "provider-source-address": "registry.terraform.io/tencentcloudstack/tencentcloud", "repo": "terraform-provider-tencentcloud", - "rev": "v1.69.0", - "sha256": "sha256-GArlBMlQdEjITqvAAcnhurJtYjs03U8pAzcdbuXzbss=", + "rev": "v1.71.0", + "sha256": "sha256-syj6fOBmErKsPQXYQ0U9bFC3butI06FJVLkD6RvWbFE=", "vendorSha256": null, - "version": "1.69.0" + "version": "1.71.0" }, "tfe": { "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/tfe", "repo": "terraform-provider-tfe", - "rev": "v0.30.2", - "sha256": "sha256-qJGHOZdnigflapWHhmvALNMzqDxJ4RSAgGFzm+3z7GA=", + "rev": "v0.31.0", + "sha256": "sha256-BvA+1oCh8xB0XcXMGOmAEdi/lEwGdRed5vDEDVBUMhE=", "vendorSha256": "sha256-7TFfIk+aPbl3CLuNdeJg1O2n3WlCuG5tsayCtbo77I0=", - "version": "0.30.2" + "version": "0.31.0" }, "thunder": { "owner": "a10networks", @@ -1162,19 +1162,19 @@ "owner": "cloudposse", "provider-source-address": "registry.terraform.io/cloudposse/utils", "repo": "terraform-provider-utils", - "rev": "0.17.20", - "sha256": "sha256-+pk2cUmYzQsa40iMvbdkYmZtoXOb5ALU/p0EEZx2AIw=", - "vendorSha256": "sha256-cb8Hqe3lGfjNpGmhrJ64x6w/iFW22Ma4AJo2w29kjR0=", - "version": "0.17.20" + "rev": "0.17.23", + "sha256": "sha256-/m2K91I1BtzfKTO6sbYL6r0N6GGtd4Ux+GSL0Ut4GUg=", + "vendorSha256": "sha256-Rmv3B8Sczvohlfwu248a1pi1VmFGNCB77/IFTBKKeiM=", + "version": "0.17.23" }, "vault": { "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/vault", "repo": "terraform-provider-vault", - "rev": "v3.4.1", - "sha256": "sha256-xG16n25upU9giQ76FEx6as2GvyhAk6kZixmJCJFti2s=", - "vendorSha256": "sha256-JiNYM8P6ExGVVOVBYA2WJSZOpZ0PAyoncENqYRXPo7c=", - "version": "3.4.1" + "rev": "v3.5.0", + "sha256": "sha256-Ap96unJFTJ8HKcIs3LYSHfTXszh1gAcZSTEWpS2W2AQ=", + "vendorSha256": "sha256-UvczG/31YPIxPBZhwoBC3QS+QA8PRtRqgA/0W8tcXD0=", + "version": "3.5.0" }, "vcd": { "owner": "vmware", @@ -1252,9 +1252,9 @@ "owner": "yandex-cloud", "provider-source-address": "registry.terraform.io/yandex-cloud/yandex", "repo": "terraform-provider-yandex", - "rev": "v0.73.0", - "sha256": "sha256-nhmy/DlO8JCjPRnm/o9R/+qq8k5kjEuNgYrGAdZWnVI=", - "vendorSha256": "sha256-GyLvc6mDA6F2xkT0bP3zjTWFmrOWodLCB4apYsBE95Q=", - "version": "0.73.0" + "rev": "v0.74.0", + "sha256": "sha256-TeApvGYWBlCzxE7/t6cbb47L1oGUfx2B/cEW8UQieoU=", + "vendorSha256": "sha256-n1qcrvBKftKYm7nlTCeAOU/Q40xMpVlyKUKxR7wgPu4=", + "version": "0.74.0" } } diff --git a/pkgs/games/ddnet/default.nix b/pkgs/games/ddnet/default.nix index 1663e17b14d29..54335279fedab 100644 --- a/pkgs/games/ddnet/default.nix +++ b/pkgs/games/ddnet/default.nix @@ -16,17 +16,23 @@ , SDL2 , sqlite , wavpack +, ffmpeg +, x264 +, vulkan-headers +, vulkan-loader +, glslang +, spirv-tools }: stdenv.mkDerivation rec { pname = "ddnet"; - version = "15.9.1"; + version = "16.0.3"; src = fetchFromGitHub { owner = "ddnet"; repo = pname; rev = version; - sha256 = "sha256-QGtXI4Dbua5LBXSvB17tnSTGEvCCoopvg1XKBuDIEoQ="; + sha256 = "sha256-9hjVAtnn+dTBNCu6E90CtjGTAStmVTsQFm2UYq68xcM="; }; nativeBuildInputs = [ cmake ninja pkg-config ]; @@ -44,6 +50,12 @@ stdenv.mkDerivation rec { SDL2 sqlite wavpack + ffmpeg + x264 + vulkan-loader + vulkan-headers + glslang + spirv-tools ]; cmakeFlags = [ diff --git a/pkgs/os-specific/linux/usbrelay/daemon.nix b/pkgs/os-specific/linux/usbrelay/daemon.nix new file mode 100644 index 0000000000000..5f8d23e5201d2 --- /dev/null +++ b/pkgs/os-specific/linux/usbrelay/daemon.nix @@ -0,0 +1,36 @@ +{ stdenv, usbrelay, python3 }: +let + python = python3.withPackages (ps: with ps; [ usbrelay-py paho-mqtt ]); +in +# This is a separate derivation, not just an additional output of +# usbrelay, because otherwise, we have a cyclic dependency between +# usbrelay (default.nix) and the python module (python.nix). +stdenv.mkDerivation rec { + pname = "usbrelayd"; + + inherit (usbrelay) src version; + + postPatch = '' + substituteInPlace 'usbrelayd.service' \ + --replace '/usr/bin/python3' "${python}/bin/python3" \ + --replace '/usr/sbin/usbrelayd' "$out/bin/usbrelayd" + ''; + + buildInputs = [ python ]; + + dontBuild = true; + + installPhase = '' + runHook preInstall; + install -m 644 -D usbrelayd $out/bin/usbrelayd + install -m 644 -D usbrelayd.service $out/lib/systemd/system/usbrelayd.service + install -m 644 -D 50-usbrelay.rules $out/lib/udev/rules.d/50-usbrelay.rules + runHook postInstall + ''; + # TODO for later releases: install -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example + + meta = { + description = "USB Relay MQTT service"; + inherit (usbrelay.meta) homepage license maintainers platforms; + }; +} diff --git a/pkgs/os-specific/linux/usbrelay/default.nix b/pkgs/os-specific/linux/usbrelay/default.nix new file mode 100644 index 0000000000000..ebbb1dd79228e --- /dev/null +++ b/pkgs/os-specific/linux/usbrelay/default.nix @@ -0,0 +1,29 @@ +{ stdenv, lib, fetchFromGitHub, hidapi }: +stdenv.mkDerivation rec { + pname = "usbrelay"; + version = "0.9"; + + src = fetchFromGitHub { + owner = "darrylb123"; + repo = "usbrelay"; + rev = version; + sha256 = "sha256-bxME4r5W5bZKxMZ/Svi1EenqHKVWIjU6iiKaM8U6lmA="; + }; + + buildInputs = [ + hidapi + ]; + + makeFlags = [ + "DIR_VERSION=${version}" + "PREFIX=${placeholder "out"}" + ]; + + meta = with lib; { + description = "Tool to control USB HID relays"; + homepage = "https://github.com/darrylb123/usbrelay"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ wentasah ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/usbrelay/python.nix b/pkgs/os-specific/linux/usbrelay/python.nix new file mode 100644 index 0000000000000..02d5ac284eda9 --- /dev/null +++ b/pkgs/os-specific/linux/usbrelay/python.nix @@ -0,0 +1,12 @@ +{ buildPythonPackage, usbrelay }: + +buildPythonPackage rec { + pname = "usbrelay_py"; + inherit (usbrelay) version src; + + buildInputs = [ usbrelay ]; + + pythonImportsCheck = [ "usbrelay_py" ]; + + inherit (usbrelay) meta; +} diff --git a/pkgs/os-specific/linux/usbrelay/test.nix b/pkgs/os-specific/linux/usbrelay/test.nix new file mode 100644 index 0000000000000..dc5847558a691 --- /dev/null +++ b/pkgs/os-specific/linux/usbrelay/test.nix @@ -0,0 +1,63 @@ +# NixOS test for usbrelayd +# +# It is not stored in nixos/tests directory, because it requires the +# USB relay connected to the host computer and as such, it cannot be +# run automatically. +# +# Run this test as: +# +# nix-build test.nix -A driverInteractive && ./result/bin/nixos-test-driver --no-interactive +# +# The interactive driver is required because the default +# (non-interactive) driver uses qemu without support for passing USB +# devices to the guest (see +# https://discourse.nixos.org/t/hardware-dependent-nixos-tests/18564 +# for discussion of other alternatives). + +import ../../../../nixos/tests/make-test-python.nix ({ pkgs, ... }: { + name = "usbrelayd"; + + nodes.machine = { + virtualisation.qemu.options = [ + "-device qemu-xhci" + "-device usb-host,vendorid=0x16c0,productid=0x05df" + ]; + services.usbrelayd.enable = true; + systemd.services.usbrelayd = { + after = [ "mosquitto.service" ]; + }; + services.mosquitto = { + enable = true; + listeners = [{ + acl = [ "pattern readwrite #" ]; + omitPasswordAuth = true; + settings.allow_anonymous = true; + }]; + }; + environment.systemPackages = [ + pkgs.usbrelay + pkgs.mosquitto + ]; + documentation.nixos.enable = false; # building nixos manual takes long time + }; + + testScript = '' + if os.waitstatus_to_exitcode(os.system("lsusb -d 16c0:05df")) != 0: + print("No USB relay detected, skipping test") + import sys + sys.exit(2) + machine.start() + # usbrelayd is started by udev when an relay is detected + machine.wait_for_unit("usbrelayd.service") + + stdout = machine.succeed("usbrelay") + relay_id = stdout.split(sep="_")[0] + assert relay_id != "" + import time + time.sleep(1) + machine.succeed(f"mosquitto_pub -h localhost -t cmnd/{relay_id}/1 -m ON") + time.sleep(1) + machine.succeed(f"mosquitto_pub -h localhost -t cmnd/{relay_id}/1 -m OFF") + print("Did you see the relay switching on and off?") + ''; +}) diff --git a/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix b/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix new file mode 100644 index 0000000000000..cf0ba46d87625 --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/jsonb_deep_sum.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "jsonb_deep_sum"; + version = "unstable-2021-12-24"; + + src = fetchFromGitHub { + owner = "furstenheim"; + repo = "jsonb_deep_sum"; + rev = "d9c69aa6b7da860e5522a9426467e67cb787980c"; + sha256 = "sha256-W1wNILAwTAjFPezq+grdRMA59KEnMZDz69n9xQUqdc0="; + }; + + buildInputs = [ postgresql ]; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *.so $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "PostgreSQL extension to easily add jsonb numeric"; + homepage = "https://github.com/furstenheim/jsonb_deep_sum"; + maintainers = with maintainers; [ _1000101 ]; + platforms = postgresql.meta.platforms; + license = licenses.mit; + }; +} diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index fec106f32acd6..c789e92c8e3c9 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -2,6 +2,8 @@ self: super: { age = super.callPackage ./ext/age.nix { }; + jsonb_deep_sum = super.callPackage ./ext/jsonb_deep_sum.nix { }; + periods = super.callPackage ./ext/periods.nix { }; postgis = super.callPackage ./ext/postgis.nix { }; diff --git a/pkgs/servers/uxplay/default.nix b/pkgs/servers/uxplay/default.nix new file mode 100644 index 0000000000000..d013a5a59e4fe --- /dev/null +++ b/pkgs/servers/uxplay/default.nix @@ -0,0 +1,60 @@ +{ lib +, stdenv +, pkg-config +, fetchFromGitHub +, fetchpatch +, cmake +, wrapGAppsHook +, avahi +, avahi-compat +, openssl +, gst_all_1 +, libplist +}: + +stdenv.mkDerivation rec { + pname = "uxplay"; + version = "1.50"; + + src = fetchFromGitHub { + owner = "FDH2"; + repo = "UxPlay"; + rev = "v${version}"; + sha256 = "sha256-43BCpYh0XtsnI064/ddcz2/Imj399g+bxLlT0BpqLMI="; + }; + + patches = [ + # https://github.com/FDH2/UxPlay/issues/91 + (fetchpatch { + url = "https://github.com/FDH2/UxPlay/commit/f373fb2edcfb1f4c279e5796cf21e4a865800a71.patch"; + sha256 = "sha256-ENT/sMyPjDdZ4gdxiatYJ/UxuCl+ekk0iQOn8ELDAKQ="; + }) + ]; + + nativeBuildInputs = [ + cmake + openssl + libplist + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + avahi + avahi-compat + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + gst_all_1.gst-libav + ]; + + meta = with lib; { + homepage = "https://github.com/FDH2/UxPlay"; + description = "AirPlay Unix mirroring server"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ azuwis ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/misc/asdf-vm/default.nix b/pkgs/tools/misc/asdf-vm/default.nix index ee33ba82be672..e492e4a6f6da5 100644 --- a/pkgs/tools/misc/asdf-vm/default.nix +++ b/pkgs/tools/misc/asdf-vm/default.nix @@ -37,13 +37,13 @@ ${asdfReshimFile} ''; in stdenv.mkDerivation rec { pname = "asdf-vm"; - version = "0.9.0"; + version = "0.10.0"; src = fetchFromGitHub { owner = "asdf-vm"; repo = "asdf"; rev = "v${version}"; - sha256 = "sha256-uvf3WVflUdh+M90zMDVFVAXi7TZytc8oZ/DexJqpNV4="; + sha256 = "sha256-yWQ74tVYBZszuuE3PaDB758kCjKO6oBOG/Z+T3+82po="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/misc/gay/default.nix b/pkgs/tools/misc/gay/default.nix index 799473a4b9f29..471ac86afcb7e 100644 --- a/pkgs/tools/misc/gay/default.nix +++ b/pkgs/tools/misc/gay/default.nix @@ -1,16 +1,12 @@ -{ lib, python3Packages, fetchFromGitHub }: +{ lib, python3Packages }: python3Packages.buildPythonApplication rec { pname = "gay"; version = "1.2.8"; - src = fetchFromGitHub { - owner = "ms-jpq"; - repo = "gay"; - # The repo doesn't have any tags - # This references version 1.2.8 - rev = "1e3e96815c68214533a925c86a52b0acf832a359"; - sha256 = "sha256-vouEFybcz27bcw/CpAGjFY8NYWQC+V0IE7h1a8XufZ0="; + src = python3Packages.fetchPypi { + inherit pname version; + sha256 = "sha256-/4IHqAoJthKvNyKqUgnGOQkgbC0aBEZ+x6dmKWUHXh0="; }; meta = with lib; { diff --git a/pkgs/tools/package-management/conda/default.nix b/pkgs/tools/package-management/conda/default.nix index bc11203bb4ae2..744b0978c9b60 100644 --- a/pkgs/tools/package-management/conda/default.nix +++ b/pkgs/tools/package-management/conda/default.nix @@ -8,10 +8,11 @@ , libarchive , libGL , xorg +, zlib # Conda installs its packages and environments under this directory , installationPath ? "~/.conda" # Conda manages most pkgs itself, but expects a few to be on the system. -, condaDeps ? [ stdenv.cc xorg.libSM xorg.libICE xorg.libX11 xorg.libXau xorg.libXi xorg.libXrender libselinux libGL ] +, condaDeps ? [ stdenv.cc xorg.libSM xorg.libICE xorg.libX11 xorg.libXau xorg.libXi xorg.libXrender libselinux libGL zlib] # Any extra nixpkgs you'd like available in the FHS env for Conda to use , extraPkgs ? [ ] }: @@ -30,24 +31,37 @@ # $ conda-shell # $ conda install spyder let - version = "4.6.14"; + version = "4.11.0"; src = fetchurl { - url = "https://repo.continuum.io/miniconda/Miniconda3-${version}-Linux-x86_64.sh"; - sha256 = "1gn43z1y5zw4yv93q1qajwbmmqs83wx5ls5x4i4llaciba4j6sqd"; + url = "https://repo.continuum.io/miniconda/Miniconda3-py39_${version}-Linux-x86_64.sh"; + sha256 = "sha256-TunDqlMynNemO0mHfAurtJsZt+WvKYB7eTp2vbHTYrQ="; }; + conda = ( + let + libPath = lib.makeLibraryPath [ + zlib # libz.so.1 + ]; + in + runCommand "conda-install" { buildInputs = [ makeWrapper zlib]; } + # on line 10, we have 'unset LD_LIBRARY_PATH' + # we have to comment it out however in a way that the number of bytes in the + # file does not change. So we replace the 'u' in the line with a '#' + # The reason is that the binary payload is encoded as number + # of bytes from the top of the installer script + # and unsetting the library path prevents the zlib library from being discovered + '' + mkdir -p $out/bin - conda = runCommand "conda-install" { buildInputs = [ makeWrapper ]; } - '' - mkdir -p $out/bin - cp ${src} $out/bin/miniconda-installer.sh - chmod +x $out/bin/miniconda-installer.sh + sed 's/unset LD_LIBRARY_PATH/#nset LD_LIBRARY_PATH/' ${src} > $out/bin/miniconda-installer.sh + chmod +x $out/bin/miniconda-installer.sh - makeWrapper \ - $out/bin/miniconda-installer.sh \ - $out/bin/conda-install \ - --add-flags "-p ${installationPath}" \ - --add-flags "-b" - ''; + makeWrapper \ + $out/bin/miniconda-installer.sh \ + $out/bin/conda-install \ + --add-flags "-p ${installationPath}" \ + --add-flags "-b" \ + --prefix "LD_LIBRARY_PATH" : "${libPath}" + ''); in buildFHSUserEnv { name = "conda-shell"; diff --git a/pkgs/tools/security/gitleaks/default.nix b/pkgs/tools/security/gitleaks/default.nix index 4f9d8dd26b0ad..a298f10d2d50f 100644 --- a/pkgs/tools/security/gitleaks/default.nix +++ b/pkgs/tools/security/gitleaks/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "gitleaks"; - version = "8.8.1"; + version = "8.8.2"; src = fetchFromGitHub { owner = "zricethezav"; repo = pname; rev = "v${version}"; - sha256 = "sha256-yXyebPZN5WbSP4x2cbdlWqbwhVW24x6VmmodK6GCMH8="; + sha256 = "sha256-WEVlddqG7t01yl05EujxH/XXBYZxePSKY6IQwkKUkws="; }; vendorSha256 = "sha256-X8z9iKRR3PptNHwy1clZG8QsClsjbW45nZb2fHGfSYk="; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d57dadfde8f34..92d2f7a0bb2e6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22539,6 +22539,8 @@ with pkgs; urserver = callPackage ../servers/urserver { }; + uxplay = callPackage ../servers/uxplay { }; + vouch-proxy = callPackage ../servers/vouch-proxy { buildGoModule = buildGo116Module; }; @@ -23801,6 +23803,9 @@ with pkgs; libgcrypt = null; }; + usbrelay = callPackage ../os-specific/linux/usbrelay { }; + usbrelayd = callPackage ../os-specific/linux/usbrelay/daemon.nix { }; + usbtop = callPackage ../os-specific/linux/usbtop { }; usbutils = callPackage ../os-specific/linux/usbutils { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b5f6cc8111233..2f1fe151f0214 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10571,6 +10571,8 @@ in { urwid-readline = callPackage ../development/python-modules/urwid-readline { }; + usbrelay-py = callPackage ../os-specific/linux/usbrelay/python.nix { }; + usbtmc = callPackage ../development/python-modules/usbtmc { }; us = callPackage ../development/python-modules/us { };