- Web: favicon.ico + png icons under static/, served from the site root and linked from every page head. - Android: the artwork becomes the launcher icon — the 432px adaptive foreground over the gruvbox background, replacing the placeholder vector drawables. - Desktop: the icon is the Qt window/taskbar icon (embedded via app.qrc), and the app is now an installable package — a wrapped binary, a photog.desktop entry, and hicolor icons — so `nix profile install ./desktop` puts "Photog" in the application menu.
61 lines
1.9 KiB
Nix
61 lines
1.9 KiB
Nix
{
|
|
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 {
|
|
# Installable build: `nix profile install ./desktop` drops "Photog" into
|
|
# the application menu with its icon. wrapQtAppsHook wraps the binary so
|
|
# it finds the Qt platform (xcb + wayland) and image-format plugins on
|
|
# its own, without the dev shell.
|
|
packages.default = pkgs.stdenv.mkDerivation {
|
|
pname = "photog";
|
|
version = "0.1.0";
|
|
src = ./.;
|
|
nativeBuildInputs = with pkgs; [
|
|
cmake
|
|
ninja
|
|
pkg-config
|
|
qt6.wrapQtAppsHook
|
|
];
|
|
buildInputs = with pkgs; [
|
|
qt6.qtbase
|
|
qt6.qtwayland
|
|
qt6.qtimageformats
|
|
qt6Packages.qtkeychain
|
|
];
|
|
};
|
|
|
|
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}"
|
|
'';
|
|
};
|
|
});
|
|
}
|