diff options
author | stuebinm | 2023-03-02 02:38:49 +0100 |
---|---|---|
committer | stuebinm | 2023-03-02 02:38:49 +0100 |
commit | d51414d155420c0f2f8cfc86bf1d2b7822074eb8 (patch) | |
tree | 12d3edf7d8f38a85eec5d5060ef7d7fcdddcb288 /pkgs | |
parent | 07b50c4007701e016100eef59a500ec13f7b38fa (diff) |
add a default overlay, package the galmon.eu tools
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/galmon.nix | 47 | ||||
-rw-r--r-- | pkgs/overlay.nix | 6 |
2 files changed, 53 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/"} + ''; +} diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix new file mode 100644 index 0000000..eaba1d9 --- /dev/null +++ b/pkgs/overlay.nix @@ -0,0 +1,6 @@ +self: super: + +{ + galmon-core = self.callPackage (import ./galmon.nix {}) {}; + galmon-full = self.callPackage (import ./galmon.nix { buildAll = true; }) {}; +} |