2022-11-13 04:47:14 +03:00
|
|
|
{ lib, stdenv, buildPackages, fetchFromGitHub, fetchpatch, pkg-config, popt, mandoc }:
|
2014-06-11 03:13:28 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "efivar";
|
2022-10-31 17:04:17 +03:00
|
|
|
version = "38";
|
2014-06-11 03:13:28 +04:00
|
|
|
|
2018-05-23 19:28:14 +03:00
|
|
|
outputs = [ "bin" "out" "dev" "man" ];
|
|
|
|
|
2015-06-19 08:03:00 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhinstaller";
|
|
|
|
repo = "efivar";
|
|
|
|
rev = version;
|
2022-10-31 17:04:17 +03:00
|
|
|
hash = "sha256-A38BKGMK3Vo+85wzgxmzTjzZXtpcY9OpbZaONWnMYNk=";
|
2014-06-11 03:13:28 +04:00
|
|
|
};
|
|
|
|
|
2022-11-13 04:47:14 +03:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rhboot/efivar/commit/15622b7e5761f3dde3f0e42081380b2b41639a48.patch";
|
|
|
|
sha256 = "sha256-SjZXj0hA2eQu2MfBoNjFPtd2DMYadtL7ZqwjKSf2cmI=";
|
|
|
|
})
|
2022-11-11 05:37:02 +03:00
|
|
|
# src/Makefile: build util.c separately for makeguids
|
|
|
|
# util.c needs to be built twice when cross-compiling
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rhboot/efivar/commit/ca48d3964d26f5e3b38d73655f19b1836b16bd2d.patch";
|
|
|
|
hash = "sha256-DkNFIK4i7Eypyf2UeK7qHW36N2FSVRJ2rnOVLriWi5c=";
|
|
|
|
})
|
2022-11-13 04:47:14 +03:00
|
|
|
];
|
|
|
|
|
2022-10-31 17:04:17 +03:00
|
|
|
nativeBuildInputs = [ pkg-config mandoc ];
|
2016-05-15 20:30:39 +03:00
|
|
|
buildInputs = [ popt ];
|
2018-11-28 15:06:23 +03:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2014-06-11 03:13:28 +04:00
|
|
|
|
2017-12-17 11:08:05 +03:00
|
|
|
makeFlags = [
|
|
|
|
"prefix=$(out)"
|
2014-06-11 03:13:28 +04:00
|
|
|
"libdir=$(out)/lib"
|
2018-05-23 19:28:14 +03:00
|
|
|
"bindir=$(bin)/bin"
|
|
|
|
"mandir=$(man)/share/man"
|
|
|
|
"includedir=$(dev)/include"
|
|
|
|
"PCDIR=$(dev)/lib/pkgconfig"
|
2014-06-11 03:13:28 +04:00
|
|
|
];
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2014-06-11 03:13:28 +04:00
|
|
|
description = "Tools and library to manipulate EFI variables";
|
2022-11-15 23:43:10 +03:00
|
|
|
homepage = "https://github.com/rhboot/efivar";
|
2014-06-11 03:13:28 +04:00
|
|
|
platforms = platforms.linux;
|
2022-10-31 17:04:17 +03:00
|
|
|
license = licenses.lgpl21Only;
|
2014-06-11 03:13:28 +04:00
|
|
|
};
|
|
|
|
}
|