osquery: remove workaround for autoPatchelfHook problem (#343084)

This commit is contained in:
Peder Bergebakken Sundt
2024-10-21 00:37:50 +02:00
committed by GitHub
2 changed files with 3 additions and 15 deletions
+1 -2
View File
@@ -14,7 +14,6 @@
, jq
, removeReferencesTo
, nixosTests
, file
, writers
}:
@@ -24,7 +23,7 @@ let
opensslSrc = fetchurl info.openssl;
toolchain = import ./toolchain-bin.nix { inherit stdenv lib fetchzip file; };
toolchain = import ./toolchain-bin.nix { inherit stdenv lib fetchzip autoPatchelfHook; };
in
+2 -13
View File
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchzip, file }:
{ stdenv, lib, fetchzip, autoPatchelfHook }:
let
version = "1.1.0";
@@ -24,24 +24,13 @@ stdenv.mkDerivation {
src = fetchzip dist.${stdenv.hostPlatform.system};
nativeBuildInputs = [ file ];
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
mkdir $out
cp -r * $out
'';
# autoPatchelfHook cannot be used here because of https://github.com/NixOS/nixpkgs/issues/333710
postFixup = ''
read -r interpreter < "$NIX_BINTOOLS"/nix-support/dynamic-linker
for file in $(find "$out"/usr/bin -type f -executable); do
if [[ $(file "$file") == *ELF*dynamically* ]]; then
patchelf --interpreter "$interpreter" "$file"
patchelf --set-rpath "$out/usr/lib" "$file"
fi
done
'';
meta = with lib; {
description = "A LLVM-based toolchain for Linux designed to build a portable osquery";
homepage = "https://github.com/osquery/osquery-toolchain";