nixpkgs/pkgs/os-specific/linux/firmware/fwupd/default.nix

39 lines
1.5 KiB
Nix
Raw Normal View History

2017-02-27 13:38:49 +00:00
{ stdenv, fetchurl, gtk_doc, pkgconfig, gobjectIntrospection, intltool
, libgudev, polkit, gcab, appstream-glib, gusb, sqlite, libarchive
, libsoup, docbook2x, gpgme, libxslt, libelf, libsmbios, efivar
2017-02-27 15:07:57 +00:00
, fwupdate, libgpgerror, libyaml, valgrind
2017-02-27 13:38:49 +00:00
}:
2017-02-27 15:07:57 +00:00
let version = "0.8.1"; in
2017-02-27 13:38:49 +00:00
stdenv.mkDerivation
{ name = "fwupd-${version}";
src = fetchurl
{ url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
2017-02-27 15:07:57 +00:00
sha256 = "0sq0aay5d6b0vgr7j7y4i58flbxmcbpwyw6vfwrd29fim21j6ac8";
2017-02-27 13:38:49 +00:00
};
buildInputs =
[ gtk_doc pkgconfig gobjectIntrospection intltool libgudev
polkit gcab appstream-glib gusb sqlite libarchive libsoup
2017-02-27 15:07:57 +00:00
docbook2x libxslt libelf libsmbios fwupdate libyaml valgrind
2017-02-27 13:38:49 +00:00
];
2017-02-27 20:28:43 +00:00
patches = [ ./localstatedir-check-perms.patch ];
postPatch = ''
2017-02-27 13:38:49 +00:00
sed -i -e \
's|/usr/bin/gpgme-config|${gpgme.dev}/bin/gpgme-config|' -e \
's|/usr/bin/gpg-error-config|${libgpgerror.dev}/bin/gpg-error-config|' \
./configure
'';
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${efivar}/include/efivar"
'';
configureFlags =
2017-02-27 13:45:14 +00:00
[ "--with-systemdunitdir=$(out)/lib/systemd/system"
"--with-udevrulesdir=$(out)/lib/udev/rules.d"
2017-02-27 20:28:43 +00:00
"--localstatedir=/var"
2017-02-27 13:38:49 +00:00
];
enableParallelBuilding = true;
meta =
{ license = [ stdenv.lib.licenses.gpl2 ];
platforms = stdenv.lib.platforms.linux;
};
}