nix: wrap programs on non-macOS to set FUSE_LIBRARY_PATH

This commit is contained in:
ihaveahax 2024-02-11 00:49:14 -06:00
parent c96f0a29ae
commit f7c678eeb1

View File

@ -1,4 +1,4 @@
{ lib, callPackage, buildPythonApplication, fetchPypi, pyctr, pycryptodomex, pypng, tkinter, setuptools, fusepy, haccrypto, pip }:
{ lib, callPackage, buildPythonApplication, fetchPypi, pyctr, pycryptodomex, pypng, tkinter, setuptools, fusepy, haccrypto, pip, stdenv, pkgs }:
buildPythonApplication rec {
pname = "ninfs";
@ -17,4 +17,10 @@ buildPythonApplication rec {
pip
haccrypto
];
postInstall = lib.optional (!stdenv.isDarwin) ''
for f in $out/bin/*; do
wrapProgram "$f" --set FUSE_LIBRARY_PATH ${pkgs.fuse}/lib/libfuse.so.2
done
'';
}