linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / subdownloader / default.nix
blob2b536fa0e62867471352788936c18712ba963b76
1 { lib
2 , buildPythonPackage
3 , fetchurl
4 , mmpython
5 , pyqt4
6 }:
8 buildPythonPackage rec {
9   version = "2.0.18";
10   pname = "subdownloader";
12   src = fetchurl {
13     url = "https://launchpad.net/subdownloader/trunk/2.0.18/+download/subdownloader_2.0.18.orig.tar.gz";
14     sha256 = "0manlfdpb585niw23ibb8n21mindd1bazp0pnxvmdjrp2mnw97ig";
15   };
17   propagatedBuildInputs = [ mmpython pyqt4 ];
19   setup = ''
20     import os
21     import sys
23     try:
24         if os.environ.get("NO_SETUPTOOLS"):
25             raise ImportError()
26         from setuptools import setup, Extension
27         SETUPTOOLS = True
28     except ImportError:
29         SETUPTOOLS = False
30         # Use distutils.core as a fallback.
31         # We won t be able to build the Wheel file on Windows.
32         from distutils.core import setup, Extension
34     with open("README") as fp:
35         long_description = fp.read()
37     requirements = [ ]
39     install_options = {
40         "name": "subdownloader",
41         "version": "2.0.18",
42         "description": "Tool for automatic download/upload subtitles for videofiles using fast hashing",
43         "long_description": long_description,
44         "url": "http://www.subdownloader.net",
46         "scripts": ["run.py"],
47         "packages": ["cli", "FileManagement", "gui", "languages", "modules"],
49     }
50     if SETUPTOOLS:
51         install_options["install_requires"] = requirements
53     setup(**install_options)
54   '';
56   postUnpack = ''
57     echo '${setup}' > $sourceRoot/setup.py
58   '';
60   meta = with lib; {
61     description = "Tool for automatic download/upload subtitles for videofiles using fast hashing";
62     homepage = "https://www.subdownloader.net";
63     license = licenses.gpl3;
64   };