nixpkgs/pkgs/by-name/co/cog/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

77 lines
1.4 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, wayland
, wayland-protocols
, libwpe
, libwpe-fdo
, glib-networking
, webkitgtk_4_0
, makeWrapper
, wrapGAppsHook3
, adwaita-icon-theme
, gdk-pixbuf
}:
stdenv.mkDerivation rec {
pname = "cog";
version = "0.8.1";
src = fetchFromGitHub {
owner = "igalia";
repo = "cog";
rev = "v${version}";
sha256 = "sha256-eF7rvOjZntcMmn622342yqfp4ksZ6R/FFBT36bYCViE=";
};
buildInputs = [
wayland-protocols
wayland
libwpe
libwpe-fdo
webkitgtk_4_0
glib-networking
gdk-pixbuf
adwaita-icon-theme
];
nativeBuildInputs = [
cmake
pkg-config
wayland
makeWrapper
wrapGAppsHook3
];
depsBuildsBuild = [
pkg-config
];
cmakeFlags = [
"-DCOG_USE_WEBKITGTK=ON"
];
# https://github.com/Igalia/cog/issues/438
postPatch = ''
substituteInPlace core/cogcore.pc.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
# 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 = "Small single window launcher for the WebKit WPE port";
homepage = "https://github.com/Igalia/cog";
mainProgram = "cog";
license = licenses.mit;
maintainers = [ maintainers.matthewbauer ];
platforms = platforms.linux;
};
}