nur-packages

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

package.nix (1079B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchfromgh,
      5   unzip,
      6   mono,
      7   makeWrapper,
      8 }:
      9 
     10 stdenv.mkDerivation (finalAttrs: {
     11   pname = "srtm2osm";
     12   version = "1.16.5.0";
     13 
     14   __structuredAttrs = true;
     15 
     16   src = fetchfromgh {
     17     owner = "mibe";
     18     repo = "Srtm2Osm";
     19     tag = "v${lib.versions.majorMinor finalAttrs.version}";
     20     hash = "sha256-wSuz/s7VEgGc3gbXcLwi3TIoW/GwUMGmTMWVWlaS2sI=";
     21     name = "Srtm2Osm-${finalAttrs.version}.zip";
     22   };
     23 
     24   nativeBuildInputs = [
     25     unzip
     26     makeWrapper
     27   ];
     28 
     29   installPhase = ''
     30     mkdir -p $out/opt/srtm2osm
     31     cp -r . $out/opt/srtm2osm
     32 
     33     makeWrapper ${mono}/bin/mono $out/bin/srtm2osm \
     34       --add-flags "$out/opt/srtm2osm/Srtm2Osm.exe"
     35   '';
     36 
     37   meta = {
     38     description = "Srtm2Osm tool uses SRTM digital elevation model to generate elevation contours of a selected terrain";
     39     homepage = "https://github.com/mibe/Srtm2Osm";
     40     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
     41     license = lib.licenses.free;
     42     maintainers = [ lib.maintainers.sikmir ];
     43     mainProgram = "srtm2osm";
     44     inherit (mono.meta) platforms;
     45   };
     46 })