libqglviewer: fix on darwin + add to qt6Packages (#348549)
This commit is contained in:
@@ -1,28 +1,40 @@
|
||||
{ lib, stdenv, fetchurl, qmake, qtbase, libGLU, AGL }:
|
||||
{ lib, stdenv, fetchFromGitHub, qmake, qtbase, libGLU }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libqglviewer";
|
||||
version = "2.9.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.libqglviewer.com/src/libQGLViewer-${version}.tar.gz";
|
||||
sha256 = "sha256-J4+DKgstPvvg1pUhGd+8YFh5C3oPGHaQmDfLZzzkP/M=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "GillesDebunne";
|
||||
repo = "libQGLViewer";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-T8KAcw3cXbp0FZm53OjlQBnUvLRFdoj80dIQzQY0/yw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake ];
|
||||
buildInputs = [ qtbase libGLU ]
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin AGL;
|
||||
buildInputs = [ qtbase libGLU ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
postPatch = ''
|
||||
# Fix build on darwin, and install dylib instead of framework
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace QGLViewer/QGLViewer.pro \
|
||||
--replace-fail \
|
||||
"LIB_DIR_ = /Library/Frameworks" \
|
||||
"LIB_DIR_ = \$\$""{PREFIX_}/lib" \
|
||||
--replace-fail \
|
||||
"!staticlib: CONFIG *= lib_bundle" \
|
||||
""
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd QGLViewer
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "C++ library based on Qt that eases the creation of OpenGL 3D viewers";
|
||||
homepage = "http://libqglviewer.com";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
homepage = "https://github.com/GillesDebunne/libQGLViewer";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -164,9 +164,7 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
|
||||
inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate AGL Cocoa Foundation;
|
||||
};
|
||||
|
||||
libqglviewer = callPackage ../development/libraries/libqglviewer {
|
||||
inherit (pkgs.darwin.apple_sdk.frameworks) AGL;
|
||||
};
|
||||
libqglviewer = callPackage ../development/libraries/libqglviewer { };
|
||||
|
||||
libqofono = callPackage ../development/libraries/libqofono { };
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ makeScopeWithSplicing' {
|
||||
kquickimageedit = callPackage ../development/libraries/kquickimageedit { };
|
||||
libqaccessibilityclient = callPackage ../development/libraries/libqaccessibilityclient { };
|
||||
|
||||
libqglviewer = callPackage ../development/libraries/libqglviewer { };
|
||||
|
||||
libqtpas = callPackage ../development/compilers/fpc/libqtpas.nix { };
|
||||
|
||||
libquotient = callPackage ../development/libraries/libquotient { };
|
||||
|
||||
Reference in New Issue
Block a user