Skip to content
Permalink
Browse files

fltk: build with cmake

  • Loading branch information
petabyteboy committed Feb 7, 2021
1 parent 7467ba0 commit bf56237d43980bd81d068428c430b4e0ef5b55ff

This file was deleted.

@@ -1,24 +1,14 @@
{ lib, stdenv, fetchurl, pkg-config, xlibsWrapper, xorgproto, libXi
{ lib, stdenv, fetchurl, cmake, xlibsWrapper, xorgproto, libXi
, freeglut, libGL, libGLU, libjpeg, zlib, libXft, libpng
, libtiff, freetype, Cocoa, AGL, GLUT
}:

let
version = "1.3.5";
in

stdenv.mkDerivation {
let generic = args: stdenv.mkDerivation ({
pname = "fltk";
inherit version;

src = fetchurl {
url = "https://www.fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
sha256 = "00jp24z1818k9n6nn6lx7qflqf2k13g4kxr0p8v1d37kanhb4ac7";
};

patches = lib.optionals stdenv.isDarwin [ ./nsosv.patch ];

nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ cmake ];
buildInputs = [ libGLU libGL libjpeg zlib libpng libXft ]
++ lib.optional stdenv.isDarwin [ AGL Cocoa GLUT ];

@@ -27,20 +17,33 @@ stdenv.mkDerivation {
then [ freetype libtiff ]
else [ xlibsWrapper libXi freeglut ]);

configureFlags = [
"--enable-gl"
"--enable-largefile"
"--enable-shared"
"--enable-threads"
"--enable-xft"
cmakeFlags = [
"-DOPTION_BUILD_SHARED_LIBS=1"
"-DOpenGL_GL_PREFERENCE=GLVND"
];

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;
};
} // args);

in {
fltk13 = generic rec {
version = "1.3.5";
src = fetchurl {
url = "https://www.fltk.org/pub/fltk/${version}/fltk-${version}-source.tar.gz";
sha256 = "00jp24z1818k9n6nn6lx7qflqf2k13g4kxr0p8v1d37kanhb4ac7";
};
};

fltk14 = generic rec {
version = "1.4.x-r13121";
src = fetchurl {
url = "https://www.fltk.org/pub/fltk/snapshots/fltk-${version}.tar.gz";
sha256 = "1v8wxvxcbk99i82x2v5fpqg5vj8n7g8a38g30ry7nzcjn5sf3r63";
};
};
}
@@ -13605,13 +13605,13 @@ in

flite = callPackage ../development/libraries/flite { };

fltk13 = callPackage ../development/libraries/fltk {
inherit (callPackage ../development/libraries/fltk {
inherit (darwin.apple_sdk.frameworks) Cocoa AGL GLUT;
};
fltk14 = callPackage ../development/libraries/fltk/1.4.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa AGL GLUT;
};
fltk = res.fltk13;
})
fltk13
fltk14
;
fltk = fltk13;

flyway = callPackage ../development/tools/flyway { };

0 comments on commit bf56237

Please sign in to comment.