aboutsummaryrefslogtreecommitdiff
path: root/pkgs/crypto/iota-cli-app/default.nix
blob: e9e9f92a17c1fbcd7ad10b9ba09fa583668a83e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ stdenv, mylibs, fetchurl, fetchgit, callPackage, nodePackages, nodejs-10_x }:
let
  nodeEnv = callPackage mylibs.nodeEnv { nodejs = nodejs-10_x; };
  # built using node2nix -8 -l package-lock.json
  # and changing "./." to "src"
  packageEnv = import ./node-packages.nix {
    src = stdenv.mkDerivation (mylibs.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://nodes.thetangle.org',@" index.js
        sed -i -e "s@port: 14265@port: 443@" index.js
        '';
    });
    inherit fetchurl fetchgit nodeEnv;
  };
in
packageEnv.package