From 3a064718e595b9678bc0f63306f3349d24f96949 Mon Sep 17 00:00:00 2001 From: Theo Paris Date: Sat, 16 Nov 2024 18:57:09 -0800 Subject: [PATCH 1/2] maintainers: add theoparis --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 30b6e40d3c19..8901ce33bd39 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -21883,6 +21883,12 @@ githubId = 71843723; keys = [ { fingerprint = "EEFB CC3A C529 CFD1 943D A75C BDD5 7BE9 9D55 5965"; } ]; }; + theoparis = { + email = "theo@tinted.dev"; + github = "theoparis"; + githubId = 11761863; + name = "Theo Paris"; + }; thepuzzlemaker = { name = "ThePuzzlemaker"; email = "tpzker@thepuzzlemaker.info"; From 36a73cab5004a795522cbfa2eaf28b6892eb5197 Mon Sep 17 00:00:00 2001 From: Theo Paris Date: Sat, 16 Nov 2024 19:11:55 -0800 Subject: [PATCH 2/2] aws-lc: init at 1.39.0 --- pkgs/by-name/aw/aws-lc/package.nix | 93 ++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 pkgs/by-name/aw/aws-lc/package.nix diff --git a/pkgs/by-name/aw/aws-lc/package.nix b/pkgs/by-name/aw/aws-lc/package.nix new file mode 100644 index 000000000000..3733c6d4964b --- /dev/null +++ b/pkgs/by-name/aw/aws-lc/package.nix @@ -0,0 +1,93 @@ +{ + lib, + stdenv, + overrideSDK, + cmakeMinimal, + fetchFromGitHub, + ninja, + testers, + aws-lc, + useSharedLibraries ? !stdenv.hostPlatform.isStatic, +}: +let + awsStdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; +in +awsStdenv.mkDerivation (finalAttrs: { + pname = "aws-lc"; + version = "1.39.0"; + + src = fetchFromGitHub { + owner = "aws"; + repo = "aws-lc"; + rev = "v${finalAttrs.version}"; + hash = "sha256-LbhSnIjZWBtbU++puuZW2hgswO1lArrD5+uhBZNItNM="; + }; + + outputs = [ + "out" + "bin" + "dev" + ]; + + nativeBuildInputs = [ + cmakeMinimal + ninja + ]; + + cmakeFlags = [ + (lib.cmakeBool "BUILD_SHARED_LIBS" useSharedLibraries) + "-GNinja" + "-DDISABLE_GO=ON" + "-DDISABLE_PERL=ON" + "-DBUILD_TESTING=ON" + ]; + + doCheck = true; + + checkPhase = '' + runHook preCheck + ninja run_minimal_tests + runHook postCheck + ''; + + env.NIX_CFLAGS_COMPILE = toString ( + lib.optionals stdenv.cc.isGNU [ + # Needed with GCC 12 but breaks on darwin (with clang) + "-Wno-error=stringop-overflow" + ] + ); + + postFixup = '' + for f in $out/lib/crypto/cmake/*/crypto-targets.cmake; do + substituteInPlace "$f" \ + --replace-fail 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES ""' + done + ''; + + passthru.tests = { + version = testers.testVersion { + package = aws-lc; + command = "bssl version"; + }; + pkg-config = testers.hasPkgConfigModules { + package = aws-lc; + moduleNames = [ + "libcrypto" + "libssl" + "openssl" + ]; + }; + }; + + meta = { + description = "General-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers"; + homepage = "https://github.com/aws/aws-lc"; + license = [ + lib.licenses.asl20 # or + lib.licenses.isc + ]; + maintainers = [ lib.maintainers.theoparis ]; + platforms = lib.platforms.unix; + mainProgram = "bssl"; + }; +})