Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.4 kB · 59 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960{ lib, stdenv, appstream, qtbase, qttools, nixosTests,}:
# TODO: look into using the libraries from the regular appstream derivation as we keep duplicates here
let qtSuffix = lib.optionalString (lib.versions.major qtbase.version == "5") "5";instdenv.mkDerivation { pname = "appstream-qt"; inherit (appstream) version src;
outputs = [ "out" "dev" "installedTests" ];
buildInputs = appstream.buildInputs ++ [ appstream qtbase ];
nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];
mesonFlags = appstream.mesonFlags ++ [ (lib.mesonBool "qt" true) (lib.mesonOption "qt-versions" (lib.versions.major qtbase.version)) ];
patches = appstream.patches;
dontWrapQtApps = true;
# AppStreamQt tries to be relocatable, in hacky cmake ways that generally fail # horribly on NixOS. Just hardcode the paths. postFixup = '' sed -i "$dev/lib/cmake/AppStreamQt${qtSuffix}/AppStreamQt${qtSuffix}Config.cmake" \ -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@" sed -i "$dev/lib/cmake/AppStreamQt${qtSuffix}/AppStreamQt${qtSuffix}Config.cmake" \ -e "/IMPORTED_LOCATION/ s@\''${PACKAGE_PREFIX_DIR}@$out@" '';
passthru = appstream.passthru // { tests = { installed-tests = nixosTests.installed-tests.appstream-qt; }; };
meta = appstream.meta // { description = "Software metadata handling library - Qt"; };}