-
-
Notifications
You must be signed in to change notification settings - Fork 431
/
Copy pathdevenv.nix
73 lines (62 loc) · 1.52 KB
/
devenv.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
pkgs,
config,
...
}:
{
# Try to disable cachix to get served from local cache
cachix.enable = false;
# https://devenv.sh/supported-languages/cplusplus/
languages.cplusplus.enable = true;
# https://devenv.sh/packages/
packages =
with pkgs;
with qt6;
[
just
crowdin-cli
cmake
qmake
qttools
wrapQtAppsHook
pkg-config
libclang # for clang-format
procs # fetches process info
gawk # for parsing procs output
fzf # for interactive process selection
# for ./build-systems/github/build-github-src.sh
coreutils
gh
# for shell scripts
findutils
gnused
ripgrep
librsvg
imagemagick
libicns
# Packages for treefmt
treefmt
libclang
nodePackages.prettier
shfmt
nixfmt-rfc-style
statix
taplo
cmake-format
];
# https://devenv.sh/git-hooks/
git-hooks.hooks.treefmt.enable = true;
# This script updates the symlinks to the qmake binaries in the nix store
# The symlinks are to be used in Qt Creator and CLion
scripts.update-qmake-symlinks.exec = ''
BIN_DIR="''${DEVENV_ROOT}/bin"
echo "🔗 Updating qmake symlinks in ''${BIN_DIR}..."
mkdir -p "''${BIN_DIR}"
ln -sf "${pkgs.kdePackages.qtbase}/bin/qmake" "''${BIN_DIR}/qmake6"
ln -sf "${pkgs.libsForQt5.qt5.qtbase.dev}/bin/qmake" "''${BIN_DIR}/qmake5"
'';
enterShell = ''
update-qmake-symlinks
'';
# See full reference at https://devenv.sh/reference/options/
}