nur-packages

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

package.nix (1231B)


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