571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
89 lines
1.8 KiB
Nix
89 lines
1.8 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, nixosTests
|
|
, freetype
|
|
, fontconfig
|
|
, libGL
|
|
, libX11
|
|
, libXrandr
|
|
, libxcb
|
|
, libxkbcommon
|
|
, utf8proc
|
|
, wayland
|
|
|
|
, libnotify
|
|
, xdg-utils
|
|
, makeDesktopItem
|
|
}:
|
|
|
|
let
|
|
desktopItem = makeDesktopItem {
|
|
desktopName = "Wayst";
|
|
name = "wayst";
|
|
genericName = "Terminal";
|
|
exec = "wayst";
|
|
icon = "wayst";
|
|
categories = [ "System" "TerminalEmulator" ];
|
|
keywords = [ "wayst" "terminal" ];
|
|
comment = "A simple terminal emulator";
|
|
};
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "wayst";
|
|
version = "unstable-2023-07-16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "91861";
|
|
repo = pname;
|
|
rev = "f8b218eec1af706fd5ae287f5073e6422eb8b6d8";
|
|
hash = "sha256-tA2R6Snk5nqWkPXSbs7wmovWkT97xafdK0e/pKBUIUg=";
|
|
};
|
|
|
|
makeFlags = [ "INSTALL_DIR=\${out}/bin" ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
fontconfig
|
|
libX11
|
|
freetype
|
|
libGL
|
|
libxcb
|
|
libxkbcommon
|
|
libXrandr
|
|
utf8proc
|
|
wayland
|
|
];
|
|
enableParallelBuilding = true;
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/settings.c \
|
|
--replace xdg-open ${xdg-utils}/bin/xdg-open
|
|
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
|
|
'';
|
|
|
|
passthru.tests.test = nixosTests.terminal-emulators.wayst;
|
|
|
|
meta = with lib; {
|
|
description = "Simple terminal emulator";
|
|
mainProgram = "wayst";
|
|
homepage = "https://github.com/91861/wayst";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ berbiche ];
|
|
};
|
|
}
|