nur-packages

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

default.nix (1050B)


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