2021-02-18 00:07:50 +00:00
|
|
|
{ lib, stdenv, fetchurl, dpkg, wrapGAppsHook, autoPatchelfHook
|
2021-06-10 03:57:09 +01:00
|
|
|
, alsa-lib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig, freetype
|
2021-08-12 17:00:11 +01:00
|
|
|
, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid, libX11, libxcb
|
|
|
|
, libXcomposite, libXcursor, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender
|
|
|
|
, libXScrnSaver, libXtst, mesa, nspr, nss, pango, systemd }:
|
2020-04-16 22:34:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "upwork";
|
2021-08-30 18:29:46 +01:00
|
|
|
version = "5.6.8.0";
|
2020-04-16 22:34:00 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-30 18:29:46 +01:00
|
|
|
url = "https://upwork-usw2-desktopapp.upwork.com/binaries/v5_6_8_0_836f43f6f6be4149/${pname}_${version}_amd64.deb";
|
|
|
|
sha256 = "b3a52f773d633837882dc107b206006325722ca5d5d5a1e8bdf5453f872e1b6f";
|
2020-04-16 22:34:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
2020-10-13 00:26:26 +01:00
|
|
|
nativeBuildInputs = [
|
2020-04-16 22:34:00 +01:00
|
|
|
dpkg
|
|
|
|
wrapGAppsHook
|
|
|
|
autoPatchelfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libcxx systemd libpulseaudio
|
2021-08-12 17:00:11 +01:00
|
|
|
stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups
|
|
|
|
dbus expat fontconfig freetype gdk-pixbuf glib gtk3 libdrm libnotify
|
|
|
|
libuuid libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes
|
|
|
|
libXi libXrandr libXrender libXScrnSaver libXtst mesa nspr nss pango systemd
|
2020-04-16 22:34:00 +01:00
|
|
|
];
|
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
libPath = lib.makeLibraryPath buildInputs;
|
2020-04-16 22:34:00 +01:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-02-18 00:07:50 +00:00
|
|
|
runHook preInstall
|
2020-04-16 22:34:00 +01:00
|
|
|
mv usr $out
|
|
|
|
mv opt $out
|
|
|
|
sed -e "s|/opt/Upwork|$out/bin|g" -i $out/share/applications/upwork.desktop
|
|
|
|
makeWrapper $out/opt/Upwork/upwork \
|
|
|
|
$out/bin/upwork \
|
|
|
|
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${libPath}
|
2021-02-18 00:07:50 +00:00
|
|
|
runHook postInstall
|
2020-04-16 22:34:00 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-16 22:34:00 +01:00
|
|
|
description = "Online freelancing platform desktop application for time tracking";
|
|
|
|
homepage = "https://www.upwork.com/ab/downloads/";
|
|
|
|
license = licenses.unfree;
|
2020-10-13 00:27:16 +01:00
|
|
|
maintainers = with maintainers; [ zakkor wolfangaukang ];
|
2020-04-16 22:34:00 +01:00
|
|
|
};
|
2020-10-13 00:26:26 +01:00
|
|
|
}
|