Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchurl 4, mmpython 5, pyqt4 6}: 7 8buildPythonPackage rec { 9 version = "2.0.18"; 10 pname = "subdownloader"; 11 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 }; 16 17 propagatedBuildInputs = [ mmpython pyqt4 ]; 18 19 setup = '' 20 import os 21 import sys 22 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 33 34 with open("README") as fp: 35 long_description = fp.read() 36 37 requirements = [ ] 38 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", 45 46 "scripts": ["run.py"], 47 "packages": ["cli", "FileManagement", "gui", "languages", "modules"], 48 49 } 50 if SETUPTOOLS: 51 install_options["install_requires"] = requirements 52 53 setup(**install_options) 54 ''; 55 56 postUnpack = '' 57 echo '${setup}' > $sourceRoot/setup.py 58 ''; 59 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 }; 65 66}