about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/libraries/graphene-hardened-malloc
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/graphene-hardened-malloc')
-rw-r--r--nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix23
1 files changed, 15 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix b/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix
index f3c16c8ac321..3d4af9db19ce 100644
--- a/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix
+++ b/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix
@@ -1,14 +1,21 @@
-{ lib, stdenv, fetchFromGitHub, python3, runCommand, makeWrapper, stress-ng }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, python3
+, runCommand
+, makeWrapper
+, stress-ng
+}:
 
 lib.fix (self: stdenv.mkDerivation rec {
   pname = "graphene-hardened-malloc";
-  version = "8";
+  version = "11";
 
   src = fetchFromGitHub {
     owner = "GrapheneOS";
     repo = "hardened_malloc";
     rev = version;
-    sha256 = "sha256-+5kJb3hhuFTto7zsIymIXl3tpKUOm3v1DCY4EkAOCgo=";
+    sha256 = "sha256-BbjL0W12QXFmGCzFrFYY6CZZeFbUt0elCGhM+mbL/IU=";
   };
 
   doCheck = true;
@@ -20,7 +27,7 @@ lib.fix (self: stdenv.mkDerivation rec {
 
   installPhase = ''
     install -Dm444 -t $out/include include/*
-    install -Dm444 -t $out/lib libhardened_malloc.so
+    install -Dm444 -t $out/lib out/libhardened_malloc.so
 
     mkdir -p $out/bin
     substitute preload.sh $out/bin/preload-hardened-malloc --replace "\$dir" $out/lib
@@ -41,21 +48,21 @@ lib.fix (self: stdenv.mkDerivation rec {
       # standalone executables. this includes disabling tests for
       # malloc_object_size, which doesn't make sense to use via LD_PRELOAD.
       buildPhase = ''
-        pushd test/simple-memory-corruption
+        pushd test
         make LDLIBS= LDFLAGS=-Wl,--unresolved-symbols=ignore-all CXXFLAGS=-lstdc++
         substituteInPlace test_smc.py \
           --replace 'test_malloc_object_size' 'dont_test_malloc_object_size' \
           --replace 'test_invalid_malloc_object_size' 'dont_test_invalid_malloc_object_size'
-        popd # test/simple-memory-corruption
+        popd # test
       '';
 
       installPhase = ''
         mkdir -p $out/test
-        cp -r test/simple-memory-corruption $out/test/simple-memory-corruption
+        cp -r test $out/test
 
         mkdir -p $out/bin
         makeWrapper ${python3.interpreter} $out/bin/run-tests \
-          --add-flags "-I -m unittest discover --start-directory $out/test/simple-memory-corruption"
+          --add-flags "-I -m unittest discover --start-directory $out/test"
       '';
     };
     tests = {