diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index b2d2824bb3..8f2280e86e 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -81,4 +81,5 @@ faup1090 = pkgs.callPackage ./piaware/faup1090.nix { }; fr24feed = pkgs.callPackage ./fr24feed { }; + qrca = pkgs.libsForQt5.callPackage ./qrca { }; } // (import ./heptapod-runner args) diff --git a/nix/pkgs/qrca/default.nix b/nix/pkgs/qrca/default.nix new file mode 100644 index 0000000000..7beb65118f --- /dev/null +++ b/nix/pkgs/qrca/default.nix @@ -0,0 +1,62 @@ +{ lib +, mkDerivation +, fetchFromGitLab + +, cmake +, extra-cmake-modules + +, kconfig +, kcoreaddons +, kcontacts +, knotifications +, prison +, kpurpose +, kservice +, kio +, ki18n +, kirigami-addons +, kirigami2 +, networkmanager-qt +, qtquickcontrols2 +, qtmultimedia +, syndication +, gst_all_1 +}: + +let + pluginPath = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad ]); +in +mkDerivation rec { + pname = "qrca"; + version = "unstable-2023-01-01"; + + src = fetchFromGitLab { + owner = "plasma-mobile"; + repo = "qrca"; + rev = "8e01967f273b1d5b68105b22de5086e15e1afe90"; + domain = "invent.kde.org"; + sha256 = "0bz07ij80khf5qqm3aja0kz7yjlnzf0887glhsiyz9yz8iw3ak2d"; + }; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + ]; + + buildInputs = [ + kcontacts + ki18n + kirigami-addons + kirigami2 + knotifications + kpurpose + kservice + kio + networkmanager-qt + prison + qtmultimedia + qtquickcontrols2 + ]; + + qtWrapperArgs = [ "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${pluginPath}" ]; +} diff --git a/third_party/nixpkgs/patches/prison-zxing.patch b/third_party/nixpkgs/patches/prison-zxing.patch new file mode 100644 index 0000000000..393a21056b --- /dev/null +++ b/third_party/nixpkgs/patches/prison-zxing.patch @@ -0,0 +1,19 @@ +diff --git a/pkgs/development/libraries/kde-frameworks/prison.nix b/pkgs/development/libraries/kde-frameworks/prison.nix +--- a/pkgs/development/libraries/kde-frameworks/prison.nix ++++ b/pkgs/development/libraries/kde-frameworks/prison.nix +@@ -2,12 +2,13 @@ + mkDerivation, + extra-cmake-modules, + libdmtx, qrencode, qtbase, ++ qtmultimedia, zxing-cpp, + }: + + mkDerivation { + pname = "prison"; + nativeBuildInputs = [ extra-cmake-modules ]; +- buildInputs = [ libdmtx qrencode ]; +- propagatedBuildInputs = [ qtbase ]; ++ buildInputs = [ libdmtx qrencode zxing-cpp ]; ++ propagatedBuildInputs = [ qtbase qtmultimedia ]; + outputs = [ "out" "dev" ]; + } diff --git a/third_party/nixpkgs/patches/series b/third_party/nixpkgs/patches/series index f9f8fb3946..387570bcc4 100644 --- a/third_party/nixpkgs/patches/series +++ b/third_party/nixpkgs/patches/series @@ -1 +1,2 @@ kubo-multiaddr.patch +prison-zxing.patch diff --git a/third_party/nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix b/third_party/nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix index c2063e22bb..34d90f5ec3 100644 --- a/third_party/nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix +++ b/third_party/nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix @@ -2,12 +2,13 @@ mkDerivation, extra-cmake-modules, libdmtx, qrencode, qtbase, + qtmultimedia, zxing-cpp, }: mkDerivation { pname = "prison"; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ libdmtx qrencode ]; - propagatedBuildInputs = [ qtbase ]; + buildInputs = [ libdmtx qrencode zxing-cpp ]; + propagatedBuildInputs = [ qtbase qtmultimedia ]; outputs = [ "out" "dev" ]; }