@@ -1,72 +0,0 @@
1−{ stdenv, makeWrapper, fetchurl, unzip, atomEnv, makeDesktopItem, buildFHSUserEnv, gtk2 }:
2−
3−let
4− version = "0.11.1";
5− pname = "mist";
6−
7− throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
8−
9− meta = with stdenv.lib; {
10− description = "Browse and use Ðapps on the Ethereum network";
11− homepage = "https://github.com/ethereum/mist";
12− license = licenses.gpl3;
13− maintainers = with maintainers; [];
14− platforms = [ "x86_64-linux" "i686-linux" ];
15− };
16−
17− urlVersion = builtins.replaceStrings ["."] ["-"] version;
18−
19− desktopItem = makeDesktopItem rec {
20− name = "Mist";
21− exec = "mist";
22− icon = "mist";
23− desktopName = name;
24− genericName = "Mist Browser";
25− categories = "Network;";
26− };
27−
28− mist = stdenv.lib.appendToName "unwrapped" (stdenv.mkDerivation {
29− inherit pname version meta;
30−
31− src = {
32− i686-linux = fetchurl {
33− url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux32-${urlVersion}.zip";
34− sha256 = "1ffzp9aa0g6w3d5pzp69fljk3sd51cbqdgxa1x16vj106sqm0gj7";
35− };
36− x86_64-linux = fetchurl {
37− url = "https://github.com/ethereum/mist/releases/download/v${version}/Mist-linux64-${urlVersion}.zip";
38− sha256 = "0yx4x72l8gk68yh9saki48zgqx8k92xnkm79dc651wdpd5c25cz3";
39− };
40− }.${stdenv.hostPlatform.system} or throwSystem;
41−
42− buildInputs = [ unzip makeWrapper ];
43−
44− buildCommand = ''
45− mkdir -p $out/lib/mist $out/bin
46− unzip -d $out/lib/mist $src
47− ln -s $out/lib/mist/mist $out/bin
48− fixupPhase
49− mkdir -p $out/share/applications
50− ln -s ${desktopItem}/share/applications/* $out/share/applications
51− patchelf \
52− --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
53− --set-rpath "${atomEnv.libPath}:${gtk2}/lib:$out/lib/mist" \
54− $out/lib/mist/mist
55− '';
56− });
57−in
58−buildFHSUserEnv {
59− name = "mist";
60− inherit meta;
61−
62− targetPkgs = pkgs: with pkgs; [
63− mist
64− ];
65−
66− extraInstallCommands = ''
67− mkdir -p "$out/share/applications"
68− cp "${desktopItem}/share/applications/"* $out/share/applications
69− '';
70−
71− runScript = "mist";
72−}