summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-17 14:32:31 -0400
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-10-18 11:02:23 +0200
commita599dc127943a79256f05a5bfddf8ef60ab920f2 (patch)
treeabea2c2b400b3aa4e32dbe4d8350274814490ed1 /pkgs
parentf320b8456ba09f09843832dae7d26932218f4492 (diff)
downloadnixpkgs-a599dc127943a79256f05a5bfddf8ef60ab920f2.tar
nixpkgs-a599dc127943a79256f05a5bfddf8ef60ab920f2.tar.gz
nixpkgs-a599dc127943a79256f05a5bfddf8ef60ab920f2.tar.bz2
nixpkgs-a599dc127943a79256f05a5bfddf8ef60ab920f2.tar.lz
nixpkgs-a599dc127943a79256f05a5bfddf8ef60ab920f2.tar.xz
nixpkgs-a599dc127943a79256f05a5bfddf8ef60ab920f2.tar.zst
nixpkgs-a599dc127943a79256f05a5bfddf8ef60ab920f2.zip
pythonPackages.livestreamer: refactor move to python-modules
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/livestreamer/default.nix44
-rw-r--r--pkgs/top-level/python-packages.nix31
2 files changed, 45 insertions, 30 deletions
diff --git a/pkgs/development/python-modules/livestreamer/default.nix b/pkgs/development/python-modules/livestreamer/default.nix
new file mode 100644
index 00000000000..94394c11e04
--- /dev/null
+++ b/pkgs/development/python-modules/livestreamer/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, buildPythonPackage
+, fetchurl
+, pkgs
+, isPyPy
+, pycrypto
+, requests
+, singledispatch
+, futures
+, isPy27
+, isPy33
+}:
+
+buildPythonPackage rec {
+  version = "1.12.2";
+  pname = "livestreamer";
+  disabled = isPyPy;
+
+  src = pkgs.fetchurl {
+    url = "https://github.com/chrippa/livestreamer/archive/v${version}.tar.gz";
+    sha256 = "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd";
+  };
+
+  buildInputs = [ pkgs.makeWrapper ];
+
+  propagatedBuildInputs = [ pkgs.rtmpdump pycrypto requests ]
+    ++ stdenv.lib.optionals isPy27 [ singledispatch futures ]
+    ++ stdenv.lib.optionals isPy33 [ singledispatch ];
+
+  postInstall = ''
+    wrapProgram $out/bin/livestreamer --prefix PATH : ${pkgs.rtmpdump}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://livestreamer.tanuki.se;
+    description = ''
+      Livestreamer is CLI program that extracts streams from various
+      services and pipes them into a video player of choice.
+    '';
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ fuuzetsu ];
+  };
+
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 935b79ab21c..b0def3b7f7a 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2972,36 +2972,7 @@ in {
 
   langcodes = callPackage ../development/python-modules/langcodes { };
 
-  livestreamer = buildPythonPackage rec {
-    version = "1.12.2";
-    name = "livestreamer-${version}";
-    disabled = isPyPy;
-
-    src = pkgs.fetchurl {
-      url = "https://github.com/chrippa/livestreamer/archive/v${version}.tar.gz";
-      sha256 = "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd";
-    };
-
-    buildInputs = [ pkgs.makeWrapper ];
-
-    propagatedBuildInputs = with self; [ pkgs.rtmpdump pycrypto requests ]
-      ++ optionals isPy27 [ singledispatch futures ]
-      ++ optionals isPy33 [ singledispatch ];
-
-    postInstall = ''
-      wrapProgram $out/bin/livestreamer --prefix PATH : ${pkgs.rtmpdump}/bin
-    '';
-
-    meta = {
-      homepage = http://livestreamer.tanuki.se;
-      description = ''
-        Livestreamer is CLI program that extracts streams from various
-        services and pipes them into a video player of choice.
-      '';
-      license = licenses.bsd2;
-      maintainers = with maintainers; [ fuuzetsu ];
-    };
-  };
+  livestreamer = callPackage ../development/python-modules/livestreamer { };
 
   livestreamer-curses = buildPythonPackage rec {
     version = "1.5.2";