Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
84 lines
1.6 KiB
Nix
84 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
makeFontsConf,
|
|
pkg-config,
|
|
pugixml,
|
|
wayland,
|
|
libGL,
|
|
libffi,
|
|
buildPackages,
|
|
docSupport ? true,
|
|
doxygen,
|
|
graphviz,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "waylandpp";
|
|
version = "1.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "NilsBrause";
|
|
repo = "waylandpp";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-vKYKUXq5lmjQcZ0rD+b2O7N1iCVnpkpKd8Z/RTI083g=";
|
|
};
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeFeature "CMAKE_INSTALL_DATADIR" (placeholder "dev"))
|
|
]
|
|
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
(lib.cmakeFeature "WAYLAND_SCANNERPP" "${buildPackages.waylandpp}/bin/wayland-scanner++")
|
|
];
|
|
|
|
# Complains about not being able to find the fontconfig config file otherwise
|
|
FONTCONFIG_FILE = lib.optional docSupport (makeFontsConf {
|
|
fontDirectories = [ ];
|
|
});
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
]
|
|
++ lib.optionals docSupport [
|
|
doxygen
|
|
graphviz
|
|
];
|
|
buildInputs = [
|
|
pugixml
|
|
wayland
|
|
libGL
|
|
libffi
|
|
];
|
|
|
|
outputs = [
|
|
"bin"
|
|
"dev"
|
|
"lib"
|
|
"out"
|
|
]
|
|
++ lib.optionals docSupport [
|
|
"doc"
|
|
"devman"
|
|
];
|
|
|
|
# Resolves the warning "Fontconfig error: No writable cache directories"
|
|
preBuild = ''
|
|
export XDG_CACHE_HOME="$(mktemp -d)"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Wayland C++ binding";
|
|
mainProgram = "wayland-scanner++";
|
|
homepage = "https://github.com/NilsBrause/waylandpp/";
|
|
license = with lib.licenses; [
|
|
bsd2
|
|
hpnd
|
|
];
|
|
maintainers = with lib.maintainers; [ minijackson ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|