default.nix (1010B)
1 { lib, stdenv, fetchFromGitHub, cmake, gdal, proj, wrapQtAppsHook }: 2 3 stdenv.mkDerivation rec { 4 pname = "garminimg"; 5 version = "2021-01-07"; 6 7 src = fetchFromGitHub { 8 owner = "kiozen"; 9 repo = "GarminImg"; 10 rev = "6bfd029e9712b47eeab144bfe150baccd8c879bd"; 11 hash = "sha256-6vNN80NJSo2GdGruUKTupMcWOR7E3vo2SD1fAkMCodE="; 12 }; 13 14 postPatch = '' 15 substituteInPlace CMakeLists.txt \ 16 --replace "PROJ4" "PROJ" 17 substituteInPlace srcEncodeImg/CMakeLists.txt \ 18 --replace "PROJ4_" "PROJ_" 19 substituteInPlace srcDecodeImg/CMakeLists.txt \ 20 --replace "PROJ4_" "PROJ_" 21 ''; 22 23 nativeBuildInputs = [ cmake wrapQtAppsHook ]; 24 25 buildInputs = [ gdal proj ]; 26 27 hardeningDisable = [ "format" ]; 28 29 installPhase = '' 30 install -Dm755 bin/* -t $out/bin 31 ''; 32 33 meta = with lib; { 34 description = "Encode/decode a Garmin IMG file"; 35 inherit (src.meta) homepage; 36 license = licenses.gpl3Plus; 37 maintainers = [ maintainers.sikmir ]; 38 platforms = platforms.unix; 39 }; 40 }