From 54918d6366fd6b2946b869f2f5a0645e5477c859 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 4 May 2020 23:20:00 +0200 Subject: [PATCH 1/2] git: Add a doc output for the HTML and text files This will install the HTML and text documentation into a separate output so that users can install it without having to rebuild Git. Previously only `doc/git/git-subtree.html` was installed (which is now in $doc as well). The current output sizes are as follows: ``` $ du -sh $(nix-build -A git) 47M /nix/store/wyqgalp61kmavx06rams7z8jz177nd8y-git-2.26.2 $ du -sh $(nix-build -A git.doc) 14M /nix/store/6zi22fl5xc3sg23d9shsviinvwk89wvq-git-2.26.2-doc ``` Fixes #86022 (at least partly since the output has to be installed). --- .../version-management/git-and-tools/git/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 9c1a01f42ae8..140a273e342e 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation { sha256 = "0j685w6pzkn926z5nf5r8fij4ziipvw4c9yb0wc577nzf4j16rbd"; }; - outputs = [ "out" ]; + outputs = [ "out" "doc" ]; hardeningDisable = [ "format" ]; @@ -234,7 +234,7 @@ stdenv.mkDerivation { '') + stdenv.lib.optionalString withManual ''# Install man pages and Info manual - make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-info \ + make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-html install-info \ -C Documentation '' + (if guiSupport then '' From 9f2faa1f6f14b977e4b91523b6c2621bb77f7b62 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Mon, 18 May 2020 16:50:14 +0200 Subject: [PATCH 2/2] git-doc: init --- nixos/doc/manual/release-notes/rl-2009.xml | 5 +++++ .../version-management/git-and-tools/default.nix | 8 ++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index 0ed440d79c63..a6c3c2033c38 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -391,6 +391,11 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ]; This matches the autotools convention for env vars which standard for these things, making interfacing with other tools easier. + + + Additional Git documentation (HTML and text files) is now available via the git-doc package. + + diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index c591ef554ee4..48fa002463b3 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -82,6 +82,14 @@ let inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; }; + git-doc = lib.addMetaAttrs { + description = "Additional documentation for Git"; + longDescription = '' + This package contains additional documentation (HTML and text files) that + is referenced in the man pages of Git. + ''; + } gitFull.doc; + git-extras = callPackage ./git-extras { }; git-fame = callPackage ./git-fame {}; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 680177a2610a..7df73a2ec1c3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19720,7 +19720,7 @@ in gitAndTools = recurseIntoAttrs (callPackage ../applications/version-management/git-and-tools {}); - inherit (gitAndTools) git gitFull gitSVN git-cola svn2git git-radar git-secret git-secrets transcrypt git-crypt ghq; + inherit (gitAndTools) git gitFull gitSVN git-cola git-doc svn2git git-radar git-secret git-secrets transcrypt git-crypt ghq; gitMinimal = git.override { withManual = false;