mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
68d10c6cc3
libXrandr has not been required since winit 0.30.0[1]
(cosmic-term 1.0.0-alpha.3).
Tested that it still starts on X11.
[1]: bb9b629bc3
119 lines
3.3 KiB
Nix
119 lines
3.3 KiB
Nix
{ lib
|
|
, cosmic-icons
|
|
, fetchFromGitHub
|
|
, fontconfig
|
|
, freetype
|
|
, just
|
|
, libglvnd
|
|
, libinput
|
|
, libxkbcommon
|
|
, makeBinaryWrapper
|
|
, pkg-config
|
|
, rustPlatform
|
|
, stdenv
|
|
, vulkan-loader
|
|
, wayland
|
|
, xorg
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cosmic-term";
|
|
version = "1.0.0-alpha.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = "cosmic-term";
|
|
rev = "epoch-${version}";
|
|
hash = "sha256-4++wCyRVIodWdlrvK2vMcHGoY4BctnrkopWC6dZvhMk=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"accesskit-0.16.0" = "sha256-yeBzocXxuvHmuPGMRebbsYSKSvN+8sUsmaSKlQDpW4w=";
|
|
"alacritty_terminal-0.24.1-dev" = "sha256-aVB1CNOLjNh6AtvdbomODNrk00Md8yz8QzldzvDo1LI=";
|
|
"atomicwrites-0.4.2" = "sha256-QZSuGPrJXh+svMeFWqAXoqZQxLq/WfIiamqvjJNVhxA=";
|
|
"clipboard_macos-0.1.0" = "sha256-tovB4fjPVVRY8LKn5albMzskFQ+1W5ul4jT5RXx9gKE=";
|
|
"cosmic-config-0.1.0" = "sha256-u/qzhRvP+HsfCfxl3aM/L4ZwmZ/Zorrlq5l9UemfoRg=";
|
|
"cosmic-files-0.1.0" = "sha256-XNUeDj5Dl8jXJRERP2F4Yx2BPV2b4bwzMNCbIH3FJdA=";
|
|
"cosmic-text-0.12.1" = "sha256-u2Tw+XhpIKeFg8Wgru/sjGw6GUZ2m50ZDmRBJ1IM66w=";
|
|
"dpi-0.1.1" = "sha256-whi05/2vc3s5eAJTZ9TzVfGQ/EnfPr0S4PZZmbiYio0=";
|
|
"fs_extra-1.3.0" = "sha256-ftg5oanoqhipPnbUsqnA4aZcyHqn9XsINJdrStIPLoE=";
|
|
"iced_glyphon-0.6.0" = "sha256-u1vnsOjP8npQ57NNSikotuHxpi4Mp/rV9038vAgCsfQ=";
|
|
"smithay-clipboard-0.8.0" = "sha256-4InFXm0ahrqFrtNLeqIuE3yeOpxKZJZx+Bc0yQDtv34=";
|
|
"softbuffer-0.4.1" = "sha256-a0bUFz6O8CWRweNt/OxTvflnPYwO5nm6vsyc/WcXyNg=";
|
|
"taffy-0.3.11" = "sha256-SCx9GEIJjWdoNVyq+RZAGn0N71qraKZxf9ZWhvyzLaI=";
|
|
"trash-5.1.1" = "sha256-So8rQ8gLF5o79Az396/CQY/veNo4ticxYpYZPfMJyjQ=";
|
|
};
|
|
};
|
|
|
|
# COSMIC applications now uses vergen for the About page
|
|
# Update the COMMIT_DATE to match when the commit was made
|
|
env.VERGEN_GIT_COMMIT_DATE = "2024-09-24";
|
|
env.VERGEN_GIT_SHA = src.rev;
|
|
|
|
postPatch = ''
|
|
substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
just
|
|
pkg-config
|
|
makeBinaryWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
fontconfig
|
|
freetype
|
|
libglvnd
|
|
libinput
|
|
libxkbcommon
|
|
vulkan-loader
|
|
wayland
|
|
xorg.libX11
|
|
];
|
|
|
|
dontUseJustBuild = true;
|
|
|
|
justFlags = [
|
|
"--set"
|
|
"prefix"
|
|
(placeholder "out")
|
|
"--set"
|
|
"bin-src"
|
|
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-term"
|
|
];
|
|
|
|
# Force linking to libEGL, which is always dlopen()ed, and to
|
|
# libwayland-client, which is always dlopen()ed except by the
|
|
# obscure winit backend.
|
|
RUSTFLAGS = map (a: "-C link-arg=${a}") [
|
|
"-Wl,--push-state,--no-as-needed"
|
|
"-lEGL"
|
|
"-lwayland-client"
|
|
"-Wl,--pop-state"
|
|
];
|
|
|
|
# LD_LIBRARY_PATH can be removed once tiny-xlib is bumped above 0.2.2
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/cosmic-term" \
|
|
--suffix XDG_DATA_DIRS : "${cosmic-icons}/share" \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
|
libxkbcommon
|
|
vulkan-loader
|
|
xorg.libX11
|
|
xorg.libXcursor
|
|
xorg.libXi
|
|
]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/pop-os/cosmic-term";
|
|
description = "Terminal for the COSMIC Desktop Environment";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ ahoneybun nyabinary ];
|
|
platforms = platforms.linux;
|
|
mainProgram = "cosmic-term";
|
|
};
|
|
}
|