nixpkgs/pkgs/by-name/co/cosmic-reader/package.nix
Gavin John b45f95514d
cosmic-*: enable separateDebugInfo if not already enabled
At least `cosmic-settings`, `cosmic-launcher`, and `cosmic-osd` have core dumps listed in `coredumpctl`. Other than "it takes up a few extra Mb in hydra's storage", there isn't a particularly compelling reason not to enable separateDebugInfo for all COSMIC applications.
2026-05-10 03:05:38 -07:00

83 lines
1.5 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
just,
libcosmicAppHook,
fontconfig,
freetype,
gumbo,
harfbuzz,
jbig2dec,
lcms2,
leptonica,
libjpeg,
openjpeg,
tesseract,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cosmic-reader";
version = "0-unstable-2026-04-16";
src = fetchFromGitHub {
owner = "pop-os";
repo = "cosmic-reader";
rev = "ebea761ab6853a9ac15b1bfc90b040d620d1d00f";
hash = "sha256-t2UKLip5SrKG4a3Eaqf8lS2hNtrqgz8eYpSTRCbrpfM=";
};
cargoHash = "sha256-p0dg5RNXkzbi+/RB5k+jr34RNOp+Irahj0BiFUddfnk=";
separateDebugInfo = true;
nativeBuildInputs = [
just
libcosmicAppHook
rustPlatform.bindgenHook
];
buildInputs = [
fontconfig
freetype
gumbo
harfbuzz
jbig2dec
lcms2
leptonica
libjpeg
openjpeg
tesseract
];
dontUseJustBuild = true;
dontUseJustCheck = true;
justFlags = [
"--set"
"prefix"
(placeholder "out")
"--set"
"cargo-target-dir"
"target/${stdenv.hostPlatform.rust.cargoShortTarget}"
];
env.VERGEN_GIT_SHA = finalAttrs.src.rev;
passthru.updateScript = nix-update-script {
extraArgs = [
"--version"
"branch=HEAD"
];
};
meta = {
description = "PDF reader for the COSMIC Desktop Environment";
homepage = "https://github.com/pop-os/cosmic-reader";
license = lib.licenses.gpl3Only;
mainProgram = "cosmic-reader";
platforms = lib.platforms.linux;
teams = [ lib.teams.cosmic ];
};
})