forked from cswimr/SeaCogs
chore(tooling): fix the nix flake
This commit is contained in:
parent
e7714cd2df
commit
527c372fb0
2 changed files with 30 additions and 16 deletions
36
flake.nix
36
flake.nix
|
@ -17,39 +17,53 @@
|
|||
system:
|
||||
f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
lib = nixpkgs.lib;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
devShells = forEachSupportedSystem (
|
||||
{ pkgs }:
|
||||
{ pkgs, lib }:
|
||||
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 {
|
||||
lib-path = lib-path;
|
||||
packages = with pkgs; [
|
||||
python311
|
||||
myPython
|
||||
uv
|
||||
ruff # the ruff pip package installs a dynamically linked binary that cannot run on NixOS
|
||||
forgejo-runner
|
||||
# Red-DiscordBot dependencies
|
||||
git
|
||||
libsodium
|
||||
libffi
|
||||
jdk17
|
||||
# Material for MkDocs dependencies
|
||||
cairo
|
||||
pngquant
|
||||
# PyLav dependencies
|
||||
libaio
|
||||
# SeaCogs dependencies
|
||||
dig
|
||||
];
|
||||
shellHook = # bash
|
||||
''
|
||||
export UV_PYTHON_PREFERENCE=only-system
|
||||
export UV_PYTHON_DOWNLOADS=never
|
||||
export "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib-path}"
|
||||
export "UV_PYTHON_PREFERENCE=only-system"
|
||||
export "UV_PYTHON_DOWNLOADS=never"
|
||||
uv sync --all-groups
|
||||
alias uvr="uv run"
|
||||
source ./.venv/bin/activate
|
||||
export PYTHONPATH=`pwd`/.venv/${pkgs.python311.sitePackages}/:$PYTHONPATH
|
||||
export "PYTHONPATH=`pwd`/.venv/${myPython.sitePackages}/:$PYTHONPATH"
|
||||
export "PATH=${pkgs.ruff}/bin:$PATH"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue