4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
57 lines
1.7 KiB
Nix
57 lines
1.7 KiB
Nix
{ stdenv, lib, lispPackages, sbcl
|
|
, makeWrapper, wrapGAppsHook, gst_all_1
|
|
, glib, gdk-pixbuf, cairo
|
|
, mime-types, pango, gtk3
|
|
, glib-networking, gsettings-desktop-schemas
|
|
, xclip, notify-osd, enchant
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nyxt";
|
|
inherit (lispPackages.nyxt.meta) version;
|
|
|
|
src = lispPackages.nyxt;
|
|
|
|
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
|
|
gstBuildInputs = with gst_all_1; [
|
|
gstreamer gst-libav
|
|
gst-plugins-base
|
|
gst-plugins-good
|
|
gst-plugins-bad
|
|
gst-plugins-ugly
|
|
];
|
|
buildInputs = [
|
|
glib gdk-pixbuf cairo
|
|
mime-types pango gtk3
|
|
glib-networking gsettings-desktop-schemas
|
|
xclip notify-osd enchant
|
|
] ++ gstBuildInputs;
|
|
|
|
GST_PLUGIN_SYSTEM_PATH_1_0 = lib.concatMapStringsSep ":" (p: "${p}/lib/gstreamer-1.0") gstBuildInputs;
|
|
|
|
dontWrapGApps = true;
|
|
installPhase = ''
|
|
mkdir -p $out/share/applications/
|
|
sed "s/VERSION/$version/" $src/lib/common-lisp/nyxt/assets/nyxt.desktop > $out/share/applications/nyxt.desktop
|
|
for i in 16 32 128 256 512; do
|
|
mkdir -p "$out/share/icons/hicolor/''${i}x''${i}/apps/"
|
|
cp -f $src/lib/common-lisp/nyxt/assets/nyxt_''${i}x''${i}.png "$out/share/icons/hicolor/''${i}x''${i}/apps/nyxt.png"
|
|
done
|
|
|
|
mkdir -p $out/bin && makeWrapper $src/bin/nyxt $out/bin/nyxt \
|
|
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "${GST_PLUGIN_SYSTEM_PATH_1_0}" \
|
|
--argv0 nyxt "''${gappsWrapperArgs[@]}"
|
|
'';
|
|
|
|
checkPhase = ''
|
|
$out/bin/nyxt -h
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Infinitely extensible web-browser (with Lisp development files using WebKitGTK platform port)";
|
|
homepage = "https://nyxt.atlas.engineer";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ lewo ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|