nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{stdenv, fetchurl, pkgconfig }:
2
3stdenv.mkDerivation rec {
4 name = "liboil-0.3.17";
5
6 src = fetchurl {
7 url = "${meta.homepage}/download/${name}.tar.gz";
8 sha256 = "0sgwic99hxlb1av8cm0albzh8myb7r3lpcwxfm606l0bkc3h4pqh";
9 };
10
11 patches = [ ./x86_64-cpuid.patch ];
12
13 outputs = [ "out" "dev" "devdoc" ];
14 outputBin = "dev"; # oil-bugreport
15
16 nativeBuildInputs = [ pkgconfig ];
17
18 # fix "argb_paint_i386.c:53:Incorrect register `%rax' used with `l' suffix"
19 # errors
20 configureFlags = stdenv.lib.optional stdenv.isDarwin "--build=x86_64";
21
22 # fixes a cast in inline asm: easier than patching
23 buildFlags = stdenv.lib.optional stdenv.isDarwin "CFLAGS=-fheinous-gnu-extensions";
24
25 meta = with stdenv.lib; {
26 description = "A library of simple functions that are optimized for various CPUs";
27 homepage = http://liboil.freedesktop.org;
28 license = licenses.bsd2;
29 maintainers = with maintainers; [ lovek323 ];
30 platforms = platforms.all;
31 };
32}