Skip to content

fix(nix): ensure Qt6LinguistTools is available in devShell - #4450

Merged
borgmanJeremy merged 1 commit into
flameshot-org:masterfrom
marcodsl:fix/devshell-build-inputs
Dec 24, 2025
Merged

borgmanJeremy merged 1 commit into
flameshot-org:masterfrom
marcodsl:fix/devshell-build-inputs

Conversation

@marcodsl

Copy link
Copy Markdown
Contributor

Description

This PR fixes an issue where the nix develop environment was missing Qt6LinguistTools, causing local builds to fail during the configuration step.

Reproduction

On NixOS, executing the following command inside nix develop previously resulted in an error:

cmake -DCMAKE_BUILD_TYPE:STRING=Debug \
      -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \
      -DQT_DEBUG_FIND_PACKAGE:STRING=ON \
      --no-warn-unused-cli \
      -S . -B build
Output
-- Could NOT find Qt6LinguistTools (missing: Qt6LinguistTools_DIR)
CMake Error at src/CMakeLists.txt:1 (find_package):
  Found package configuration file:

    /nix/store/...-qtbase-6.10.0/lib/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find required Qt component "LinguistTools".

  Expected Config file at
  "/nix/store/...-qtbase-6.10.0/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsConfig.cmake"
  does NOT exist

-- Configuring incomplete, errors occurred!

Solution

I updated the flake to use inputsFrom inheriting from the main flameshot package derivation.

This ensures the development shell automatically includes all build dependencies defined in the package (specifically qt6.qttools in this case), preventing the shell from drifting apart from the actual package build requirements.

-- KDSingleApplication is used!
Flameshot predefined color palette large: false
git found: /etc/profiles/per-user/marco/bin/git in version      2.51.2
FLAMESHOT_GIT_HASH: 56faa17e
-- Configuring done (2.0s)
-- Generating done (0.2s)
-- Build files have been written to: /home/marco/projects/flameshot/build

Use inputsFrom to inherit all build dependencies from the
package derivation. This ensures
the development shell includes qt6.qttools.
@borgmanJeremy

Copy link
Copy Markdown
Collaborator

Thanks! I don't have much opinion on the nix setup so if you say this is better I believe you.

@borgmanJeremy
borgmanJeremy merged commit 3bebdf5 into flameshot-org:master Dec 24, 2025
14 of 16 checks passed
GCP-TUX pushed a commit to GCP-TUX/flameshot that referenced this pull request May 4, 2026
Use inputsFrom to inherit all build dependencies from the
package derivation. This ensures
the development shell includes qt6.qttools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants