nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, makeWrapper, bash, gnumake }:
2
3stdenv.mkDerivation rec {
4 pname = "makefile2graph";
5 version = "unstable-2018-01-03";
6
7 src = fetchFromGitHub {
8 owner = "lindenb";
9 repo = "makefile2graph";
10 rev = "61fb95a5ba91c20236f5e4deb11127c34b47091f";
11 sha256 = "07hq40bl48i8ka35fcciqcafpd8k9rby1wf4vl2p53v0665xaghr";
12 };
13
14 nativeBuildInputs = [ makeWrapper ];
15
16 makeFlags = [ "prefix=$(out)" ];
17
18 fixupPhase = ''
19 substituteInPlace $out/bin/makefile2graph \
20 --replace '/bin/sh' ${bash}/bin/bash \
21 --replace 'make2graph' "$out/bin/make2graph"
22 wrapProgram $out/bin/makefile2graph \
23 --set PATH ${lib.makeBinPath [ gnumake ]}
24 '';
25
26 meta = with lib; {
27 homepage = "https://github.com/lindenb/makefile2graph";
28 description = "Creates a graph of dependencies from GNU-Make; Output is a graphiz-dot file or a Gexf-XML file";
29 maintainers = with maintainers; [ cmcdragonkai ];
30 license = licenses.mit;
31 platforms = platforms.all;
32 };
33}