about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/checksec
diff options
context:
space:
mode:
authorMatías Lang <matiasl@infobytesec.com>2018-08-10 16:47:16 -0300
committerMatías Lang <matiasl@infobytesec.com>2018-08-10 16:47:16 -0300
commitfb15f208454e6721d598553a6d0fb9761c693ce2 (patch)
tree26491939f1f52352c3ed82316439213d361ab8cd /pkgs/os-specific/linux/checksec
parent68b5f51d6fc4bb0474bef55e75c3ec61deaf4517 (diff)
checksec: switch to binutils-unwrapped
checksec needs the readelf command to work properly, which is contained
in the binutils-unwrapped derivation but not in the normal binutils.
Before this commit, this tool wasn't working due to that.
Diffstat (limited to 'pkgs/os-specific/linux/checksec')
-rw-r--r--pkgs/os-specific/linux/checksec/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/checksec/default.nix b/pkgs/os-specific/linux/checksec/default.nix
index a8ffb133a9059..6c927ae93afb3 100644
--- a/pkgs/os-specific/linux/checksec/default.nix
+++ b/pkgs/os-specific/linux/checksec/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, file, findutils, binutils, glibc, coreutils, sysctl }:
+{ stdenv, fetchurl, file, findutils, binutils-unwrapped, glibc, coreutils, sysctl }:
 
 stdenv.mkDerivation rec {
   name = "checksec-${version}";
@@ -26,9 +26,9 @@ stdenv.mkDerivation rec {
     substituteInPlace $out/bin/checksec --replace find ${findutils}/bin/find
     substituteInPlace $out/bin/checksec --replace "file $" "${file}/bin/file $"
     substituteInPlace $out/bin/checksec --replace "xargs file" "xargs ${file}/bin/file"
-    substituteInPlace $out/bin/checksec --replace " readelf -" " ${binutils.out}/bin/readelf -"
-    substituteInPlace $out/bin/checksec --replace "(readelf -" "(${binutils.out}/bin/readelf -"
-    substituteInPlace $out/bin/checksec --replace "command_exists readelf" "command_exists ${binutils.out}/bin/readelf"
+    substituteInPlace $out/bin/checksec --replace " readelf -" " ${binutils-unwrapped}/bin/readelf -"
+    substituteInPlace $out/bin/checksec --replace "(readelf -" "(${binutils-unwrapped}/bin/readelf -"
+    substituteInPlace $out/bin/checksec --replace "command_exists readelf" "command_exists ${binutils-unwrapped}/bin/readelf"
     substituteInPlace $out/bin/checksec --replace "/sbin/sysctl -" "${sysctl}/bin/sysctl -"
     substituteInPlace $out/bin/checksec --replace "/usr/bin/id -" "${coreutils}/bin/id -"
   '';