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