nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 53 lines 1.6 kB view raw
1{ lib, stdenv, buildPackages, fetchFromGitHub, fetchpatch, pkg-config, popt, mandoc }: 2 3stdenv.mkDerivation rec { 4 pname = "efivar"; 5 version = "38"; 6 7 outputs = [ "bin" "out" "dev" "man" ]; 8 9 src = fetchFromGitHub { 10 owner = "rhinstaller"; 11 repo = "efivar"; 12 rev = version; 13 hash = "sha256-A38BKGMK3Vo+85wzgxmzTjzZXtpcY9OpbZaONWnMYNk="; 14 }; 15 16 patches = [ 17 (fetchpatch { 18 url = "https://github.com/rhboot/efivar/commit/15622b7e5761f3dde3f0e42081380b2b41639a48.patch"; 19 sha256 = "sha256-SjZXj0hA2eQu2MfBoNjFPtd2DMYadtL7ZqwjKSf2cmI="; 20 }) 21 # src/Makefile: build util.c separately for makeguids 22 # util.c needs to be built twice when cross-compiling 23 (fetchpatch { 24 url = "https://github.com/rhboot/efivar/commit/ca48d3964d26f5e3b38d73655f19b1836b16bd2d.patch"; 25 hash = "sha256-DkNFIK4i7Eypyf2UeK7qHW36N2FSVRJ2rnOVLriWi5c="; 26 }) 27 (fetchpatch { 28 name = "musl-backport.patch"; 29 url = "https://github.com/rhboot/efivar/commit/cece3ffd5be2f8641eb694513f2b73e5eb97ffd3.patch"; 30 sha256 = "7/E0gboU0A45/BY6jGPLuvds6qKtNjzpgKgdNTaVaZQ="; 31 }) 32 ]; 33 34 nativeBuildInputs = [ pkg-config mandoc ]; 35 buildInputs = [ popt ]; 36 depsBuildBuild = [ buildPackages.stdenv.cc ]; 37 38 makeFlags = [ 39 "prefix=$(out)" 40 "libdir=$(out)/lib" 41 "bindir=$(bin)/bin" 42 "mandir=$(man)/share/man" 43 "includedir=$(dev)/include" 44 "PCDIR=$(dev)/lib/pkgconfig" 45 ]; 46 47 meta = with lib; { 48 description = "Tools and library to manipulate EFI variables"; 49 homepage = "https://github.com/rhboot/efivar"; 50 platforms = platforms.linux; 51 license = licenses.lgpl21Only; 52 }; 53}