nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5
6 # buildInputs
7 buildbox,
8 fuse3,
9 lzip,
10 patch,
11
12 # tests
13 addBinToPathHook,
14 gitMinimal,
15 versionCheckHook,
16
17 # Optional features
18 enableBuildstreamPlugins ? true,
19}:
20
21python3Packages.buildPythonApplication rec {
22 pname = "buildstream";
23 version = "2.4.1";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "apache";
28 repo = "buildstream";
29 tag = version;
30 hash = "sha256-6a0VzYO5yj7EHvAb0xa4xZ0dgBKjFcwKv2F4o93oahY=";
31 };
32
33 build-system = with python3Packages; [
34 cython
35 pdm-pep517
36 setuptools
37 setuptools-scm
38 ];
39
40 dependencies = [
41 buildbox
42 ]
43 ++ (with python3Packages; [
44 click
45 dulwich
46 grpcio
47 jinja2
48 markupsafe
49 packaging
50 pluginbase
51 protobuf
52 psutil
53 pyroaring
54 requests
55 ruamel-yaml
56 ruamel-yaml-clib
57 tomlkit
58 ujson
59 ])
60 ++ lib.optionals enableBuildstreamPlugins [
61 python3Packages.buildstream-plugins
62 ];
63
64 buildInputs = [
65 fuse3
66 lzip
67 patch
68 ];
69
70 pythonImportsCheck = [ "buildstream" ];
71
72 nativeCheckInputs = [
73 addBinToPathHook
74 buildbox
75 gitMinimal
76 python3Packages.pexpect
77 python3Packages.pyftpdlib
78 python3Packages.pytest-datafiles
79 python3Packages.pytest-env
80 python3Packages.pytest-timeout
81 python3Packages.pytest-xdist
82 python3Packages.pytestCheckHook
83 versionCheckHook
84 ];
85
86 disabledTests = [
87 # ValueError: Unexpected comparison between all and ''
88 "test_help"
89
90 # Error loading project: project.conf [line 37 column 2]: Failed to load source-mirror plugin 'mirror': No package metadata was found for sample-plugins
91 "test_source_mirror_plugin"
92
93 # AssertionError: assert '1a5528cad211...0bbe5ee314c14' == '2ccfee62a657...52dbc47203a88'
94 "test_fixed_cas_import"
95 "test_random_cas_import"
96
97 # Runtime error: The FUSE stager child process unexpectedly died with exit code 2
98 "test_patch_sources_cached_1"
99 "test_patch_sources_cached_2"
100 "test_source_cache_key"
101 "test_custom_transform_source"
102
103 # Blob not found in the local CAS
104 "test_source_pull_partial_fallback_fetch"
105
106 # FAILED tests/sources/tar.py::test_out_of_basedir_hardlinks - AssertionError
107 "test_out_of_basedir_hardlinks"
108 ];
109
110 disabledTestPaths = [
111 # FileNotFoundError: [Errno 2] No such file or directory: '/build/source/tmp/popen-gw1/test_report_when_cascache_exit0/buildbox-casd'
112 "tests/internals/cascache.py"
113 ];
114
115 versionCheckProgram = "${placeholder "out"}/bin/bst";
116 versionCheckProgramArg = "--version";
117
118 meta = {
119 description = "Powerful software integration tool";
120 downloadPage = "https://buildstream.build/install.html";
121 homepage = "https://buildstream.build";
122 license = lib.licenses.asl20;
123 platforms = lib.platforms.linux;
124 mainProgram = "bst";
125 maintainers = with lib.maintainers; [ shymega ];
126 };
127}