add uevent-watch, which toggles services based on uevent msgs
This commit is contained in:
23
pkgs/uevent-watch/default.nix
Normal file
23
pkgs/uevent-watch/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
lua
|
||||
, nellie
|
||||
, writeFennelScript
|
||||
, runCommand
|
||||
, anoia
|
||||
, fennel
|
||||
, stdenv
|
||||
, fennelrepl
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "uevent-watch";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ fennelrepl ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -p ${writeFennelScript "uevent-watch" [fennel anoia nellie lua.pkgs.luafilesystem] ./watch.fnl} $out/bin/uevent-watch
|
||||
'';
|
||||
checkPhase = ''
|
||||
fennelrepl ./test.fnl
|
||||
'';
|
||||
doCheck = true;
|
||||
}
|
Reference in New Issue
Block a user