Skip to content

Commit d1404a7

Browse files
committed
nixfmt: format all nix files
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent 6e20872 commit d1404a7

File tree

8 files changed

+349
-271
lines changed

8 files changed

+349
-271
lines changed
+58-47
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,47 @@
1-
{ lib
2-
, stdenv
3-
, fetchurl
4-
, cmake
5-
, qttools
6-
, qtbase
7-
, qtdeclarative
8-
, qtsvg
9-
, qtwayland
10-
, qtwebsockets
11-
, qtx11extras
12-
, makeWrapper
13-
, wrapQtAppsHook
14-
, botan2
15-
, pkg-config
16-
, xvfb-run
17-
, installShellFiles
1+
{
2+
lib,
3+
stdenv,
4+
fetchurl,
5+
cmake,
6+
qttools,
7+
qtbase,
8+
qtdeclarative,
9+
qtsvg,
10+
qtwayland,
11+
qtwebsockets,
12+
qtx11extras,
13+
makeWrapper,
14+
wrapQtAppsHook,
15+
botan2,
16+
pkg-config,
17+
xvfb-run,
18+
installShellFiles,
1819
}:
1920

2021
let
2122
pname = "qownnotes";
2223
appname = "QOwnNotes";
23-
# version = builtins.head (builtins.match "#define VERSION \"([0-9.]+)\"" (builtins.readFile ./src/version.h));
24+
# version = builtins.head (builtins.match "#define VERSION \"([0-9.]+)\"" (builtins.readFile ./src/version.h));
2425
version = "local-build";
2526
in
2627
stdenv.mkDerivation {
2728
inherit pname appname version;
2829

29-
src = builtins.path { path = ../../src; name = "qownnotes"; };
30+
src = builtins.path {
31+
path = ../../src;
32+
name = "qownnotes";
33+
};
3034

31-
nativeBuildInputs = [
32-
cmake
33-
qttools
34-
wrapQtAppsHook
35-
pkg-config
36-
installShellFiles
37-
] ++ lib.optionals stdenv.isLinux [ xvfb-run ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
35+
nativeBuildInputs =
36+
[
37+
cmake
38+
qttools
39+
wrapQtAppsHook
40+
pkg-config
41+
installShellFiles
42+
]
43+
++ lib.optionals stdenv.isLinux [ xvfb-run ]
44+
++ lib.optionals stdenv.isDarwin [ makeWrapper ];
3845

3946
buildInputs = [
4047
qtbase
@@ -46,37 +53,41 @@ stdenv.mkDerivation {
4653
] ++ lib.optionals stdenv.isLinux [ qtwayland ];
4754

4855
cmakeFlags = [
49-
# "-DQON_QT6_BUILD=ON"
56+
# "-DQON_QT6_BUILD=ON"
5057
"-DBUILD_WITH_SYSTEM_BOTAN=ON"
5158
];
5259

53-
postInstall = ''
54-
# installShellCompletion --cmd ${appname} \
55-
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
56-
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
57-
# installShellCompletion --cmd ${pname} \
58-
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
59-
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
60-
''
61-
# Create a lowercase symlink for Linux
62-
+ lib.optionalString stdenv.isLinux ''
63-
ln -s $out/bin/${appname} $out/bin/${pname}
64-
''
65-
# Remame application for macOS as lowercase binary
66-
+ lib.optionalString stdenv.isDarwin ''
67-
find $out
68-
# Prevent "same file" error
69-
mv $out/bin/${appname} $out/bin/${pname}.bin
70-
mv $out/bin/${pname}.bin $out/bin/${pname}
71-
'';
60+
postInstall =
61+
''
62+
# installShellCompletion --cmd ${appname} \
63+
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
64+
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
65+
# installShellCompletion --cmd ${pname} \
66+
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
67+
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
68+
''
69+
# Create a lowercase symlink for Linux
70+
+ lib.optionalString stdenv.isLinux ''
71+
ln -s $out/bin/${appname} $out/bin/${pname}
72+
''
73+
# Remame application for macOS as lowercase binary
74+
+ lib.optionalString stdenv.isDarwin ''
75+
find $out
76+
# Prevent "same file" error
77+
mv $out/bin/${appname} $out/bin/${pname}.bin
78+
mv $out/bin/${pname}.bin $out/bin/${pname}
79+
'';
7280

7381
meta = with lib; {
7482
description = "Plain-text file notepad and todo-list manager with Markdown support and Nextcloud/ownCloud integration";
7583
homepage = "https://www.qownnotes.org/";
7684
changelog = "https://www.qownnotes.org/changelog.html";
7785
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
7886
license = licenses.gpl2Only;
79-
maintainers = with maintainers; [ pbek totoroot ];
87+
maintainers = with maintainers; [
88+
pbek
89+
totoroot
90+
];
8091
platforms = platforms.unix;
8192
};
8293
}

build-systems/nix/default-qmake.nix

+50-39
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
1-
{ lib
2-
, stdenv
3-
, fetchurl
4-
, qmake
5-
, qttools
6-
, qtbase
7-
, qtdeclarative
8-
, qtsvg
9-
, qtwayland
10-
, qtwebsockets
11-
, makeWrapper
12-
, wrapQtAppsHook
13-
, botan2
14-
, pkg-config
15-
, xvfb-run
16-
, installShellFiles
1+
{
2+
lib,
3+
stdenv,
4+
fetchurl,
5+
qmake,
6+
qttools,
7+
qtbase,
8+
qtdeclarative,
9+
qtsvg,
10+
qtwayland,
11+
qtwebsockets,
12+
makeWrapper,
13+
wrapQtAppsHook,
14+
botan2,
15+
pkg-config,
16+
xvfb-run,
17+
installShellFiles,
1718
}:
1819

1920
let
2021
pname = "qownnotes";
2122
appname = "QOwnNotes";
22-
# version = builtins.head (builtins.match "#define VERSION \"([0-9.]+)\"" (builtins.readFile ./src/version.h));
23+
# version = builtins.head (builtins.match "#define VERSION \"([0-9.]+)\"" (builtins.readFile ./src/version.h));
2324
version = "local-build";
2425
in
2526
stdenv.mkDerivation {
2627
inherit pname appname version;
2728

28-
src = builtins.path { path = ./src; name = "qownnotes"; };
29+
src = builtins.path {
30+
path = ./src;
31+
name = "qownnotes";
32+
};
2933

30-
nativeBuildInputs = [
31-
qmake
32-
qttools
33-
wrapQtAppsHook
34-
pkg-config
35-
installShellFiles
36-
] ++ lib.optionals stdenv.isLinux [ xvfb-run ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
34+
nativeBuildInputs =
35+
[
36+
qmake
37+
qttools
38+
wrapQtAppsHook
39+
pkg-config
40+
installShellFiles
41+
]
42+
++ lib.optionals stdenv.isLinux [ xvfb-run ]
43+
++ lib.optionals stdenv.isDarwin [ makeWrapper ];
3744

3845
buildInputs = [
3946
qtbase
@@ -48,33 +55,37 @@ stdenv.mkDerivation {
4855
];
4956

5057
# Install shell completion on Linux (there is no xvfb-run on macOS)
51-
postInstall = lib.optionalString stdenv.isLinux ''
58+
postInstall =
59+
lib.optionalString stdenv.isLinux ''
5260
installShellCompletion --cmd ${appname} \
5361
--bash <(xvfb-run $out/bin/${appname} --completion bash) \
5462
--fish <(xvfb-run $out/bin/${appname} --completion fish)
5563
installShellCompletion --cmd ${pname} \
5664
--bash <(xvfb-run $out/bin/${appname} --completion bash) \
5765
--fish <(xvfb-run $out/bin/${appname} --completion fish)
58-
''
59-
# Create a lowercase symlink for Linux
60-
+ lib.optionalString stdenv.isLinux ''
61-
ln -s $out/bin/${appname} $out/bin/${pname}
62-
''
63-
# Remame application for macOS as lowercase binary
64-
+ lib.optionalString stdenv.isDarwin ''
65-
find $out
66-
# Prevent "same file" error
67-
mv $out/bin/${appname} $out/bin/${pname}.bin
68-
mv $out/bin/${pname}.bin $out/bin/${pname}
69-
'';
66+
''
67+
# Create a lowercase symlink for Linux
68+
+ lib.optionalString stdenv.isLinux ''
69+
ln -s $out/bin/${appname} $out/bin/${pname}
70+
''
71+
# Remame application for macOS as lowercase binary
72+
+ lib.optionalString stdenv.isDarwin ''
73+
find $out
74+
# Prevent "same file" error
75+
mv $out/bin/${appname} $out/bin/${pname}.bin
76+
mv $out/bin/${pname}.bin $out/bin/${pname}
77+
'';
7078

7179
meta = with lib; {
7280
description = "Plain-text file notepad and todo-list manager with Markdown support and Nextcloud/ownCloud integration";
7381
homepage = "https://www.qownnotes.org/";
7482
changelog = "https://www.qownnotes.org/changelog.html";
7583
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
7684
license = licenses.gpl2Only;
77-
maintainers = with maintainers; [ pbek totoroot ];
85+
maintainers = with maintainers; [
86+
pbek
87+
totoroot
88+
];
7889
platforms = platforms.unix;
7990
};
8091
}

build-systems/nix/default-qt5.nix

+58-47
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,48 @@
1-
{ lib
2-
, stdenv
3-
, fetchurl
4-
, qmake
5-
, qttools
6-
, qtbase
7-
, qtdeclarative
8-
, qtsvg
9-
, qtwayland
10-
, qtwebsockets
11-
, qtx11extras
12-
, makeWrapper
13-
, wrapQtAppsHook
14-
, botan2
15-
, pkg-config
16-
, xvfb-run
17-
, installShellFiles
1+
{
2+
lib,
3+
stdenv,
4+
fetchurl,
5+
qmake,
6+
qttools,
7+
qtbase,
8+
qtdeclarative,
9+
qtsvg,
10+
qtwayland,
11+
qtwebsockets,
12+
qtx11extras,
13+
makeWrapper,
14+
wrapQtAppsHook,
15+
botan2,
16+
pkg-config,
17+
xvfb-run,
18+
installShellFiles,
1819
}:
1920

2021
let
2122
pname = "qownnotes";
2223
appname = "QOwnNotes";
23-
# version = builtins.head (builtins.match "#define VERSION \"([0-9.]+)\"" (builtins.readFile ./src/version.h));
24+
# version = builtins.head (builtins.match "#define VERSION \"([0-9.]+)\"" (builtins.readFile ./src/version.h));
2425
version = "local-build";
2526
in
2627
stdenv.mkDerivation {
2728
inherit pname appname version;
2829

29-
src = builtins.path { path = ../../src; name = "qownnotes"; };
30+
src = builtins.path {
31+
path = ../../src;
32+
name = "qownnotes";
33+
};
3034

31-
nativeBuildInputs = [
32-
qmake
33-
qttools
34-
wrapQtAppsHook
35-
pkg-config
36-
installShellFiles
37-
xvfb-run
38-
] ++ lib.optionals stdenv.isLinux [ xvfb-run ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
35+
nativeBuildInputs =
36+
[
37+
qmake
38+
qttools
39+
wrapQtAppsHook
40+
pkg-config
41+
installShellFiles
42+
xvfb-run
43+
]
44+
++ lib.optionals stdenv.isLinux [ xvfb-run ]
45+
++ lib.optionals stdenv.isDarwin [ makeWrapper ];
3946

4047
buildInputs = [
4148
qtbase
@@ -50,33 +57,37 @@ stdenv.mkDerivation {
5057
"USE_SYSTEM_BOTAN=1"
5158
];
5259

53-
postInstall = ''
54-
# installShellCompletion --cmd ${appname} \
55-
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
56-
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
57-
# installShellCompletion --cmd ${pname} \
58-
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
59-
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
60-
''
61-
# Create a lowercase symlink for Linux
62-
+ lib.optionalString stdenv.isLinux ''
63-
ln -s $out/bin/${appname} $out/bin/${pname}
64-
''
65-
# Remame application for macOS as lowercase binary
66-
+ lib.optionalString stdenv.isDarwin ''
67-
find $out
68-
# Prevent "same file" error
69-
mv $out/bin/${appname} $out/bin/${pname}.bin
70-
mv $out/bin/${pname}.bin $out/bin/${pname}
71-
'';
60+
postInstall =
61+
''
62+
# installShellCompletion --cmd ${appname} \
63+
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
64+
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
65+
# installShellCompletion --cmd ${pname} \
66+
# --bash <(xvfb-run $out/bin/${appname} --completion bash) \
67+
# --fish <(xvfb-run $out/bin/${appname} --completion fish)
68+
''
69+
# Create a lowercase symlink for Linux
70+
+ lib.optionalString stdenv.isLinux ''
71+
ln -s $out/bin/${appname} $out/bin/${pname}
72+
''
73+
# Remame application for macOS as lowercase binary
74+
+ lib.optionalString stdenv.isDarwin ''
75+
find $out
76+
# Prevent "same file" error
77+
mv $out/bin/${appname} $out/bin/${pname}.bin
78+
mv $out/bin/${pname}.bin $out/bin/${pname}
79+
'';
7280

7381
meta = with lib; {
7482
description = "Plain-text file notepad and todo-list manager with Markdown support and Nextcloud/ownCloud integration";
7583
homepage = "https://www.qownnotes.org/";
7684
changelog = "https://www.qownnotes.org/changelog.html";
7785
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
7886
license = licenses.gpl2Only;
79-
maintainers = with maintainers; [ pbek totoroot ];
87+
maintainers = with maintainers; [
88+
pbek
89+
totoroot
90+
];
8091
platforms = platforms.unix;
8192
};
8293
}

0 commit comments

Comments
 (0)