2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, garmintools, libgcrypt, libusb-compat-0_1, pkg-config, tinyxml, zlib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "garmin-plugin";
|
|
|
|
version = "0.3.26";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "adiesner";
|
|
|
|
repo = "GarminPlugin";
|
|
|
|
rev = "V${version}";
|
|
|
|
sha256 = "sha256-l0WAbEsQl1dCADf5gTepYjsA1rQCJMLcrTxRR4PfUus=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd src
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
buildInputs = [ garmintools libusb-compat-0_1 libgcrypt tinyxml zlib ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-libgcrypt-prefix=${libgcrypt.dev}"
|
|
|
|
"--with-garmintools-incdir=${garmintools}/include"
|
|
|
|
"--with-garmintools-libdir=${garmintools}/lib"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/mozilla/plugins
|
|
|
|
cp npGarminPlugin.so $out/lib/mozilla/plugins
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://adiesner.github.io/GarminPlugin/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|