chore(flake): Add setuptools in order to build on a minimal Nix system (#741)
Builder Win / Build PluginLoader for Win (push) Has been cancelled
Builder / Build PluginLoader (push) Has been cancelled
Push Updated Plugin Stub to Template / copy-stub (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Type Check / Run type checkers (push) Has been cancelled

This commit is contained in:
Adrian Covaci
2025-01-17 21:52:50 +00:00
committed by GitHub
parent 054517595d
commit 0c727d64d2
+28 -16
View File
@@ -11,20 +11,32 @@
}; };
}; };
outputs = { self, nixpkgs, flake-utils, poetry2nix }: outputs =
flake-utils.lib.eachDefaultSystem (system: {
self,
nixpkgs,
flake-utils,
poetry2nix,
}:
flake-utils.lib.eachDefaultSystem (
system:
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
p2n = (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }); p2n = (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; });
in { in
devShells.default = (p2n.mkPoetryEnv { {
devShells.default =
(p2n.mkPoetryEnv {
projectDir = self + "/backend"; projectDir = self + "/backend";
# pyinstaller fails to compile so precompiled it is # pyinstaller fails to compile so precompiled it is
overrides = p2n.overrides.withDefaults (final: prev: { overrides = p2n.overrides.withDefaults (
final: prev: {
pyinstaller = prev.pyinstaller.override { preferWheel = true; }; pyinstaller = prev.pyinstaller.override { preferWheel = true; };
pyright = null; pyright = null;
}); }
}).env.overrideAttrs (oldAttrs: { );
}).env.overrideAttrs
(oldAttrs: {
shellHook = '' shellHook = ''
PYTHONPATH=`which python` PYTHONPATH=`which python`
FILE=.vscode/settings.json FILE=.vscode/settings.json
@@ -35,21 +47,21 @@
fi fi
''; '';
UV_USE_IO_URING = 0; # work around node#48444 UV_USE_IO_URING = 0; # work around node#48444
nativeBuildInputs = with pkgs; [
python311Packages.setuptools
];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
nodejs_22 nodejs_22
nodePackages.pnpm nodePackages.pnpm
poetry poetry
jq jq
# fixes local pyright not being able to see the pythonpath properly. # fixes local pyright not being able to see the pythonpath properly.
(pkgs.writeShellScriptBin "pyright" '' (pkgs.writeShellScriptBin "pyright" ''${pkgs.pyright}/bin/pyright --pythonpath `which python3` "$@" '')
${pkgs.pyright}/bin/pyright --pythonpath `which python3` "$@" '') (pkgs.writeShellScriptBin "pyright-langserver" ''${pkgs.pyright}/bin/pyright-langserver --pythonpath `which python3` "$@" '')
(pkgs.writeShellScriptBin "pyright-langserver" '' (pkgs.writeShellScriptBin "pyright-python" ''${pkgs.pyright}/bin/pyright-python --pythonpath `which python3` "$@" '')
${pkgs.pyright}/bin/pyright-langserver --pythonpath `which python3` "$@" '') (pkgs.writeShellScriptBin "pyright-python-langserver" ''${pkgs.pyright}/bin/pyright-python-langserver --pythonpath `which python3` "$@" '')
(pkgs.writeShellScriptBin "pyright-python" ''
${pkgs.pyright}/bin/pyright-python --pythonpath `which python3` "$@" '')
(pkgs.writeShellScriptBin "pyright-python-langserver" ''
${pkgs.pyright}/bin/pyright-python-langserver --pythonpath `which python3` "$@" '')
]; ];
}); });
}); }
);
} }