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

Walabot SDK and module #46654

Closed
wants to merge 2 commits into from
Closed

Walabot SDK and module #46654

wants to merge 2 commits into from

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Sep 14, 2018

Motivation for this change

This PR adds the proprietary SDK for the Walabot Makers. Because of the nature of the library, which is only available as a pre-compiled shared library, a database must be present under /var/lib/walabot. The walabot NixOS-module creates this directory and populates it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/) (none present)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

This module creates both the database needed for the SDK packaged as
walabot-sdk in the /var/lib/walabot directory and the udev rules for the
"Walabot Makers" device.
@oxzi
Copy link
Member Author

oxzi commented Sep 16, 2018

Any comment on this PR?

script = ''
if [ ! -d "/var/lib/walabot" ]; then
mkdir -p /var/lib
cp -r ${pkgs.walabot-sdk}/var/lib/walabot /var/lib/
Copy link
Member

Choose a reason for hiding this comment

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

How is this supposed to work when upgrading? Supposedly pkgs.walabot-sdk would be bumped, but it wouldn't be copied again to /var/lib as the directory would already exist.

name = "walabot-udev-rules";
destination = "/etc/udev/rules.d/50-walabot.rules";
text = ''
SUBSYSTEM=="usb", ATTR{idVendor}=="2c9c", ATTR{idProduct}="1000", MODE="0666"
Copy link
Member

Choose a reason for hiding this comment

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

0666 is really strong. Maybe make it 0660 and owned by a group to which users can be added? Defaulting the group to root would I think make sense, and let the user define it through another configuration option, so that we don't add little-used IDs to nixos/modules/misc/ids.nix.

TL;DR: make it 0660 root:${cfg.group} with the group option defaulting to root.

version = "1.0.34";

src = fetchurl {
url = "https://s3.eu-central-1.amazonaws.com/walabot/WalabotInstaller/Latest/walabot_maker_${version}_linux_x64.deb";
Copy link
Member

Choose a reason for hiding this comment

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

Can you add as a comment an URL to the place via which you found this URL? I can't find it easily on the website, and it would help when checking for updates.

@oxzi
Copy link
Member Author

oxzi commented Nov 26, 2018

@Ekleog: Thanks for your feedback and checking this older PR. I have kind of forgotten this one and don't (have to) use the Walabot anymore. Furthermore this PR is, as you mentioned, kind of hacky. I think it's for the best to just close it. I'm very sorry that you worked all through this.

@oxzi oxzi closed this Nov 26, 2018
@oxzi oxzi deleted the walabot branch November 26, 2018 16:00
@Ekleog
Copy link
Member

Ekleog commented Nov 27, 2018 via email

@oxzi oxzi restored the walabot branch March 10, 2019 21:32
@oxzi oxzi deleted the walabot branch March 10, 2019 21:34
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

3 participants