IRC Bot package #83
2 changed files with 33 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
||||||
./modules/devshell.nix
|
./modules/devshell.nix
|
||||||
./build-support
|
./build-support
|
||||||
|
|
||||||
|
./servers/ircbot/project.nix
|
||||||
./websites/landing/project.nix
|
./websites/landing/project.nix
|
||||||
./websites/stop-using-nix-env/project.nix
|
./websites/stop-using-nix-env/project.nix
|
||||||
];
|
];
|
||||||
|
|
32
packages/servers/ircbot/project.nix
Normal file
32
packages/servers/ircbot/project.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ inputs, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
python = pkgs.python3;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.ircbot = with pkgs; stdenvNoCC.mkDerivation {
|
||||||
|
pname = "ircbot";
|
||||||
|
version = "0.0.0";
|
||||||
|
|
||||||
|
src = with inputs.nix-filter.lib; filter {
|
||||||
|
root = ./.;
|
||||||
|
include = [
|
||||||
|
(matchExt "py")
|
||||||
|
(inDirectory "hooks")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin $out/lib
|
||||||
|
|
||||||
|
cp -r $src/ $out/lib/ircbot
|
||||||
|
|
||||||
|
cat <<EOF >$out/bin/ircbot
|
||||||
|
#!${runtimeShell}
|
||||||
|
export PYTHONNOUSERSITE=true
|
||||||
|
export PYTHONPATH="$out/lib/ircbot"
|
||||||
|
exec ${python.interpreter} $out/lib/ircbot/main.py "$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/ircbot
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue