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