Show More
@@ -33,6 +33,39 b' let' | |||||
33 |
|
33 | |||
34 | ce-pythonPackages = enterprise-ce.pythonPackages; |
|
34 | ce-pythonPackages = enterprise-ce.pythonPackages; | |
35 |
|
35 | |||
|
36 | # This method looks up a path from `pkgs.config.rc.sources` and returns a | |||
|
37 | # shell script which does a `python setup.py develop` installation of it. If | |||
|
38 | # no path is found it will return an empty string. | |||
|
39 | optionalDevelopInstall = attributeName: | |||
|
40 | let | |||
|
41 | path = pkgs.lib.attrByPath [attributeName] null sources; | |||
|
42 | doIt = doDevelopInstall && path != null; | |||
|
43 | in | |||
|
44 | pkgs.lib.optionalString doIt ( | |||
|
45 | builtins.trace "Develop install of ${attributeName} from ${path}" '' | |||
|
46 | echo "Develop install of '${attributeName}' from '${path}' [BEGIN]" | |||
|
47 | pushd ${path} | |||
|
48 | python setup.py develop --prefix $tmp_path --allow-hosts "" | |||
|
49 | popd | |||
|
50 | echo "Develop install of '${attributeName}' from '${path}' [DONE]" | |||
|
51 | ''); | |||
|
52 | ||||
|
53 | # This method looks up a path from `pkgs.config.rc.sources` and imports the | |||
|
54 | # default.nix file if it exists. It returns the list of build inputs. If no | |||
|
55 | # path is found it will return an empty list. | |||
|
56 | optionalDevelopInstallBuildInputs = attributeName: | |||
|
57 | let | |||
|
58 | path = pkgs.lib.attrByPath [attributeName] null sources; | |||
|
59 | nixFile = "${path}/default.nix"; | |||
|
60 | doIt = doDevelopInstall && path != null && pkgs.lib.pathExists "${nixFile}"; | |||
|
61 | derivate = import "${nixFile}" { | |||
|
62 | inherit doCheck pkgs pythonPackages; | |||
|
63 | }; | |||
|
64 | in | |||
|
65 | pkgs.lib.lists.optionals doIt derivate.propagatedNativeBuildInputs; | |||
|
66 | ||||
|
67 | developInstalls = [ "rhodecode-vcsserver" ]; | |||
|
68 | ||||
36 | in enterprise-ce.override (attrs: { |
|
69 | in enterprise-ce.override (attrs: { | |
37 | # Avoid that we dump any sources into the store when entering the shell and |
|
70 | # Avoid that we dump any sources into the store when entering the shell and | |
38 | # make development a little bit more convenient. |
|
71 | # make development a little bit more convenient. |
General Comments 0
You need to be logged in to leave comments.
Login now