Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ce283f055bd6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e99a40906518
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 13, 2020

  1. Copy the full SHA
    17f2cf9 View commit details

Commits on Apr 17, 2020

  1. Merge pull request #85190 from Ericson2314/fwupdate

    fwupdate: Clean up -I flags
    Ericson2314 authored Apr 17, 2020
    Copy the full SHA
    e99a409 View commit details
Showing with 12 additions and 7 deletions.
  1. +12 −7 pkgs/os-specific/linux/firmware/fwupdate/default.nix
19 changes: 12 additions & 7 deletions pkgs/os-specific/linux/firmware/fwupdate/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{ efivar, fetchurl, gettext, gnu-efi, libsmbios, pkgconfig, popt, stdenv }:

let
version = "12";

arch =
if stdenv.hostPlatform.isx86_32
then "ia32"
else stdenv.hostPlatform.parsed.cpu.name;

in stdenv.mkDerivation {
pname = "fwupdate";
inherit version;
@@ -13,7 +20,11 @@ in stdenv.mkDerivation {
./do-not-create-sharedstatedir.patch
];

NIX_CFLAGS_COMPILE = "-I${gnu-efi}/include/efi -Wno-error=address-of-packed-member";
NIX_CFLAGS_COMPILE = builtins.toString [
"-I${gnu-efi}/include/efi"
"-I${gnu-efi}/include/efi/${arch}"
"-Wno-error=address-of-packed-member"
];

# TODO: Just apply the disable to the efi subdir
hardeningDisable = [ "stackprotector" ];
@@ -41,12 +52,6 @@ in stdenv.mkDerivation {
efivar
];

# TODO: fix wrt cross-compilation
preConfigure = ''
arch=$(cc -dumpmachine | cut -f1 -d- | sed 's,i[3456789]86,ia32,' )
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gnu-efi}/include/efi/$arch"
'';

postInstall = ''
rm -rf $out/src
rm -rf $out/lib/debug