2016-05-15 18:39:18 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, popt }:
|
2014-06-11 00:13:28 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "efivar-${version}";
|
2016-05-03 02:50:13 +01:00
|
|
|
version = "0.23";
|
2014-06-11 00:13:28 +01:00
|
|
|
|
2015-06-19 06:03:00 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhinstaller";
|
|
|
|
repo = "efivar";
|
|
|
|
rev = version;
|
2016-05-03 02:50:13 +01:00
|
|
|
sha256 = "1fdqi053v335pjwj1i3yi9f1kasdzg3agfcp36bxsbhqjp4imlid";
|
2014-06-11 00:13:28 +01:00
|
|
|
};
|
|
|
|
|
2016-05-15 18:39:18 +01:00
|
|
|
patches = [
|
|
|
|
# fix problem with linux 4.4 headers https://github.com/rhinstaller/efivar/issues/37
|
|
|
|
(fetchurl {
|
|
|
|
url = https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-libs/efivar/files/0.21-nvme_ioctl.h.patch;
|
|
|
|
sha256 = "1rjjpd4s1xdsnhq974j5wnwav8pfvd0jbvhk8a9wc2w029fvj7zp";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-05-03 02:50:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-05-15 18:30:39 +01:00
|
|
|
buildInputs = [ popt ];
|
2014-06-11 00:13:28 +01:00
|
|
|
|
2015-07-17 04:06:50 +01:00
|
|
|
postPatch = ''
|
2016-05-03 02:50:13 +01:00
|
|
|
substituteInPlace src/Makefile --replace "-static" ""
|
2015-07-17 04:06:50 +01:00
|
|
|
'';
|
2015-06-19 06:34:29 +01:00
|
|
|
|
2014-06-11 00:13:28 +01:00
|
|
|
installFlags = [
|
|
|
|
"libdir=$(out)/lib"
|
|
|
|
"mandir=$(out)/share/man"
|
|
|
|
"includedir=$(out)/include"
|
|
|
|
"bindir=$(out)/bin"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2016-05-03 02:50:13 +01:00
|
|
|
inherit (src.meta) homepage;
|
2014-06-11 00:13:28 +01:00
|
|
|
description = "Tools and library to manipulate EFI variables";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
};
|
|
|
|
}
|