1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 # Python Inputs
6 jupyter-packaging,
7 jupyterlab,
8 setuptools,
9 wheel,
10 ipyvue,
11}:
12
13buildPythonPackage rec {
14 pname = "ipyvuetify";
15 version = "1.9.4";
16 pyproject = true;
17
18 # GitHub version tries to run npm (Node JS)
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-wpwfN68wpj2+lLb4w0erAZYa7OrbVhNfGMv0635oiVs=";
22 };
23
24 # drop pynpm which tries to install node_modules
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail "jupyter_packaging~=0.7.9" "jupyter_packaging" \
28 --replace-fail "jupyterlab~=3.0" "jupyterlab" \
29 --replace-fail '"pynpm"' ""
30
31 substituteInPlace setup.py \
32 --replace-fail "from pynpm import NPMPackage" "" \
33 --replace-fail "from generate_source import generate_source" "" \
34 --replace-fail 'setup(cmdclass={"egg_info": js_prerelease(egg_info)})' 'setup()'
35 '';
36
37 nativeBuildInputs = [
38 jupyter-packaging
39 jupyterlab
40 setuptools
41 wheel
42 ];
43
44 propagatedBuildInputs = [ ipyvue ];
45
46 doCheck = false; # no tests on PyPi/GitHub
47 pythonImportsCheck = [ "ipyvuetify" ];
48
49 meta = with lib; {
50 description = "Jupyter widgets based on Vuetify UI Components";
51 homepage = "https://github.com/mariobuikhuizen/ipyvuetify";
52 license = licenses.mit;
53 maintainers = with maintainers; [ drewrisinger ];
54 };
55}