|
1 |
| -{ stdenv, fetchurl, makeDesktopItem |
| 1 | +{ stdenv, fetchurl, dpkg |
2 | 2 | , xorg, gtk2, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig
|
3 | 3 | , gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify }:
|
4 | 4 |
|
5 | 5 | let
|
6 | 6 | bits = if stdenv.system == "x86_64-linux" then "x64"
|
7 | 7 | else "ia32";
|
8 | 8 |
|
9 |
| - version = "0.5.10"; |
| 9 | + version = "0.5.12"; |
10 | 10 |
|
11 | 11 | runtimeDeps = [
|
12 | 12 | udev libnotify
|
|
18 | 18 | gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
|
19 | 19 | gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
|
20 | 20 | ] ++ runtimeDeps;
|
21 |
| - |
22 |
| - myIcon = fetchurl { |
23 |
| - url = "https://raw.githubusercontent.com/saenzramiro/rambox/9e4444e6297dd35743b79fe23f8d451a104028d5/resources/Icon.png"; |
24 |
| - sha256 = "0r00l4r5mlbgn689i3rp6ks11fgs4h2flvrlggvm2qdd974d1x0b"; |
25 |
| - }; |
26 |
| - desktopItem = makeDesktopItem rec { |
27 |
| - name = "Rambox"; |
28 |
| - exec = "rambox"; |
29 |
| - icon = myIcon; |
30 |
| - desktopName = name; |
31 |
| - genericName = "Rambox messenger"; |
32 |
| - categories = "Network;"; |
33 |
| - }; |
34 | 21 | in stdenv.mkDerivation rec {
|
35 | 22 | name = "rambox-${version}";
|
36 | 23 | src = fetchurl {
|
37 |
| - url = "https://github.com/saenzramiro/rambox/releases/download/${version}/Rambox-${version}-${bits}.tar.gz"; |
| 24 | + url = "https://github.com/saenzramiro/rambox/releases/download/${version}/Rambox_${version}-${bits}.deb"; |
38 | 25 | sha256 = if bits == "x64" then
|
39 |
| - "1i5jbhsfdbhr0rsb5w2pfpwjiagz47ppxk65qny3ay3lr4lbccn3" else |
40 |
| - "1p1m6vsa9xvl3pjf3pygvllyk7j4q9vnlzmrizb8f5q30fpls25x"; |
| 26 | + "1jlvpq7wryz4vf6xlsb9c38jrhjiv18rdf2ndlv76png60wl8418" else |
| 27 | + "063j3gcpp18wdvspy7d43cgv7i5v8c42hn2zpp083jixw9ddsqwa"; |
41 | 28 | };
|
42 | 29 |
|
43 | 30 | # don't remove runtime deps
|
44 | 31 | dontPatchELF = true;
|
45 | 32 |
|
| 33 | + buildInputs = [ dpkg ]; |
| 34 | + |
| 35 | + unpackPhase = "dpkg-deb -x $src ."; |
| 36 | + |
46 | 37 | installPhase = ''
|
47 |
| - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" rambox |
48 |
| - patchelf --set-rpath "$out/opt/rambox:${stdenv.lib.makeLibraryPath deps}" rambox |
| 38 | + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" opt/Rambox/rambox |
| 39 | + patchelf --set-rpath "$out/opt/Rambox:${stdenv.lib.makeLibraryPath deps}" opt/Rambox/rambox |
49 | 40 |
|
50 |
| - mkdir -p $out/bin $out/opt/rambox |
51 |
| - cp -r * $out/opt/rambox |
52 |
| - ln -s $out/opt/rambox/rambox $out/bin |
| 41 | + mkdir -p $out/bin |
| 42 | + cp -r opt $out |
| 43 | + ln -s $out/opt/Rambox/rambox $out/bin |
53 | 44 |
|
54 |
| - # provide desktop item |
55 |
| - mkdir -p $out/share/applications |
56 |
| - ln -s ${desktopItem}/share/applications/* $out/share/applications |
| 45 | + # provide resources |
| 46 | + cp -r usr/share $out |
| 47 | + substituteInPlace $out/share/applications/rambox.desktop \ |
| 48 | + --replace Exec=\"/opt/Rambox/rambox\" Exec=rambox |
57 | 49 | '';
|
58 | 50 |
|
59 | 51 | postFixup = ''
|
60 |
| - paxmark m $out/opt/rambox/rambox |
| 52 | + paxmark m $out/opt/Rambox/rambox |
61 | 53 | '';
|
62 | 54 |
|
63 | 55 | meta = with stdenv.lib; {
|
64 | 56 | description = "Free and Open Source messaging and emailing app that combines common web applications into one";
|
65 | 57 | homepage = http://rambox.pro;
|
66 | 58 | license = licenses.mit;
|
67 |
| - maintainers = [ stdenv.lib.maintainers.gnidorah ]; |
| 59 | + maintainers = [ maintainers.gnidorah ]; |
68 | 60 | platforms = ["i686-linux" "x86_64-linux"];
|
69 | 61 | hydraPlatforms = [];
|
70 | 62 | };
|
|
0 commit comments