1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pscript,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "vbuild";
13 version = "0.8.2";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "manatlan";
20 repo = "vbuild";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-p9v1FiYn0cI+f/25hvjwm7eb1GqxXvNnmXBGwZe9fk0=";
23 };
24
25 postPatch = ''
26 # Switch to poetry-core, patch can't be applied, https://github.com/manatlan/vbuild/pull/12
27 substituteInPlace pyproject.toml \
28 --replace-fail 'version = "0.0.0"' 'version = "${version}"' \
29 --replace-fail 'requires = ["poetry>=0.12"]' 'requires = ["poetry-core>=1.0.0"]' \
30 --replace-fail 'build-backend = "poetry.masonry.api"' 'build-backend = "poetry.core.masonry.api"'
31 '';
32
33 build-system = [ poetry-core ];
34
35 dependencies = [ pscript ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pythonImportsCheck = [ "vbuild" ];
40
41 disabledTests = [
42 # Tests require network access
43 "test_min"
44 "test_pycomp_onlineClosurable"
45 ];
46
47 meta = {
48 description = "Module to compile your VueJS components to standalone HTML/JS/CSS";
49 homepage = "https://github.com/manatlan/vbuild";
50 changelog = "https://github.com/manatlan/vbuild/blob/${src.rev}/changelog.md";
51 license = lib.licenses.mit;
52 maintainers = with lib.maintainers; [ fab ];
53 };
54}