Files
nixpkgs/pkgs/development/libraries/quickflux/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.5 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
cmake,
qtbase,
qtquickcontrols2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quickflux";
version = "1.1-unstable-2020-11-10";
src = fetchFromGitHub {
owner = "benlau";
repo = "quickflux";
rev = "2a37acff0416c56cb349e5bc1b841b25ff1bb6f8";
hash = "sha256-c0W3Qj8kY6hMcMy/v5xhwJF9+muZjotmJqhbjqQVab0=";
};
outputs = [
"out"
"dev"
];
postPatch = ''
# Don't hardcode static linking, let stdenv decide
# Use GNUInstallDirs
substituteInPlace CMakeLists.txt \
--replace-fail 'quickflux STATIC' 'quickflux' \
--replace-fail 'DESTINATION include' 'DESTINATION ''${CMAKE_INSTALL_INCLUDEDIR}'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
];
buildInputs = [
qtbase
qtquickcontrols2
];
# Only a QML module
dontWrapQtApps = true;
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
];
preFixup = ''
# Has extra $out in includes list, breaks usage of module (complains about non-existent path in module includes)
substituteInPlace $out/lib/cmake/QuickFlux/QuickFluxTargets.cmake \
--replace "\''${_IMPORT_PREFIX}/include" '${placeholder "dev"}/include'
'';
meta = with lib; {
description = "Flux implementation for QML";
homepage = "https://github.com/benlau/quickflux";
license = licenses.asl20;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.unix;
};
})