##// END OF EJS Templates
dev-env: Improve build inputs formatting.
Martin Bornhold -
r433:95232319 default
parent child Browse files
Show More
@@ -1,56 +1,58 b''
1 1 { pkgs ? (import <nixpkgs> {})
2 2 , vcsserverPath ? "./../rhodecode-vcsserver"
3 3 , vcsserverNix ? "shell.nix"
4 4 , doCheck ? true
5 5 }:
6 6
7 7 let
8 8
9 9 # Convert vcsserverPath to absolute path.
10 10 vcsserverAbsPath =
11 11 if pkgs.lib.strings.hasPrefix "/" vcsserverPath then
12 12 builtins.toPath "${vcsserverPath}"
13 13 else
14 14 builtins.toPath ("${builtins.getEnv "PWD"}/${vcsserverPath}");
15 15
16 16 # Import vcsserver if nix file exists, otherwise set it to null.
17 17 vcsserver =
18 18 let
19 19 nixFile = "${vcsserverAbsPath}/${vcsserverNix}";
20 20 in
21 21 if pkgs.lib.pathExists "${nixFile}" then
22 22 builtins.trace
23 23 "Using local vcsserver from ${nixFile}"
24 24 import "${nixFile}" {inherit pkgs;}
25 25 else
26 26 null;
27 27
28 28 hasVcsserver = !isNull vcsserver;
29 29
30 30 enterprise = import ./default.nix {
31 31 inherit pkgs doCheck;
32 32 };
33 33
34 34 pythonPackages = enterprise.pythonPackages;
35 35
36 36 in enterprise.override (attrs: {
37 37 # Avoid that we dump any sources into the store when entering the shell and
38 38 # make development a little bit more convenient.
39 39 src = null;
40 40
41 buildInputs = attrs.buildInputs ++
42 pkgs.lib.optionals (hasVcsserver) vcsserver.propagatedNativeBuildInputs ++ [
43 pythonPackages.bumpversion
44 pythonPackages.invoke
45 pythonPackages.ipdb
46 pythonPackages.locustio
47 ];
41 buildInputs =
42 attrs.buildInputs ++
43 pkgs.lib.optionals (hasVcsserver) vcsserver.propagatedNativeBuildInputs ++
44 (with pythonPackages; [
45 bumpversion
46 invoke
47 ipdb
48 locustio
49 ]);
48 50
49 51 shellHook = attrs.shellHook +
50 52 pkgs.lib.strings.optionalString (hasVcsserver) ''
51 53 # Setup the vcsserver development egg.
52 54 pushd ${vcsserverAbsPath}
53 55 python setup.py develop --prefix $tmp_path --allow-hosts ""
54 56 popd
55 57 '';
56 58 })
General Comments 0
You need to be logged in to leave comments. Login now