From 01eec1f8499728b5cf73838469366b4a5af967e0 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sat, 6 Apr 2024 19:06:47 +0530 Subject: [PATCH 1/2] agate: 3.3.4 -> 3.3.7 add new dependency openssl add nix update script --- pkgs/servers/gemini/agate/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/gemini/agate/default.nix b/pkgs/servers/gemini/agate/default.nix index 4dd4c7f7303e..8dcf05c19a83 100644 --- a/pkgs/servers/gemini/agate/default.nix +++ b/pkgs/servers/gemini/agate/default.nix @@ -1,19 +1,22 @@ -{ lib, stdenv, nixosTests, fetchFromGitHub, rustPlatform, libiconv, Security }: +{ lib, stdenv, nixosTests, fetchFromGitHub, rustPlatform, libiconv, Security, openssl, pkg-config, nix-update-script }: rustPlatform.buildRustPackage rec { pname = "agate"; - version = "3.3.4"; + version = "3.3.7"; src = fetchFromGitHub { owner = "mbrubeck"; repo = "agate"; rev = "v${version}"; - hash = "sha256-7z3iAA+Q3k5jEO9ZhA06h7/17gE0FWPqDOGK/XENRWg="; + hash = "sha256-pNfTgkl59NTRDH+w23P49MUWzIXh5ElnJitMEYfsBnc="; }; - cargoHash = "sha256-iTopJnuH2extGnaJXL+RPUwcvj2e+k5A4BT33v+sFiA="; + cargoHash = "sha256-RuSvweZhPWS2C2lwncxWAW2XLQN6+bAslv3p4IwQ2BA="; - buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ openssl ] + ++ lib.optionals stdenv.isDarwin [ libiconv Security ]; doInstallCheck = true; installCheckPhase = '' @@ -25,7 +28,10 @@ rustPlatform.buildRustPackage rec { __darwinAllowLocalNetworking = true; - passthru.tests = { inherit (nixosTests) agate; }; + passthru = { + tests = { inherit (nixosTests) agate; }; + updateScript = nix-update-script { }; + }; meta = with lib; { homepage = "https://github.com/mbrubeck/agate"; From efd4ac1194793442224301a2fe7bdb1bf315ef3b Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Thu, 30 May 2024 14:15:16 +0530 Subject: [PATCH 2/2] agate: cleanup format with nixfmt-rfc-style use `lib.` explicitly update changelog url --- pkgs/servers/gemini/agate/default.nix | 36 +++++++++++++++++++++------ 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/pkgs/servers/gemini/agate/default.nix b/pkgs/servers/gemini/agate/default.nix index 8dcf05c19a83..18667580a5fe 100644 --- a/pkgs/servers/gemini/agate/default.nix +++ b/pkgs/servers/gemini/agate/default.nix @@ -1,4 +1,15 @@ -{ lib, stdenv, nixosTests, fetchFromGitHub, rustPlatform, libiconv, Security, openssl, pkg-config, nix-update-script }: +{ + lib, + stdenv, + nixosTests, + fetchFromGitHub, + rustPlatform, + libiconv, + Security, + openssl, + pkg-config, + nix-update-script, +}: rustPlatform.buildRustPackage rec { pname = "agate"; @@ -15,8 +26,12 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ libiconv Security ]; + buildInputs = + [ openssl ] + ++ lib.optionals stdenv.isDarwin [ + libiconv + Security + ]; doInstallCheck = true; installCheckPhase = '' @@ -29,13 +44,15 @@ rustPlatform.buildRustPackage rec { __darwinAllowLocalNetworking = true; passthru = { - tests = { inherit (nixosTests) agate; }; + tests = { + inherit (nixosTests) agate; + }; updateScript = nix-update-script { }; }; - meta = with lib; { + meta = { homepage = "https://github.com/mbrubeck/agate"; - changelog = "https://github.com/mbrubeck/agate/blob/master/CHANGELOG.md"; + changelog = "https://github.com/mbrubeck/agate/releases/tag/v${version}"; description = "Very simple server for the Gemini hypertext protocol"; mainProgram = "agate"; longDescription = '' @@ -44,7 +61,10 @@ rustPlatform.buildRustPackage rec { static files. It uses async I/O, and should be quite efficient even when running on low-end hardware and serving many concurrent requests. ''; - license = with licenses; [ asl20 /* or */ mit ]; - maintainers = with maintainers; [ jk ]; + license = with lib.licenses; [ + asl20 + mit + ]; + maintainers = with lib.maintainers; [ jk ]; }; }