nixpkgs/pkgs/development/libraries/liboil/default.nix
Rick van Schijndel 9833d56c24 treewide: mark packages broken that never built on PLATFORM
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken
Tool is still WIP but this is one of the first results.

I manually audited the results and removed some results that were not valid.

Note that some of these packages maybe should have more constrained platforms set
instead of broken set, but I think not being perfectly correct is better than
just keep trying to build all these things and never succeeding.

Some observations:

- Some darwin builds require XCode tools
- aarch64-linux builds sometimes suffer from using gcc9
  - gcc9 is getting older and misses some new libraries/features
- Sometimes tools try to do system detection or expect some explicit settings for
  platforms that are not x86_64-linux
2022-12-13 21:40:12 +01:00

36 lines
1.1 KiB
Nix

{lib, stdenv, fetchurl, pkg-config }:
stdenv.mkDerivation rec {
pname = "liboil";
version = "0.3.17";
src = fetchurl {
url = "${meta.homepage}/download/liboil-${version}.tar.gz";
sha256 = "0sgwic99hxlb1av8cm0albzh8myb7r3lpcwxfm606l0bkc3h4pqh";
};
patches = [ ./x86_64-cpuid.patch ];
outputs = [ "out" "dev" "devdoc" ];
outputBin = "dev"; # oil-bugreport
nativeBuildInputs = [ pkg-config ];
# fix "argb_paint_i386.c:53:Incorrect register `%rax' used with `l' suffix"
# errors
configureFlags = lib.optional stdenv.isDarwin "--build=x86_64";
# fixes a cast in inline asm: easier than patching
buildFlags = lib.optional stdenv.isDarwin "CFLAGS=-fheinous-gnu-extensions";
meta = with lib; {
description = "A library of simple functions that are optimized for various CPUs";
homepage = "https://liboil.freedesktop.org";
license = licenses.bsd2;
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.all;
# never built on aarch64-darwin since first introduction in nixpkgs
broken = stdenv.isDarwin && stdenv.isAarch64;
};
}