From 5136e375f2e764f7d11ec87455ca05498f723af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viorel-C=C4=83t=C4=83lin=20R=C4=83pi=C8=9Beanu?= Date: Sun, 22 Sep 2024 15:56:38 +0300 Subject: [PATCH 1/4] arti: move to by-name Move the package to the new by-name structure. --- .../arti/default.nix => by-name/ar/arti/package.nix} | 11 ++++++++--- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 8 insertions(+), 7 deletions(-) rename pkgs/{tools/security/arti/default.nix => by-name/ar/arti/package.nix} (86%) diff --git a/pkgs/tools/security/arti/default.nix b/pkgs/by-name/ar/arti/package.nix similarity index 86% rename from pkgs/tools/security/arti/default.nix rename to pkgs/by-name/ar/arti/package.nix index 1e93dae95961..4e2c7495d850 100644 --- a/pkgs/tools/security/arti/default.nix +++ b/pkgs/by-name/ar/arti/package.nix @@ -5,7 +5,7 @@ , pkg-config , sqlite , openssl -, CoreServices +, darwin }: rustPlatform.buildRustPackage rec { @@ -26,8 +26,13 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = [ sqlite ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; + ++ lib.optionals stdenv.isLinux [ openssl ] + ++ lib.optionals stdenv.isDarwin ( + with darwin.apple_sdk.frameworks; + [ + CoreServices + ] + ); cargoBuildFlags = [ "--package" "arti" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b79143c50a5f..22b340c16c69 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -293,10 +293,6 @@ with pkgs; ares-rs = callPackage ../tools/security/ares-rs { }; - arti = callPackage ../tools/security/arti { - inherit (darwin.apple_sdk.frameworks) CoreServices; - }; - asn1c = callPackage ../development/compilers/asn1c { }; authz0 = callPackage ../tools/security/authz0 { }; From a41d7b3b260441511b5da120772689c2d556e832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viorel-C=C4=83t=C4=83lin=20R=C4=83pi=C8=9Beanu?= Date: Sun, 22 Sep 2024 16:10:52 +0300 Subject: [PATCH 2/4] arti: formatted via nixfmt-rfc-style --- pkgs/by-name/ar/arti/package.nix | 35 +++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ar/arti/package.nix b/pkgs/by-name/ar/arti/package.nix index 4e2c7495d850..828036a938d9 100644 --- a/pkgs/by-name/ar/arti/package.nix +++ b/pkgs/by-name/ar/arti/package.nix @@ -1,11 +1,12 @@ -{ lib -, stdenv -, rustPlatform -, fetchFromGitLab -, pkg-config -, sqlite -, openssl -, darwin +{ + lib, + stdenv, + rustPlatform, + fetchFromGitLab, + pkg-config, + sqlite, + openssl, + darwin, }: rustPlatform.buildRustPackage rec { @@ -25,7 +26,8 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = [ sqlite ] + buildInputs = + [ sqlite ] ++ lib.optionals stdenv.isLinux [ openssl ] ++ lib.optionals stdenv.isDarwin ( with darwin.apple_sdk.frameworks; @@ -34,9 +36,15 @@ rustPlatform.buildRustPackage rec { ] ); - cargoBuildFlags = [ "--package" "arti" ]; + cargoBuildFlags = [ + "--package" + "arti" + ]; - cargoTestFlags = [ "--package" "arti" ]; + cargoTestFlags = [ + "--package" + "arti" + ]; checkFlags = [ # problematic tests that were fixed after the release @@ -49,7 +57,10 @@ rustPlatform.buildRustPackage rec { mainProgram = "arti"; homepage = "https://arti.torproject.org/"; changelog = "https://gitlab.torproject.org/tpo/core/arti/-/blob/${src.rev}/CHANGELOG.md"; - license = with licenses; [ asl20 /* or */ mit ]; + license = with licenses; [ + asl20 + mit + ]; maintainers = [ ]; }; } From e28e945f4b46f775b8ff238f0a903e75158d1e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viorel-C=C4=83t=C4=83lin=20R=C4=83pi=C8=9Beanu?= Date: Sun, 22 Sep 2024 16:12:47 +0300 Subject: [PATCH 3/4] arti: modernize derivation Removed 'with lib;' from meta. --- pkgs/by-name/ar/arti/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ar/arti/package.nix b/pkgs/by-name/ar/arti/package.nix index 828036a938d9..f5b7412499f0 100644 --- a/pkgs/by-name/ar/arti/package.nix +++ b/pkgs/by-name/ar/arti/package.nix @@ -52,12 +52,12 @@ rustPlatform.buildRustPackage rec { "--skip=reload_cfg::test::watch_multiple" ]; - meta = with lib; { + meta = { description = "Implementation of Tor in Rust"; mainProgram = "arti"; homepage = "https://arti.torproject.org/"; changelog = "https://gitlab.torproject.org/tpo/core/arti/-/blob/${src.rev}/CHANGELOG.md"; - license = with licenses; [ + license = with lib.licenses; [ asl20 mit ]; From 71fd6fec9b17d50236218a50acb181b581525d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viorel-C=C4=83t=C4=83lin=20R=C4=83pi=C8=9Beanu?= Date: Sat, 28 Sep 2024 23:41:55 +0300 Subject: [PATCH 4/4] arti: add rapiteanu as maintainer --- pkgs/by-name/ar/arti/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ar/arti/package.nix b/pkgs/by-name/ar/arti/package.nix index f5b7412499f0..6185ec1c683f 100644 --- a/pkgs/by-name/ar/arti/package.nix +++ b/pkgs/by-name/ar/arti/package.nix @@ -61,6 +61,6 @@ rustPlatform.buildRustPackage rec { asl20 mit ]; - maintainers = [ ]; + maintainers = with lib.maintainers; [ rapiteanu ]; }; }