From 1badc6033853d115597639fb9f52032ec9a6dfd3 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 24 May 2016 16:08:13 +0200 Subject: [PATCH] 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 --- pkgs/os-specific/linux/paxtest/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/os-specific/linux/paxtest/default.nix b/pkgs/os-specific/linux/paxtest/default.nix index 7c8e5eb70a15..0c2fd9b6f86c 100644 --- a/pkgs/os-specific/linux/paxtest/default.nix +++ b/pkgs/os-specific/linux/paxtest/default.nix @@ -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 ]; }; } -