commit d19b498f80b864301e3fd5e2118910a8d0ca7f3c parent cc060d15cd46302516021f6e32e0f72a4348847e Author: Nikolay Korotkiy <sikmir@gmail.com> Date: Sun, 26 Apr 2020 23:15:34 +0300 Add imgdecode Diffstat:
M | pkgs/default.nix | | | 1 | + |
A | pkgs/tools/geo/imgdecode/default.nix | | | 30 | ++++++++++++++++++++++++++++++ |
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -110,6 +110,7 @@ lib.makeScope newScope ( inherit sources; }; i18n-editor = callPackage ./tools/i18n-editor {}; + imgdecode = callPackage ./tools/geo/imgdecode {}; ish = callPackage ./tools/networking/ish {}; morse-talk = python3Packages.callPackage ./tools/morse-talk { inherit sources; diff --git a/pkgs/tools/geo/imgdecode/default.nix b/pkgs/tools/geo/imgdecode/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "imgdecode"; + version = "1.1"; + + src = fetchurl { + url = "mirror://sourceforge/garmin-img/${pname}-${version}.tar.gz"; + sha256 = "sha256-VQC9o/QOti6jTCYi4ktH6UKZLPLwLOUAfosZftf+uWc="; + }; + + postPatch = '' + substituteInPlace garminimg.cc \ + --replace "<stdio.h>" "<cstring>" + ''; + + configurePhase = "./configure || true"; + + installPhase = '' + install -Dm755 imgdecode -t "$out/bin" + ''; + + meta = with stdenv.lib; { + description = "IMG Decoder"; + homepage = "https://sourceforge.net/projects/garmin-img/"; + license = licenses.bsd3; + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.linux; + }; +}