IRC Bot package #83

Closed
max wants to merge 16 commits from pkg-ircbot into master
2 changed files with 33 additions and 0 deletions
Showing only changes of commit 253fd2f2f0 - Show all commits

View file

@ -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
]; ];

View 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
'';
};
}