]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add yarn2nix as dependency where needed to avoid garbage collection
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 26 Apr 2019 21:45:00 +0000 (23:45 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 26 Apr 2019 21:46:00 +0000 (23:46 +0200)
fetched/yarn2nix.json [deleted file]
libs.nix
nixops/modules/buildbot/default.nix
nixops/modules/websites/aten/aten.nix
nixops/modules/websites/tools/mastodon/mastodon.nix

diff --git a/fetched/yarn2nix.json b/fetched/yarn2nix.json
deleted file mode 100644 (file)
index 81914e3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "tag": "780e33a-master",
-  "meta": {
-    "name": "yarn2nix",
-    "url": "https://github.com/moretea/yarn2nix",
-    "branch": "master"
-  },
-  "github": {
-    "owner": "moretea",
-    "repo": "yarn2nix",
-    "rev": "780e33a07fd821e09ab5b05223ddb4ca15ac663f",
-    "sha256": "1f83cr9qgk95g3571ps644rvgfzv2i4i7532q8pg405s4q5ada3h",
-    "fetchSubmodules": true
-  }
-}
index a9e1e78f01d4f74bd9e177299ea5a3b1d5ed322d..981039ec2d1b354e43da3fca3d6f9ce349f44f9b 100644 (file)
--- a/libs.nix
+++ b/libs.nix
@@ -1,6 +1,17 @@
 { nixpkgs }:
 with nixpkgs;
 rec {
+  yarn2nixPackage = let
+    src = fetchFromGitHub {
+      owner = "moretea";
+      repo = "yarn2nix";
+      rev = "780e33a07fd821e09ab5b05223ddb4ca15ac663f";
+      sha256 = "1f83cr9qgk95g3571ps644rvgfzv2i4i7532q8pg405s4q5ada3h";
+      fetchSubmodules = true;
+    };
+  in
+    (callPackage src {}) // { inherit src; };
+
   fetchedGithub = path:
     let
       json = lib.importJSON path;
@@ -46,5 +57,4 @@ rec {
         makeWrapper "$f" "$out" ${toString args}
       '';
 
-  yarn2nixPackage = callPackage (fetchedGithub ./fetched/yarn2nix.json).src {};
 }
index aa8df36ef159d35122cd4f1d3f98a0979b12f613..1c37e05df656f76288cf7d9f000cdf65b0fb049a 100644 (file)
@@ -8,6 +8,9 @@ let
     inherit (pkgs.buildbot-pkg) version;
     packageJSON = "${buildslist_src.src}/package.json";
     yarnLock = "${buildslist_src.src}/yarn.lock";
+    pkgConfig = {
+      all = { buildInputs = [ mylibs.yarn2nixPackage.src ]; };
+    };
   };
   buildslist_bower = pkgs.buildBowerComponents {
     name = "buildslist";
index 46a7361b583899613190e4d0e336e61138b79724..c35af6f098ee3dc1ea936ee397c7f8549486a1ee 100644 (file)
@@ -117,6 +117,9 @@ let
           packageJSON = packagejson;
           yarnLock = "${info.src}/yarn.lock";
           pkgConfig = {
+            all = {
+              buildInputs = [ yarn2nixPackage.src ];
+            };
             node-sass = {
               buildInputs = [ libsass python ];
               postInstall = let
index 3ee355227770a017c8d86a5f7be29aed7a9e6f22..516cc5879ac04fba8ab901417ea120847315c54c 100644 (file)
@@ -44,6 +44,9 @@ let
         yarnLock = "${info.src}/yarn.lock";
         yarnNix = ./yarn-packages.nix;
         pkgConfig = {
+          all = {
+            buildInputs = [ yarn2nixPackage.src ];
+          };
           uws = {
             postInstall = ''
               npx node-gyp rebuild > build_log.txt 2>&1 || true