3
0
Fork 0
forked from mirrors/nixpkgs

paxtest: refactoring

- Use standard phase hooks
- Install test helpers into $out/lib/paxtest instead of dumping
  them into PATH
- Set PAXBIN=paxctl so that the appropriate pax flags are set
This commit is contained in:
Joachim Fasting 2016-05-24 16:08:13 +02:00
parent 54f5872f06
commit 1badc60338
No known key found for this signature in database
GPG key ID: 4330820E1E04DCF4

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, paxctl }:
stdenv.mkDerivation rec {
name = "paxtest-${version}";
@ -9,20 +9,16 @@ stdenv.mkDerivation rec {
sha256 = "0j40h3x42k5mr5gc5np4wvr9cdf9szk2f46swf42zny8rlgxiskx";
};
buildPhase = ''
make $makeFlags RUNDIR=$out/bin/ linux
'';
enableParallelBuilding = true;
installPhase = ''
mkdir -p $out/bin
find . -executable -exec cp {} $out/bin \;
'';
makefile = "Makefile.psm";
makeFlags = [ "PAXBIN=${paxctl}/bin/paxctl" "BINDIR=$(out)/bin" "RUNDIR=$(out)/lib/paxtest" ];
installFlags = ''DESTDIR=""'';
meta = with stdenv.lib; {
description = "Test various memory protection measures";
license = licenses.gpl2;
platforms = platforms.linux;
maintainer = [ maintainers.copumpkin ];
maintainer = with maintainers; [ copumpkin joachifm ];
};
}