diff --git a/README.md b/README.md index 538eb5c..1bf5050 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ What environments should **not** include: | [cc2538-bsl](envs/cc2538-bsl) | `cc2538-bsl` | | [Jruby](envs/jruby) | `jruby` | | [Firefox](envs/firefox) | `firefox` | +| [Git](envs/git) | `git` | | [Github Pages](envs/github-pages) | `github-pages` | | [Homeassistant](envs/home-assistant) | `home-assistant` | | [Nannou](envs/nannou) | `nannou` | diff --git a/default.nix b/default.nix index ea920e0..6b21f6b 100644 --- a/default.nix +++ b/default.nix @@ -7,6 +7,7 @@ firefox = import ./envs/firefox/shell.nix { inherit pkgs; }; infinitime = import ./envs/infinitime/shell.nix { pkgs = pkgsUnfree; }; infinisim = import ./envs/infinisim/shell.nix { inherit pkgs; }; + git = import ./envs/git/shell.nix { inherit pkgs; }; github-pages = import ./envs/github-pages/shell.nix { inherit pkgs; }; home-assistant = import ./envs/home-assistant/shell.nix { inherit pkgs; }; jruby = import ./envs/jruby/shell.nix { inherit pkgs; }; diff --git a/envs/git/README.md b/envs/git/README.md new file mode 100644 index 0000000..2b82147 --- /dev/null +++ b/envs/git/README.md @@ -0,0 +1,23 @@ +# Git + +Git is a fast, scalable, distributed revision control system. See +[Git](https://git-scm.com) for more details. + +This shell environment configuration allows you to build Git and its +documentation, as well as run its tests. + +## Building Git + +Run `make` from the Git repository's root directory. + +## Building Git documentation + +Run `make` from the `Documentation` directory. + +## Running Git tests + +Run `make` from the `t` directory to kick off the full test suite. +Alternatively, the individual test scripts can be run directly. + +See [t/README.md](https://github.com/git/git/blob/master/t/README) for more +details. diff --git a/envs/git/shell.nix b/envs/git/shell.nix new file mode 100644 index 0000000..78e044b --- /dev/null +++ b/envs/git/shell.nix @@ -0,0 +1,36 @@ +{ + pkgs ? import { }, + extraPkgs ? [ ], +}: + +with pkgs; +mkShell { + nativeBuildInputs = [ + # Building git + libiconv + + # Building the docs + asciidoc + docbook-xsl-nons + docbook_xml_dtd_45 + libxslt + xmlto + ]; + buildInputs = + [ + curl + expat + gettext + openssl + perl + zlib + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreServices + ] + ++ extraPkgs; + PERL_PATH = "${perl.outPath}/bin/perl"; + shellHook = lib.strings.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS="-F${darwin.apple_sdk.frameworks.CoreServices}/Library/Frameworks -framework CoreServices $NIX_LDFLAGS" + ''; +}