aboutsummaryrefslogtreecommitdiff
path: root/pkgs/crypto/iota-cli-app/default.nix
blob: a027098305482e36f566b3bdebd912c0901f5eec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ stdenv, fetchedGithub, fetchurl, fetchgit, callPackage, nodePackages, nodejs-8_x }:
let
  nodeEnv = callPackage "${nodePackages.node2nix}/lib/node_modules/node2nix/nix/node-env.nix" {
    nodejs = nodejs-8_x;
  };
  # built using node2nix -8 -l package-lock.json
  # and changing "./." to "src"
  packageEnv = import ./iota-cli-app-node-packages.nix {
    src = stdenv.mkDerivation (fetchedGithub ./iota-cli-app.json // {
      phases = "installPhase";
      installPhase = ''
        cp -a $src $out
        chmod u+w -R $out
        cd $out
        sed -i -e "s@host: 'http://localhost',@host: 'https://iri.trytes.eu',@" index.js
        sed -i -e "s@port: 14265@port: 443@" index.js
        '';
    });
    inherit fetchurl fetchgit nodeEnv;
  };
in
packageEnv.package