File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # ##
3
+ # This script updates the symlinks to the qmake binaries in the nix store
4
+ # It will be executed by direnv when entering the project directory via the shell.nix
5
+ # The symlinks are to be used in Qt Creator and CLion
6
+ # ##
7
+
8
+ # With direnv, the current directory is the project directory
9
+ BIN_DIR=" $( pwd) /bin"
10
+
11
+ mkdir -p " ${BIN_DIR} "
12
+ ln -sf " $( which qmake) " " ${BIN_DIR} /qmake6" && " ${BIN_DIR} /qmake6" --version
13
+ # Run a pure shell so the shell.nix will not be loaded again by direnv
14
+ nix-shell --pure -p which libsForQt5.qt5.qtbase --run " ln -sf \$ (which qmake | tail -n1) \$ PWD/bin/qmake5" && " ${BIN_DIR} /qmake5" --version
Original file line number Diff line number Diff line change @@ -54,6 +54,6 @@ pkgs.mkShell {
54
54
] ;
55
55
56
56
shellHook = ''
57
- echo "qmake: $(qmake --version)"
57
+ ./scripts/nix-update-qmake-symlinks.sh
58
58
'' ;
59
59
}
You can’t perform that action at this time.
0 commit comments