From 5dc86f23a189b3344ce6a529f9216b4ac7ba5d53 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 3 Jan 2023 14:44:36 +0100 Subject: [PATCH] gtksourceview5: Add Nix syntax highlighting So that the default text editor (GNOME Text Editor) can highlight NixOS configuration out of the box. --- pkgs/development/libraries/gtksourceview/5.x.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/gtksourceview/5.x.nix b/pkgs/development/libraries/gtksourceview/5.x.nix index d3ac8246d95e..083c98785342 100644 --- a/pkgs/development/libraries/gtksourceview/5.x.nix +++ b/pkgs/development/libraries/gtksourceview/5.x.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch2 , meson , ninja , pkg-config @@ -37,6 +38,13 @@ stdenv.mkDerivation rec { # but not from its own datadr (it assumes it will be in XDG_DATA_DIRS). # Since this is not generally true with Nix, let’s add $out/share unconditionally. ./4.x-nix_share_path.patch + + # Add Nix syntax highlighting. + # https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/303 + (fetchpatch2 { + url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/2cc7fd079f9fc8b593c727c68a2c783c82299562.patch"; + sha256 = "bTYWjEDpdbnUxcYNKl2YtSLfYlMfcbQSSYQjhixOGS8="; + }) ]; nativeBuildInputs = [