summary refs log tree commit diff
path: root/pkgs/applications/altcoins
diff options
context:
space:
mode:
authorMatthew Justin Bauer <mjbauer95@gmail.com>2018-04-18 22:00:34 -0500
committerGitHub <noreply@github.com>2018-04-18 22:00:34 -0500
commit22639dbdf7ce10e425f3cfb01f80ad33414f05eb (patch)
tree890480f778f64244591d01ca7d16128a62e8bf2a /pkgs/applications/altcoins
parent5cff8ec220cc51864c81fc5d0cfc1baa2e873072 (diff)
parent7cb50de416819e8505d70931c899fc8692aecb33 (diff)
downloadnixpkgs-22639dbdf7ce10e425f3cfb01f80ad33414f05eb.tar
nixpkgs-22639dbdf7ce10e425f3cfb01f80ad33414f05eb.tar.gz
nixpkgs-22639dbdf7ce10e425f3cfb01f80ad33414f05eb.tar.bz2
nixpkgs-22639dbdf7ce10e425f3cfb01f80ad33414f05eb.tar.lz
nixpkgs-22639dbdf7ce10e425f3cfb01f80ad33414f05eb.tar.xz
nixpkgs-22639dbdf7ce10e425f3cfb01f80ad33414f05eb.tar.zst
nixpkgs-22639dbdf7ce10e425f3cfb01f80ad33414f05eb.zip
Merge pull request #38661 from jbboehr/ethereum-mist-browser-master
altcoins.mist: init at 0.10.0
Diffstat (limited to 'pkgs/applications/altcoins')
-rw-r--r--pkgs/applications/altcoins/default.nix2
-rw-r--r--pkgs/applications/altcoins/mist.nix71
2 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix
index d7cce586b9b..174ff96a124 100644
--- a/pkgs/applications/altcoins/default.nix
+++ b/pkgs/applications/altcoins/default.nix
@@ -51,6 +51,8 @@ rec {
   memorycoin  = callPackage ./memorycoin.nix { boost = boost165; withGui = true; };
   memorycoind = callPackage ./memorycoin.nix { boost = boost165; withGui = false; };
 
+  mist = callPackage ./mist.nix { };
+
   namecoin  = callPackage ./namecoin.nix  { withGui = true; };
   namecoind = callPackage ./namecoin.nix { withGui = false; };
 
diff --git a/pkgs/applications/altcoins/mist.nix b/pkgs/applications/altcoins/mist.nix
new file mode 100644
index 00000000000..c112384f3d8
--- /dev/null
+++ b/pkgs/applications/altcoins/mist.nix
@@ -0,0 +1,71 @@
+{ stdenv, lib, makeWrapper, fetchurl, unzip, atomEnv, makeDesktopItem, buildFHSUserEnv }:
+
+let
+  version = "0.10.0";
+  name = "mist-${version}";
+
+  throwSystem = throw "Unsupported system: ${stdenv.system}";
+
+  meta = with stdenv.lib; {
+    description = "Browse and use Ðapps on the Ethereum network";
+    homepage = https://github.com/ethereum/mist;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+
+  urlVersion = builtins.replaceStrings ["."] ["-"] version;
+
+  desktopItem = makeDesktopItem rec {
+    name = "Mist";
+    exec = "mist";
+    icon = "mist";
+    desktopName = name;
+    genericName = "Mist Browser";
+    categories = "Network;";
+  };
+
+  mist = stdenv.mkDerivation {
+    inherit name version;
+
+    src = {
+      i686-linux = fetchurl {
+        url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux32-${urlVersion}.zip";
+        sha256 = "01hvxlm9w522pwvsjdy18gsrapkfjr7d1jjl4bqjjysxnjaaj2lk";
+      };
+      x86_64-linux = fetchurl {
+        url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux64-${urlVersion}.zip";
+        sha256 = "01k17j7fdfhxfd26njdsiwap0xnka2536k9ydk32czd8db7ya9zi";
+      };
+    }.${stdenv.system} or throwSystem;
+
+    buildInputs = [ unzip makeWrapper ];
+
+    buildCommand = ''
+      mkdir -p $out/lib/mist $out/bin
+      unzip -d $out/lib/mist $src
+      ln -s $out/lib/mist/mist $out/bin
+      fixupPhase
+      mkdir -p $out/share/applications
+      ln -s ${desktopItem}/share/applications/* $out/share/applications
+      patchelf \
+        --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath "${atomEnv.libPath}:$out/lib/mist" \
+        $out/lib/mist/mist
+    '';
+  };
+in
+buildFHSUserEnv {
+  name = "mist";
+
+  targetPkgs = pkgs: with pkgs; [
+     mist
+  ];
+
+  extraInstallCommands = ''
+    mkdir -p "$out/share/applications"
+    cp "${desktopItem}/share/applications/"* $out/share/applications
+  '';
+
+  runScript = "mist";
+}