mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 05:33:23 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
56 lines
1.8 KiB
Nix
56 lines
1.8 KiB
Nix
{ lib, stdenv, fetchurl, dpkg, wrapGAppsHook, autoPatchelfHook, writeShellScript
|
|
, alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig, freetype
|
|
, gdk-pixbuf, glib, gtk3, libnotify, libX11, libXcomposite, libXcursor, libXdamage, libuuid
|
|
, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, libxcb
|
|
, pango, systemd, libXScrnSaver, libcxx, libpulseaudio }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "upwork";
|
|
version = "5.4.9.6";
|
|
|
|
src = fetchurl {
|
|
url = "https://upwork-usw2-desktopapp.upwork.com/binaries/v5_4_9_6_2565cdd0547940a2/${pname}_${version}_amd64.deb";
|
|
sha256 = "ff6246b3b4a1ed79cc9bca2934652fefb40bdac4b7e95997f3a46e354ce52456";
|
|
};
|
|
|
|
dontWrapGApps = true;
|
|
|
|
nativeBuildInputs = [
|
|
dpkg
|
|
wrapGAppsHook
|
|
autoPatchelfHook
|
|
];
|
|
|
|
buildInputs = [
|
|
libcxx systemd libpulseaudio
|
|
stdenv.cc.cc alsaLib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype
|
|
gdk-pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid
|
|
libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
|
|
libXtst nspr nss libxcb pango systemd libXScrnSaver
|
|
];
|
|
|
|
libPath = stdenv.lib.makeLibraryPath buildInputs;
|
|
|
|
unpackPhase = ''
|
|
dpkg-deb -x ${src} ./
|
|
'';
|
|
|
|
installPhase = ''
|
|
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}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Online freelancing platform desktop application for time tracking";
|
|
homepage = "https://www.upwork.com/ab/downloads/";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ zakkor wolfangaukang ];
|
|
};
|
|
}
|