From fa7d1d8bfb3bb67ae0a8a14bcc3eb9c7aa84f761 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 29 Oct 2018 17:41:25 -0400 Subject: [PATCH] pythonPackages.smugline: refactor move to python-modules --- .../python-modules/smugline/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 27 +----------- 2 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 pkgs/development/python-modules/smugline/default.nix diff --git a/pkgs/development/python-modules/smugline/default.nix b/pkgs/development/python-modules/smugline/default.nix new file mode 100644 index 000000000000..ac625cf1fa04 --- /dev/null +++ b/pkgs/development/python-modules/smugline/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, fetchFromGitHub +, docopt +, requests +, smugpy +, python +, pkgs +}: + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "smugline"; + version = "20160106"; + + src = fetchFromGitHub { + owner = "gingerlime"; + repo = pname; + rev = "134554c574c2d282112ba60165a8c5ffe0f16fd4"; + sha256 = "00n012ijkdrx8wsl8x3ghdcxcdp29s4kwr3yxvlyj79g5yhfvaj6"; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + buildInputs = [ python pkgs.makeWrapper ]; + propagatedBuildInputs = [ docopt requests smugpy ]; + + installPhase = '' + mkdir -p $out/bin $out/libexec + cp smugline.py $out/libexec + makeWrapper ${python.interpreter} $out/bin/smugline \ + --add-flags "$out/libexec/smugline.py" \ + --prefix PYTHONPATH : "$PYTHONPATH" + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/gingerlime/smugline; + description = "A simple command line tool for smugmug "; + license = licenses.mit; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6eb00ad092dd..d7d6c8313f0b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4639,32 +4639,7 @@ in { smugpy = callPackage ../development/python-modules/smugpy { }; - smugline = stdenv.mkDerivation rec { - name = pname + "-" + version; - pname = "smugline"; - version = "20160106"; - - src = pkgs.fetchFromGitHub { - owner = "gingerlime"; - repo = pname; - rev = "134554c574c2d282112ba60165a8c5ffe0f16fd4"; - sha256 = "00n012ijkdrx8wsl8x3ghdcxcdp29s4kwr3yxvlyj79g5yhfvaj6"; - }; - - phases = [ "unpackPhase" "installPhase" ]; - - buildInputs = [ python pkgs.makeWrapper ]; - - propagatedBuildInputs = with self; [ docopt requests smugpy ]; - - installPhase = '' - mkdir -p $out/bin $out/libexec - cp smugline.py $out/libexec - makeWrapper ${python.interpreter} $out/bin/smugline \ - --add-flags "$out/libexec/smugline.py" \ - --prefix PYTHONPATH : "$PYTHONPATH" - ''; - }; + smugline = callPackage ../development/python-modules/smugline { }; txaio = callPackage ../development/python-modules/txaio { };