2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
|
|
|
, libwpe
|
|
|
|
, libwpe-fdo
|
|
|
|
, glib-networking
|
|
|
|
, webkitgtk
|
|
|
|
, makeWrapper
|
|
|
|
, wrapGAppsHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2021-02-05 17:12:51 +00:00
|
|
|
, gdk-pixbuf
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cog";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "0.8.1";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "igalia";
|
|
|
|
repo = "cog";
|
|
|
|
rev = "v${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "sha256-eF7rvOjZntcMmn622342yqfp4ksZ6R/FFBT36bYCViE=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wayland-protocols
|
|
|
|
wayland
|
|
|
|
libwpe
|
|
|
|
libwpe-fdo
|
|
|
|
webkitgtk
|
|
|
|
glib-networking
|
|
|
|
gdk-pixbuf
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.adwaita-icon-theme
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
wayland
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
depsBuildsBuild = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCOG_USE_WEBKITGTK=ON"
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/Igalia/cog/issues/438
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace core/cogcore.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# not ideal, see https://github.com/WebPlatformForEmbedded/libwpe/issues/59
|
|
|
|
preFixup = ''
|
|
|
|
wrapProgram $out/bin/cog \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${libwpe-fdo}/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A small single “window” launcher for the WebKit WPE port";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.matthewbauer ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|