nixpkgs/pkgs/applications/terminal-emulators/contour/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

104 lines
2.4 KiB
Nix
Raw Normal View History

2022-05-28 04:20:00 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
2023-12-19 22:48:04 +00:00
, boxed-cpp
2022-05-28 04:20:00 +00:00
, freetype
, fontconfig
, libunicode
, libutempter
, termbench-pro
, qtmultimedia
2023-12-19 22:48:04 +00:00
, qt5compat
, wrapQtAppsHook
2022-05-28 04:20:00 +00:00
, pcre
, boost
, catch2
, fmt
, microsoft-gsl
2022-05-28 04:20:00 +00:00
, range-v3
, yaml-cpp
2022-05-28 04:20:00 +00:00
, ncurses
, file
, utmp
, sigtool
2022-05-28 04:20:00 +00:00
, nixosTests
, installShellFiles
2022-05-28 04:20:00 +00:00
}:
2021-06-25 13:17:28 +00:00
stdenv.mkDerivation (final: {
2021-06-25 13:17:28 +00:00
pname = "contour";
2024-02-07 17:05:42 +00:00
version = "0.4.3.6442";
2021-06-25 13:17:28 +00:00
src = fetchFromGitHub {
2022-05-28 04:20:00 +00:00
owner = "contour-terminal";
repo = "contour";
rev = "v${final.version}";
2024-02-07 17:05:42 +00:00
hash = "sha256-m3BEhGbyQm07+1/h2IRhooLPDewmSuhRHOMpWPDluiY=";
2021-06-25 13:17:28 +00:00
};
2023-12-19 22:48:04 +00:00
patches = [ ./dont-fix-app-bundle.diff ];
2023-12-19 22:48:04 +00:00
outputs = [ "out" "terminfo" ];
2022-05-28 04:20:00 +00:00
nativeBuildInputs = [
cmake
pkg-config
ncurses
file
wrapQtAppsHook
installShellFiles
] ++ lib.optionals stdenv.isDarwin [ sigtool ];
2022-05-28 04:20:00 +00:00
buildInputs = [
2023-12-19 22:48:04 +00:00
boxed-cpp
2022-05-28 04:20:00 +00:00
fontconfig
freetype
libunicode
termbench-pro
qtmultimedia
2023-12-19 22:48:04 +00:00
qt5compat
2022-05-28 04:20:00 +00:00
pcre
boost
catch2
fmt
microsoft-gsl
2022-05-28 04:20:00 +00:00
range-v3
yaml-cpp
]
++ lib.optionals stdenv.isLinux [ libutempter ]
++ lib.optionals stdenv.isDarwin [ utmp ];
2022-05-28 04:20:00 +00:00
cmakeFlags = [ "-DCONTOUR_QT_VERSION=6" ];
2021-06-25 13:17:28 +00:00
postInstall = ''
mkdir -p $out/nix-support $terminfo/share
'' + lib.optionalString stdenv.isDarwin ''
mkdir $out/Applications
installShellCompletion --zsh $out/contour.app/Contents/Resources/shell-integration/shell-integration.zsh
installShellCompletion --fish $out/contour.app/Contents/Resources/shell-integration/shell-integration.fish
cp -r $out/contour.app/Contents/Resources/terminfo $terminfo/share
mv $out/contour.app $out/Applications
ln -s $out/bin $out/Applications/contour.app/Contents/MacOS
'' + lib.optionalString stdenv.isLinux ''
mv $out/share/terminfo $terminfo/share/
installShellCompletion --zsh $out/share/contour/shell-integration/shell-integration.zsh
installShellCompletion --fish $out/share/contour/shell-integration/shell-integration.fish
'' + ''
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
'';
passthru.tests.test = nixosTests.terminal-emulators.contour;
2021-06-25 13:17:28 +00:00
meta = with lib; {
description = "Modern C++ Terminal Emulator";
2022-05-28 04:20:00 +00:00
homepage = "https://github.com/contour-terminal/contour";
changelog = "https://github.com/contour-terminal/contour/raw/v${version}/Changelog.md";
2021-06-25 13:17:28 +00:00
license = licenses.asl20;
2023-11-17 10:03:27 +00:00
maintainers = with maintainers; [ moni ];
2021-06-25 13:17:28 +00:00
platforms = platforms.unix;
2023-11-27 01:17:53 +00:00
mainProgram = "contour";
2021-06-25 13:17:28 +00:00
};
})