nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

pythonPackages.pyparted: refactor move to python-modules

authored by

Chris Ostrouchov and committed by
Frederik Rietdijk
7069d5eb d7e98c8a

+50 -42
+49
pkgs/development/python-modules/pyparted/default.nix
··· 1 + { stdenv 2 + , buildPythonPackage 3 + , fetchurl 4 + , isPyPy 5 + , pkgs 6 + , python 7 + }: 8 + 9 + buildPythonPackage rec { 10 + name = "pyparted-${version}"; 11 + version = "3.10.7"; 12 + disabled = isPyPy; 13 + 14 + src = pkgs.fetchurl { 15 + url = "https://github.com/rhinstaller/pyparted/archive/v${version}.tar.gz"; 16 + sha256 = "0c9ljrdggwawd8wdzqqqzrna9prrlpj6xs59b0vkxzip0jkf652r"; 17 + }; 18 + 19 + postPatch = '' 20 + sed -i -e 's|mke2fs|${pkgs.e2fsprogs}/bin/mke2fs|' tests/baseclass.py 21 + sed -i -e ' 22 + s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path| 23 + ' tests/test__ped_ped.py 24 + '' + stdenv.lib.optionalString stdenv.isi686 '' 25 + # remove some integers in this test case which overflow on 32bit systems 26 + sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \ 27 + tests/test__ped_ped.py 28 + ''; 29 + 30 + preConfigure = '' 31 + PATH="${pkgs.parted}/sbin:$PATH" 32 + ''; 33 + 34 + nativeBuildInputs = [ pkgs.pkgconfig ]; 35 + propagatedBuildInputs = [ pkgs.parted ]; 36 + 37 + checkPhase = '' 38 + patchShebangs Makefile 39 + make test PYTHON=${python.executable} 40 + ''; 41 + 42 + meta = with stdenv.lib; { 43 + homepage = "https://fedorahosted.org/pyparted/"; 44 + description = "Python interface for libparted"; 45 + license = licenses.gpl2Plus; 46 + platforms = platforms.linux; 47 + }; 48 + 49 + }
+1 -42
pkgs/top-level/python-packages.nix
··· 3386 3386 3387 3387 pyparsing = callPackage ../development/python-modules/pyparsing { }; 3388 3388 3389 - pyparted = buildPythonPackage rec { 3390 - name = "pyparted-${version}"; 3391 - version = "3.10.7"; 3392 - disabled = isPyPy; 3393 - 3394 - src = pkgs.fetchurl { 3395 - url = "https://github.com/rhinstaller/pyparted/archive/v${version}.tar.gz"; 3396 - sha256 = "0c9ljrdggwawd8wdzqqqzrna9prrlpj6xs59b0vkxzip0jkf652r"; 3397 - }; 3398 - 3399 - postPatch = '' 3400 - sed -i -e 's|mke2fs|${pkgs.e2fsprogs}/bin/mke2fs|' tests/baseclass.py 3401 - sed -i -e ' 3402 - s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path| 3403 - ' tests/test__ped_ped.py 3404 - '' + optionalString stdenv.isi686 '' 3405 - # remove some integers in this test case which overflow on 32bit systems 3406 - sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \ 3407 - tests/test__ped_ped.py 3408 - ''; 3409 - 3410 - preConfigure = '' 3411 - PATH="${pkgs.parted}/sbin:$PATH" 3412 - ''; 3413 - 3414 - nativeBuildInputs = [ pkgs.pkgconfig ]; 3415 - 3416 - propagatedBuildInputs = with self; [ pkgs.parted ]; 3417 - 3418 - checkPhase = '' 3419 - patchShebangs Makefile 3420 - make test PYTHON=${python.executable} 3421 - ''; 3422 - 3423 - meta = { 3424 - homepage = "https://fedorahosted.org/pyparted/"; 3425 - description = "Python interface for libparted"; 3426 - license = licenses.gpl2Plus; 3427 - platforms = platforms.linux; 3428 - }; 3429 - }; 3430 - 3389 + pyparted = callPackage ../development/python-modules/pyparted { }; 3431 3390 3432 3391 pyptlib = buildPythonPackage (rec { 3433 3392 name = "pyptlib-${version}";