]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/commitdiff
Fix packages and make buildslist sandboxed
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 24 May 2019 21:55:36 +0000 (23:55 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 27 May 2019 22:40:06 +0000 (00:40 +0200)
pkgs/python-packages/buildbot/plugins/buildslist/default.nix
pkgs/webapps/infcloud/default.nix

index 08e6955ae03bef6a22fe6109c3ae6bcf31875aaa..a1a87b2bd8951df4c1bb3a766582003717767b79 100644 (file)
@@ -1,4 +1,4 @@
-{ mylibs, runCommand, buildBowerComponents, pythonPackages, jq, yarn, nodejs }:
+{ mylibs, runCommand, buildBowerComponents, pythonPackages, libsass, python, fetchurl, jq, yarn, nodejs }:
 let
   buildslist_src = mylibs.fetchedGit ./buildslist.json;
   packagejson = runCommand "package.json" { buildInputs = [ jq ]; } ''
 let
   buildslist_src = mylibs.fetchedGit ./buildslist.json;
   packagejson = runCommand "package.json" { buildInputs = [ jq ]; } ''
@@ -13,6 +13,18 @@ let
     yarnNix = ./yarn-packages.nix;
     pkgConfig = {
       all = { buildInputs = [ mylibs.yarn2nixPackage.src ]; };
     yarnNix = ./yarn-packages.nix;
     pkgConfig = {
       all = { buildInputs = [ mylibs.yarn2nixPackage.src ]; };
+      node-sass = {
+        buildInputs = [ libsass python ];
+        postInstall = let
+          nodeHeaders = fetchurl {
+            url = "https://nodejs.org/download/release/v${nodejs.version}/node-v${nodejs.version}-headers.tar.gz";
+            sha256 = "16f20ya3ys6w5w6y6l4536f7jrgk4gz46bf71w1r1xxb26a54m32";
+          };
+        in
+          ''
+            node scripts/build.js --tarball=${nodeHeaders}
+          '';
+      };
     };
   };
   buildslist_bower = buildBowerComponents {
     };
   };
   buildslist_bower = buildBowerComponents {
@@ -25,11 +37,9 @@ pythonPackages.buildPythonPackage rec {
   pname = "buildbot-buildslist";
   inherit (pythonPackages.buildbot-pkg) version;
 
   pname = "buildbot-buildslist";
   inherit (pythonPackages.buildbot-pkg) version;
 
-  __noChroot = true;
   preConfigure = ''
     export HOME=$PWD
   preConfigure = ''
     export HOME=$PWD
-    cp -a ${buildslist_yarn}/node_modules .
-    chmod -R u+w node_modules
+    ln -s ${buildslist_yarn}/node_modules .
     cp -a ${buildslist_bower}/bower_components ./libs
     chmod -R u+w libs
     '';
     cp -a ${buildslist_bower}/bower_components ./libs
     chmod -R u+w libs
     '';
index 0d73f524c2589ff7db74ec13579b203f732693ae..d949d2608ecb1c5a0cd7f0cee5e8ec2ffe28526c 100644 (file)
@@ -7,6 +7,7 @@ stdenv.mkDerivation rec {
     sha256 = "1fjhs0cj0b9fhf5ysfz281mknmmg1z551bas143sxfcqlpa5aiiq";
   };
   buildPhase = ''
     sha256 = "1fjhs0cj0b9fhf5ysfz281mknmmg1z551bas143sxfcqlpa5aiiq";
   };
   buildPhase = ''
+    patchShebangs .
     ./cache_update.sh
     rm config.js
     '';
     ./cache_update.sh
     rm config.js
     '';