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

pidgin: now builds and runs on osx #91882

Merged
merged 2 commits into from Jul 1, 2020
Merged

pidgin: now builds and runs on osx #91882

merged 2 commits into from Jul 1, 2020

Conversation

@fkautz
Copy link
Contributor

@fkautz fkautz commented Jun 30, 2020

Signed-off-by: Frederick F. Kautz IV fkautz@alumni.cmu.edu

A quick note: this is my first patch in nixpkgs. I don't know if I have followed best practices. E.g. I read sandboxing is enabled by default but I don't know how to confirm it.

Also, this package does require an X11 server to run. Nix does provide access to the xquartz installer, but it is possible to run pidgin with an already running X11 server.

Motivation for this change

Before: No Pidgin on OSX
After: Pidgin on OSX

Things done

Changed build to support unix.

  • Build: constrain to platforms.unix instead of platforms.linux
  • Build: Differences Linux and OSX now parameterized
  • Darwin: build against gtk2-x11 instead of gtk
  • Darwin: disable gtkspell2 (spellcheck)
  • Darwin: disable farstream (voice and video)
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
    • I didn't disable sandbox, I read somewhere in docs that it is enabled by default. Don't know how to confirm.
  • 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)
    • I see that these tests exist, I don't know how to run them yet. Would appreciate assistance here.
  • 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/)
    • OSX
    • Linux (I have a headless NixOS)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
    • No docs found
  • Fits CONTRIBUTING.md.
    • I read through and attempted to adapt. Please verify.
We can now build and run pidgin on OSX.

Pidgin requires an X11 server to run.

* Build: Differences Linux and OSX now parameterized
* Darwin: build against gtk2-x11 instead of gtk
* Darwin: disable gtkspell2 (spellcheck)
* Darwin: disable farstream (voice and video)

Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
@ofborg ofborg bot requested a review from vcunat Jun 30, 2020
@Mic92
Copy link
Contributor

@Mic92 Mic92 commented Jun 30, 2020

Not quite sure if I need to disable the sandbox?

[nix-shell:~/.cache/nixpkgs-review/pr-91882-1]$ nix log /nix/store/1nywh7sccp8l0x4f7wk2n5nkyi855v71-libstartup-notification-0.12.drv
warning: unknown setting 'experimental-features'
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ STDIN
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ @nix { "action": "setPhase", "phase": "unpackPhase" }
   2   │ unpacking sources
   3   │ unpacking source archive /nix/store/bbqnd6qxw97v4dh2dxlysp0kckfvdj51-startup-notification-0.12.tar.gz
   4   │ dyld: Library not loaded: @rpath/CoreFoundation.framework/Versions/A/CoreFoundation
   5   │   Referenced from: /nix/store/bzf81p8lczllrs1633zaj0rka7cz4k8g-gettext-0.20.1/lib/libintl.8.dylib
   6   │   Reason: no suitable image found.  Did find:
   7   │     /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation: file system sandbox blocked stat()
   8   │ /nix/store/swr2h40348gmxmsxwfyhlm6xsrjyw0cj-stdenv-darwin/setup: line 838:  1661 Abort trap: 6           tar xf "$fn"
   9   │ do not know how to unpack source archive /nix/store/bbqnd6qxw97v4dh2dxlysp0kckfvdj51-startup-notification-0.12.tar.gz
@fkautz
Copy link
Contributor Author

@fkautz fkautz commented Jul 1, 2020

@Mic92 was that posted to the correct PR? This code shouldn't affect anything in that library.

@fkautz
Copy link
Contributor Author

@fkautz fkautz commented Jul 1, 2020

@vcunat I've ran nix-shell -p nixpkgs-review --run "nixpkgs-review wip" and found a problem with a downstream purple-matrix library. libpurple is pidgin's library for building IM messages on. It's in pidgin-plugins. I have a fix for it that I intend to submit after this one since it's a different package.

@Mic92
Copy link
Contributor

@Mic92 Mic92 commented Jul 1, 2020

@Mic92 was that posted to the correct PR? This code shouldn't affect anything in that library.

Well startup-notifications is one of pidgin's dependencies. I built with nix-review with also does a merge into current master before running the build.

@fkautz
Copy link
Contributor Author

@fkautz fkautz commented Jul 1, 2020

@Mic92 what command did you use to reproduce this? I'm very new here so still trying to navigate the tooling. :)

I was just using nix-build -A pidgin and nix-shell -p nixpkgs-review --run "nixpkgs-review wip"

And would this be the appropriate PR to fix that problem or should I open a new PR?

@Mic92
Copy link
Contributor

@Mic92 Mic92 commented Jul 1, 2020

@Mic92 what command did you use to reproduce this? I'm very new here so still trying to navigate the tooling. :)

I was just using nix-build -A pidgin and nix-shell -p nixpkgs-review --run "nixpkgs-review wip"

And would this be the appropriate PR to fix that problem or should I open a new PR?

You can reproduce it by sandbox = true in $HOME/.config/nix/nix.conf or in your system-config nix.conf if you are an unprivileged user on a multi-user nix installation (in other words when you have a nix-daemon running). I don't know what are our policies are for macOS right now and if hydra has sandboxes enabled or not. I am only using a macOS vm occasionally and just copied my configuration over from Linux. For now I just trust of ofborg to be the ground truth:

@GrahamcOfBorg build pidgin

@Mic92 Mic92 merged commit 1b9b144 into NixOS:master Jul 1, 2020
19 checks passed
19 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f25079d"; rev="f25079d967bc7a7a8181637cfdb154c39460d3ec"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f25079d"; rev="f25079d967bc7a7a8181637cfdb154c39460d3ec"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f25079d"; rev="f25079d967bc7a7a8181637cfdb154c39460d3ec"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f25079d"; rev="f25079d967bc7a7a8181637cfdb154c39460d3ec"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f25079d"; rev="f25079d967bc7a7a8181637cfdb154c39460d3ec"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f25079d"; rev="f25079d967bc7a7a8181637cfdb154c39460d3ec"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f25079d"; rev="f25079d967bc7a7a8181637cfdb154c39460d3ec"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
pidgin on aarch64-linux Success
Details
pidgin on x86_64-darwin Success
Details
pidgin on x86_64-linux Success
Details
pidgin, pidgin.passthru.tests on aarch64-linux Success
Details
pidgin, pidgin.passthru.tests on x86_64-linux Success
Details
@fkautz fkautz deleted the fkautz:pidgin-osx branch Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.