lxcfs: Wrap lxc.mount.hook
, so that it detects the mount
command
This commit is contained in:
parent
72e80cdc54
commit
4dee97c43e
@ -1,4 +1,5 @@
|
|||||||
{ config, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, help2man, fuse
|
{ config, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, help2man, fuse
|
||||||
|
, utillinux, makeWrapper
|
||||||
, enableDebugBuild ? config.lxcfs.enableDebugBuild or false }:
|
, enableDebugBuild ? config.lxcfs.enableDebugBuild or false }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
@ -13,7 +14,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig help2man autoreconfHook ];
|
nativeBuildInputs = [ pkgconfig help2man autoreconfHook ];
|
||||||
buildInputs = [ fuse ];
|
buildInputs = [ fuse makeWrapper ];
|
||||||
|
|
||||||
preConfigure = stdenv.lib.optionalString enableDebugBuild ''
|
preConfigure = stdenv.lib.optionalString enableDebugBuild ''
|
||||||
sed -i 's,#AM_CFLAGS += -DDEBUG,AM_CFLAGS += -DDEBUG,' Makefile.am
|
sed -i 's,#AM_CFLAGS += -DDEBUG,AM_CFLAGS += -DDEBUG,' Makefile.am
|
||||||
@ -27,6 +28,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
installFlags = [ "SYSTEMD_UNIT_DIR=\${out}/lib/systemd" ];
|
installFlags = [ "SYSTEMD_UNIT_DIR=\${out}/lib/systemd" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# `mount` hook requires access to the `mount` command from `utillinux`:
|
||||||
|
wrapProgram "$out/share/lxcfs/lxc.mount.hook" \
|
||||||
|
--prefix PATH : "${utillinux}/bin"
|
||||||
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
# liblxcfs.so is reloaded with dlopen()
|
# liblxcfs.so is reloaded with dlopen()
|
||||||
patchelf --set-rpath "$(patchelf --print-rpath "$out/bin/lxcfs"):$out/lib" "$out/bin/lxcfs"
|
patchelf --set-rpath "$(patchelf --print-rpath "$out/bin/lxcfs"):$out/lib" "$out/bin/lxcfs"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user