mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
Merge pull request #177548 from fabaff/checksec-bump
checksec: 2.5.0 -> 2.6.0
This commit is contained in:
commit
b3f8311eb9
1 changed files with 42 additions and 22 deletions
|
@ -1,26 +1,46 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper, file, findutils
|
||||
, binutils-unwrapped, glibc, coreutils, sysctl, openssl
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, file
|
||||
, findutils
|
||||
, binutils-unwrapped
|
||||
, glibc
|
||||
, coreutils
|
||||
, sysctl
|
||||
, openssl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "checksec";
|
||||
version = "2.5.0";
|
||||
version = "2.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "slimm609";
|
||||
repo = "checksec.sh";
|
||||
rev = version;
|
||||
sha256 = "sha256-GxWXocz+GCEssRrIQP6E9hjVIhVh2EmZrefELxQlV1Q=";
|
||||
hash = "sha256-BWtchWXukIDSLJkFX8M/NZBvfi7vUE2j4yFfS0KEZDo=";
|
||||
};
|
||||
|
||||
patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = let
|
||||
path = lib.makeBinPath [
|
||||
findutils file binutils-unwrapped sysctl openssl
|
||||
patches = [
|
||||
./0001-attempt-to-modprobe-config-before-checking-kernel.patch
|
||||
];
|
||||
in ''
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
installPhase =
|
||||
let
|
||||
path = lib.makeBinPath [
|
||||
findutils
|
||||
file
|
||||
binutils-unwrapped
|
||||
sysctl
|
||||
openssl
|
||||
];
|
||||
in
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
install checksec $out/bin
|
||||
substituteInPlace $out/bin/checksec --replace /lib/libc.so.6 ${glibc.out}/lib/libc.so.6
|
||||
|
@ -30,7 +50,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for checking security bits on executables";
|
||||
description = "Tool for checking security bits on executables";
|
||||
homepage = "https://www.trapkit.de/tools/checksec/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
|
|
Loading…
Reference in a new issue