From: Ismaƫl Bouya Date: Fri, 24 May 2019 21:55:36 +0000 (+0200) Subject: Fix packages and make buildslist sandboxed X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=fcc5798571bf76e7267673bea824746570e0d66d;p=perso%2FImmae%2FConfig%2FNix%2FNUR.git Fix packages and make buildslist sandboxed --- diff --git a/pkgs/python-packages/buildbot/plugins/buildslist/default.nix b/pkgs/python-packages/buildbot/plugins/buildslist/default.nix index 08e6955a..a1a87b2b 100644 --- a/pkgs/python-packages/buildbot/plugins/buildslist/default.nix +++ b/pkgs/python-packages/buildbot/plugins/buildslist/default.nix @@ -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 ]; } '' @@ -13,6 +13,18 @@ let 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 { @@ -25,11 +37,9 @@ pythonPackages.buildPythonPackage rec { pname = "buildbot-buildslist"; inherit (pythonPackages.buildbot-pkg) version; - __noChroot = true; 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 ''; diff --git a/pkgs/webapps/infcloud/default.nix b/pkgs/webapps/infcloud/default.nix index 0d73f524..d949d260 100644 --- a/pkgs/webapps/infcloud/default.nix +++ b/pkgs/webapps/infcloud/default.nix @@ -7,6 +7,7 @@ stdenv.mkDerivation rec { sha256 = "1fjhs0cj0b9fhf5ysfz281mknmmg1z551bas143sxfcqlpa5aiiq"; }; buildPhase = '' + patchShebangs . ./cache_update.sh rm config.js '';