-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git: add shell environment for git.git
This `shell.nix` file provides an environment that allows building and testing git with `make`. The tools/libraries included were determined by reviewing git's `INSTALL` document [1] followed by some trial and error. Exporting `PERL_PATH` as an environment variable allows both the build and test processes to work despite `perl` not being present at `/usr/bin/perl` on a standard NixOS install. Tested on both `x86_64-linux` and `aarch64-darwin`. [1]: https://github.com/git/git/blob/2e7b89e038c0c888acf61f1b4ee5a43d4dd5e94c/INSTALL#L110 Signed-off-by: Brian Lyles <[email protected]>
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
pkgs ? import <nixpkgs> { }, | ||
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" | ||
''; | ||
} |