git.iko.soy/typeable/nixpkgs
on master help sign in
diff-so-fancy: init at 0.9.3

Script was mentioned at GitHub blog - https://github.com/blog/2188-git-2-9-has-been-released :)

commit552388f8dfd185e603b2cf8888d6ef54696bbbd5 authorAlexey Lebedeff <alebedev@mirantis.com> dateFri 17 Jun 2016, 13:34 (10 years ago) parent95b8962
2 files changed+51
pkgs/applications/version-management/git-and-tools/default.nix+2 pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix+49
pkgs/applications/version-management/git-and-tools/default.nix+2
@@ -23,6 +23,8 @@ rec {
2323
2424 darcsToGit = callPackage ./darcs-to-git { };
2525
26+ diff-so-fancy = callPackage ./diff-so-fancy { };
27+
2628 git = appendToName "minimal" gitBase;
2729
2830 # The full-featured Git.
pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nixnew file+49
@@ -0,0 +1,49 @@
1+{stdenv, git, perl, ncurses, coreutils, fetchFromGitHub, makeWrapper, ...}:
2+
3+stdenv.mkDerivation rec {
4+ name = "diff-so-fancy-${version}";
5+ version = "0.9.3";
6+
7+ # perl is needed here so patchShebangs can do its job
8+ buildInputs = [perl makeWrapper];
9+
10+ src = fetchFromGitHub {
11+ owner = "so-fancy";
12+ repo = "diff-so-fancy";
13+ rev = "v${version}";
14+ sha256 = "0b5k54h3l4z81p6f7n14g2r5vz7qdyyrbql0z7rwhb7sw7s7zrgx";
15+ };
16+
17+ buildPhase = null;
18+
19+ installPhase = ''
20+ mkdir -p $out/bin $out/lib/diff-so-fancy
21+
22+ # diff-so-fancy executable searches for it's library relative to
23+ # itself, so we are copying executable to lib, and only symlink it
24+ # from bin/
25+ cp diff-so-fancy $out/lib/diff-so-fancy
26+ cp -r lib $out/lib/diff-so-fancy
27+ ln -s $out/lib/diff-so-fancy/diff-so-fancy $out/bin
28+
29+ # ncurses is needed for `tput`
30+ wrapProgram $out/lib/diff-so-fancy/diff-so-fancy \
31+ --prefix PATH : "${git}/share/git/contrib/diff-highlight" \
32+ --prefix PATH : "${git}/bin" \
33+ --prefix PATH : "${coreutils}/bin" \
34+ --prefix PATH : "${ncurses.out}/bin"
35+ '';
36+
37+ meta = {
38+ homepage = https://github.com/so-fancy/diff-so-fancy;
39+ description = "Good-looking diffs filter for git";
40+ license = stdenv.lib.licenses.mit;
41+
42+ longDescription = ''
43+ diff-so-fancy builds on the good-lookin' output of git contrib's
44+ diff-highlight to upgrade your diffs' appearances.
45+ '';
46+
47+ platforms = stdenv.lib.platforms.all;
48+ };
49+}