diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-26 23:45:00 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-26 23:46:00 +0200 |
commit | 167b81657d696e91545cedde172e7859643bba06 (patch) | |
tree | 23bceb4dd1138c93beacfb3ac81fb306bb4d79da /libs.nix | |
parent | 787fcba368ae658a83b1566bcbb160f8e27ccd66 (diff) | |
download | Nix-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.nix | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,6 +1,17 @@ | |||
1 | { nixpkgs }: | 1 | { nixpkgs }: |
2 | with nixpkgs; | 2 | with nixpkgs; |
3 | rec { | 3 | rec { |
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 | } |