aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fetched/yarn2nix.json15
-rw-r--r--libs.nix12
-rw-r--r--nixops/modules/buildbot/default.nix3
-rw-r--r--nixops/modules/websites/aten/aten.nix3
-rw-r--r--nixops/modules/websites/tools/mastodon/mastodon.nix3
5 files changed, 20 insertions, 16 deletions
diff --git a/fetched/yarn2nix.json b/fetched/yarn2nix.json
deleted file mode 100644
index 81914e3..0000000
--- a/fetched/yarn2nix.json
+++ /dev/null
@@ -1,15 +0,0 @@
1{
2 "tag": "780e33a-master",
3 "meta": {
4 "name": "yarn2nix",
5 "url": "https://github.com/moretea/yarn2nix",
6 "branch": "master"
7 },
8 "github": {
9 "owner": "moretea",
10 "repo": "yarn2nix",
11 "rev": "780e33a07fd821e09ab5b05223ddb4ca15ac663f",
12 "sha256": "1f83cr9qgk95g3571ps644rvgfzv2i4i7532q8pg405s4q5ada3h",
13 "fetchSubmodules": true
14 }
15}
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}
diff --git a/nixops/modules/buildbot/default.nix b/nixops/modules/buildbot/default.nix
index aa8df36..1c37e05 100644
--- a/nixops/modules/buildbot/default.nix
+++ b/nixops/modules/buildbot/default.nix
@@ -8,6 +8,9 @@ let
8 inherit (pkgs.buildbot-pkg) version; 8 inherit (pkgs.buildbot-pkg) version;
9 packageJSON = "${buildslist_src.src}/package.json"; 9 packageJSON = "${buildslist_src.src}/package.json";
10 yarnLock = "${buildslist_src.src}/yarn.lock"; 10 yarnLock = "${buildslist_src.src}/yarn.lock";
11 pkgConfig = {
12 all = { buildInputs = [ mylibs.yarn2nixPackage.src ]; };
13 };
11 }; 14 };
12 buildslist_bower = pkgs.buildBowerComponents { 15 buildslist_bower = pkgs.buildBowerComponents {
13 name = "buildslist"; 16 name = "buildslist";
diff --git a/nixops/modules/websites/aten/aten.nix b/nixops/modules/websites/aten/aten.nix
index 46a7361..c35af6f 100644
--- a/nixops/modules/websites/aten/aten.nix
+++ b/nixops/modules/websites/aten/aten.nix
@@ -117,6 +117,9 @@ let
117 packageJSON = packagejson; 117 packageJSON = packagejson;
118 yarnLock = "${info.src}/yarn.lock"; 118 yarnLock = "${info.src}/yarn.lock";
119 pkgConfig = { 119 pkgConfig = {
120 all = {
121 buildInputs = [ yarn2nixPackage.src ];
122 };
120 node-sass = { 123 node-sass = {
121 buildInputs = [ libsass python ]; 124 buildInputs = [ libsass python ];
122 postInstall = let 125 postInstall = let
diff --git a/nixops/modules/websites/tools/mastodon/mastodon.nix b/nixops/modules/websites/tools/mastodon/mastodon.nix
index 3ee3552..516cc58 100644
--- a/nixops/modules/websites/tools/mastodon/mastodon.nix
+++ b/nixops/modules/websites/tools/mastodon/mastodon.nix
@@ -44,6 +44,9 @@ let
44 yarnLock = "${info.src}/yarn.lock"; 44 yarnLock = "${info.src}/yarn.lock";
45 yarnNix = ./yarn-packages.nix; 45 yarnNix = ./yarn-packages.nix;
46 pkgConfig = { 46 pkgConfig = {
47 all = {
48 buildInputs = [ yarn2nixPackage.src ];
49 };
47 uws = { 50 uws = {
48 postInstall = '' 51 postInstall = ''
49 npx node-gyp rebuild > build_log.txt 2>&1 || true 52 npx node-gyp rebuild > build_log.txt 2>&1 || true