Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d07483c17b | |||
| ea1ad60f1c |
8
flake.lock
generated
8
flake.lock
generated
@@ -17,16 +17,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1638239011,
|
||||
"narHash": "sha256-AjhmbT4UBlJWqxY0ea8a6GU2C2HdKUREkG43oRr3TZg=",
|
||||
"lastModified": 1739758141,
|
||||
"narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31",
|
||||
"rev": "c618e28f70257593de75a7044438efc1c1fc0791",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "21.11",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/21.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
@@ -10,7 +10,7 @@
|
||||
supportedSystems = with flake-utils.lib.system; [ x86_64-linux i686-linux aarch64-linux ];
|
||||
in {
|
||||
overlay = final: prev: {
|
||||
drastikbot = prev.python3Packages.buildPythonApplication rec {
|
||||
drastikbot = prev.python3.pkgs.buildPythonApplication rec {
|
||||
pname = "drastikbot";
|
||||
version = "v2.1";
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${prev.python3}/bin/python3 $out/bin/drastikbot \
|
||||
--prefix PYTHONPATH : ${with prev.python3Packages; makePythonPath [requests beautifulsoup4]} \
|
||||
--prefix PYTHONPATH : ${with prev.python3.pkgs; makePythonPath [requests beautifulsoup4]} \
|
||||
--add-flags "$out/drastikbot.py"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -205,7 +205,9 @@ class Drastikbot():
|
||||
self.irc_socket = socket.create_connection(
|
||||
(self.var.host, self.var.port), 300)
|
||||
if self.var.ssl:
|
||||
self.irc_socket = ssl.wrap_socket(self.irc_socket)
|
||||
context = ssl.create_default_context()
|
||||
self.irc_socket = context.wrap_socket(
|
||||
self.irc_socket, server_hostname=self.var.host)
|
||||
except OSError:
|
||||
if self.var.sigint:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user