Skip to content

Barco clickshare #59891

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

Merged
merged 2 commits into from
Jun 2, 2019
Merged

Barco clickshare #59891

merged 2 commits into from
Jun 2, 2019

Conversation

Yarny0
Copy link
Contributor

@Yarny0 Yarny0 commented Apr 19, 2019

Motivation for this change

Let NixOS users share their desktops with Barco's ClickShare dongles during presentations etc. See the package's description and Barco's homepage for more information on the technology.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS: x86_64-linux, x86_32-linux
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) ( does not apply )
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip" ( does not apply )
  • 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): the package requires 5.9 MiB
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@Yarny0 Yarny0 requested a review from infinisil as a code owner April 19, 2019 14:55
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Apr 19, 2019
@Yarny0 Yarny0 force-pushed the barco-clickshare branch from 70124f3 to 9aeba76 Compare April 19, 2019 15:43
throw "unsupported system: ${stdenv.hostPlatform.system}";
inherit usersGroup;
sourceRoot = ".";
postUnpack = builtins.readFile ./post-unpack.sh;
Copy link
Contributor

Choose a reason for hiding this comment

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

please inline these files.

xorg.libXinerama
xorg.libXtst
];
rpmArch =
Copy link
Contributor

Choose a reason for hiding this comment

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

please set this in a let expression inside postUnpack, and use ${rpmArch} in there.

# The package brings a udev rule file with a group name.
# This module has to define that group.
# We check for a name mismatch here:
assert clicksharePkg.usersGroup=="clickshare";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we check this here?
How can a user of the module redefine usersGroup by accident? 😕

@Yarny0 Yarny0 force-pushed the barco-clickshare branch from 9aeba76 to 0d9dfb5 Compare May 13, 2019 14:35
@Yarny0
Copy link
Contributor Author

Yarny0 commented May 13, 2019

Thanks, @flokli, for the review and your suggestions. I updated my branch accordingly. Regarding the group name check, I'm just used to adding lots of assertions to catch any mismatches. I removed it.

I also rebased on current nixos-unstable channel and checked the 32bit version.

@Yarny0 Yarny0 mentioned this pull request May 13, 2019
10 tasks

Verified

This commit was signed with the committer’s verified signature.
BurntSushi Andrew Gallant
Barco ClickShare is a wireless presentation system
where a USB dongle transmits to a base station
that is connected with a beamer.

Note that this package also contains a udev rule
file to grant access to the dongle if connected.
Access is limited to a group "clickshare"
(the name may be altered by package options).
@Yarny0 Yarny0 force-pushed the barco-clickshare branch from 0d9dfb5 to adfbc21 Compare May 30, 2019 14:37
@Yarny0
Copy link
Contributor Author

Yarny0 commented May 30, 2019

Updated the branch following a suggestion of #61312: Remove empty line at beginning and end of stdenv.mkDerivation argument. Also rebased on current nixos-unstable.

{

options.programs.clickshare-csc1.enable =
lib.options.mkEnableOption "Barco ClickShare CSC-1 driver/client";
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably we should add a line that users need to be added to the clickshare group to be able to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done (I hope the interpunctation of mkEnableOption adds up correctly in the documentation).

The clickshare-csc1 package brings a udev rule file
to grant access to the ClickShare dongle if connected.
This module provides an option to install that rule file.
Only users in the "clickshare" users group have access.
@Yarny0 Yarny0 force-pushed the barco-clickshare branch from adfbc21 to b38bdf6 Compare May 30, 2019 17:59
@flokli
Copy link
Contributor

flokli commented Jun 2, 2019

@Yarny0 , I can't really test this (as I don't have the hardware around), but I assume you did :-)

@flokli flokli merged commit 640afe9 into NixOS:master Jun 2, 2019
@flokli
Copy link
Contributor

flokli commented Jun 2, 2019

Thanks!

@Yarny0
Copy link
Contributor Author

Yarny0 commented Jun 2, 2019

For the record: Most of my tests happened on the release-19.03 branch and on a NixOS 19.03 machine. Once I also built it on top of the unstable branch and successfully used the binaries, also on a NixOS 19.03 machine, however. So the only thing I never tested is whether the udev rule recognizes the dongle on the unstable branch. But I'm optimistic about that :-)

Thanks for your help and all your efforts, @flokli !!

@Yarny0 Yarny0 deleted the barco-clickshare branch June 11, 2019 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants