-
-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix: add script to update qmake symlinks
Signed-off-by: Patrizio Bekerle <[email protected]>
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
### | ||
# This script updates the symlinks to the qmake binaries in the nix store | ||
# It will be executed by direnv when entering the project directory via the shell.nix | ||
# The symlinks are to be used in Qt Creator and CLion | ||
### | ||
|
||
# With direnv, the current directory is the project directory | ||
BIN_DIR="$(pwd)/bin" | ||
|
||
mkdir -p "${BIN_DIR}" | ||
ln -sf "$(which qmake)" "${BIN_DIR}/qmake6" && "${BIN_DIR}/qmake6" --version | ||
# Run a pure shell so the shell.nix will not be loaded again by direnv | ||
nix-shell --pure -p which libsForQt5.qt5.qtbase --run "ln -sf \$(which qmake | tail -n1) \$PWD/bin/qmake5" && "${BIN_DIR}/qmake5" --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,6 @@ pkgs.mkShell { | |
]; | ||
|
||
shellHook = '' | ||
echo "qmake: $(qmake --version)" | ||
./scripts/nix-update-qmake-symlinks.sh | ||
''; | ||
} |