{ description = "att_browser - a minimal, qutebrowser-like QtWebEngine browser"; inputs = { # Pinned to the current NixOS stable release. nixpkgs.url = "github:NixOS/nixpkgs"; }; outputs = { self, nixpkgs }: let systems = [ "x86_64-linux" "aarch64-linux" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system}); in { packages = forAllSystems (pkgs: rec { att_browser = pkgs.callPackage ./package.nix { }; default = att_browser; }); apps = forAllSystems (pkgs: rec { att_browser = { type = "app"; program = "${self.packages.${pkgs.stdenv.hostPlatform.system}.att_browser}/bin/att_browser"; }; default = att_browser; }); devShells = forAllSystems (pkgs: { default = pkgs.mkShell { inputsFrom = [ self.packages.${pkgs.stdenv.hostPlatform.system}.att_browser ]; packages = with pkgs; [ clang-tools gdb ]; # wrapQtAppsHook only wraps installed binaries, so a binary run straight # out of ./build has no idea where Qt's plugins live. Export the same # variables the wrapper would have set. shellHook = with pkgs.qt6; '' export QT_PLUGIN_PATH="${qtbase}/${qtbase.qtPluginPrefix}:${qtwebengine}/${qtbase.qtPluginPrefix}" export QML2_IMPORT_PATH="${qtdeclarative}/${qtbase.qtQmlPrefix}:${qtwebengine}/${qtbase.qtQmlPrefix}" export QTWEBENGINEPROCESS_PATH="${qtwebengine}/libexec/QtWebEngineProcess" echo "att_browser dev shell - cmake -B build -G Ninja && cmake --build build && ./build/att_browser" ''; }; }); formatter = forAllSystems (pkgs: pkgs.nixpkgs-fmt); }; }