diff options
author | tilpner | 2018-06-05 11:58:30 +0200 |
---|---|---|
committer | tilpner | 2018-06-05 11:58:30 +0200 |
commit | ef6573e4ad6dc489880023ee492ef236595646ba (patch) | |
tree | f15ce5a19688cc1f96d01f1b6678c066287d036c /patchwork.nix | |
download | scuttlebutt-nix-ef6573e4ad6dc489880023ee492ef236595646ba.tar.gz scuttlebutt-nix-ef6573e4ad6dc489880023ee492ef236595646ba.tar.xz scuttlebutt-nix-ef6573e4ad6dc489880023ee492ef236595646ba.zip |
Diffstat (limited to 'patchwork.nix')
-rw-r--r-- | patchwork.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patchwork.nix b/patchwork.nix new file mode 100644 index 0000000..afdd947 --- /dev/null +++ b/patchwork.nix @@ -0,0 +1,28 @@ +{ 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 = "patchwork"; + + src = fetchFromGitHub { + owner = "ssbc"; + repo = "patchwork"; + rev = "77570f8a228dbe5f1d398a92623d4c25675654ec"; + sha256 = "0w1437xhpc6dsxsb29zvg3rvn0w6wiy6ys8vi9mfh9jy8hkfjahk"; + }; + + packageJson = "${src}/package.json"; + yarnLock = ./yarn-patchwork.lock; + yarnNix = ./yarn-patchwork.nix; + + pkgConfig.leveldown = { + buildInputs = [ python nodePackages_8_x.node-gyp ]; + postInstall = '' + node-gyp rebuild --build-from-source --tarball=${nodeHeaders} + ''; + }; +} |