]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - libs.nix
Add yarn2nix as dependency where needed to avoid garbage collection
[perso/Immae/Config/Nix.git] / libs.nix
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 {};
 }