aboutsummaryrefslogtreecommitdiff
path: root/libs.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 23:45:00 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 23:46:00 +0200
commit167b81657d696e91545cedde172e7859643bba06 (patch)
tree23bceb4dd1138c93beacfb3ac81fb306bb4d79da /libs.nix
parent787fcba368ae658a83b1566bcbb160f8e27ccd66 (diff)
downloadNix-167b81657d696e91545cedde172e7859643bba06.tar.gz
Nix-167b81657d696e91545cedde172e7859643bba06.tar.zst
Nix-167b81657d696e91545cedde172e7859643bba06.zip
Add yarn2nix as dependency where needed to avoid garbage collection
Diffstat (limited to 'libs.nix')
-rw-r--r--libs.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/libs.nix b/libs.nix
index a9e1e78..981039e 100644
--- a/libs.nix
+++ b/libs.nix
@@ -1,6 +1,17 @@
1{ nixpkgs }: 1{ nixpkgs }:
2with nixpkgs; 2with nixpkgs;
3rec { 3rec {
4 yarn2nixPackage = let
5 src = fetchFromGitHub {
6 owner = "moretea";
7 repo = "yarn2nix";
8 rev = "780e33a07fd821e09ab5b05223ddb4ca15ac663f";
9 sha256 = "1f83cr9qgk95g3571ps644rvgfzv2i4i7532q8pg405s4q5ada3h";
10 fetchSubmodules = true;
11 };
12 in
13 (callPackage src {}) // { inherit src; };
14
4 fetchedGithub = path: 15 fetchedGithub = path:
5 let 16 let
6 json = lib.importJSON path; 17 json = lib.importJSON path;
@@ -46,5 +57,4 @@ rec {
46 makeWrapper "$f" "$out" ${toString args} 57 makeWrapper "$f" "$out" ${toString args}
47 ''; 58 '';
48 59
49 yarn2nixPackage = callPackage (fetchedGithub ./fetched/yarn2nix.json).src {};
50} 60}