Skip to content

Commit

Permalink
gtk-doc: fix css file permissions
Browse files Browse the repository at this point in the history
Fixes https://gitlab.gnome.org/GNOME/gtk-doc/issues/84 which
was breaking the documentation build for glib.

The patch was based off an upstream pr [0] but
completed with the requested changes.

[0]: https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/27
  • Loading branch information
worldofpeace committed May 18, 2019
1 parent 064ca0a commit 0e27680
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
@@ -0,0 +1,24 @@
From 95a75c95c5c4e641ce7cda0ded968d66f07f822a Mon Sep 17 00:00:00 2001
From: worldofpeace <worldofpeace@protonmail.ch>
Date: Sat, 18 May 2019 14:44:08 -0400
Subject: [PATCH] highlight: fix permission on file style

---
gtkdoc/highlight.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtkdoc/highlight.py b/gtkdoc/highlight.py
index 8f6e470..d11c432 100644
--- a/gtkdoc/highlight.py
+++ b/gtkdoc/highlight.py
@@ -47,6 +47,6 @@ def highlight_code(code, lang='c'):


def append_style_defs(css_file_name):
- os.chmod(css_file_name, stat.S_IWRITE)
+ os.chmod(css_file_name, 0o664)
with open(css_file_name, 'at', newline='\n', encoding='utf-8') as css:
css.write(HTML_FORMATTER.get_style_defs())
--
2.21.0

2 changes: 2 additions & 0 deletions pkgs/development/tools/documentation/gtk-doc/default.nix
Expand Up @@ -27,6 +27,8 @@ stdenv.mkDerivation rec {

patches = [
passthru.respect_xml_catalog_files_var_patch
# https://gitlab.gnome.org/GNOME/gtk-doc/issues/84
./0001-highlight-fix-permission-on-file-style.patch
];

outputDevdoc = "out";
Expand Down

0 comments on commit 0e27680

Please sign in to comment.