Hi,
I am trying to build beancount-import
, which is a python package with node dependencies. Unfortunately, I am not super familiar with how to accomplish this. I did see panel
, which seems to have a similar node dependency, so I tried to model after that.
This is my current buildPythonPackage
:
beancount_import = with pkgs;
python38Packages.buildPythonPackage rec {
pname = "beancount-import";
version = "v1.3.3";
src = fetchFromGitHub {
owner = "jbms";
repo = pname;
rev = "master";
sha256 = "sha256-7Ct5yYv7GB341t7SkJAAVmTE4PAdZpJEYGgrfjicZIY=";
};
preBuild = ''
pushd beancount_import
mkdir frontend
ln -s ${beancount_import-node.nodeDependencies}/lib/node_modules frontend/node_modules
export PATH="${beancount_import-node.nodeDependencies}/bin:$PATH"
popd
'';
# pipInstallFlags = [ "--install-option='--skip_npm_reinstall'" ];
nativeBuildInputs = [ nodejs ];
propagatedBuildInputs = with python38Packages; [
jsonschema
nltk
scikitlearn
tornado
watchdog
beancount
];
};
There also seems to be a user option to skip-npm-reinstall
, although, I am not quite sure how to add that option to the command.
Any help would be appreciated, thanks!