summaryrefslogtreecommitdiff
path: root/scuttlebot.nix
diff options
context:
space:
mode:
authortilpner2018-06-05 11:58:30 +0200
committertilpner2018-06-05 11:58:30 +0200
commitef6573e4ad6dc489880023ee492ef236595646ba (patch)
treef15ce5a19688cc1f96d01f1b6678c066287d036c /scuttlebot.nix
downloadscuttlebutt-nix-ef6573e4ad6dc489880023ee492ef236595646ba.tar.gz
scuttlebutt-nix-ef6573e4ad6dc489880023ee492ef236595646ba.tar.xz
scuttlebutt-nix-ef6573e4ad6dc489880023ee492ef236595646ba.zip
Initial commitHEADmaster
Diffstat (limited to 'scuttlebot.nix')
-rw-r--r--scuttlebot.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/scuttlebot.nix b/scuttlebot.nix
new file mode 100644
index 0000000..874f7af
--- /dev/null
+++ b/scuttlebot.nix
@@ -0,0 +1,27 @@
+{ fetchurl, fetchFromGitHub, mkYarnPackage, nodejs-8_x, nodePackages_8_x, python }:
+
+let
+ nodeHeaders = fetchurl {
+ url = "https://nodejs.org/download/release/v${nodejs-8_x.version}/node-v${nodejs-8_x.version}-headers.tar.gz";
+ sha256 = "01zscz0g8kf1nl99kpc5wx3cwklq3qc0xyr5bxq22frvgagi0a7a";
+ };
+in mkYarnPackage rec {
+ name = "scuttlebot";
+
+ src = fetchFromGitHub {
+ owner = "ssbc";
+ repo = "scuttlebot";
+ rev = "1aecb1ebddc53be1a98fd5950e1c9ba8a946bc62";
+ sha256 = "0pfd4a6bhlybi1i2mmkzigfb1b7pg7dy7ki1sdzmai3fx0lkc3i3";
+ };
+
+ packageJson = "${src}/package.json";
+ yarnLock = ./yarn-scuttlebot.lock;
+
+ pkgConfig.leveldown = {
+ buildInputs = [ python nodePackages_8_x.node-gyp ];
+ postInstall = ''
+ node-gyp rebuild --build-from-source --tarball=${nodeHeaders}
+ '';
+ };
+}