mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
c8dfaee895
* init: lib25519 at 20240321 Signed-off-by: Jack Leightcap <jack@leightcap.com> * Add installCheckPhase to lib25519 * Set platforms for lib25519, libcpucycles and librandombytes * Fixed patch for libcpucycles * lib25519: remove openssl unneeded variable * lib25519: patch scripts to pull toolchain from environment variables * librandombytes: add regression test script * lib25519: checkpoint for successful cross-compile * testing without binfmt * compilation for arm64 without cross compiling * compilation for x86 that creates a x86 binary * lib25519: replace compiler command to fix cross- and native compiling * librandombytes, lib25519: cleanup * crosstest.sh: drop --------- Signed-off-by: Jack Leightcap <jack@leightcap.com> Co-authored-by: Roland Coeurjoly <rolandcoeurjoly@gmail.com> Co-authored-by: imad.nyc <me@imad.nyc> Co-authored-by: Enric Morales <me@enric.me> Co-authored-by: Alberto Merino Risueño <Alberto.Merino@uclm.es> Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
python3,
|
|
librandombytes,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libcpucycles";
|
|
version = "20240318";
|
|
|
|
src = fetchzip {
|
|
url = "https://cpucycles.cr.yp.to/libcpucycles-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-Fb73EOHGgEehZJwTCtCG12xwyiqtDXFs9eFDsHBQiDo=";
|
|
};
|
|
|
|
patches = [ ./environment-variable-tools.patch ];
|
|
|
|
postPatch = ''
|
|
patchShebangs configure
|
|
patchShebangs scripts-build
|
|
'';
|
|
|
|
nativeBuildInputs = [ python3 ];
|
|
|
|
inherit (librandombytes) hardeningDisable configurePlatforms env;
|
|
|
|
preFixup = lib.optionalString stdenv.isDarwin ''
|
|
install_name_tool -id "$out/lib/libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib"
|
|
install_name_tool -change "libcpucycles.1.dylib" "$out/lib/libcpucycles.1.dylib" "$out/bin/cpucycles-info"
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://cpucycles.cr.yp.to/";
|
|
description = "Microlibrary for counting CPU cycles";
|
|
changelog = "https://cpucycles.cr.yp.to/download.html";
|
|
license = with lib.licenses; [
|
|
# Upstream specifies the public domain licenses with the terms here https://cr.yp.to/spdx.html
|
|
publicDomain
|
|
cc0
|
|
bsd0
|
|
mit
|
|
mit0
|
|
];
|
|
maintainers = with lib.maintainers; [
|
|
kiike
|
|
imadnyc
|
|
jleightcap
|
|
];
|
|
inherit (librandombytes.meta) platforms;
|
|
};
|
|
})
|