nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1036B)


      1 { lib, stdenv, fetchFromGitHub, cmake, gdal, proj, wrapQtAppsHook }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "garminimg";
      5   version = "0-unstable-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-fail "PROJ4" "PROJ"
     17     substituteInPlace srcEncodeImg/CMakeLists.txt \
     18       --replace-fail "PROJ4_" "PROJ_"
     19     substituteInPlace srcDecodeImg/CMakeLists.txt \
     20       --replace-fail "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 }