1 { lib, stdenv, fetchFromGitHub, makeWrapper, bash, gnumake }:
3 stdenv.mkDerivation rec {
4 pname = "makefile2graph";
5 version = "2021.11.06";
7 src = fetchFromGitHub {
9 repo = "makefile2graph";
10 rev = "refs/tags/${version}";
11 hash = "sha256-4jyftC0eCJ13X/L4uEWhT5FA5/UXUmSHSoba89GSySQ=";
14 nativeBuildInputs = [ makeWrapper ];
16 makeFlags = [ "prefix=$(out)" ];
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 ]}
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;