34 lines
843 B
Nix
34 lines
843 B
Nix
{ lib, buildPythonApplication, python, pyroute2, syndicate, synit-pid1 }:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "interface-monitor";
|
|
inherit (synit-pid1) version src;
|
|
|
|
propagatedBuildInputs = [ pyroute2 syndicate ];
|
|
|
|
format = "other";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p \
|
|
$out/bin \
|
|
$out/lib/${python.libPrefix}/site-packages/synit/daemon \
|
|
$out/protocols \
|
|
|
|
cp -r protocols/schema-bundle.bin $out/protocols
|
|
pushd packaging/packages/synit-config/files/usr/lib/synit
|
|
for f in *; do
|
|
[ -f $f ] && cp $f $out/bin
|
|
done
|
|
pushd python/synit/daemon
|
|
for f in *; do
|
|
substitute $f $out/lib/${python.libPrefix}/site-packages/synit/daemon/$f \
|
|
--replace "/home/tonyg/src/synit/protocols" "$out/protocols"
|
|
done
|
|
popd
|
|
popd
|
|
runHook postInstall
|
|
'';
|
|
|
|
}
|