nur-packages

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

default.nix (1594B)


      1 {
      2   lib,
      3   stdenv,
      4   buildPerlPackage,
      5   fetchwebarchive,
      6   unzip,
      7   dos2unix,
      8   cgpsmapper,
      9   ocad2mp,
     10   ModulePluggable,
     11   Tk,
     12 }:
     13 
     14 buildPerlPackage {
     15   pname = "ocad2img";
     16   version = "2009-10-11";
     17 
     18   src = fetchwebarchive {
     19     url = "http://worldofo.com/div/ocad2img.zip";
     20     timestamp = "20150326063156";
     21     hash = "sha256-toLKnAY9guAcwOWqgZHsrwBeFLvJLMR+Y8L7GTiXyPA=";
     22   };
     23 
     24   sourceRoot = ".";
     25 
     26   outputs = [ "out" ];
     27 
     28   nativeBuildInputs = [
     29     unzip
     30     dos2unix
     31   ];
     32 
     33   propagatedBuildInputs = [
     34     ModulePluggable
     35     Tk
     36   ];
     37 
     38   postPatch = ''
     39     substituteInPlace ocad2img.pl \
     40       --replace-fail "cgpsmapper" "${cgpsmapper}/bin/cgpsmapper-static" \
     41       --replace-fail "ocad2mp.exe" "${ocad2mp}/bin/ocad2mp" \
     42       --replace-fail "symbols.txt" "$out/share/ocad2img/symbols.txt" \
     43       --replace-fail "use Win32" "#use Win32" \
     44       --replace-fail "require \"unicore/lib/gc_sc" "#require \"unicore/lib/gc_sc"
     45   '';
     46 
     47   preConfigure = ''
     48     dos2unix ocad2img.pl
     49     patchShebangs .
     50     touch Makefile.PL
     51   '';
     52 
     53   installPhase = ''
     54     install -Dm755 ocad2img.pl $out/bin/ocad2img
     55     install -Dm644 symbols.txt -t $out/share/ocad2img
     56     install -dm755 $out/lib/perl5/site_perl
     57     cp -r Convert $out/lib/perl5/site_perl
     58   '';
     59 
     60   meta = {
     61     description = "Converter from OCAD map format to Garmin format";
     62     homepage = "http://news.worldofo.com/2009/10/11/howto-convert-any-orienteering-map-to-a-garmin-map/";
     63     license = lib.licenses.gpl3Plus;
     64     maintainers = [ lib.maintainers.sikmir ];
     65     platforms = lib.platforms.linux;
     66     skip.ci = stdenv.isDarwin;
     67   };
     68 }