1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/applications/networking/instant-messengers/rambox/pro.nix
Christopher A. Williamson a63be6cdd7 rambox-pro: init at 1.1.2 (#60380)
* Added myself to maintainer list

* Add package file for rambox-pro

* Add patch to fix rambox-pro build

* Removed child module refs from package

* Added various fixes for new rambox-pro pkg

* Change name -> pname to address feedback

* Update pkgs/applications/networking/instant-messengers/rambox-pro/default.nix

Co-Authored-By: cawilliamson <home@chrisaw.com>

* Moved rambox-pro to rambox pkg

* Fixed package name - no idea what I was thinking here!

* Replace patch with postPatch script

Co-Authored-By: cawilliamson <home@chrisaw.com>

* Removed patch file
2019-05-01 20:08:32 +02:00

52 lines
1.8 KiB
Nix

{ autoPatchelfHook, electron, fetchurl, makeDesktopItem, makeWrapper, nodePackages, nss, stdenv, xdg_utils, xorg }:
stdenv.mkDerivation rec {
pname = "rambox-pro";
version = "1.1.2";
dontBuild = true;
dontStrip = true;
buildInputs = [ nss xorg.libxkbfile ];
nativeBuildInputs = [ autoPatchelfHook makeWrapper nodePackages.asar ];
src = fetchurl {
url = "https://github.com/ramboxapp/download/releases/download/v${version}/RamboxPro-${version}-linux-x64.tar.gz";
sha256 = "0rrfpl371hp278b02b9b6745ax29yrdfmxrmkxv6d158jzlv0dlr";
};
postPatch = ''
substituteInPlace resources/app.asar.unpacked/node_modules/ad-block/vendor/depot_tools/create-chromium-git-src \
--replace "/usr/bin/env -S bash -e" "${stdenv.shell}"
substituteInPlace resources/app.asar.unpacked/node_modules/ad-block/node_modules/bloom-filter-cpp/vendor/depot_tools/create-chromium-git-src \
--replace "/usr/bin/env -S bash -e" "${stdenv.shell}"
'';
installPhase = ''
mkdir -p $out/bin $out/opt/RamboxPro $out/share/applications
asar e resources/app.asar $out/opt/RamboxPro/resources/app.asar.unpacked
ln -s ${desktopItem}/share/applications/* $out/share/applications
'';
postFixup = ''
makeWrapper ${electron}/lib/electron/.electron-wrapped $out/bin/ramboxpro \
--add-flags "$out/opt/RamboxPro/resources/app.asar.unpacked --without-update" \
--prefix PATH : ${xdg_utils}/bin
'';
desktopItem = makeDesktopItem {
name = "rambox-pro";
exec = "ramboxpro";
type = "Application";
desktopName = "Rambox Pro";
};
meta = with stdenv.lib; {
description = "Messaging and emailing app that combines common web applications into one";
homepage = https://rambox.pro;
license = licenses.unfree;
maintainers = with maintainers; [ chrisaw ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}