Add Qt6 desktop uploader
A native Qt6/C++ desktop client for the gallery's POST /upload API, in desktop/ with its own flake (kept separate from the Go server module the same way android/ is). Single-photo parity with the Android app: - multipart upload with preemptive HTTP Basic auth and retry-aware outcome classification (uploadclient) - JPEG/PNG metadata stripped byte-for-byte to drop embedded GPS, EXIF orientation baked in, and a quality/scale valve for the 20M nginx cap; HEIC decodes via the qtimageformats plugin (imageprep) - base URL / username in QSettings, password in the system keychain via qtkeychain; https required and a trailing /upload stripped (settings) - settings and post screens in a QStackedWidget (mainwindow) Native Wayland or xcb is selected at runtime. Bulk upload, EXIF capture-date prefill, and moving image prep off the UI thread are left as follow-ups.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
{
|
||||
description = "photogallery uploader — Qt6 C++ desktop app";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
qtPlugins = pkgs.lib.makeSearchPathOutput "out" "lib/qt-6/plugins" [
|
||||
pkgs.qt6.qtbase
|
||||
pkgs.qt6.qtwayland
|
||||
pkgs.qt6.qtimageformats
|
||||
];
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
qt6.qtbase
|
||||
qt6.qtwayland # native Wayland QPA plugin
|
||||
qt6.qtimageformats # HEIF/HEIC + others, read by QImage
|
||||
qt6Packages.qtkeychain # password → libsecret / kwallet
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# Let a binary run straight from the build dir find Qt's platform
|
||||
# (xcb + wayland) and image-format plugins without wrapQtAppsHook.
|
||||
export QT_PLUGIN_PATH="${qtPlugins}''${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user