qownnotes: format with nixfmt
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, qt6Packages
|
||||
, cmake
|
||||
, makeWrapper
|
||||
, botan2
|
||||
, pkg-config
|
||||
, nixosTests
|
||||
, installShellFiles
|
||||
, xvfb-run
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
qt6Packages,
|
||||
cmake,
|
||||
makeWrapper,
|
||||
botan2,
|
||||
pkg-config,
|
||||
nixosTests,
|
||||
installShellFiles,
|
||||
xvfb-run,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -24,13 +25,16 @@ qt6Packages.stdenv.mkDerivation {
|
||||
hash = "sha256-48puEyScG6EIrsXZpFc62dl4a23p+TO2buzuwq9m3Sw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qt6Packages.qttools
|
||||
qt6Packages.wrapQtAppsHook
|
||||
pkg-config
|
||||
installShellFiles
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [ xvfb-run ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ];
|
||||
nativeBuildInputs =
|
||||
[
|
||||
cmake
|
||||
qt6Packages.qttools
|
||||
qt6Packages.wrapQtAppsHook
|
||||
pkg-config
|
||||
installShellFiles
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ xvfb-run ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
qt6Packages.qtbase
|
||||
@@ -46,30 +50,31 @@ qt6Packages.stdenv.mkDerivation {
|
||||
];
|
||||
|
||||
# Install shell completion on Linux (with xvfb-run)
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
postInstall =
|
||||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
installShellCompletion --cmd ${appname} \
|
||||
--bash <(xvfb-run $out/bin/${appname} --completion bash) \
|
||||
--fish <(xvfb-run $out/bin/${appname} --completion fish)
|
||||
installShellCompletion --cmd ${pname} \
|
||||
--bash <(xvfb-run $out/bin/${appname} --completion bash) \
|
||||
--fish <(xvfb-run $out/bin/${appname} --completion fish)
|
||||
''
|
||||
# Install shell completion on macOS
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
''
|
||||
# Install shell completion on macOS
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
installShellCompletion --cmd ${pname} \
|
||||
--bash <($out/bin/${appname} --completion bash) \
|
||||
--fish <($out/bin/${appname} --completion fish)
|
||||
''
|
||||
# Create a lowercase symlink for Linux
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
ln -s $out/bin/${appname} $out/bin/${pname}
|
||||
''
|
||||
# Rename application for macOS as lowercase binary
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Prevent "same file" error
|
||||
mv $out/bin/${appname} $out/bin/${pname}.bin
|
||||
mv $out/bin/${pname}.bin $out/bin/${pname}
|
||||
'';
|
||||
''
|
||||
# Create a lowercase symlink for Linux
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
ln -s $out/bin/${appname} $out/bin/${pname}
|
||||
''
|
||||
# Rename application for macOS as lowercase binary
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Prevent "same file" error
|
||||
mv $out/bin/${appname} $out/bin/${pname}.bin
|
||||
mv $out/bin/${pname}.bin $out/bin/${pname}
|
||||
'';
|
||||
|
||||
# Tests QOwnNotes using the NixOS module by launching xterm:
|
||||
passthru.tests.basic-nixos-module-functionality = nixosTests.qownnotes;
|
||||
@@ -80,7 +85,10 @@ qt6Packages.stdenv.mkDerivation {
|
||||
changelog = "https://www.qownnotes.org/changelog.html";
|
||||
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ pbek totoroot ];
|
||||
maintainers = with maintainers; [
|
||||
pbek
|
||||
totoroot
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user