2021-01-14 15:36:34 +00:00
|
|
|
{ lib, stdenv, fetchurl, python, lvm2, dmraid }:
|
2014-10-22 07:15:30 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "pyblock";
|
2014-10-22 07:15:30 +01:00
|
|
|
version = "0.53";
|
2016-03-11 21:42:37 +00:00
|
|
|
md5_path = "f6d33a8362dee358517d0a9e2ebdd044";
|
2014-10-22 07:15:30 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
src = fetchurl {
|
2018-11-24 22:53:27 +00:00
|
|
|
url = "https://src.fedoraproject.org/repo/pkgs/python-pyblock/"
|
2019-08-15 13:41:18 +01:00
|
|
|
+ "${pname}-${version}.tar.bz2/${md5_path}/${pname}-${version}.tar.bz2";
|
2016-03-11 21:42:37 +00:00
|
|
|
sha256 = "f6cef88969300a6564498557eeea1d8da58acceae238077852ff261a2cb1d815";
|
2014-10-22 07:15:30 +01:00
|
|
|
};
|
|
|
|
|
2020-05-13 21:37:22 +01:00
|
|
|
patches = [
|
|
|
|
# Fix build with glibc >= 2.28
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/86403
|
|
|
|
./pyblock-sysmacros.h.patch
|
|
|
|
];
|
|
|
|
|
2014-10-22 07:15:30 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's|/usr/include/python|${python}/include/python|' \
|
|
|
|
-e 's/-Werror *//' -e 's|/usr/|'"$out"'/|' Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ python lvm2 dmraid ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"USESELINUX=0"
|
|
|
|
"SITELIB=$(out)/lib/${python.libPrefix}/site-packages"
|
|
|
|
];
|
|
|
|
|
2021-01-14 15:36:34 +00:00
|
|
|
meta = with lib; {
|
2014-10-22 07:15:30 +01:00
|
|
|
description = "Interface for working with block devices";
|
2021-01-14 15:36:34 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2014-10-22 07:15:30 +01:00
|
|
|
};
|
|
|
|
}
|