mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
950e2a7efd
For some reason having a file called `VERSION` in the package root directory appears to be interfering with the build process: ``` Compiling Fl_cocoa.mm... In file included from Fl_cocoa.mm:39: In file included from ../FL/x.H:32: In file included from ../FL/mac.H:50: [...] In file included from /nix/store/xhvrrnz8n6dxizgig46ijh59m7mfy261-libcxx-11.1.0-dev/include/c++/v1/cstddef:37: ../version:1:1: error: expected unqualified-id 1.4.0 ^ ``` By removing the file, the build succeeds.
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, pkg-config, xlibsWrapper, xorgproto, libXi
|
|
, freeglut, libGLU, libGL, libjpeg, zlib, libXft, libpng
|
|
, libtiff, freetype, Cocoa, AGL, GLUT
|
|
}:
|
|
|
|
let
|
|
version = "1.4.x-r13121";
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "fltk";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "https://www.fltk.org/pub/fltk/snapshots/fltk-${version}.tar.gz";
|
|
sha256 = "1v8wxvxcbk99i82x2v5fpqg5vj8n7g8a38g30ry7nzcjn5sf3r63";
|
|
};
|
|
|
|
patches = lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ libGLU libGL libjpeg zlib libpng libXft ]
|
|
++ lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];
|
|
|
|
propagatedBuildInputs = [ xorgproto ]
|
|
++ (if stdenv.isDarwin
|
|
then [ freetype libtiff ]
|
|
else [ xlibsWrapper libXi freeglut ]);
|
|
|
|
configureFlags = [
|
|
"--enable-gl"
|
|
"--enable-largefile"
|
|
"--enable-shared"
|
|
"--enable-threads"
|
|
"--enable-xft"
|
|
];
|
|
|
|
preConfigure = ''
|
|
make clean
|
|
rm VERSION
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "A C++ cross-platform lightweight GUI library";
|
|
homepage = "https://www.fltk.org";
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
license = licenses.gpl2;
|
|
};
|
|
|
|
}
|