Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, makeWrapper, bash, gnumake }: 2 3stdenv.mkDerivation rec { 4 pname = "makefile2graph"; 5 version = "2021.11.06"; 6 7 src = fetchFromGitHub { 8 owner = "lindenb"; 9 repo = "makefile2graph"; 10 rev = "refs/tags/${version}"; 11 hash = "sha256-4jyftC0eCJ13X/L4uEWhT5FA5/UXUmSHSoba89GSySQ="; 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}