Skip to content

Commit

Permalink
stdoutisatty: use cmakeFlags, not LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Cao <[email protected]>
  • Loading branch information
bryango and NickCao committed Oct 6, 2024
1 parent 985c898 commit 577ab41
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkgs/by-name/st/stdoutisatty/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ stdenv.mkDerivation (finalAttrs: {
makeBinaryWrapper
];

preFixup = ''
# necessary for dynamic loading of `lib/libstdoutisatty.so` at runtime
wrapProgram $out/bin/${finalAttrs.pname} \
--prefix LD_LIBRARY_PATH : "$out/lib"
'';
cmakeFlags = [
# must specify the full path to `libstdoutisatty.so` in the nix store
(lib.cmakeFeature "CMAKE_C_FLAGS" "-DLIB_FILE='\"${placeholder "out"}/lib/libstdoutisatty.so\"'")
];

passthru = {
updateScript = nix-update-script { };
Expand Down

0 comments on commit 577ab41

Please sign in to comment.