Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leftover -I${efivar}/include/efivar CFLAGS #35011

Closed
neilmayhew opened this issue Feb 15, 2018 · 5 comments
Closed

Leftover -I${efivar}/include/efivar CFLAGS #35011

neilmayhew opened this issue Feb 15, 2018 · 5 comments
Labels
3.skill: trivial This is trivial to complete (typically find-and-replace) 9.needs: clean-up

Comments

@neilmayhew
Copy link
Member

Issue description

efivar.pc uses a prefix of /usr/include

Steps to reproduce

nix-shell '<nixpkgs>' -A efibootmgr --command 'pkg-config --cflags efivar'

It doesn't have to be efibootmgr: any package that uses efivar will do.

I'm trying to package a utility (mokutil) that uses efivar via pkg-config and it can't find <efivar.h> because pkg-config --cflags efivar returns -I/usr/include/efivar.

efibootmgr builds because its derivation doesn't rely on using pkg-config. It uses NIX_CFLAGS_COMPILE = "-I${efivar}/include/efivar";.

I've added this attribute to my derivation for mokutil and it now builds, but it shouldn't be necessary to add this.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.9.80, NixOS, 17.09.3008.c831224528c (Hummingbird)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 1.11.16
  • channels(user): ""
  • channels(root): "nixos-17.09.3008.c831224528c, unstable-18.03pre126508.8ecadc12502"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
@jtojnar
Copy link
Member

jtojnar commented Feb 15, 2018

This was fixed in #32751.

@jtojnar
Copy link
Member

jtojnar commented Feb 15, 2018

We should probably remove the hacks now:

$ rg include/efivar
pkgs/tools/system/efibootmgr/default.nix
18:  NIX_CFLAGS_COMPILE = "-I${efivar}/include/efivar";

pkgs/os-specific/linux/firmware/fwupdate/default.nix
31:        export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gnu-efi}/include/efi -I${efivar}/include/efivar -I${gnu-efi}/include/efi/$arch"

@neilmayhew
Copy link
Member Author

My apologies. I tested this with a checkout of master that wasn't up to date.

@neilmayhew
Copy link
Member Author

Actually, I should leave this open because of the need for cleanup that was mentioned.

@neilmayhew neilmayhew reopened this Feb 15, 2018
@jtojnar jtojnar added 3.skill: trivial This is trivial to complete (typically find-and-replace) 9.needs: clean-up labels Feb 15, 2018
@jtojnar jtojnar changed the title efivar: incorrect pkg-config definition Leftover -I${efivar}/include/efivar CFLAGS Feb 16, 2018
@jtojnar
Copy link
Member

jtojnar commented Feb 28, 2018

Fixed in #35065

@jtojnar jtojnar closed this as completed Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.skill: trivial This is trivial to complete (typically find-and-replace) 9.needs: clean-up
Projects
None yet
Development

No branches or pull requests

2 participants