Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-lc: init at 1.39.0 #356628

Merged
merged 2 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21883,6 +21883,12 @@
githubId = 71843723;
keys = [ { fingerprint = "EEFB CC3A C529 CFD1 943D A75C BDD5 7BE9 9D55 5965"; } ];
};
theoparis = {
email = "[email protected]";
github = "theoparis";
githubId = 11761863;
name = "Theo Paris";
};
thepuzzlemaker = {
name = "ThePuzzlemaker";
email = "[email protected]";
Expand Down
93 changes: 93 additions & 0 deletions pkgs/by-name/aw/aws-lc/package.nix
Original file line number Diff line number Diff line change
@@ -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";
};
})
Loading