mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-24 13:01:28 +00:00
devShell: add python environment explicitly (for VS Code)
This commit is contained in:
parent
22f9d2e9df
commit
b3a6e6393c
|
@ -27,8 +27,4 @@ pythonPackages.buildPythonApplication rec {
|
||||||
SelfPrivacy Server Management API
|
SelfPrivacy Server Management API
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
passthru = {
|
|
||||||
# TODO explain what's the purpose of this?
|
|
||||||
pythonPath = pythonPackages.makePythonPath propagatedBuildInputs;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
16
flake.nix
16
flake.nix
|
@ -20,15 +20,23 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
inputsFrom = [ selfprivacy-graphql-api ];
|
packages =
|
||||||
packages = with pkgs; [
|
let
|
||||||
|
# TODO is there a better way to get environment for VS Code?
|
||||||
|
python3 =
|
||||||
|
nixpkgs.lib.findFirst (p: p.pname == "python3") (abort "wtf")
|
||||||
|
self.packages.${system}.default.propagatedBuildInputs;
|
||||||
|
python-env =
|
||||||
|
python3.withPackages
|
||||||
|
(_: self.packages.${system}.default.propagatedBuildInputs);
|
||||||
|
in
|
||||||
|
with pkgs; [
|
||||||
|
python-env
|
||||||
black
|
black
|
||||||
rclone
|
rclone
|
||||||
redis
|
redis
|
||||||
restic
|
restic
|
||||||
];
|
];
|
||||||
# FIXME is it still needed inside shellHook?
|
|
||||||
# PYTHONPATH=${sp-python}/${sp-python.sitePackages}
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
# envs set with export and as attributes are treated differently.
|
# envs set with export and as attributes are treated differently.
|
||||||
# for example. printenv <Name> will not fetch the value of an attribute.
|
# for example. printenv <Name> will not fetch the value of an attribute.
|
||||||
|
|
Loading…
Reference in a new issue