summaryrefslogtreecommitdiff
path: root/pkgs/galmon.nix
diff options
context:
space:
mode:
authorstuebinm2023-03-02 02:38:49 +0100
committerstuebinm2023-03-02 02:38:49 +0100
commitd51414d155420c0f2f8cfc86bf1d2b7822074eb8 (patch)
tree12d3edf7d8f38a85eec5d5060ef7d7fcdddcb288 /pkgs/galmon.nix
parent07b50c4007701e016100eef59a500ec13f7b38fa (diff)
add a default overlay, package the galmon.eu tools
Diffstat (limited to 'pkgs/galmon.nix')
-rw-r--r--pkgs/galmon.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/galmon.nix b/pkgs/galmon.nix
new file mode 100644
index 0000000..7af18da
--- /dev/null
+++ b/pkgs/galmon.nix
@@ -0,0 +1,47 @@
+{ 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
+ ${lib.optionalString buildAll "cp -r html $out/"}
+ '';
+}