From 9d0884c2886773335de3740fd282815617b5b98c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 18 Nov 2022 04:20:00 +0000 Subject: [PATCH 01/26] python310Packages.cssselect: 1.1.0 -> 1.2.0 https://github.com/scrapy/cssselect/raw/v1.2.0/CHANGES --- .../python-modules/cssselect/default.nix | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/cssselect/default.nix b/pkgs/development/python-modules/cssselect/default.nix index 04b6dc36afab..3ca8f8d20416 100644 --- a/pkgs/development/python-modules/cssselect/default.nix +++ b/pkgs/development/python-modules/cssselect/default.nix @@ -1,17 +1,42 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, setuptools +, pytestCheckHook +, lxml +}: buildPythonPackage rec { pname = "cssselect"; - version = "1.1.0"; + version = "1.2.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "f95f8dedd925fd8f54edb3d2dfb44c190d9d18512377d3c1e2388d16126879bc"; + sha256 = "666b19839cfaddb9ce9d36bfe4c969132c647b92fc9088c4e23f786b30f1b3dc"; }; - # AttributeError: 'module' object has no attribute 'tests' - doCheck = false; + nativeBuildInputs = [ + setuptools + ]; + + checkInputs = [ + pytestCheckHook + lxml + ]; + + pythonImportsCheck = [ + "cssselect" + ]; meta = with lib; { + description = "CSS Selectors for Python"; + homepage = "https://cssselect.readthedocs.io/"; + changelog = "https://github.com/scrapy/cssselect/v${version}//CHANGES"; + license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } From d743b6124c4758b939d05bd2df8c1f03f3093ff7 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 20 Nov 2022 04:20:00 +0000 Subject: [PATCH 02/26] godu: 1.3.0 -> 1.4.1 --- pkgs/tools/misc/godu/default.nix | 8 ++++---- pkgs/tools/misc/godu/go-mod.patch | 33 ------------------------------- 2 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 pkgs/tools/misc/godu/go-mod.patch diff --git a/pkgs/tools/misc/godu/default.nix b/pkgs/tools/misc/godu/default.nix index 37511d2e847c..f4e1fc1c4fbe 100644 --- a/pkgs/tools/misc/godu/default.nix +++ b/pkgs/tools/misc/godu/default.nix @@ -2,18 +2,18 @@ buildGoModule rec { pname = "godu"; - version = "1.3.0"; + version = "1.4.1"; src = fetchFromGitHub { owner = "viktomas"; repo = pname; rev = "v${version}"; - sha256 = "1fp8iq4x0qiswksznnd6qh7c6g5pwglzz6ga11a7vgic0201wsvb"; + hash = "sha256-fJeSUAuNELZZ1DcybNsYd2ZX93VYWsLum5tHp68ZVlo="; }; - patches = [ ./go-mod.patch ]; + vendorHash = "sha256-8cZCeZ0gqxqbwB0WuEOFmEUNQd3/KcLeN0eLGfWG8BY="; - vendorSha256 = "1zq7b0zn24cbrjssk4g03i90szp1ms7ila4khwcm7hp9n1py245s"; + ldflags = [ "-s" "-w" ]; meta = with lib; { description = "Utility helping to discover large files/folders"; diff --git a/pkgs/tools/misc/godu/go-mod.patch b/pkgs/tools/misc/godu/go-mod.patch deleted file mode 100644 index 2b3efe6be604..000000000000 --- a/pkgs/tools/misc/godu/go-mod.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/go.mod b/go.mod -index cf8f2fb..e405e03 100644 ---- a/go.mod -+++ b/go.mod -@@ -5,5 +5,6 @@ go 1.14 - require ( - github.com/gdamore/tcell v1.1.1 - github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd -+ github.com/mattn/go-isatty v0.0.12 // indirect - github.com/stretchr/testify v1.3.0 - ) -diff --git a/go.sum b/go.sum -index 23c1232..e25c87e 100644 ---- a/go.sum -+++ b/go.sum -@@ -8,6 +8,8 @@ github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd h1:1e+0Z+T4t1mKL5xxv - github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= - github.com/lucasb-eyer/go-colorful v0.0.0-20181028223441-12d3b2882a08 h1:5MnxBC15uMxFv5FY/J/8vzyaBiArCOkMdFT9Jsw78iY= - github.com/lucasb-eyer/go-colorful v0.0.0-20181028223441-12d3b2882a08/go.mod h1:NXg0ArsFk0Y01623LgUqoqcouGDB+PwCCQlrwrG6xJ4= -+github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= - github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= - github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= - github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -@@ -16,6 +18,8 @@ github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= - github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= - github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= - github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -+golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= -+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= - golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= - golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= - gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0 h1:FVCohIoYO7IJoDDVpV2pdq7SgrMH6wHnuTyrdrxJNoY= \ No newline at end of file From 66f6e7655e68fb928069efc202e00f8066bcf751 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 21 Nov 2022 03:40:54 +0000 Subject: [PATCH 03/26] python310Packages.pebble: 5.0.2 -> 5.0.3 --- pkgs/development/python-modules/pebble/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pebble/default.nix b/pkgs/development/python-modules/pebble/default.nix index 996d85b67d9f..ae250557410e 100644 --- a/pkgs/development/python-modules/pebble/default.nix +++ b/pkgs/development/python-modules/pebble/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "pebble"; - version = "5.0.2"; + version = "5.0.3"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "Pebble"; inherit version; - hash = "sha256-nFjAPq+SDDEodETG/vOdxTuurJ3iIerRBPXJtI6L1Yc="; + hash = "sha256-vc/Z6n4K7biVsgQXfBnm1lQ9mWL040AuurIXUASGPag="; }; checkInputs = [ From 403a7405ab5b337b6f08349be0b7e2d09cadbc13 Mon Sep 17 00:00:00 2001 From: A cursed quail Date: Sun, 20 Nov 2022 22:30:30 -0600 Subject: [PATCH 04/26] dotty: use preFixup instead of fixupPhase --- pkgs/development/compilers/scala/bare.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/scala/bare.nix b/pkgs/development/compilers/scala/bare.nix index 92d22ca7d6e6..1914156e59d6 100644 --- a/pkgs/development/compilers/scala/bare.nix +++ b/pkgs/development/compilers/scala/bare.nix @@ -17,7 +17,9 @@ stdenv.mkDerivation rec { mv * $out ''; - fixupPhase = '' + # Use preFixup instead of fixupPhase + # because we want the default fixupPhase as well + preFixup = '' bin_files=$(find $out/bin -type f ! -name common) for f in $bin_files ; do wrapProgram $f --set JAVA_HOME ${jre} --prefix PATH : '${ncurses.dev}/bin' From 8683f16c3981aac5c622e8e2788c8529b2976282 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sat, 12 Nov 2022 11:25:36 +0100 Subject: [PATCH 05/26] rekor-cli, rekor-server: 1.0.0 -> 1.0.1 https://github.com/sigstore/rekor/releases/tag/v1.0.1 --- pkgs/tools/security/rekor/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/rekor/default.nix b/pkgs/tools/security/rekor/default.nix index 28eb45a6cdb2..e367314ba19b 100644 --- a/pkgs/tools/security/rekor/default.nix +++ b/pkgs/tools/security/rekor/default.nix @@ -4,13 +4,13 @@ let generic = { pname, packageToBuild, description }: buildGoModule rec { inherit pname; - version = "1.0.0"; + version = "1.0.1"; src = fetchFromGitHub { owner = "sigstore"; repo = "rekor"; rev = "v${version}"; - sha256 = "sha256-yFUpaKfZUgT/KZyZLEeNGnD0SS4iBAQfXRy/Yiuj9g8="; + sha256 = "sha256-WVAIhsbxwwvUyuLQLTcMHx9B5UsJxBvmS9MXYxVNiNs="; # populate values that require us to use git. By doing this in postFetch we # can delete .git afterwards and maintain better reproducibility of the src. leaveDotGit = true; From 45c65058c03ff13f9e242be565a8222f16c70969 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 14 Nov 2022 00:43:24 +0100 Subject: [PATCH 06/26] enumer: init at 1.5.7 --- pkgs/tools/misc/enumer/default.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/tools/misc/enumer/default.nix diff --git a/pkgs/tools/misc/enumer/default.nix b/pkgs/tools/misc/enumer/default.nix new file mode 100644 index 000000000000..c7e7818d09ef --- /dev/null +++ b/pkgs/tools/misc/enumer/default.nix @@ -0,0 +1,26 @@ +{ lib +, stdenv +, fetchFromGitHub +, buildGoModule +}: + +buildGoModule rec { + pname = "enumer"; + version = "1.5.7"; + + src = fetchFromGitHub { + owner = "dmarkham"; + repo = "enumer"; + rev = "refs/tags/v${version}"; + hash = "sha256-2fVWrrWOiCtg7I3Lul2PgQ2u/qDEDioPSB61Tp0rfEo="; + }; + + vendorSha256 = "sha256-BmFv0ytRnjaB7z7Gb+38Fw2ObagnaFMnMhlejhaGxsk="; + + meta = with lib; { + description = "Go tool to auto generate methods for enums"; + homepage = "https://github.com/dmarkham/enumer"; + license = licenses.bsd2; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f48ad8215f6..d7f643caa002 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -480,6 +480,8 @@ with pkgs; efficient-compression-tool = callPackage ../tools/compression/efficient-compression-tool { }; + enumer = callPackage ../tools/misc/enumer { }; + evans = callPackage ../development/tools/evans { }; expressvpn = callPackage ../applications/networking/expressvpn { }; From 74b39464975dfaa92194e8cec27f4699a75ea1a8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 21 Nov 2022 21:33:13 +0000 Subject: [PATCH 07/26] cargo-expand: 1.0.32 -> 1.0.35 --- pkgs/development/tools/rust/cargo-expand/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-expand/default.nix b/pkgs/development/tools/rust/cargo-expand/default.nix index b7235356b539..07fb95f8729c 100644 --- a/pkgs/development/tools/rust/cargo-expand/default.nix +++ b/pkgs/development/tools/rust/cargo-expand/default.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-expand"; - version = "1.0.32"; + version = "1.0.35"; src = fetchFromGitHub { owner = "dtolnay"; repo = pname; rev = version; - sha256 = "sha256-5zWJsc0OKgQMp0PeCuL99RE/Uj5sudXRMITjoKniPqQ="; + sha256 = "sha256-hJb4FLL3+AMNLL05eQc7Mkhp0KEGxmHg8/ETDoZiLV4="; }; - cargoSha256 = "sha256-/euiu7WNFY89QU1BKFfOAn7k93dZpuwbS6u2A6MDsoM="; + cargoSha256 = "sha256-wKVlmO2/ugAb7vUSIGMz0WGnjEVEsm459DV9FaM28Mk="; buildInputs = lib.optional stdenv.isDarwin libiconv; From cc8681b2c718472614196b0424cdc47761c5d5a0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 25 Jul 2021 10:59:01 +0200 Subject: [PATCH 08/26] evcc: init at 0.107.1 --- pkgs/servers/home-automation/evcc/default.nix | 92 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 94 insertions(+) create mode 100644 pkgs/servers/home-automation/evcc/default.nix diff --git a/pkgs/servers/home-automation/evcc/default.nix b/pkgs/servers/home-automation/evcc/default.nix new file mode 100644 index 000000000000..feb0180cc4cb --- /dev/null +++ b/pkgs/servers/home-automation/evcc/default.nix @@ -0,0 +1,92 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, fetchNpmDeps +, cacert +, go +, git +, enumer +, mockgen +, nodejs +, npmHooks +, nix-update-script +, stdenv +}: + +buildGoModule rec { + pname = "evcc"; + version = "0.107.1"; + + src = fetchFromGitHub { + owner = "evcc-io"; + repo = pname; + rev = version; + hash = "sha256-Yu7ebZ6WkLpdvmg7H9A1Sveyu9SRuQ+78gFrCZrYhCU="; + }; + + vendorHash = "sha256-10W1BNHcdP77m7lJ/mc+jQeUigoUid3K0wI4bUm5y+s="; + + npmDeps = fetchNpmDeps { + inherit src; + hash = "sha256-+l5LuxJAjrTvOL5XEQ4OIktdupSpn6IqrNX5x4MRmNw="; + }; + + nativeBuildInputs = [ + nodejs + npmHooks.npmConfigHook + ]; + + overrideModAttrs = _: { + nativeBuildInputs = [ + enumer + go + git + cacert + mockgen + ]; + + preBuild = '' + make assets + ''; + }; + + tags = [ + "release" + ]; + + ldflags = [ + "-X github.com/evcc-io/evcc/server.Version=${version}" + "-X github.com/evcc-io/evcc/server.Commit=${src.rev}" + "-s" + "-w" + ]; + + npmInstallFlags = [ + "--legacy-peer-deps" + ]; + + preBuild = '' + make ui + ''; + + doCheck = !stdenv.isDarwin; # tries to bind to local network, doesn't work in darwin sandbox + + preCheck = '' + # requires network access + rm meter/template_test.go + ''; + + passthru = { + updateScript = nix-update-script { + attrPath = pname; + }; + }; + + meta = with lib; { + description = "EV Charge Controller"; + homepage = "https://evcc.io"; + changelog = "https://github.com/andig/evcc/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d7f643caa002..826da64315fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6452,6 +6452,8 @@ with pkgs; ettercap = callPackage ../applications/networking/sniffers/ettercap { }; + evcc = callPackage ../servers/home-automation/evcc { }; + eventstat = callPackage ../os-specific/linux/eventstat { }; evillimiter = python3Packages.callPackage ../tools/networking/evillimiter { }; From 36f58b687c48494e6f849f0bb816b5d4fcdc30f4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Jul 2021 15:13:24 +0200 Subject: [PATCH 09/26] nixos/evcc: init --- .../from_md/release-notes/rl-2211.section.xml | 10 ++ .../manual/release-notes/rl-2211.section.md | 2 + nixos/modules/module-list.nix | 1 + .../modules/services/home-automation/evcc.nix | 92 +++++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 nixos/modules/services/home-automation/evcc.nix diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index 3ab35fe84bbf..763010ae82a3 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -278,6 +278,16 @@ services.prometheus.sachet. + + + EVCC is an EV charge + controller with PV integration. It supports a multitude of + chargers, meters, vehicle APIs and more and ties that together + with a well-tested backend and a lightweight web frontend. + Available as + services.evcc. + + infnoise, diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 81aef68a716f..b8aa0cc09fa9 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -98,6 +98,8 @@ In addition to numerous new and upgraded packages, this release has the followin - [Sachet](https://github.com/messagebird/sachet/), an SMS alerting tool for the Prometheus Alertmanager. Available as [services.prometheus.sachet](#opt-services.prometheus.sachet.enable). +- [EVCC](https://evcc.io) is an EV charge controller with PV integration. It supports a multitude of chargers, meters, vehicle APIs and more and ties that together with a well-tested backend and a lightweight web frontend. Available as [services.evcc](#opt-services.evcc.enable). + - [infnoise](https://github.com/leetronics/infnoise), a hardware True Random Number Generator dongle. Available as [services.infnoise](options.html#opt-services.infnoise.enable). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 2a23a32eaba6..bc5f6f1d76cd 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -491,6 +491,7 @@ ./services/hardware/vdr.nix ./services/home-automation/home-assistant.nix ./services/home-automation/zigbee2mqtt.nix + ./services/home-automation/evcc.nix ./services/logging/SystemdJournal2Gelf.nix ./services/logging/awstats.nix ./services/logging/filebeat.nix diff --git a/nixos/modules/services/home-automation/evcc.nix b/nixos/modules/services/home-automation/evcc.nix new file mode 100644 index 000000000000..c12ba9d0c1e2 --- /dev/null +++ b/nixos/modules/services/home-automation/evcc.nix @@ -0,0 +1,92 @@ +{ lib +, pkgs +, config +, ... +}: + +with lib; + +let + cfg = config.services.evcc; + + format = pkgs.formats.yaml {}; + configFile = format.generate "evcc.yml" cfg.settings; + + package = pkgs.evcc; +in + +{ + meta.maintainers = with lib.maintainers; [ hexa ]; + + options.services.evcc = with types; { + enable = mkEnableOption (lib.mdDoc "EVCC, the extensible EV Charge Controller with PV integration"); + + extraArgs = mkOption { + type = listOf str; + default = []; + description = lib.mdDoc '' + Extra arguments to pass to the evcc executable. + ''; + }; + + settings = mkOption { + type = format.type; + description = lib.mdDoc '' + evcc configuration as a Nix attribute set. + + Check for possible options in the sample [evcc.dist.yaml](https://github.com/andig/evcc/blob/${package.version}/evcc.dist.yaml]. + ''; + }; + }; + + config = mkIf cfg.enable { + systemd.services.evcc = { + after = [ + "network-online.target" + "mosquitto.target" + ]; + wantedBy = [ + "multi-user.target" + ]; + + serviceConfig = { + ExecStart = "${package}/bin/evcc --config ${configFile} ${escapeShellArgs cfg.extraArgs}"; + CapabilityBoundingSet = [ "" ]; + DeviceAllow = [ + "char-ttyUSB" + ]; + DevicePolicy = "closed"; + DynamicUser = true; + LockPersonality = true; + MemoryDenyWriteExecute = true; + RestrictAddressFamilies = [ + "AF_INET" + "AF_INET6" + "AF_UNIX" + ]; + RestrictNamespaces = true; + RestrictRealtime = true; + PrivateTmp = true; + PrivateUsers = true; + ProcSubset = "pid"; + ProtectClock = true; + ProtectControlGroups= true; + ProtectHome = true; + ProtectHostname = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectProc = "invisible"; + SystemCallArchitectures = "native"; + SystemCallFilter = [ + "@system-service" + "~@privileged" + ]; + UMask = "0077"; + User = "evcc"; + }; + }; + }; + + meta.buildDocsInSandbox = false; +} From 005233baa29a7da3aa2e76ce0bd36bf286aaac4f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Jul 2021 15:14:24 +0200 Subject: [PATCH 10/26] nixos/tests/evcc: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/evcc.nix | 96 +++++++++++++++++++ pkgs/servers/home-automation/evcc/default.nix | 4 + 3 files changed, 101 insertions(+) create mode 100644 nixos/tests/evcc.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index d3dc8b9ca08a..7b1006ba6015 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -198,6 +198,7 @@ in { etebase-server = handleTest ./etebase-server.nix {}; etesync-dav = handleTest ./etesync-dav.nix {}; extra-python-packages = handleTest ./extra-python-packages.nix {}; + evcc = handleTest ./evcc.nix {}; fancontrol = handleTest ./fancontrol.nix {}; fcitx = handleTest ./fcitx {}; fenics = handleTest ./fenics.nix {}; diff --git a/nixos/tests/evcc.nix b/nixos/tests/evcc.nix new file mode 100644 index 000000000000..0fc261142f78 --- /dev/null +++ b/nixos/tests/evcc.nix @@ -0,0 +1,96 @@ +import ./make-test-python.nix ({ pkgs, lib, ...} : + +{ + name = "evcc"; + meta.maintainers = with lib.maintainers; [ hexa ]; + + nodes = { + machine = { config, ... }: { + services.evcc = { + enable = true; + settings = { + network = { + schema = "http"; + host = "localhost"; + port = 7070; + }; + + log = "info"; + + site = { + title = "NixOS Test"; + meters = { + grid = "grid"; + pv = "pv"; + }; + }; + + meters = [ { + type = "custom"; + name = "grid"; + power = { + source = "script"; + cmd = "/bin/sh -c 'echo -4500'"; + }; + } { + type = "custom"; + name = "pv"; + power = { + source = "script"; + cmd = "/bin/sh -c 'echo 7500'"; + }; + } ]; + + chargers = [ { + name = "dummy-charger"; + type = "custom"; + status = { + source = "script"; + cmd = "/bin/sh -c 'echo charger status F'"; + }; + enabled = { + source = "script"; + cmd = "/bin/sh -c 'echo charger enabled state false'"; + }; + enable = { + source = "script"; + cmd = "/bin/sh -c 'echo set charger enabled state true'"; + }; + maxcurrent = { + source = "script"; + cmd = "/bin/sh -c 'echo set charger max current 7200'"; + }; + } ]; + + loadpoints = [ { + title = "Dummy"; + charger = "dummy-charger"; + } ]; + }; + }; + }; + }; + + testScript = '' + start_all() + + machine.wait_for_unit("evcc.service") + machine.wait_for_open_port(7070) + + with subtest("Check package version propagates into frontend"): + machine.fail( + "curl --fail http://localhost:7070 | grep '0.0.1-alpha'" + ) + machine.succeed( + "curl --fail http://localhost:7070 | grep '${pkgs.evcc.version}'" + ) + + with subtest("Check journal for errors"): + _, output = machine.execute("journalctl -o cat -u evcc.service") + assert "ERROR" not in output + + with subtest("Check systemd hardening"): + _, output = machine.execute("systemd-analyze security evcc.service | grep -v '✓'") + machine.log(output) + ''; +}) diff --git a/pkgs/servers/home-automation/evcc/default.nix b/pkgs/servers/home-automation/evcc/default.nix index feb0180cc4cb..a242f9d1cc3a 100644 --- a/pkgs/servers/home-automation/evcc/default.nix +++ b/pkgs/servers/home-automation/evcc/default.nix @@ -10,6 +10,7 @@ , nodejs , npmHooks , nix-update-script +, nixosTests , stdenv }: @@ -77,6 +78,9 @@ buildGoModule rec { ''; passthru = { + tests = { + inherit (nixosTests) evcc; + }; updateScript = nix-update-script { attrPath = pname; }; From 73dd9e31d32a5ba530be62459e69f4a23c0b5244 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 21 Nov 2022 23:28:03 +0000 Subject: [PATCH 11/26] jackett: 0.20.2264 -> 0.20.2271 --- pkgs/servers/jackett/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/jackett/default.nix b/pkgs/servers/jackett/default.nix index 630d7b845b7b..f7585e180a0a 100644 --- a/pkgs/servers/jackett/default.nix +++ b/pkgs/servers/jackett/default.nix @@ -9,13 +9,13 @@ buildDotnetModule rec { pname = "jackett"; - version = "0.20.2264"; + version = "0.20.2271"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "Y1m828STKL4ANuf11oCekvT2ctCRBlT7Blyvvoltdxc="; + sha256 = "Sngvd9OWCB2I0qfYvb7yEGb7HiWuHtc+jU6O5r68mbU="; }; projectFile = "src/Jackett.Server/Jackett.Server.csproj"; From ead322b582033bb5cc4787908c04d0069c30e2f0 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 18 Nov 2022 17:54:06 +0800 Subject: [PATCH 12/26] wlroots: deduplicate builders --- pkgs/development/libraries/wlroots/0.14.nix | 64 --------- pkgs/development/libraries/wlroots/0.15.nix | 69 ---------- .../development/libraries/wlroots/default.nix | 124 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 7 +- 4 files changed, 128 insertions(+), 136 deletions(-) delete mode 100644 pkgs/development/libraries/wlroots/0.14.nix delete mode 100644 pkgs/development/libraries/wlroots/0.15.nix create mode 100644 pkgs/development/libraries/wlroots/default.nix diff --git a/pkgs/development/libraries/wlroots/0.14.nix b/pkgs/development/libraries/wlroots/0.14.nix deleted file mode 100644 index db10e57443cc..000000000000 --- a/pkgs/development/libraries/wlroots/0.14.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wayland-scanner -, libGL, wayland, wayland-protocols, libinput, libxkbcommon, pixman -, libcap, mesa, xorg -, libpng, ffmpeg_4, seatd - -, enableXWayland ? true, xwayland ? null -}: - -stdenv.mkDerivation rec { - pname = "wlroots"; - version = "0.14.1"; - - src = fetchFromGitHub { - owner = "swaywm"; - repo = "wlroots"; - rev = version; - sha256 = "1sshp3lvlkl1i670kxhwsb4xzxl8raz6769kqvgmxzcb63ns9ay1"; - }; - - # $out for the library and $examples for the example programs (in examples): - outputs = [ "out" "examples" ]; - - strictDeps = true; - depsBuildBuild = [ pkg-config ]; - - nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ]; - - buildInputs = [ - libGL wayland wayland-protocols libinput libxkbcommon pixman - xorg.xcbutilwm xorg.libX11 libcap xorg.xcbutilimage xorg.xcbutilerrors mesa - libpng ffmpeg_4 xorg.xcbutilrenderutil seatd - ] - ++ lib.optional enableXWayland xwayland - ; - - mesonFlags = - lib.optional (!enableXWayland) "-Dxwayland=disabled" - ; - - postFixup = '' - # Install ALL example programs to $examples: - # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle - # screenshot output-layout multi-pointer rotation tablet touch pointer - # simple - mkdir -p $examples/bin - cd ./examples - for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do - cp "$binary" "$examples/bin/wlroots-$binary" - done - ''; - - meta = with lib; { - description = "A modular Wayland compositor library"; - longDescription = '' - Pluggable, composable, unopinionated modules for building a Wayland - compositor; or about 50,000 lines of code you were going to write anyway. - ''; - inherit (src.meta) homepage; - changelog = "https://github.com/swaywm/wlroots/releases/tag/${version}"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ primeos synthetica ]; - }; -} diff --git a/pkgs/development/libraries/wlroots/0.15.nix b/pkgs/development/libraries/wlroots/0.15.nix deleted file mode 100644 index 117b7ebdc5d5..000000000000 --- a/pkgs/development/libraries/wlroots/0.15.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ lib, stdenv, fetchFromGitLab, meson, ninja, pkg-config, wayland-scanner -, libGL, wayland, wayland-protocols, libinput, libxkbcommon, pixman -,libcap, mesa, xorg -, libpng, ffmpeg_4, seatd, vulkan-loader, glslang -, nixosTests - -, enableXWayland ? true, xwayland ? null -}: - -stdenv.mkDerivation rec { - pname = "wlroots"; - version = "0.15.1"; - - src = fetchFromGitLab { - domain = "gitlab.freedesktop.org"; - owner = "wlroots"; - repo = "wlroots"; - rev = version; - sha256 = "sha256-MFR38UuB/wW7J9ODDUOfgTzKLse0SSMIRYTpEaEdRwM="; - }; - - # $out for the library and $examples for the example programs (in examples): - outputs = [ "out" "examples" ]; - - strictDeps = true; - depsBuildBuild = [ pkg-config ]; - - nativeBuildInputs = [ meson ninja pkg-config wayland-scanner glslang ]; - - buildInputs = [ - libGL wayland wayland-protocols libinput libxkbcommon pixman - xorg.xcbutilwm xorg.libX11 libcap xorg.xcbutilimage xorg.xcbutilerrors mesa - libpng ffmpeg_4 xorg.xcbutilrenderutil seatd vulkan-loader - ] - ++ lib.optional enableXWayland xwayland - ; - - mesonFlags = - lib.optional (!enableXWayland) "-Dxwayland=disabled" - ; - - postFixup = '' - # Install ALL example programs to $examples: - # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle - # screenshot output-layout multi-pointer rotation tablet touch pointer - # simple - mkdir -p $examples/bin - cd ./examples - for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do - cp "$binary" "$examples/bin/wlroots-$binary" - done - ''; - - # Test via TinyWL (the "minimum viable product" Wayland compositor based on wlroots): - passthru.tests.tinywl = nixosTests.tinywl; - - meta = with lib; { - description = "A modular Wayland compositor library"; - longDescription = '' - Pluggable, composable, unopinionated modules for building a Wayland - compositor; or about 50,000 lines of code you were going to write anyway. - ''; - inherit (src.meta) homepage; - changelog = "https://gitlab.freedesktop.org/wlroots/wlroots/-/tags/${version}"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ primeos synthetica ]; - }; -} diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix new file mode 100644 index 000000000000..3d35828f289b --- /dev/null +++ b/pkgs/development/libraries/wlroots/default.nix @@ -0,0 +1,124 @@ +{ lib +, stdenv +, fetchFromGitLab +, meson +, ninja +, pkg-config +, wayland-scanner +, libGL +, wayland +, wayland-protocols +, libinput +, libxkbcommon +, pixman +, libcap +, mesa +, xorg +, libpng +, ffmpeg_4 +, hwdata +, seatd +, vulkan-loader +, glslang +, nixosTests + +, enableXWayland ? true +, xwayland ? null +}: + +let + generic = { version, hash, extraBuildInputs ? [ ], extraNativeBuildInputs ? [ ], extraPatch ? "" }: + stdenv.mkDerivation rec { + pname = "wlroots"; + inherit version; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "wlroots"; + repo = "wlroots"; + rev = version; + inherit hash; + }; + + postPatch = extraPatch; + + # $out for the library and $examples for the example programs (in examples): + outputs = [ "out" "examples" ]; + + strictDeps = true; + depsBuildBuild = [ pkg-config ]; + + nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ] + ++ extraNativeBuildInputs; + + buildInputs = [ + ffmpeg_4 + libGL + libcap + libinput + libpng + libxkbcommon + mesa + pixman + seatd + vulkan-loader + wayland + wayland-protocols + xorg.libX11 + xorg.xcbutilerrors + xorg.xcbutilimage + xorg.xcbutilrenderutil + xorg.xcbutilwm + ] + ++ lib.optional enableXWayland xwayland + ++ extraBuildInputs; + + mesonFlags = + lib.optional (!enableXWayland) "-Dxwayland=disabled" + ; + + postFixup = '' + # Install ALL example programs to $examples: + # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle + # screenshot output-layout multi-pointer rotation tablet touch pointer + # simple + mkdir -p $examples/bin + cd ./examples + for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do + cp "$binary" "$examples/bin/wlroots-$binary" + done + ''; + + # Test via TinyWL (the "minimum viable product" Wayland compositor based on wlroots): + passthru.tests.tinywl = nixosTests.tinywl; + + meta = with lib; { + description = "A modular Wayland compositor library"; + longDescription = '' + Pluggable, composable, unopinionated modules for building a Wayland + compositor; or about 50,000 lines of code you were going to write anyway. + ''; + inherit (src.meta) homepage; + changelog = "https://gitlab.freedesktop.org/wlroots/wlroots/-/tags/${version}"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos synthetica ]; + }; + }; + +in +rec { + wlroots_0_14 = generic { + version = "0.14.1"; + hash = "sha256-wauk7TCL/V7fxjOZY77KiPbfydIc9gmOiYFOuum4UOs="; + }; + + wlroots_0_15 = generic { + version = "0.15.1"; + hash = "sha256-MFR38UuB/wW7J9ODDUOfgTzKLse0SSMIRYTpEaEdRwM="; + extraBuildInputs = [ vulkan-loader ]; + extraNativeBuildInputs = [ glslang ]; + }; + + wlroots = wlroots_0_15; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a4a31df2778..d75cefbeb211 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29397,9 +29397,10 @@ with pkgs; electron = electron_17; }; - wlroots = wlroots_0_15; - wlroots_0_14 = callPackage ../development/libraries/wlroots/0.14.nix { }; - wlroots_0_15 = callPackage ../development/libraries/wlroots/0.15.nix { }; + inherit (callPackages ../development/libraries/wlroots {}) + wlroots_0_14 + wlroots_0_15 + wlroots; sway-unwrapped = callPackage ../applications/window-managers/sway { }; sway = callPackage ../applications/window-managers/sway/wrapper.nix { }; From d2596de25e49d613b5eaf3d43d64f5ba216573c4 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 18 Nov 2022 17:54:58 +0800 Subject: [PATCH 13/26] wlroots_0_16: init at 0.16 --- pkgs/development/libraries/wlroots/default.nix | 11 +++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix index 3d35828f289b..761e97784013 100644 --- a/pkgs/development/libraries/wlroots/default.nix +++ b/pkgs/development/libraries/wlroots/default.nix @@ -120,5 +120,16 @@ rec { extraNativeBuildInputs = [ glslang ]; }; + wlroots_0_16 = generic { + version = "0.16.0"; + hash = "sha256-k7BFx1xvvsdCXNWX0XeZYwv8H/myk4p42i2Y6vjILqM="; + extraBuildInputs = [ vulkan-loader ]; + extraNativeBuildInputs = [ glslang ]; + extraPatch = '' + substituteInPlace backend/drm/meson.build \ + --replace /usr/share/hwdata/ ${hwdata}/share/hwdata/ + ''; + }; + wlroots = wlroots_0_15; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d75cefbeb211..5efe67baaa0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29400,6 +29400,7 @@ with pkgs; inherit (callPackages ../development/libraries/wlroots {}) wlroots_0_14 wlroots_0_15 + wlroots_0_16 wlroots; sway-unwrapped = callPackage ../applications/window-managers/sway { }; From 408131fde1a95ce6944dae686da02cf9ad10f99b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 21 Nov 2022 23:53:36 +0100 Subject: [PATCH 14/26] fnott: Drop the unnecessary wlroots dependency Fnott doesn't depend on wlroots and this produces the exact same binaries. --- pkgs/applications/misc/fnott/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/misc/fnott/default.nix b/pkgs/applications/misc/fnott/default.nix index f01a2b5595a3..8c730a2b48b7 100644 --- a/pkgs/applications/misc/fnott/default.nix +++ b/pkgs/applications/misc/fnott/default.nix @@ -12,7 +12,6 @@ , pixman , libpng , wayland -, wlroots , dbus , fcft }: @@ -43,7 +42,6 @@ stdenv.mkDerivation rec { pixman libpng wayland - wlroots dbus fcft ]; From 4c5f7afb5f25d1404e79c87009abb5d6fffcf0cd Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 21 Nov 2022 15:07:04 +0000 Subject: [PATCH 15/26] broadlink-cli: 0.18.2 -> 0.18.3 --- pkgs/tools/misc/broadlink-cli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/broadlink-cli/default.nix b/pkgs/tools/misc/broadlink-cli/default.nix index 1d9a45cb5610..087b56c9d1a3 100644 --- a/pkgs/tools/misc/broadlink-cli/default.nix +++ b/pkgs/tools/misc/broadlink-cli/default.nix @@ -2,7 +2,7 @@ python3Packages.buildPythonApplication rec { pname = "broadlink-cli"; - version = "0.18.2"; + version = "0.18.3"; # the tools are available as part of the source distribution from GH but # not pypi, so we have to fetch them here. @@ -10,7 +10,7 @@ python3Packages.buildPythonApplication rec { owner = "mjg59"; repo = "python-broadlink"; rev = "refs/tags/${version}"; - sha256 = "sha256-JX+Io5EP1OgtP7T+UQtkfCPWE1rd3MTrCYRhU9C0+0c="; + sha256 = "sha256-8bSlMA5Nb3hqpVMeHlgb8AkKt5JrfEiyKjobxRBdmNM="; }; format = "other"; From 3be2a76832fa540b32cefd8bf8e9095037f97391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Sun, 20 Nov 2022 14:15:47 -0600 Subject: [PATCH 16/26] =?UTF-8?q?zeal:=20unstable-2021-12-25=20=E2=86=92?= =?UTF-8?q?=20unstable-2022-10-02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/data/documentation/zeal/default.nix | 46 +++++++++++++++++------- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/pkgs/data/documentation/zeal/default.nix b/pkgs/data/documentation/zeal/default.nix index de3d7638eb9b..3a8b7122c7ff 100644 --- a/pkgs/data/documentation/zeal/default.nix +++ b/pkgs/data/documentation/zeal/default.nix @@ -1,16 +1,31 @@ -{ lib, fetchFromGitHub, cmake, extra-cmake-modules, pkg-config -, qtbase, qtimageformats, qtwebengine, qtx11extras, mkDerivation -, libarchive, libXdmcp, libpthreadstubs, xcbutilkeysyms }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, extra-cmake-modules +, pkg-config +, qtbase +, qtimageformats +, qtwebengine +, qtx11extras ? null # qt5 only +, libarchive +, libXdmcp +, libpthreadstubs +, wrapQtAppsHook +, xcbutilkeysyms +}: -mkDerivation rec { +let + isQt5 = lib.versions.major qtbase.version == "5"; +in stdenv.mkDerivation rec { pname = "zeal"; - version = "0.6.999"; + version = "0.6.20221022"; src = fetchFromGitHub { owner = "zealdocs"; repo = "zeal"; - rev = "763edca12ccd6c67e51f10891d1ced8b2510904f"; - sha256 = "sha256-1/wQXkRWvpRia8UDvvvmzHinPG8q2Tz9Uoeegej9uC8="; + rev = "7ea03e4bb9754020e902a2989f56f4bc42b85c82"; + sha256 = "sha256-BozRLlws56i9P7Qtc5qPZWgJR5yhYqnLQsEdsymt5us="; }; # we only need this if we are using a version that hasn't been released. We @@ -22,13 +37,18 @@ mkDerivation rec { -e 's@^project.*@project(Zeal VERSION ${version})@' ''; - nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ]; + nativeBuildInputs = [ cmake extra-cmake-modules pkg-config wrapQtAppsHook ]; - buildInputs = [ - qtbase qtimageformats qtwebengine qtx11extras - libarchive - libXdmcp libpthreadstubs xcbutilkeysyms - ]; + buildInputs = + [ + qtbase + qtimageformats + qtwebengine + libarchive + libXdmcp + libpthreadstubs + xcbutilkeysyms + ] ++ lib.optionals isQt5 [ qtx11extras ]; meta = with lib; { description = "A simple offline API documentation browser"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5efe67baaa0d..c841d8b933da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27163,7 +27163,9 @@ with pkgs; inherit (plasma5Packages) breeze-icons; }; - zeal = libsForQt5.callPackage ../data/documentation/zeal { }; + zeal-qt5 = libsForQt5.callPackage ../data/documentation/zeal { }; + zeal-qt6 = qt6Packages.callPackage ../data/documentation/zeal { }; + zeal = zeal-qt5; zilla-slab = callPackage ../data/fonts/zilla-slab { }; From de6f2b0a0701954a35bd7de525f7baadeda1812e Mon Sep 17 00:00:00 2001 From: WORLDofPEACE Date: Fri, 12 Feb 2021 04:36:23 -0500 Subject: [PATCH 17/26] nixos/dbus: support dbus-broker --- nixos/modules/services/system/dbus.nix | 172 +++++++++++++++++-------- 1 file changed, 116 insertions(+), 56 deletions(-) diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix index b87e48f2945d..c677088101f0 100644 --- a/nixos/modules/services/system/dbus.nix +++ b/nixos/modules/services/system/dbus.nix @@ -14,7 +14,7 @@ let serviceDirectories = cfg.packages; }; - inherit (lib) mkOption types; + inherit (lib) mkOption mkIf mkMerge types; in @@ -33,6 +33,18 @@ in ''; }; + implementation = mkOption { + type = types.enum [ "dbus" "broker" ]; + default = "dbus"; + description = lib.mdDoc '' + The implementation to use for the message bus defined by the D-Bus specification. + Can be either the classic dbus daemon or dbus-broker, which aims to provide high + performance and reliability, while keeping compatibility to the D-Bus + reference implementation. + ''; + + }; + packages = mkOption { type = types.listOf types.path; default = [ ]; @@ -66,66 +78,114 @@ in }; }; - config = lib.mkIf cfg.enable { - environment.systemPackages = [ - pkgs.dbus - ]; + config = mkIf cfg.enable (mkMerge [ + { + environment.etc."dbus-1".source = configDir; - environment.etc."dbus-1".source = configDir; - - users.users.messagebus = { - uid = config.ids.uids.messagebus; - description = "D-Bus system message bus daemon user"; - home = homeDir; - group = "messagebus"; - }; - - users.groups.messagebus.gid = config.ids.gids.messagebus; - - systemd.packages = [ - pkgs.dbus - ]; - - security.wrappers.dbus-daemon-launch-helper = { - source = "${pkgs.dbus}/libexec/dbus-daemon-launch-helper"; - owner = "root"; - group = "messagebus"; - setuid = true; - setgid = false; - permissions = "u+rx,g+rx,o-rx"; - }; - - services.dbus.packages = [ - pkgs.dbus - config.system.path - ]; - - systemd.services.dbus = { - # Don't restart dbus-daemon. Bad things tend to happen if we do. - reloadIfChanged = true; - restartTriggers = [ - configDir + environment.pathsToLink = [ + "/etc/dbus-1" + "/share/dbus-1" ]; - environment = { - LD_LIBRARY_PATH = config.system.nssModules.path; + + users.users.messagebus = { + uid = config.ids.uids.messagebus; + description = "D-Bus system message bus daemon user"; + home = homeDir; + group = "messagebus"; }; - }; - systemd.user.services.dbus = { - # Don't restart dbus-daemon. Bad things tend to happen if we do. - reloadIfChanged = true; - restartTriggers = [ - configDir + users.groups.messagebus.gid = config.ids.gids.messagebus; + + # You still need the dbus reference implementation installed to use dbus-broker + systemd.packages = [ + pkgs.dbus ]; - }; - systemd.user.sockets.dbus.wantedBy = [ - "sockets.target" - ]; + services.dbus.packages = [ + pkgs.dbus + config.system.path + ]; - environment.pathsToLink = [ - "/etc/dbus-1" - "/share/dbus-1" - ]; - }; + systemd.user.sockets.dbus.wantedBy = [ + "sockets.target" + ]; + } + + (mkIf (cfg.implementation == "dbus") { + environment.systemPackages = [ + pkgs.dbus + ]; + + security.wrappers.dbus-daemon-launch-helper = { + source = "${pkgs.dbus}/libexec/dbus-daemon-launch-helper"; + owner = "root"; + group = "messagebus"; + setuid = true; + setgid = false; + permissions = "u+rx,g+rx,o-rx"; + }; + + systemd.services.dbus = { + # Don't restart dbus-daemon. Bad things tend to happen if we do. + reloadIfChanged = true; + restartTriggers = [ + configDir + ]; + environment = { + LD_LIBRARY_PATH = config.system.nssModules.path; + }; + }; + + systemd.user.services.dbus = { + # Don't restart dbus-daemon. Bad things tend to happen if we do. + reloadIfChanged = true; + restartTriggers = [ + configDir + ]; + }; + + }) + + (mkIf (cfg.implementation == "broker") { + environment.systemPackages = [ + pkgs.dbus-broker + ]; + + systemd.packages = [ + pkgs.dbus-broker + ]; + + # Just to be sure we don't restart through the unit alias + systemd.services.dbus.reloadIfChanged = true; + systemd.user.services.dbus.reloadIfChanged = true; + + # NixOS Systemd Module doesn't respect 'Install' + # https://github.com/NixOS/nixpkgs/issues/108643 + systemd.services.dbus-broker = { + aliases = [ + "dbus.service" + ]; + # Don't restart dbus. Bad things tend to happen if we do. + reloadIfChanged = true; + restartTriggers = [ + configDir + ]; + environment = { + LD_LIBRARY_PATH = config.system.nssModules.path; + }; + }; + + systemd.user.services.dbus-broker = { + aliases = [ + "dbus.service" + ]; + # Don't restart dbus. Bad things tend to happen if we do. + reloadIfChanged = true; + restartTriggers = [ + configDir + ]; + }; + }) + + ]); } From fef20379e4c8e574c8b0eee91cbda3a486984b88 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 22 Nov 2022 02:10:01 +0000 Subject: [PATCH 18/26] esbuild: 0.15.14 -> 0.15.15 --- pkgs/development/tools/esbuild/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/esbuild/default.nix b/pkgs/development/tools/esbuild/default.nix index bafcca27474e..ddb178e35c44 100644 --- a/pkgs/development/tools/esbuild/default.nix +++ b/pkgs/development/tools/esbuild/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "esbuild"; - version = "0.15.14"; + version = "0.15.15"; src = fetchFromGitHub { owner = "evanw"; repo = "esbuild"; rev = "v${version}"; - sha256 = "sha256-RcXVynR/dHI0Wn9gTQsYVjxqzAfeiI52Ph+hfpM9RhU="; + sha256 = "sha256-vWpm9tbzLZE+rrEHC6mBH+ajMdhdAk9Fwy5MBFG35ss="; }; vendorSha256 = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ="; From 9a1b2c5ec6832113470e92ef060161fec3c5319a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 22 Nov 2022 03:16:14 +0000 Subject: [PATCH 19/26] gitleaks: 8.15.0 -> 8.15.1 --- pkgs/tools/security/gitleaks/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/gitleaks/default.nix b/pkgs/tools/security/gitleaks/default.nix index ed8ebf669c3d..5d7465f728a8 100644 --- a/pkgs/tools/security/gitleaks/default.nix +++ b/pkgs/tools/security/gitleaks/default.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "gitleaks"; - version = "8.15.0"; + version = "8.15.1"; src = fetchFromGitHub { owner = "zricethezav"; repo = pname; rev = "v${version}"; - sha256 = "sha256-KqShYaUODClKkbLs3jaj55WXy9HyyBzvY5KdNOqEXPE="; + sha256 = "sha256-iIjQytsZDz9H5wT44jBBZCx8NvfAhNBl7pTv3mCkeMY="; }; vendorSha256 = "sha256-Ev0/CSpwJDmc+Dvu/bFDzsgsq80rWImJWXNAUqYHgoE="; From cd777c91587642ac8a0c25aca9df630a92771e5b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 13 Nov 2022 14:34:32 +0000 Subject: [PATCH 20/26] cyberchef: 9.48.0 -> 9.49.0 --- pkgs/tools/misc/cyberchef/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/cyberchef/default.nix b/pkgs/tools/misc/cyberchef/default.nix index 8d27438ea381..0bdeb64c0c16 100644 --- a/pkgs/tools/misc/cyberchef/default.nix +++ b/pkgs/tools/misc/cyberchef/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "cyberchef"; - version = "9.48.0"; + version = "9.49.0"; src = fetchzip { url = "https://github.com/gchq/CyberChef/releases/download/v${version}/CyberChef_v${version}.zip"; - sha256 = "sha256-tKNU+gUcuZMjsQes/vpEpn216/0fWCgb0mgvJ8WWoDQ="; + sha256 = "sha256-5cqCPxyH4O4TzAIwRR2oyWMzIl5Hi5YcdOKdpl518zw="; stripRoot = false; }; From db935280e5f67ae1bd37527c07d3f8579a484477 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 03:28:02 +0000 Subject: [PATCH 21/26] =?UTF-8?q?terraform-providers.google:=204.43.1=20?= =?UTF-8?q?=E2=86=92=204.44.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index bfc5e828cb27..250aa5994959 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -441,14 +441,14 @@ "version": "3.19.0" }, "google": { - "hash": "sha256-qOB4UV53j0Bm0332U1YETzLfyBtGwfXs2hGDAL2BCCk=", + "hash": "sha256-etTMRjQeZoLNpFlKBWa63eowXQC8wDP/O0YdwzbmFK0=", "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/google", "proxyVendor": true, "repo": "terraform-provider-google", - "rev": "v4.43.1", - "vendorHash": "sha256-Hzl95NLEZlvTBpCGJYzF5rtHWfYe26TwW0pbtqWmxOo=", - "version": "4.43.1" + "rev": "v4.44.0", + "vendorHash": "sha256-X5wjho+hotqi9aZ5ABv3RY0xJj1HFH7IN/HLPKIxi2c=", + "version": "4.44.0" }, "google-beta": { "hash": "sha256-nNz9BgTJ8Aj3QZNpT0XK14s44+thDu4EfLvbEB8OFRc=", From 2a784c5cf87693b370ca4c530106c4d17547778c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 03:28:15 +0000 Subject: [PATCH 22/26] =?UTF-8?q?terraform-providers.google-beta:=204.43.1?= =?UTF-8?q?=20=E2=86=92=204.44.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 250aa5994959..296987b280e3 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -451,14 +451,14 @@ "version": "4.44.0" }, "google-beta": { - "hash": "sha256-nNz9BgTJ8Aj3QZNpT0XK14s44+thDu4EfLvbEB8OFRc=", + "hash": "sha256-AD2ZtjjlmYZYmBA3csjIDH+4g7DTskaLeuBGjqIKpbU=", "owner": "hashicorp", "provider-source-address": "registry.terraform.io/hashicorp/google-beta", "proxyVendor": true, "repo": "terraform-provider-google-beta", - "rev": "v4.43.1", - "vendorHash": "sha256-Hzl95NLEZlvTBpCGJYzF5rtHWfYe26TwW0pbtqWmxOo=", - "version": "4.43.1" + "rev": "v4.44.0", + "vendorHash": "sha256-X5wjho+hotqi9aZ5ABv3RY0xJj1HFH7IN/HLPKIxi2c=", + "version": "4.44.0" }, "googleworkspace": { "hash": "sha256-dedYnsKHizxJZibuvJOMbJoux0W6zgKaK5fxIofKqCY=", From 254db8a04e4ec6a2fb034deca87946dc3e863bd0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 03:34:01 +0000 Subject: [PATCH 23/26] =?UTF-8?q?terraform-providers.rancher2:=201.24.2=20?= =?UTF-8?q?=E2=86=92=201.25.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 296987b280e3..d313d28036cf 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -950,13 +950,13 @@ "version": "1.7.0" }, "rancher2": { - "hash": "sha256-TqztIk0sHevfv+BpNZJUs1XbwrbzJtcqdafGN5fTVaE=", + "hash": "sha256-DInP+DpCBOsBdlg1tiujlmN20WB5VQbeHgOiabEv9Zc=", "owner": "rancher", "provider-source-address": "registry.terraform.io/rancher/rancher2", "repo": "terraform-provider-rancher2", - "rev": "v1.24.2", + "rev": "v1.25.0", "vendorHash": "sha256-Ntq4wxXPUGbu4+6X1pBsmQsqfJ/jccTiHDJeHVpWe8Y=", - "version": "1.24.2" + "version": "1.25.0" }, "random": { "hash": "sha256-oYtvVK0OOHyLUG6amhkvmr6zlbzy0CKoS3DxztoLbdE=", From f8636f5d05f8c885cfd557d574de1748735858bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 03:35:11 +0000 Subject: [PATCH 24/26] =?UTF-8?q?terraform-providers.tencentcloud:=201.78.?= =?UTF-8?q?12=20=E2=86=92=201.78.13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index d313d28036cf..38d69e289b27 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -1112,13 +1112,13 @@ "version": "0.13.5" }, "tencentcloud": { - "hash": "sha256-HSZP6O9s6KkvaJK3xpy7uT3sjBlhBYEOu5k7VYW8MdU=", + "hash": "sha256-62G9q/MZtVnKO0ALXX9/pgkHDV6Bfdol4tSVdl0kx3I=", "owner": "tencentcloudstack", "provider-source-address": "registry.terraform.io/tencentcloudstack/tencentcloud", "repo": "terraform-provider-tencentcloud", - "rev": "v1.78.12", + "rev": "v1.78.13", "vendorHash": null, - "version": "1.78.12" + "version": "1.78.13" }, "tfe": { "hash": "sha256-ikuLRGm9Z+tt0Zsx7DYKNBrS08rW4DOvVWYpl3wvaeU=", From b380f254a02f33171469762364d9d9238381dd9f Mon Sep 17 00:00:00 2001 From: Stella Date: Mon, 24 Oct 2022 19:01:13 +0200 Subject: [PATCH 25/26] dwarfs: 0.6.1 -> 0.6.2 --- pkgs/tools/filesystems/dwarfs/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/dwarfs/default.nix b/pkgs/tools/filesystems/dwarfs/default.nix index 22b29b5ed27f..3427a5a688c3 100644 --- a/pkgs/tools/filesystems/dwarfs/default.nix +++ b/pkgs/tools/filesystems/dwarfs/default.nix @@ -26,14 +26,14 @@ stdenv.mkDerivation rec { pname = "dwarfs"; - version = "0.6.1"; + version = "0.6.2"; src = fetchFromGitHub { owner = "mhx"; repo = "dwarfs"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "sha256-bGJkgcq8JxueRTX08QpJv1A0O5wXbiIgUY7BrY0Ln/M="; + sha256 = "sha256-fA/3AooDndqYiK215cu/zTqCqeccHnwIX2CfJ9sC+Fc="; }; patches = with lib.versions; [ @@ -59,6 +59,10 @@ stdenv.mkDerivation rec { # may be added under an option in the future # "-DWITH_LEGACY_FUSE=ON" "-DWITH_TESTS=ON" + + # temporary hack until folly builds work on aarch64, + # see https://github.com/facebook/folly/issues/1880 + "-DCMAKE_LIBRARY_ARCHITECTURE=${if stdenv.isx86_64 then "x86_64" else "dummy"}" ]; nativeBuildInputs = [ From 2ea79e0fe445f3fe4f7ac355e12b60ca0e2bd1fa Mon Sep 17 00:00:00 2001 From: wentam Date: Fri, 18 Nov 2022 17:15:29 -0500 Subject: [PATCH 26/26] mnc: init at 0.4 --- pkgs/tools/misc/mnc/default.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/tools/misc/mnc/default.nix diff --git a/pkgs/tools/misc/mnc/default.nix b/pkgs/tools/misc/mnc/default.nix new file mode 100644 index 000000000000..b6ee577d07cd --- /dev/null +++ b/pkgs/tools/misc/mnc/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildGoModule +, fetchFromSourcehut +}: + +buildGoModule rec { + pname = "mnc"; + version = "0.4"; + + vendorSha256 = "sha256-H0KmGTWyjZOZLIEWophCwRYPeKLxBC050RI7cMXNbPs="; + + src = fetchFromSourcehut { + owner = "~anjan"; + repo = "mnc"; + rev = version; + sha256 = "sha256-S7MBIxuYI+cc8OMQULt7VS7ouPqhq0Jk+rz6E5GyKac="; + }; + + meta = with lib; { + description = "Opens the user's crontab and echos the time when the next cronjob will be ran"; + homepage = "https://git.sr.ht/~anjan/mnc"; + license = licenses.unlicense; + platforms = platforms.linux; + maintainers = with maintainers; [ wentam ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c841d8b933da..48a0ec0c45a6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1396,6 +1396,8 @@ with pkgs; midi-trigger = callPackage ../applications/audio/midi-trigger { }; + mnc = callPackage ../tools/misc/mnc { }; + mprocs = callPackage ../tools/misc/mprocs { }; nominatim = callPackage ../servers/nominatim { };