This is the first time I’m trying to make a nix derivation to build a python project. I have my own custom version of the python package GitHub - jbms/beancount-import: Web UI for semi-automatically importing external data into beancount (note that my custom version is stored locally) and I’m trying to build it to import into a shell.nix
{ pkgs ? import <nixpkgs> {},
unstable-pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) {}
}:
let
my_beancount_import = unstable-pkgs.python3Packages.buildPythonPackage {
pname = "beancount-import";
version = "0.1";
src = "/home/myusername/MyRepos/beancount_import";
};
in
pkgs.mkShell {
buildInputs = with unstable-pkgs; [
fava
beancount
python3
my_beancount_import
];
}
However when the derivation is trying to be built, it ends up with the error do not know how to unpack source archive.
this derivation will be built:
/nix/store/ah6wk5347i4dxs4sk6c8w0z6sariy4wp-python3.10-beancount-import-0.1.drv
building '/nix/store/ah6wk5347i4dxs4sk6c8w0z6sariy4wp-python3.10-beancount-import-0.1.drv'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing setuptools-check-hook
Using setuptoolsCheckPhase
unpacking sources
unpacking source archive /home/myusername/MyRepos/beancount_import
do not know how to unpack source archive /home/myusername/MyRepos/beancount_import
error: builder for '/nix/store/ah6wk5347i4dxs4sk6c8w0z6sariy4wp-python3.10-beancount-import-0.1.drv' failed with exit code 1;
The repository has a setup.py that is unaltered from the main repository. What is going wrong/how do I fix this?
Thanks in advance.