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
commit 83bc01a59c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 15 deletions

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

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";