From b1549317ac3a95768f7f676ef01f87a8ead4fbda Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 10:21:31 -0400 Subject: [PATCH] pythonPackages.nx-python: refactor move to python-modules --- .../python-modules/nxt-python/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 27 +------------- 2 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 pkgs/development/python-modules/nxt-python/default.nix diff --git a/pkgs/development/python-modules/nxt-python/default.nix b/pkgs/development/python-modules/nxt-python/default.nix new file mode 100644 index 00000000000..c9b523a266b --- /dev/null +++ b/pkgs/development/python-modules/nxt-python/default.nix @@ -0,0 +1,36 @@ +{ stdenv +, buildPythonPackage +, fetchgit +, isPy3k +, pyusb +, pybluez +, pyfantom +, git +}: + +buildPythonPackage rec { + version = "unstable-20160819"; + pname = "nxt-python"; + disabled = isPy3k; + + src = fetchgit { + url = "http://github.com/Eelviny/nxt-python"; + rev = "479e20b7491b28567035f4cee294c4a2af629297"; + sha256 = "0mcsajhgm2wy4iy2lhmyi3xibgmbixbchanzmlhsxk6qyjccn9r9"; + branchName= "pyusb"; + }; + + propagatedBuildInputs = [ pyusb pybluez pyfantom git ]; + + # Tests fail on Mac dependency + doCheck = false; + + meta = with stdenv.lib; { + description = "Python driver/interface for Lego Mindstorms NXT robot"; + homepage = https://github.com/Eelviny/nxt-python; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ leenaars ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9fdd828f47f..a7930408fec 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1996,32 +1996,7 @@ in { Nikola = callPackage ../development/python-modules/Nikola { }; - nxt-python = buildPythonPackage rec { - version = "unstable-20160819"; - pname = "nxt-python"; - name = "${pname}-${version}"; - - propagatedBuildInputs = with self; [ pyusb pybluez pyfantom pkgs.git ]; - disabled = isPy3k; - - src = pkgs.fetchgit { - url = "http://github.com/Eelviny/nxt-python"; - rev = "479e20b7491b28567035f4cee294c4a2af629297"; - sha256 = "0mcsajhgm2wy4iy2lhmyi3xibgmbixbchanzmlhsxk6qyjccn9r9"; - branchName= "pyusb"; - }; - - # Tests fail on Mac dependency - doCheck = false; - - meta = { - description = "Python driver/interface for Lego Mindstorms NXT robot"; - homepage = https://github.com/Eelviny/nxt-python; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ leenaars ]; - }; - }; + nxt-python = callPackage ../development/python-modules/nxt-python { }; odfpy = callPackage ../development/python-modules/odfpy { };