Compare commits
No commits in common. "527c372fb0f0e297f01d2e52a3415adcb1767135" and "9b96a1562155d851e43d4051b972a0a50549168c" have entirely different histories.
527c372fb0
...
9b96a15621
3 changed files with 17 additions and 31 deletions
10
flake.lock
generated
10
flake.lock
generated
|
@ -2,12 +2,12 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738680400,
|
"lastModified": 1738546358,
|
||||||
"narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=",
|
"narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=",
|
||||||
"rev": "799ba5bffed04ced7067a91798353d360788b30d",
|
"rev": "c6e957d81b96751a3d5967a0fd73694f303cc914",
|
||||||
"revCount": 747653,
|
"revCount": 747070,
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.747653%2Brev-799ba5bffed04ced7067a91798353d360788b30d/0194d302-29da-7009-8f43-5b8a58825954/source.tar.gz"
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.747070%2Brev-c6e957d81b96751a3d5967a0fd73694f303cc914/0194cfda-968b-7c4f-95c5-bd4a42478770/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
|
36
flake.nix
36
flake.nix
|
@ -17,53 +17,39 @@
|
||||||
system:
|
system:
|
||||||
f {
|
f {
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
lib = nixpkgs.lib;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells = forEachSupportedSystem (
|
devShells = forEachSupportedSystem (
|
||||||
{ pkgs, lib }:
|
{ pkgs }:
|
||||||
let
|
|
||||||
myPython = pkgs.python311;
|
|
||||||
lib-path =
|
|
||||||
with pkgs;
|
|
||||||
lib.makeLibraryPath [
|
|
||||||
stdenv.cc.cc
|
|
||||||
# Red-DiscordBot dependencies
|
|
||||||
libffi
|
|
||||||
libsodium
|
|
||||||
# PyLav dependency
|
|
||||||
libaio
|
|
||||||
# Material for MkDocs dependency
|
|
||||||
cairo
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
lib-path = lib-path;
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
myPython
|
python311
|
||||||
uv
|
uv
|
||||||
ruff # the ruff pip package installs a dynamically linked binary that cannot run on NixOS
|
|
||||||
forgejo-runner
|
forgejo-runner
|
||||||
# Red-DiscordBot dependencies
|
# Red-DiscordBot dependencies
|
||||||
git
|
git
|
||||||
|
libsodium
|
||||||
|
libffi
|
||||||
jdk17
|
jdk17
|
||||||
# Material for MkDocs dependencies
|
# Material for MkDocs dependencies
|
||||||
|
cairo
|
||||||
pngquant
|
pngquant
|
||||||
|
# PyLav dependencies
|
||||||
|
libaio
|
||||||
# SeaCogs dependencies
|
# SeaCogs dependencies
|
||||||
dig
|
dig
|
||||||
];
|
];
|
||||||
shellHook = # bash
|
shellHook = # bash
|
||||||
''
|
''
|
||||||
export "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib-path}"
|
export UV_PYTHON_PREFERENCE=only-system
|
||||||
export "UV_PYTHON_PREFERENCE=only-system"
|
export UV_PYTHON_DOWNLOADS=never
|
||||||
export "UV_PYTHON_DOWNLOADS=never"
|
|
||||||
uv sync --all-groups
|
uv sync --all-groups
|
||||||
|
alias uvr="uv run"
|
||||||
source ./.venv/bin/activate
|
source ./.venv/bin/activate
|
||||||
export "PYTHONPATH=`pwd`/.venv/${myPython.sitePackages}/:$PYTHONPATH"
|
export PYTHONPATH=`pwd`/.venv/${pkgs.python311.sitePackages}/:$PYTHONPATH
|
||||||
export "PATH=${pkgs.ruff}/bin:$PATH"
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ class HotReload(commands.Cog):
|
||||||
]
|
]
|
||||||
return "\n".join(text)
|
return "\n".join(text)
|
||||||
|
|
||||||
async def get_paths(self) -> Generator[Path, None, None]:
|
async def get_paths(self) -> Generator[Path]:
|
||||||
"""Retrieve user defined paths."""
|
"""Retrieve user defined paths."""
|
||||||
cog_manager = self.bot._cog_mgr # noqa: SLF001 # We have to use this private method because there is no public API to get user defined paths
|
cog_manager = self.bot._cog_mgr # noqa: SLF001 # We have to use this private method because there is no public API to get user defined paths
|
||||||
cog_paths = await cog_manager.user_defined_paths()
|
cog_paths = await cog_manager.user_defined_paths()
|
||||||
|
|
Loading…
Add table
Reference in a new issue