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

python: gatt: new package #99669

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

python: gatt: new package #99669

wants to merge 1 commit into from

Conversation

@jktjkt
Copy link

@jktjkt jktjkt commented Oct 5, 2020

For some reason the upstream git repo is missing the tag for the latest
release that is available on pypi. However, the soucre tarball is
available for downlaod from pypi, so let's use that one.

Motivation for this change

I wanted to use a simple Python app for Bluetooth control of my IKEA Idasen sit-stand desk on my new NixOS installation. That application uses some Python modules that require C extensions (GLib introspection, dbus,...), and it was painful to install that on NixOS via pip. The only package that was not in NixOS already is this one, so here we go.

Things done

After configuring the app, I can now run it like this: nix-shell -p 'python3.withPackages (ps: with ps; [ gatt-python pyaml ])' --run 'python main.py --sit', which is awesome.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
    • sorry, just starting with nix on by default
  • 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)
    • n/a I believe
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
    • there are none
  • Tested execution of all binary files (usually in ./result/bin/)
    • It isn't a binary, instead it's a Python script, but nix-shell -p 'python3.withPackages (ps: with ps; [ gatt-python ])' --run 'gattctl --discover' works
  • Determined the impact on package closure size (by running nix path-info -S before and after)
    • the dir contents looks sane
  • Ensured that relevant documentation is up to date
    • there's none, it's a python library package
  • Fits CONTRIBUTING.md.
  • I'm not adding myself as a maintainer because I don't know how that works.
For some reason the upstream git repo is missing the tag for the latest
release that is available on pypi. However, the soucre tarball *is*
available for downlaod from pypi, so let's use that one.
@jktjkt jktjkt requested review from FRidh and jonringer as code owners Oct 5, 2020
disabled = pythonOlder "3.4";

# there's no 0.2.7 tag on GitHub, which is what fetchPypi would do, so fetch manually
src = fetchTarball {
Copy link
Member

@SuperSandro2000 SuperSandro2000 Nov 27, 2020

Please use fetchPypi and do not hardcode the version number.


meta = with stdenv.lib; {
description = "Bluetooth GATT SDK for Python";
license = licenses.mit;
Copy link
Member

@SuperSandro2000 SuperSandro2000 Nov 27, 2020

Please add homepage and yourself as a maintainer.

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Nov 27, 2020

Also change the commit message to python3Packages.gatt: ini at x.x.x. Replace x.x.x with the version number.

@stale
Copy link

@stale stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants