nur-packages

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

default.nix (1202B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchurl,
      5   unzip,
      6   mono,
      7   gtk2,
      8   makeWrapper,
      9 }:
     10 
     11 stdenv.mkDerivation (finalAttrs: {
     12   pname = "maperitive";
     13   version = "2.4.3";
     14 
     15   src = fetchurl {
     16     url = "http://maperitive.net/download/Maperitive-${finalAttrs.version}.zip";
     17     hash = "sha256-yhslRj4CjUY0kviQTI7z8LvSiWvjf7K8+tDMeA9zNEk=";
     18   };
     19 
     20   nativeBuildInputs = [
     21     unzip
     22     makeWrapper
     23   ];
     24 
     25   installPhase = ''
     26     mkdir -p $out/opt/maperitive
     27     cp -r . $out/opt/maperitive
     28 
     29     makeWrapper ${mono}/bin/mono $out/bin/maperitive \
     30       --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk2 ]} \
     31       --run "[ -d \$HOME/.maperitive ] || { cp -r $out/opt/maperitive \$HOME/.maperitive && chmod -R +w \$HOME/.maperitive; }" \
     32       --add-flags "--desktop \$HOME/.maperitive/Maperitive.exe"
     33   '';
     34 
     35   meta = {
     36     description = "Desktop application for drawing maps based on OpenStreetMap and GPS data";
     37     homepage = "http://maperitive.net/";
     38     changelog = "http://maperitive.net/updates.xml";
     39     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
     40     license = lib.licenses.free;
     41     maintainers = [ lib.maintainers.sikmir ];
     42     platforms = lib.platforms.linux;
     43     skip.ci = true;
     44   };
     45 })