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

init: Pebble sdk at 4.5 #35083

Closed
wants to merge 13 commits into from
Closed

init: Pebble sdk at 4.5 #35083

wants to merge 13 commits into from

Conversation

edanaher
Copy link
Contributor

Motivation for this change

While Pebble has been bought by Fitbit and stopped selling new products, the watches are still around and available (and cheap!). So this adds the pebble sdk to develop apps for it.

After the initial PR (#23445) languished and was eventually closed, here's a fresh one. (It's been a good learning experience for me in the Right Way to do several things :) )

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
    • 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/)
  • Fits CONTRIBUTING.md.

Evan Danaher and others added 9 commits February 17, 2018 13:34
Caught by travis-ci; nicely done!
- peewee
- pypng
- progressbar2
- pyqrcode
- wsgiref
- Don't require exact versions of python packages
- Use existing python packages where appropriate
- Use pythonEnv to set up the python dependencies
- Other minor cleanups
Thanks for the PR comment, c0bw3b.
@@ -5897,6 +5897,23 @@ in {
};
};

peewee = buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

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

Please put this in pkgs/development/python-modules and use callPackage.
The same is true for the other 3 Python modules.

@@ -5897,6 +5897,23 @@ in {
};
};

peewee = buildPythonPackage rec {
name = "peewee-2.8.8";
Copy link
Member

Choose a reason for hiding this comment

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

No name. Specify pname and version instead.

@@ -6101,6 +6118,20 @@ in {

pyphen = callPackage ../development/python-modules/pyphen {};

pypng = buildPythonPackage rec {
name = "pypng-0.0.18";
Copy link
Member

Choose a reason for hiding this comment

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

No name. Specify pname and version instead.

@@ -6101,6 +6118,20 @@ in {

pyphen = callPackage ../development/python-modules/pyphen {};

pypng = buildPythonPackage rec {
name = "pypng-0.0.18";
src = pkgs.fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi

@@ -5897,6 +5897,23 @@ in {
};
};

peewee = buildPythonPackage rec {
name = "peewee-2.8.8";
src = pkgs.fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi

wsgiref
];

patchPhase = ''
Copy link
Member

Choose a reason for hiding this comment

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

prePatch

name = "${pname}-${version}";
pname = "libpebble2";
version = "0.0.26";
src = python27Packages.fetchPypi {
Copy link
Member

Choose a reason for hiding this comment

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

If this is even on PyPI, why didn't you put it in python-packages.nix?

sha256 = "16n69xxma7k8mhl8birdwa0fsqvf902g08s80mjb477s4dcxrvaz";
};

# Tries and fails to pull in pytest-mock
Copy link
Member

Choose a reason for hiding this comment

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

checkInputs = [ pytest-mock ]

homepage = https://developer.pebble.com/sdk;
description = "SDK to build applications for the Pebble smartwatch";

license = https://developer.pebble.com/legal/sdk-license/;
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be licenses.unfree, shouldn't it?
You can put the URL in a comment.


meta = {
description = "A QR code generator written purely in Python with SVG, EPS, PNG and terminal output";
home = "https://pypi.python.org/pypi/PyQRCode/";
Copy link
Member

Choose a reason for hiding this comment

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

homepage, no quotes. And the homepage should be https://github.com/mnooner256/pyqrcode.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please also make all changes requested in #23445.

@edanaher
Copy link
Contributor Author

sigh; I forgot to push my final two changes wrapping up comments from #23445. Those should be good now; I'll look at the rest of your comments in a bit.

@edanaher
Copy link
Contributor Author

@dotlambda Thanks for all the feedback; I think I've addressed it all, along with a couple other minor cleanups. Two areas I'd appreciate feedback:

  • It looks like libpebble and peewee don't put their tests in the pypi distribution; I'm not entirely sure whether it's better to be simple and disable the tests, or pull the source from github and enable them

  • progressbar2 version 3 made some breaking changes, so I'm building progressbar2 version 2.7.3 (the latest 2.x version I could find). I'm not sure if that should be in pebble-libs or if I should add it to python-packages in case other packages also need it.

@dotlambda
Copy link
Member

@dotlambda
Copy link
Member

@edanaher Any progress?

@edanaher
Copy link
Contributor Author

In the process of pulling out and testing pypkjs, I discovered that the emulator isn't working again; I was looking at that, and got distracted. I'll take another shot at fixing it up.

@FRidh
Copy link
Member

FRidh commented Jan 6, 2019

Closing due to inactivity. If you still want this in, either request for this to be reopened or open a new PR.

@FRidh FRidh closed this Jan 6, 2019
@Sorixelle Sorixelle mentioned this pull request Jul 30, 2020
10 tasks
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

5 participants