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 #23445
init: pebble-sdk at 4.5 #23445
Conversation
So these are the requirements:
Apparently they have been fixed by something like Please try and use the packages we have currently in |
Furthermore, unless the sdk includes importable modules (i.e., its a library itself) you might want to use |
@FRidh Thanks for the input! I'll try your advice. |
What is the status of this PR? |
I cleaned it up a bit, and thought it was better; I just noticed that travis-ci failed because I used "bsd" for one of the licenses instead of "bsd3"; I've fixed that and re-pushed. Aside from that, I think it's good, but would be happy to get more feedback if you have any suggestions. |
I'm a bit confused by that failing travis-ci build; it's failing with the following
But when I build locally (on x86_64), the sdk builds just fine, as does the nox-review command given in the PR checklist. And if I try to run the command from travis-ci (travis-nox-review-pr.sh), it fails due to a missing /nixos/release.nix. Can I get a hand either with possible causes of the error or with how to reproduce it? |
Well, there is |
rec { | ||
libpebble2 = python27Packages.buildPythonPackage { | ||
name = "libpebble2-0.0.26"; | ||
src = pkgs.fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use fetchPypi
here
@edanaher do you still want this merged? If you could rebase it on master and resolve the conflicts, please. :) And take a look at |
Yeah... I never managed to figure out the travis failure, and it Works For Me for now, so I kind of gave up on the PR. Maybe I'll take another look at it in the next few days. |
The Travis failures were probably unrelated to your commits so don't worry about it. |
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
Whoops; didn't mean to push this yet. It's rebased and conflicts are resolved, but still needs some cleanup from a few months of bitrot. |
Thanks for the PR comment, c0bw3b.
@@ -0,0 +1,77 @@ | |||
{ pkgs, stdenv, lib, fetchurl, makeWrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no pkgs
@@ -0,0 +1,77 @@ | |||
{ pkgs, stdenv, lib, fetchurl, makeWrapper | |||
, python27, python27Packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either python27
or python27Packages
sha256 = "15yiypx9rnwyzsn4s4z1wmn1naw6mk7dpsiljmw3078ag66z1ca7"; | ||
}; | ||
|
||
pythonEnv = (python27.withPackages (ps: with ps; builtins.attrValues pebble-libs ++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can go in a let .. in
@@ -0,0 +1,59 @@ | |||
{ pkgs, python27Packages }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No pkgs
{ pkgs, python27Packages }: | ||
|
||
rec { | ||
libpebble2 = python27Packages.buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using with python27Packages;
at the top
@@ -6484,6 +6484,23 @@ in { | |||
}; | |||
}; | |||
|
|||
peewee = buildPythonPackage rec { | |||
name = "peewee-2.8.8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
pyphen = callPackage ../development/python-modules/pyphen {}; | ||
|
||
pypng = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
@@ -16242,6 +16274,22 @@ in { | |||
}; | |||
}); | |||
|
|||
progressbar2 = buildPythonPackage (rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
@@ -18314,6 +18362,24 @@ in { | |||
}; | |||
in if isPy3k then py3 else py2; | |||
|
|||
pyqrcode = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
@@ -20519,6 +20585,20 @@ EOF | |||
|
|||
magic-wormhole = callPackage ../development/python-modules/magic-wormhole { }; | |||
|
|||
wsgiref = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
Because of inactivity I will close this PR. When you do like to get this in, please make the required changes and open a new PR. |
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.
This is by far my most complex PR to date; there are definitely some rough edges and probably things that could be done better. E.g., I used pypi2nix to generate the dependencies, since the sdk's requirements.txt wants specific versions which are often slightly older than the versions in nixpkgs (though I don't know if that's actually a requirement or just paranoia). Also, the user-facing tooling is written in Python, but a C toolchain is also included, so we need to patch both binaries and python scripts; I ended up doing that "manually" but would love to hear if there's a better way.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)