I’ve been trying for several days to get the module ( lichess · PyPI ) downloaded from my configuration.nix. I’ve been following the documentation from Python - NixOS Wiki and entries from the forum but I didn’t manage to get a working solution.
Here’s the error message:
[root@nixosl1:/etc/nixos]# nixos-rebuild switch --upgrade
unpacking channels...
error: syntax error, unexpected LET
at /etc/nixos/configuration.nix:62:1:
61| ###
62| let
| ^
63| my-python-packages = ps: with ps; [
… and the code:
let
my-python-packages = ps: with ps; [
# Lichess
(
buildPythonPackage rec {
pname = "lichess";
version = "0.2.8";
src = fetchPypi {
inherit pname version;
sha256 = "2c5d4ad2d18978ee684c5e19368efcffa31b7884066f802859eb1fbeaece527c";
};
doCheck = false;
}
)
];
in
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# wget vim
# ];
environment.systemPackages = with pkgs; [
...
(python3.withPackages (ps: with ps; [ requests my-python-packages ]))
...
I hope that someone can assist me. Many thanks in advance!