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

antfs-cli and openant: init at unstable-2017-02-11 #22713

Merged
merged 2 commits into from Feb 20, 2017

Conversation

richardlarocque
Copy link
Contributor

Motivation for this change

Adds antfs-cli and the openant library it depends on to nixpkgs.

These packages seem to not have had any formal release and their version numbers haven't been updated in a long time, so I decided to package them as a Git snapshot rather than aiming for a particular (non-existent) release.

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 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.

@mention-bot
Copy link

@richardlarocque, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh to be a potential reviewer.

@@ -169,6 +169,26 @@ in {
};
};

antfs-cli = buildPythonApplication rec {
Copy link
Member

Choose a reason for hiding this comment

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

Since this is an application, it should go into the directory structure similarly to garmin-uploader.

@@ -169,6 +169,26 @@ in {
};
};

antfs-cli = buildPythonApplication rec {
name = "antfs-cli-${version}";
version = "git-2017-02-11";
Copy link
Member

Choose a reason for hiding this comment

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

Since the version field is not actually used anywhere in the expression you can inline it into the name field. Note, however, that this will not be interpreted as you might expect. Nix will parse name as antfs-cli-git and the version to 2017-02-11. This is because it starts the version at the first hyphen followed by a digit:

nix-repl> builtins.parseDrvName "antfs-cli-git-2017-02-11"
{ name = "antfs-cli-git"; version = "2017-02-11"; }

Also as per the naming guidelines it should be name = "antfs-cli-unstable-2017-02-11";.

This comment also applies for the openant package below.

@richardlarocque
Copy link
Contributor Author

Thanks for the quick review! I'm not so quick myself, so feel free to take your time on the second round.

I've fixed a few things and squashed my fixes. Changes include:

  • Renaming and re-versioning both packages as "-unstable-2017-02-11".
  • Add platforms = platform.linux to meta attributes. (I presume this package isn't intended to work elsewhere as it has install scripts that are hard-coded to install udev rules.)
  • Moved antfs-cli to pkgs/applications/misc


# Removes some setup.py hacks intended to install udev rules.
# We do the job ourselves in postInstall below.
patchPhase = ''
Copy link
Member

Choose a reason for hiding this comment

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

make it postPatch since that allows us to still pass in patches`

@rycee
Copy link
Member

rycee commented Feb 19, 2017

Beside the @FRidh's point about postPatch this looks fine to me. I don't have my Garmin watch around at the moment but hope to use this package in the future :-)

@richardlarocque richardlarocque changed the title antfs-cli and openant: init at git-2017-02-11 antfs-cli and openant: init at unstable-2017-02-11 Feb 20, 2017
@richardlarocque
Copy link
Contributor Author

Replaced patchPhase with postPatch. Also updated the PR description, which I just noticed was out of date.

@FRidh FRidh merged commit 9d48d37 into NixOS:master Feb 20, 2017
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