{ buildAll ? false }: { protobuf , pkg-config , h2o , openssl , eigen , ncurses5 , zstd , zlib , curl , gitMinimal , stdenv , fetchFromGitHub , lib }: let core = "ubxtool rtcmtool navrecv navnexus navparse"; noncore = if buildAll then "navdump navcat reporter rinreport galmonmon navdisplay" else ""; in stdenv.mkDerivation { pname = "galmon"; version = "git-master"; src = fetchFromGitHub { owner = "berthubert"; repo = "galmon"; rev = "refs/heads/master"; sha256 = "sha256-QDluII9Ry3smMup5yOkAQZi35Phdf8m3fsQLDT8JFGc="; fetchSubmodules = true; }; buildInputs = [ protobuf pkg-config h2o openssl eigen ncurses5 zstd zlib curl gitMinimal ]; buildPhase = '' make ${core} ${noncore} ''; installPhase = '' mkdir -p $out/bin mv ${core} ${noncore} $out/bin # avoid collision with gpsd's ubxtool mv $out/bin/ubxtool $out/bin/galmon-ubxtool ${lib.optionalString buildAll "cp -r html $out/"} ''; }