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