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