2020-10-20 23:56:30 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-10-20 23:56:30 +01:00
|
|
|
, freetype
|
|
|
|
, fontconfig
|
|
|
|
, libGL
|
|
|
|
, libX11
|
|
|
|
, libXrandr
|
|
|
|
, libxcb
|
|
|
|
, libxkbcommon
|
|
|
|
, utf8proc
|
|
|
|
, wayland
|
|
|
|
|
|
|
|
, libnotify
|
2021-02-01 08:05:09 +00:00
|
|
|
, xdg-utils
|
2020-10-20 23:56:30 +01:00
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
desktopName = "Wayst";
|
|
|
|
name = "wayst";
|
|
|
|
exec = "wayst";
|
|
|
|
icon = "wayst";
|
|
|
|
terminal = "false";
|
|
|
|
categories = "System;TerminalEmulator";
|
|
|
|
comment = "A simple terminal emulator";
|
|
|
|
extraEntries = ''
|
|
|
|
GenericName=Terminal
|
|
|
|
Keywords=wayst;terminal;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wayst";
|
2021-05-10 18:27:23 +01:00
|
|
|
version = "unstable-2021-04-05";
|
2020-10-20 23:56:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "91861";
|
|
|
|
repo = pname;
|
2021-05-10 18:27:23 +01:00
|
|
|
rev = "e72ca78ef72c7b1e92473a98d435a3c85d7eab98";
|
|
|
|
hash = "sha256-UXAVSfVpk/8KSg4oMw2tVWImD6HqJ7gEioR2MqhUUoQ=";
|
2020-10-20 23:56:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [ "INSTALL_DIR=\${out}/bin" ];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-10-20 23:56:30 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
fontconfig
|
|
|
|
libX11
|
|
|
|
freetype
|
|
|
|
libGL
|
|
|
|
libxcb
|
|
|
|
libxkbcommon
|
|
|
|
libXrandr
|
|
|
|
utf8proc
|
|
|
|
wayland
|
|
|
|
];
|
|
|
|
|
|
|
|
# This patch forces the Makefile to use utf8proc
|
|
|
|
# The makefile relies on ldconfig to find the utf8proc libraries
|
|
|
|
# which is not possible on nixpkgs
|
|
|
|
patches = [ ./utf8proc.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/settings.c \
|
2021-02-01 08:05:09 +00:00
|
|
|
--replace xdg-open ${xdg-utils}/bin/xdg-open
|
2020-10-20 23:56:30 +01: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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple terminal emulator";
|
2021-05-10 18:27:23 +01:00
|
|
|
mainProgram = "wayst";
|
2020-10-20 23:56:30 +01:00
|
|
|
homepage = "https://github.com/91861/wayst";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ berbiche ];
|
|
|
|
};
|
|
|
|
}
|