Skip to content

Commit 85b6d9d

Browse files
committed
Merge branch 'main' into Alpha-v9.4
2 parents 9a78bf3 + 3e2fb12 commit 85b6d9d

File tree

3 files changed

+71
-46
lines changed

3 files changed

+71
-46
lines changed

.envrc renamed to .envrc.recommended

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# vi: ft=bash
2+
#
3+
# If you wish to use this file, copy or symlink it to `.envrc` for direnv to read it.
4+
# This will use the flake development shell.
25

36
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
47
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,5 +254,6 @@ compile_commands.json
254254
TagStudio.ini
255255
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,python,qt
256256

257+
.envrc
257258
.direnv
258259
.devenv

flake.nix

Lines changed: 67 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,35 @@
2727
systems.url = "github:nix-systems/default-linux";
2828
};
2929

30-
outputs = { flake-parts, nixpkgs, nixpkgs-qt6, self, systems, ... }@inputs:
30+
outputs =
31+
{
32+
flake-parts,
33+
nixpkgs,
34+
nixpkgs-qt6,
35+
self,
36+
systems,
37+
...
38+
}@inputs:
3139
flake-parts.lib.mkFlake { inherit inputs; } {
3240
imports = [ inputs.devenv.flakeModule ];
3341

3442
systems = import systems;
3543

36-
perSystem = { config, pkgs, system, ... }:
44+
perSystem =
45+
{
46+
config,
47+
pkgs,
48+
system,
49+
...
50+
}:
3751
let
3852
inherit (nixpkgs) lib;
3953

4054
qt6Pkgs = import nixpkgs-qt6 { inherit system; };
4155
in
4256
{
57+
formatter = pkgs.nixfmt-rfc-style;
58+
4359
devenv.shells = rec {
4460
default = tagstudio;
4561

@@ -68,50 +84,53 @@
6884
name = "TagStudio";
6985

7086
# Derived from previous flake iteration.
71-
packages = (with pkgs; [
72-
cmake
73-
binutils
74-
coreutils
75-
dbus
76-
fontconfig
77-
freetype
78-
gdb
79-
glib
80-
libGL
81-
libGLU
82-
libgcc
83-
libxkbcommon
84-
mypy
85-
ruff
86-
xorg.libxcb
87-
zstd
88-
])
89-
++ (with qt6Pkgs; [
90-
qt6.full
91-
qt6.qtbase
92-
qt6.qtwayland
93-
qtcreator
94-
]);
87+
packages =
88+
(with pkgs; [
89+
cmake
90+
binutils
91+
coreutils
92+
dbus
93+
fontconfig
94+
freetype
95+
gdb
96+
glib
97+
libGL
98+
libGLU
99+
libgcc
100+
libxkbcommon
101+
mypy
102+
ruff
103+
xorg.libxcb
104+
zstd
105+
])
106+
++ (with qt6Pkgs; [
107+
qt6.full
108+
qt6.qtbase
109+
qt6.qtwayland
110+
qtcreator
111+
]);
95112

96113
enterShell =
97114
let
98-
setQtEnv = pkgs.runCommand "set-qt-env"
99-
{
100-
buildInputs = with qt6Pkgs.qt6; [
101-
qtbase
102-
];
103-
104-
nativeBuildInputs = (with pkgs; [
105-
makeShellWrapper
106-
])
107-
++ (with qt6Pkgs.qt6; [
108-
wrapQtAppsHook
109-
]);
110-
}
111-
''
112-
makeShellWrapper "$(type -p sh)" "$out" "''${qtWrapperArgs[@]}"
113-
sed "/^exec/d" -i "$out"
114-
'';
115+
setQtEnv =
116+
pkgs.runCommand "set-qt-env"
117+
{
118+
buildInputs = with qt6Pkgs.qt6; [
119+
qtbase
120+
];
121+
122+
nativeBuildInputs =
123+
(with pkgs; [
124+
makeShellWrapper
125+
])
126+
++ (with qt6Pkgs.qt6; [
127+
wrapQtAppsHook
128+
]);
129+
}
130+
''
131+
makeShellWrapper "$(type -p sh)" "$out" "''${qtWrapperArgs[@]}"
132+
sed "/^exec/d" -i "$out"
133+
'';
115134
in
116135
''
117136
source ${setQtEnv}
@@ -162,9 +181,11 @@
162181
quiet = true;
163182
requirements =
164183
let
165-
excludeDeps = req: deps: builtins.concatStringsSep "\n"
166-
(builtins.filter (line: !(lib.any (elem: lib.hasPrefix elem line) deps))
167-
(lib.splitString "\n" req));
184+
excludeDeps =
185+
req: deps:
186+
builtins.concatStringsSep "\n" (
187+
builtins.filter (line: !(lib.any (elem: lib.hasPrefix elem line) deps)) (lib.splitString "\n" req)
188+
);
168189
in
169190
''
170191
${builtins.readFile ./requirements.txt}

0 commit comments

Comments
 (0)