Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upwork: init at 5.3.3-883 #85396

Merged
merged 2 commits into from Apr 16, 2020
Merged

upwork: init at 5.3.3-883 #85396

merged 2 commits into from Apr 16, 2020

Conversation

zakkor
Copy link
Member

@zakkor zakkor commented Apr 16, 2020

Motivation for this change

I needed to use the Upwork time tracker, and a package for it didn't exist.
Related issue: #30654

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@zakkor zakkor mentioned this pull request Apr 16, 2020
maintainers/maintainer-list.nix Show resolved Hide resolved
, pango, systemd, libXScrnSaver, libcxx, libpulseaudio }:

stdenv.mkDerivation rec {
name = "upwork-${version}";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name = "upwork-${version}";
pname = "upwork";

nativeBuildInputs = [
dpkg
wrapGAppsHook
autoPatchelfHook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really sure this is needed since you're creating a LD_LIBRARY_PATH for the program wrapper

Suggested change
autoPatchelfHook

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell it doesn't work without doing patchelf

version = "5.3.3-883";

src = fetchurl {
url = https://updates-desktopapp.upwork.com/binaries/v5_3_3_883_1f817bc1fefd44e7/upwork_5.3.3.883_amd64.deb;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap the url in quotes (as per RFC45)

@notpeelz
Copy link

notpeelz commented Apr 16, 2020

Running /opt/Upwork/upwork in nix-shell --pure seems to fail:

No protocol specified

(upwork:29262): Gtk-WARNING **: 16:39:07.676: cannot open display: :0

Running /bin/upwork (the symlink) causes it to segfault in an impure shell:

[1]    28927 segmentation fault (core dumped)  /nix/store/y0150qnl83w9ida3ir2al5b5i76nqnyg-upwork-5.3.3-883/bin/upwork

In a pure shell however, the symlink gives the same "No protocol specified" error.

Tested with HOME="$(mktemp -d)" nix-shell --pure

@jonringer
Copy link
Contributor

jonringer commented Apr 16, 2020

In a pure shell however, the symlink gives the same "No protocol specified" error.

Tested with HOME="$(mktemp -d)" nix-shell --pure

thats because there's not a /etc/protocols in a sandbox, this is a known-issue see NixOS/nix#1238

it's unfortunate, but just a lot of GUI applications need some impurity to work

@zakkor
Copy link
Member Author

zakkor commented Apr 16, 2020

I've implemented all your suggestions and used makeWrapper directly to create /bin/upwork as a workaround for the symlink issue.
(I've also updated the .desktop file to point to the new /bin/upwork wrapper so everything works correctly)

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff LGTM
gui launches fine

[2 built, 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/85396
43 package marked as broken and skipped:
clang-sierraHack-stdenv crossLibcStdenv digitalbitbox glibcCross iterm2 linuxPackages-libre.sch_cake linuxPackages.sch_cake linuxPackages_4_14.sch_cake linuxPackages_4_19.sch_cake linuxPackages_4_4.evdi linuxPackages_4_4.sysdig linuxPackages_4_9.sysdig linuxPackages_5_5.sch_cake linuxPackages_5_6.sch_cake linuxPackages_hardened.sch_cake linuxPackages_hardkernel_4_14.bpftrace linuxPackages_hardkernel_4_14.can-isotp linuxPackages_hardkernel_4_14.chipsec linuxPackages_hardkernel_4_14.digimend linuxPackages_hardkernel_4_14.evdi linuxPackages_hardkernel_4_14.mba6x_bl linuxPackages_hardkernel_4_14.nvidia_x11_legacy390 linuxPackages_hardkernel_4_14.nvidiabl linuxPackages_hardkernel_4_14.rtl8814au linuxPackages_hardkernel_4_14.rtl8821ce linuxPackages_hardkernel_4_14.rtlwifi_new linuxPackages_hardkernel_4_14.sch_cake linuxPackages_hardkernel_4_14.v4l2loopback linuxPackages_latest-libre.sch_cake linuxPackages_xen_dom0_hardened.sch_cake muslCross newlibCross octave-jit octoprint php73Extensions.zmq php74Extensions.couchbase php74Extensions.pcs php74Extensions.pthreads python27Packages.caffe python27Packages.libmodulemd python38Packages.nixpart synfigstudio ucommon

1 package built:
upwork

@jonringer jonringer merged commit e14c4ba into NixOS:master Apr 16, 2020
@jonringer
Copy link
Contributor

@zakkor congrats on your first PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants