mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
108 lines
2.3 KiB
Nix
108 lines
2.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=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-0KXo1wtbbnK3Kk+EGZo7eEecM4PChLpwawWWI0Bp/Yw=";
|
|
|
|
# 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";
|
|
};
|
|
}
|