2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2018-10-26 04:15:22 +02:00
|
|
|
, python
|
|
|
|
, pkgs
|
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pyblock";
|
2018-10-26 04:15:22 +02:00
|
|
|
version = "0.53";
|
|
|
|
md5_path = "f6d33a8362dee358517d0a9e2ebdd044";
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
src = pkgs.fetchurl {
|
2018-11-24 23:53:27 +01:00
|
|
|
url = "https://src.fedoraproject.org/repo/pkgs/python-pyblock/"
|
2019-08-15 14:41:18 +02:00
|
|
|
+ "${pname}-${version}.tar.bz2/${md5_path}/${pname}-${version}.tar.bz2";
|
2018-10-26 04:15:22 +02:00
|
|
|
sha256 = "f6cef88969300a6564498557eeea1d8da58acceae238077852ff261a2cb1d815";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's|/usr/include/python|${python}/include/python|' \
|
|
|
|
-e 's/-Werror *//' -e 's|/usr/|'"$out"'/|' Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ python pkgs.lvm2 pkgs.dmraid ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"USESELINUX=0"
|
|
|
|
"SITELIB=$(out)/${python.sitePackages}"
|
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.centos.org/docs/5/html/5.4/Technical_Notes/python-pyblock.html";
|
2018-10-26 04:15:22 +02:00
|
|
|
description = "Interface for working with block devices";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
broken = isPy3k; # doesn't build on python 3, 2018-04-11
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|