2021-01-21 09:00:13 -08:00
|
|
|
{lib, stdenv, fetchurl, pkg-config }:
|
2008-10-26 01:40:11 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-01-31 13:16:31 -08:00
|
|
|
name = "liboil-0.3.17";
|
2008-10-26 01:40:11 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${meta.homepage}/download/${name}.tar.gz";
|
2013-01-31 13:16:31 -08:00
|
|
|
sha256 = "0sgwic99hxlb1av8cm0albzh8myb7r3lpcwxfm606l0bkc3h4pqh";
|
2008-10-26 01:40:11 -07:00
|
|
|
};
|
|
|
|
|
2013-01-31 13:16:31 -08:00
|
|
|
patches = [ ./x86_64-cpuid.patch ];
|
2008-10-26 01:40:11 -07:00
|
|
|
|
2016-09-01 02:07:23 -07:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2015-10-06 08:03:27 -07:00
|
|
|
outputBin = "dev"; # oil-bugreport
|
|
|
|
|
2021-01-18 22:50:56 -08:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2015-10-06 08:03:27 -07:00
|
|
|
|
2013-07-03 02:52:46 -07:00
|
|
|
# fix "argb_paint_i386.c:53:Incorrect register `%rax' used with `l' suffix"
|
|
|
|
# errors
|
2021-01-21 09:00:13 -08:00
|
|
|
configureFlags = lib.optional stdenv.isDarwin "--build=x86_64";
|
2013-07-03 02:52:46 -07:00
|
|
|
|
2015-02-28 06:42:39 -08:00
|
|
|
# fixes a cast in inline asm: easier than patching
|
2021-01-21 09:00:13 -08:00
|
|
|
buildFlags = lib.optional stdenv.isDarwin "CFLAGS=-fheinous-gnu-extensions";
|
2015-02-28 06:42:39 -08:00
|
|
|
|
2021-01-21 09:00:13 -08:00
|
|
|
meta = with lib; {
|
2009-03-03 05:27:40 -08:00
|
|
|
description = "A library of simple functions that are optimized for various CPUs";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://liboil.freedesktop.org";
|
2013-07-04 09:13:20 -07:00
|
|
|
license = licenses.bsd2;
|
2013-07-03 02:52:46 -07:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.all;
|
2008-10-26 01:40:11 -07:00
|
|
|
};
|
|
|
|
}
|