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

[NixOS] Fix + update hardware.parallels config option #27513

Merged
merged 9 commits into from Nov 23, 2017

Conversation

lukeadams
Copy link
Contributor

@lukeadams lukeadams commented Jul 19, 2017

Motivation for this change

This PR enables support for Parallels 12, and also removes the need to provide prl-tools-lin.iso. It fixes dynamic resolution/coherence/clipboard support.

It may be a good idea to add:

hardware.parallels.version = {
    major = "12";
    minor = "2.1-41615";
    releaseSha256 = "1jwzwif69qlhmfky9kigjaxpxfj0lyrl1iyrpqy4iwqvajdgbbym";
};
# or
hardware.parallels.version = {
    full = "12.2.1-41615";
    major = lib.splitString "." full
    minor = lib.removePrefix major full
    releaseSha256 = "1jwzwif69qlhmfky9kigjaxpxfj0lyrl1iyrpqy4iwqvajdgbbym";
};

to allow the use of newer prl-tools versions in configuration.nix without forking nixpkgs

Squash before committing:
743485f6579422b1115986d40522d820b67b5b8f
041ae372c9531682118cdb5de99768a84fcc7a0c
c6700487d7d02453774c49bb42e2e25997a63999
I left them as separate commits for clarity

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

TODO: possibly add tests ala Virtualbox

@mention-bot
Copy link

@lukeadams, thanks for your PR! By analyzing the history of the files in this pull request, we identified @abbradar, @nckx and @fpletz to be potential reviewers.

@Mic92 Mic92 added the 6.topic: darwin Running or building packages on Darwin label Jul 20, 2017
@lukeadams
Copy link
Contributor Author

@Mic92 this PR is for NixOS (in Parallels on Darwin)

@lukeadams lukeadams force-pushed the prl-tools-fix branch 3 times, most recently from 71668c8 to 62c3ffa Compare July 26, 2017 18:32
@lukeadams
Copy link
Contributor Author

Everything works once logged in. I couldn't find out how to create a systemd unit to launch prlcc in the getty "environment" (to allow dynamic resolution on the login window) though...

@lukeadams
Copy link
Contributor Author

13.0.1-42947 (parallels 13 instead of 12) is now the latest. I haven't upgraded to it so have no idea if it works, but it should be easy to test by overriding with

prl_major = "13";
version = "${prl_major}.0.1-42947";

description = "Parallels Control Center";
wantedBy = [ "graphical.target" ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prlcc";
Copy link
Member

Choose a reason for hiding this comment

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

I am not familiar at all with parallels to excuse my question:
What does prlcc that it is started both as a global service and a user in a graphical session?

Copy link
Contributor Author

@lukeadams lukeadams Oct 2, 2017

Choose a reason for hiding this comment

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

I put prlcc as a "global" to try and get dynamic resolution working on the login screen; it can be removed. The user service is the important one which works perfectly once logged in.

I don't recall seeing prldhd in prl-12, but there was prldnd. I'm not sure if they have the same functionality?

Copy link
Member

Choose a reason for hiding this comment

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

Is there any recommendation by upstream? Running x11 applications as root can create security problems because their is not user separation in x11.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Mic92 Fixed! I removed prlcc as a global service, and everything still works.

description = "Parallels Control Center";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${prl-tools}/bin/prlcc";
Copy link
Member

Choose a reason for hiding this comment

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

I ask because there was a service called prldhd before.

Copy link
Contributor Author

@lukeadams lukeadams Oct 2, 2017

Choose a reason for hiding this comment

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

Above comment:

I don't recall seeing prldhd in prl-12, but there was prldnd. I'm not sure if they have the same functionality?

I haven't looked at this in a while since I just needed it to work on my system at the time; if I have a chance this weekend I'll get more information for you.

@Mic92
Copy link
Member

Mic92 commented Oct 2, 2017

cc @disassembler for review.

@disassembler
Copy link
Member

I tested this PR in a parallels VM. It built successfully and auto-resizing worked in plasma/kde after login.

@lukeadams
Copy link
Contributor Author

lukeadams commented Oct 7, 2017

Above: prlcc as root has been removed.

I've rebased this PR onto channels/nixos-17.09 and everything works.

Additionally, diffing the directory structure from v12 (Parallels Tools)/v13(Parallels Tools 1) produces nearly identical output. The only differences are a few install scripts which we don't use!

Bitrig:Volumes lukeadams$ diff <( tree "Parallels Tools" ) <( tree "Parallels Tools 1" )
1c1
< Parallels\ Tools
---
> Parallels\ Tools\ 1
7d6
< │   ├── hname.sh
63a63
> │   ├── install-cli.sh
78c78,79
< │   ├── prlfsmountd.sh
---
> │   ├── prltimesync.fc
> │   ├── prltimesync.te
94a96,99
> │   ├── gnome-coherence
> │   │   ├── extension.js
> │   │   ├── metadata.json
> │   │   └── stylesheet.css
99a105
> │   ├── prlfsmountd.sh
131c137
< 30 directories, 98 files
---
> 31 directories, 103 files

@lukeadams
Copy link
Contributor Author

Rebased onto master for vm upgrade. Changes are still good

@Mic92
Copy link
Member

Mic92 commented Nov 23, 2017

@GrahamcOfBorg eval

@Mic92 Mic92 merged commit 487c4a6 into NixOS:master Nov 23, 2017
@lukeadams lukeadams deleted the prl-tools-fix branch May 26, 2021 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants