biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / applications / terminal-emulators / contour / default.nix
blob78a1b7243cdc94611f90917f7bb077ea29fa4247
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 , pkg-config
6 , boxed-cpp
7 , freetype
8 , fontconfig
9 , libunicode
10 , libutempter
11 , termbench-pro
12 , qtmultimedia
13 , qt5compat
14 , wrapQtAppsHook
15 , pcre
16 , boost
17 , catch2
18 , fmt
19 , microsoft-gsl
20 , range-v3
21 , yaml-cpp
22 , ncurses
23 , file
24 , utmp
25 , sigtool
26 , nixosTests
27 , installShellFiles
30 stdenv.mkDerivation (final: {
31   pname = "contour";
32   version = "0.4.3.6442";
34   src = fetchFromGitHub {
35     owner = "contour-terminal";
36     repo = "contour";
37     rev = "v${final.version}";
38     hash = "sha256-m3BEhGbyQm07+1/h2IRhooLPDewmSuhRHOMpWPDluiY=";
39   };
41   patches = [ ./dont-fix-app-bundle.diff ];
43   outputs = [ "out" "terminfo" ];
45   nativeBuildInputs = [
46     cmake
47     pkg-config
48     ncurses
49     file
50     wrapQtAppsHook
51     installShellFiles
52   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ];
54   buildInputs = [
55     boxed-cpp
56     fontconfig
57     freetype
58     libunicode
59     termbench-pro
60     qtmultimedia
61     qt5compat
62     pcre
63     boost
64     catch2
65     fmt
66     microsoft-gsl
67     range-v3
68     yaml-cpp
69   ]
70   ++ lib.optionals stdenv.hostPlatform.isLinux [ libutempter ]
71   ++ lib.optionals stdenv.hostPlatform.isDarwin [ utmp ];
73   cmakeFlags = [ "-DCONTOUR_QT_VERSION=6" ];
75   postInstall = ''
76     mkdir -p $out/nix-support $terminfo/share
77   '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
78     mkdir $out/Applications
79     installShellCompletion --zsh $out/contour.app/Contents/Resources/shell-integration/shell-integration.zsh
80     installShellCompletion --fish $out/contour.app/Contents/Resources/shell-integration/shell-integration.fish
81     cp -r $out/contour.app/Contents/Resources/terminfo $terminfo/share
82     mv $out/contour.app $out/Applications
83     ln -s $out/bin $out/Applications/contour.app/Contents/MacOS
84   '' + lib.optionalString stdenv.hostPlatform.isLinux ''
85     mv $out/share/terminfo $terminfo/share/
86     installShellCompletion --zsh $out/share/contour/shell-integration/shell-integration.zsh
87     installShellCompletion --fish $out/share/contour/shell-integration/shell-integration.fish
88   '' + ''
89     echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
90   '';
92   passthru.tests.test = nixosTests.terminal-emulators.contour;
94   meta = with lib; {
95     description = "Modern C++ Terminal Emulator";
96     homepage = "https://github.com/contour-terminal/contour";
97     changelog = "https://github.com/contour-terminal/contour/raw/v${version}/Changelog.md";
98     license = licenses.asl20;
99     maintainers = with maintainers; [ moni ];
100     platforms = platforms.unix;
101     mainProgram = "contour";
102     # This was caused by boxed-cpp 1.4.2 -> 1.4.3
103     # More details in issue #345752
104     broken = true;
105   };