osquery: remove workaround for autoPatchelfHook problem

Remove workaround for #333710.
This commit is contained in:
squalus 2024-09-19 11:05:03 -07:00
parent b024224462
commit 2b5cd64f80
2 changed files with 3 additions and 15 deletions

View File

@ -14,7 +14,6 @@
, jq , jq
, removeReferencesTo , removeReferencesTo
, nixosTests , nixosTests
, file
, writers , writers
}: }:
@ -24,7 +23,7 @@ let
opensslSrc = fetchurl info.openssl; 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 in

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchzip, file }: { stdenv, lib, fetchzip, autoPatchelfHook }:
let let
version = "1.1.0"; version = "1.1.0";
@ -24,24 +24,13 @@ stdenv.mkDerivation {
src = fetchzip dist.${stdenv.hostPlatform.system}; src = fetchzip dist.${stdenv.hostPlatform.system};
nativeBuildInputs = [ file ]; nativeBuildInputs = [ autoPatchelfHook ];
installPhase = '' installPhase = ''
mkdir $out mkdir $out
cp -r * $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; { meta = with lib; {
description = "A LLVM-based toolchain for Linux designed to build a portable osquery"; description = "A LLVM-based toolchain for Linux designed to build a portable osquery";
homepage = "https://github.com/osquery/osquery-toolchain"; homepage = "https://github.com/osquery/osquery-toolchain";