Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions pkgs/development/libraries/libqglviewer/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
})
4 changes: 1 addition & 3 deletions pkgs/top-level/qt5-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/qt6-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down