garmin-plugin: switch to fetchFromGitHub, minor formatting, cleanup meta

authored by

Sandro Jäckel and committed by
Sandro Jäckel
2c3c7cc3 d81070c8

+21 -10
+21 -10
pkgs/applications/misc/garmin-plugin/default.nix
··· 1 - { lib, stdenv, fetchurl, garmintools, libgcrypt, libusb-compat-0_1, pkg-config, tinyxml, zlib }: 2 stdenv.mkDerivation rec { 3 pname = "garmin-plugin"; 4 version = "0.3.26"; 5 6 - src = fetchurl { 7 - url = "https://github.com/adiesner/GarminPlugin/archive/V${version}.tar.gz"; 8 - sha256 = "15gads1fj4sj970m5960dgnhys41ksi4cm53ldkf67wn8dc9i4k0"; 9 }; 10 - sourceRoot = "GarminPlugin-${version}/src"; 11 nativeBuildInputs = [ pkg-config ]; 12 buildInputs = [ garmintools libusb-compat-0_1 libgcrypt tinyxml zlib ]; 13 configureFlags = [ 14 "--with-libgcrypt-prefix=${libgcrypt.dev}" 15 "--with-garmintools-incdir=${garmintools}/include" 16 "--with-garmintools-libdir=${garmintools}/lib" 17 ]; 18 installPhase = '' 19 mkdir -p $out/lib/mozilla/plugins 20 cp npGarminPlugin.so $out/lib/mozilla/plugins 21 ''; 22 - meta = { 23 - homepage = "http://www.andreas-diesner.de/garminplugin"; 24 - license = lib.licenses.gpl3; 25 - maintainers = [ ]; 26 - platforms = lib.platforms.linux; 27 }; 28 }
··· 1 + { lib, stdenv, fetchFromGitHub, garmintools, libgcrypt, libusb-compat-0_1, pkg-config, tinyxml, zlib }: 2 + 3 stdenv.mkDerivation rec { 4 pname = "garmin-plugin"; 5 version = "0.3.26"; 6 7 + src = fetchFromGitHub { 8 + owner = "adiesner"; 9 + repo = "GarminPlugin"; 10 + rev = "V${version}"; 11 + sha256 = "sha256-l0WAbEsQl1dCADf5gTepYjsA1rQCJMLcrTxRR4PfUus="; 12 }; 13 + 14 + preConfigure = '' 15 + cd src 16 + ''; 17 + 18 nativeBuildInputs = [ pkg-config ]; 19 + 20 buildInputs = [ garmintools libusb-compat-0_1 libgcrypt tinyxml zlib ]; 21 + 22 configureFlags = [ 23 "--with-libgcrypt-prefix=${libgcrypt.dev}" 24 "--with-garmintools-incdir=${garmintools}/include" 25 "--with-garmintools-libdir=${garmintools}/lib" 26 ]; 27 + 28 installPhase = '' 29 mkdir -p $out/lib/mozilla/plugins 30 cp npGarminPlugin.so $out/lib/mozilla/plugins 31 ''; 32 + 33 + meta = with lib; { 34 + homepage = "https://adiesner.github.io/GarminPlugin/"; 35 + license = licenses.gpl3Plus; 36 + maintainers = with maintainers; [ ]; 37 + platforms = platforms.linux; 38 }; 39 }