Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qdjango: init at unstable-2018-03-07 #237543

Merged
merged 2 commits into from
Jun 19, 2023
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
73 changes: 73 additions & 0 deletions pkgs/development/libraries/qdjango/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{ stdenv
, lib
, fetchFromGitHub
, testers
, doxygen
, qmake
}:

stdenv.mkDerivation (finalAttrs: {
pname = "qdjango";
version = "unstable-2018-03-07";

src = fetchFromGitHub {
owner = "jlaine";
repo = "qdjango";
rev = "bda4755ece9d173a67b880e498027fcdc51598a8";
hash = "sha256-5MfRfsIlv73VMvKMBCLviXFovyGH0On5ukLIEy7zwkk=";
};

outputs = [ "out" "dev" "doc" ];

postPatch = ''
# HTML docs depend on regular docs
substituteInPlace qdjango.pro \
--replace 'dist.depends = docs' 'htmldocs.depends = docs'
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
# tst_Auth:constIterator (tests/db/auth/tst_auth.cpp:624) fails on Darwin?
# QVERIFY(&*(it += 2) == 0) evals to false
substituteInPlace tests/db/db.pro \
--replace 'auth' ""
'';

qmakeFlags = [
# Uses Qt testing infrastructure via QMake CONFIG testcase,
# defaults to installing all testcase targets under Qt prefix
# https://github.com/qt/qtbase/blob/29400a683f96867133b28299c0d0bd6bcf40df35/mkspecs/features/testcase.prf#L110-L120
"CONFIG+=no_testcase_installs"

# Qmake-generated pkg-config files default to Qt prefix
"QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}"
];

nativeBuildInputs = [
doxygen
qmake
];

dontWrapQtApps = true;

doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
# at this point in the build, install_name for dylibs hasn't been patched yet so we need to set the library path.
# for some reason, this doesn't work when just exporting the needed paths even though the autogenerated wrappers
# should at most prepend paths? just patch them into the wrappers instead
substituteInPlace $(find tests -name target_wrapper.sh) \
--replace 'DYLD_LIBRARY_PATH=' "DYLD_LIBRARY_PATH=$PWD/src/db:$PWD/src/http:"
'';

passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;

meta = with lib; {
description = "Qt-based C++ web framework";
homepage = "https://github.com/jlaine/qdjango";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.all;
pkgConfigModules = [
"qdjango-db"
"qdjango-http"
];
};
})
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23764,6 +23764,8 @@ with pkgs;

qbs = libsForQt5.callPackage ../development/tools/build-managers/qbs { };

qdjango = libsForQt5.callPackage ../development/libraries/qdjango { };

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

qolibri = libsForQt5.callPackage ../applications/misc/qolibri { };
Expand Down