From b48b48ac58e4d58d72af55949459bd62e7fd1b31 Mon Sep 17 00:00:00 2001 From: datafoo <34766150+datafoo@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:43:06 +0200 Subject: [PATCH 1/5] mosquitto: use `hash` attribute for SRI hashes See https://nixos.org/manual/nixpkgs/unstable/#fetchfromgithub and https://nixos.org/manual/nixpkgs/unstable/#sec-pkgs-fetchers-fetchurl-inputs > It is recommended that you use the hash attribute instead of the other hash-specific attributes that exist for backwards compatibility. --- pkgs/servers/mqtt/mosquitto/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index 3c3a6199f7b5..b07084ab9676 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { owner = "eclipse"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Vs0blV2IhnlEAm0WtOartz+0vLesJfp78FNJCivRxHk="; + hash = "sha256-Vs0blV2IhnlEAm0WtOartz+0vLesJfp78FNJCivRxHk="; }; patches = lib.optionals stdenv.hostPlatform.isDarwin [ From 90f4a481725fec496232284c2e6c48dc41907c5e Mon Sep 17 00:00:00 2001 From: datafoo <34766150+datafoo@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:25:43 +0200 Subject: [PATCH 2/5] mosquitto: stop using `with` expression --- pkgs/servers/mqtt/mosquitto/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index b07084ab9676..a6448045665e 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -83,11 +83,11 @@ stdenv.mkDerivation rec { inherit (nixosTests) mosquitto; }; - meta = with lib; { + meta = { description = "Open source MQTT v3.1/3.1.1/5.0 broker"; homepage = "https://mosquitto.org/"; - license = licenses.epl10; - maintainers = with maintainers; [ peterhoeg ]; - platforms = platforms.unix; + license = lib.licenses.epl10; + maintainers = [ lib.maintainers.peterhoeg ]; + platforms = lib.platforms.unix; }; } From 348d9d0414457fb0e0bb7634a15d6ce0a71e0271 Mon Sep 17 00:00:00 2001 From: datafoo <34766150+datafoo@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:34:57 +0200 Subject: [PATCH 3/5] mosquitto: fetch repo with its explicit name See #277994 --- pkgs/servers/mqtt/mosquitto/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index a6448045665e..3ac1f5e7dd1b 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "eclipse"; - repo = pname; + repo = "mosquitto"; rev = "v${version}"; hash = "sha256-Vs0blV2IhnlEAm0WtOartz+0vLesJfp78FNJCivRxHk="; }; From 0c764c58a46e6ded56e956ae2016b849a2d84aad Mon Sep 17 00:00:00 2001 From: datafoo <34766150+datafoo@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:57:56 +0200 Subject: [PATCH 4/5] mosquitto: add `meta.changelog` attribute --- pkgs/servers/mqtt/mosquitto/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index 3ac1f5e7dd1b..62a57ef28ef8 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -86,6 +86,7 @@ stdenv.mkDerivation rec { meta = { description = "Open source MQTT v3.1/3.1.1/5.0 broker"; homepage = "https://mosquitto.org/"; + changelog = "https://github.com/eclipse/mosquitto/blob/v${version}/ChangeLog.txt"; license = lib.licenses.epl10; maintainers = [ lib.maintainers.peterhoeg ]; platforms = lib.platforms.unix; From 9549f7ad3023cb99880fac61966b7ee76430af86 Mon Sep 17 00:00:00 2001 From: datafoo <34766150+datafoo@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:39:33 +0200 Subject: [PATCH 5/5] mosquitto: add `meta.mainProgram` attribute --- pkgs/servers/mqtt/mosquitto/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/mqtt/mosquitto/default.nix b/pkgs/servers/mqtt/mosquitto/default.nix index 62a57ef28ef8..83cd922bc517 100644 --- a/pkgs/servers/mqtt/mosquitto/default.nix +++ b/pkgs/servers/mqtt/mosquitto/default.nix @@ -90,5 +90,6 @@ stdenv.mkDerivation rec { license = lib.licenses.epl10; maintainers = [ lib.maintainers.peterhoeg ]; platforms = lib.platforms.unix; + mainProgram = "mosquitto"; }; }