checksec: clean up

This commit is contained in:
Robin Gloster 2016-02-26 17:26:03 +00:00
parent a73762200d
commit 631c09bbe5
2 changed files with 6 additions and 5 deletions

View File

@ -3,6 +3,7 @@
stdenv.mkDerivation rec {
name = "checksec-${version}";
version = "1.5";
src = fetchurl {
url = "http://www.trapkit.de/tools/checksec.sh";
sha256 = "0iq9v568mk7g7ksa1939g5f5sx7ffq8s8n2ncvphvlckjgysgf3p";
@ -11,9 +12,9 @@ stdenv.mkDerivation rec {
patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
unpackPhase = ''
mkdir ${name}-${version}
cp $src ${name}-${version}/checksec.sh
cd ${name}-${version}
mkdir ${name}
cp $src ${name}/checksec.sh
cd ${name}
'';
installPhase = ''
@ -32,8 +33,6 @@ stdenv.mkDerivation rec {
substituteInPlace $out/bin/checksec --replace "/usr/bin/id -" "${coreutils}/bin/id -"
'';
phases = "unpackPhase patchPhase installPhase";
meta = {
description = "A tool for checking security bits on executables";
homepage = "http://www.trapkit.de/tools/checksec.html";

View File

@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ libcap openssl ];
hardening_pie = true;
postInstall = ''
rm -rf $out/share/doc
'';