refactor(nix): rely more on setup hooks in dev shell
Signed-off-by: Seth Flynn <getchoo@tuta.io> (cherry picked from commit de923a07d8a4b7c9f8cd688b9682587c78116e14)
This commit is contained in:
parent
760fbdf54f
commit
ddcd61c808
12
flake.nix
12
flake.nix
@ -121,18 +121,18 @@
|
|||||||
llvm.clang-tools
|
llvm.clang-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = packages'.prismlauncher-unwrapped.cmakeFlags ++ [
|
cmakeBuildType = "Debug";
|
||||||
"-GNinja"
|
cmakeFlags = [ "-GNinja" ] ++ packages'.prismlauncher.cmakeFlags;
|
||||||
"-Bbuild"
|
dontFixCmake = true;
|
||||||
];
|
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "Sourcing ${qt-wrapper-env}"
|
echo "Sourcing ${qt-wrapper-env}"
|
||||||
source ${qt-wrapper-env}
|
source ${qt-wrapper-env}
|
||||||
|
|
||||||
if [ ! -f compile_commands.json ]; then
|
if [ ! -f compile_commands.json ]; then
|
||||||
cmake $cmakeFlags -D CMAKE_BUILD_TYPE=Debug
|
cmakeConfigurePhase
|
||||||
ln -s {build/,}compile_commands.json
|
cd ..
|
||||||
|
ln -s "$cmakeBuildDir"/compile_commands.json compile_commands.json
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user