2020-10-19 09:53:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2022-03-30 09:31:56 +00:00
|
|
|
, nixosTests
|
2020-10-19 09:53:12 +00:00
|
|
|
, freetype
|
|
|
|
, fontconfig
|
|
|
|
, libGL
|
|
|
|
, libX11
|
|
|
|
, libXrandr
|
|
|
|
, libxcb
|
|
|
|
, libxkbcommon
|
|
|
|
, utf8proc
|
|
|
|
, wayland
|
|
|
|
|
|
|
|
, libnotify
|
2021-02-05 17:12:51 +00:00
|
|
|
, xdg-utils
|
2020-10-19 09:53:12 +00:00
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
desktopName = "Wayst";
|
|
|
|
name = "wayst";
|
2022-03-05 16:20:37 +00:00
|
|
|
genericName = "Terminal";
|
2020-10-19 09:53:12 +00:00
|
|
|
exec = "wayst";
|
|
|
|
icon = "wayst";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "System" "TerminalEmulator" ];
|
|
|
|
keywords = [ "wayst" "terminal" ];
|
2020-10-19 09:53:12 +00:00
|
|
|
comment = "A simple terminal emulator";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wayst";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "unstable-2023-07-16";
|
2020-10-19 09:53:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "91861";
|
|
|
|
repo = pname;
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "f8b218eec1af706fd5ae287f5073e6422eb8b6d8";
|
|
|
|
hash = "sha256-tA2R6Snk5nqWkPXSbs7wmovWkT97xafdK0e/pKBUIUg=";
|
2020-10-19 09:53:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [ "INSTALL_DIR=\${out}/bin" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-10-19 09:53:12 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fontconfig
|
|
|
|
libX11
|
|
|
|
freetype
|
|
|
|
libGL
|
|
|
|
libxcb
|
|
|
|
libxkbcommon
|
|
|
|
libXrandr
|
|
|
|
utf8proc
|
|
|
|
wayland
|
|
|
|
];
|
2023-08-04 22:07:22 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-10-19 09:53:12 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/settings.c \
|
2021-02-05 17:12:51 +00:00
|
|
|
--replace xdg-open ${xdg-utils}/bin/xdg-open
|
2020-10-19 09:53:12 +00:00
|
|
|
substituteInPlace src/main.c \
|
|
|
|
--replace notify-send ${libnotify}/bin/notify-send
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
|
|
|
install -D icons/wayst.svg $out/share/icons/hicolor/scalable/apps/wayst.svg
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
passthru.tests.test = nixosTests.terminal-emulators.wayst;
|
|
|
|
|
2020-10-19 09:53:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple terminal emulator";
|
2021-05-20 23:08:51 +00:00
|
|
|
mainProgram = "wayst";
|
2020-10-19 09:53:12 +00:00
|
|
|
homepage = "https://github.com/91861/wayst";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ berbiche ];
|
|
|
|
};
|
|
|
|
}
|