nixpkgs/pkgs/development/libraries/waylandpp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-04-22 18:20:20 +03:00
, fetchFromGitHub
, cmake
2022-05-11 01:55:06 +03:00
, makeFontsConf
, pkg-config
2020-04-22 18:20:20 +03:00
, pugixml
, wayland
, libGL
, libffi
, buildPackages
, docSupport ? true
2022-05-11 01:55:06 +03:00
, doxygen
, graphviz
2020-04-22 18:20:20 +03:00
}:
2019-03-26 22:23:35 +03:00
stdenv.mkDerivation rec {
pname = "waylandpp";
2022-05-11 01:55:06 +03:00
version = "1.0.0";
2019-03-26 22:23:35 +03:00
src = fetchFromGitHub {
owner = "NilsBrause";
repo = pname;
rev = version;
2022-05-11 01:55:06 +03:00
hash = "sha256-Dw2RnLLyhykikHps1in+euHksO+ERbATbfmbUFOJklg=";
2019-03-26 22:23:35 +03:00
};
cmakeFlags = [
"-DCMAKE_INSTALL_DATADIR=${placeholder "dev"}"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
2020-04-22 20:53:19 +03:00
"-DWAYLAND_SCANNERPP=${buildPackages.waylandpp}/bin/wayland-scanner++"
];
2022-05-11 01:55:06 +03:00
# 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 ];
2019-03-26 22:23:35 +03:00
2022-05-11 01:55:06 +03:00
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 = with lib; {
2019-03-26 22:23:35 +03:00
description = "Wayland C++ binding";
homepage = "https://github.com/NilsBrause/waylandpp/";
2022-05-11 01:55:06 +03:00
license = with lib.licenses; [ bsd2 hpnd ];
maintainers = with lib.maintainers; [ minijackson ];
2019-03-26 22:23:35 +03:00
};
}