2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, bash, gnumake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "makefile2graph";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "2021.11.06";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lindenb";
|
|
|
|
repo = "makefile2graph";
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-4jyftC0eCJ13X/L4uEWhT5FA5/UXUmSHSoba89GSySQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
makeFlags = [ "prefix=$(out)" ];
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
substituteInPlace $out/bin/makefile2graph \
|
|
|
|
--replace '/bin/sh' ${bash}/bin/bash \
|
|
|
|
--replace 'make2graph' "$out/bin/make2graph"
|
|
|
|
wrapProgram $out/bin/makefile2graph \
|
2021-02-05 17:12:51 +00:00
|
|
|
--set PATH ${lib.makeBinPath [ gnumake ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/lindenb/makefile2graph";
|
|
|
|
description = "Creates a graph of dependencies from GNU-Make; Output is a graphiz-dot file or a Gexf-XML file";
|
|
|
|
maintainers = with maintainers; [ cmcdragonkai ];
|
|
|
|
license = licenses.mit;
|
2021-03-19 17:17:44 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|