graphene-hardened-malloc: migrate to by-name, build light variant

This commit is contained in:
nat 2023-11-11 17:50:39 +01:00
parent d3bf7abb55
commit 2df126c3dd
No known key found for this signature in database
2 changed files with 18 additions and 8 deletions

View file

@ -1,9 +1,9 @@
{ lib { fetchFromGitHub
, stdenv , lib
, fetchFromGitHub , makeWrapper
, python3 , python3
, runCommand , runCommand
, makeWrapper , stdenv
, stress-ng , stress-ng
}: }:
@ -18,18 +18,30 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "sha256-ujwzr4njNsf/VTyEq7zKHWxoivU3feavSTx+MLIj1ZM="; sha256 = "sha256-ujwzr4njNsf/VTyEq7zKHWxoivU3feavSTx+MLIj1ZM=";
}; };
doCheck = true;
nativeCheckInputs = [ python3 ]; nativeCheckInputs = [ python3 ];
# these tests cover use as a build-time-linked library # these tests cover use as a build-time-linked library
checkTarget = "test"; checkTarget = "test";
doCheck = true;
buildPhase = ''
runHook preBuild
for VARIANT in default light; do make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES} VARIANT=$VARIANT; done
runHook postBuild
'';
installPhase = '' installPhase = ''
runHook preInstall
install -Dm444 -t $out/include include/* install -Dm444 -t $out/include include/*
install -Dm444 -t $out/lib out/libhardened_malloc.so install -Dm444 -t $out/lib out/libhardened_malloc.so out-light/libhardened_malloc-light.so
mkdir -p $out/bin mkdir -p $out/bin
substitute preload.sh $out/bin/preload-hardened-malloc --replace "\$dir" $out/lib substitute preload.sh $out/bin/preload-hardened-malloc --replace "\$dir" $out/lib
chmod 0555 $out/bin/preload-hardened-malloc chmod 0555 $out/bin/preload-hardened-malloc
runHook postInstall
''; '';
separateDebugInfo = true; separateDebugInfo = true;

View file

@ -18977,8 +18977,6 @@ with pkgs;
grail = callPackage ../development/libraries/grail { }; grail = callPackage ../development/libraries/grail { };
graphene-hardened-malloc = callPackage ../development/libraries/graphene-hardened-malloc { };
graphene = callPackage ../development/libraries/graphene { }; graphene = callPackage ../development/libraries/graphene { };
griffe = with python3Packages; toPythonApplication griffe; griffe = with python3Packages; toPythonApplication griffe;