configuration/packages/git-diff-image.nix
2022-06-22 10:29:27 -07:00

62 lines
1.2 KiB
Nix

{ fetchFromGitHub
, lib
, makeWrapper
, stdenv
# Dependencies
, bash
, bc
, coreutils
, diffutils
, exiftool
, gnugrep
, gnused
, imagemagick
, xdg-utils
, xdpyinfo
}:
stdenv.mkDerivation rec {
pname = "git-diff-image";
version = "unstable-2020-12-15";
src = fetchFromGitHub {
owner = "ewanmellor";
repo = "git-diff-image";
rev = "8e66316d00ff78270ec09e1388738e30ac43a39d";
sha256 = "188zjg582qlxmpgnwi57mvjb1y3mc3plk2l6b1hfxin35j6z4p4l";
};
buildInputs = [ makeWrapper ];
installPhase = ''
install -D -m755 $src/diff-image $out/bin/diff-image
wrapProgram $out/bin/diff-image --prefix PATH : ${lib.makeBinPath [
bash
bc
coreutils
diffutils
exiftool
gnugrep
gnused
imagemagick
xdg-utils
xdpyinfo
]}
install -D -m755 $src/git_diff_image $out/bin/git_diff_image
wrapProgram $out/bin/git_diff_image --prefix PATH : ${lib.makeBinPath [
bash
coreutils
diffutils
imagemagick
]}
'';
meta = {
description = "An extension to 'git diff' that provides support for diffing images.";
homepage = "https://github.com/ewanmellor/git-diff-image";
license = lib.licenses.cc0;
mainProgram = "diff-image";
};
}