##// END OF EJS Templates
nix: Link node modules based on node2nix
johbo -
r708:caa19e67 default
parent child
Show More
@@ -49,23 +49,10 let
49 sources = pkgs.config.rc.sources or {};
49 sources = pkgs.config.rc.sources or {};
50 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
50 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
51
51
52 # Load the generated node packages
52 nodeEnv = import ./pkgs/node-default.nix {
53 nodePackages = pkgs.callPackage "${pkgs.path}/pkgs/top-level/node-packages.nix" rec {
53 inherit pkgs;
54 self = nodePackages;
55 generated = pkgs.callPackage ./pkgs/node-packages.nix { inherit self; };
56 };
54 };
57
55 nodeDependencies = nodeEnv.shell.nodeDependencies;
58 # TODO: Should be taken automatically out of the generates packages.
59 # apps.nix has one solution for this, although I'd prefer to have the deps
60 # from package.json mapped in here.
61 nodeDependencies = with nodePackages; [
62 grunt
63 grunt-contrib-concat
64 grunt-contrib-jshint
65 grunt-contrib-less
66 grunt-contrib-watch
67 jshint
68 ];
69
56
70 pythonGeneratedPackages = self: basePythonPackages.override (a: {
57 pythonGeneratedPackages = self: basePythonPackages.override (a: {
71 inherit self;
58 inherit self;
@@ -89,12 +76,14 let
89 version = builtins.readFile ./rhodecode/VERSION;
76 version = builtins.readFile ./rhodecode/VERSION;
90 linkNodeModules = ''
77 linkNodeModules = ''
91 echo "Link node packages"
78 echo "Link node packages"
92 # TODO: check if this adds stuff as a dependency, closure size
93 rm -fr node_modules
79 rm -fr node_modules
94 mkdir -p node_modules
80 mkdir node_modules
95 ${pkgs.lib.concatMapStrings (dep: ''
81
96 ln -sfv ${dep}/lib/node_modules/${dep.pkgName} node_modules/
82 # johbo: Linking individual packages allows us to run "npm install"
97 '') nodeDependencies}
83 # inside of a shell to try things out. Re-entering the shell will
84 # restore a clean environment.
85 ln -s ${nodeDependencies}/lib/node_modules/* node_modules/
86
98 echo "DONE: Link node packages"
87 echo "DONE: Link node packages"
99 '';
88 '';
100 in super.rhodecode-enterprise-ce.override (attrs: {
89 in super.rhodecode-enterprise-ce.override (attrs: {
General Comments 0
You need to be logged in to leave comments. Login now