citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

default.nix (1153B)


      1 { stdenv, gawk, fetchurl }:
      2 stdenv.mkDerivation rec {
      3   name = "ical2org-${version}";
      4   version = "15r1rq9xpjypij0bb89zrscm1wc5czljfyv47z68vmkhimr579az";
      5 
      6   src = fetchurl {
      7     url = http://orgmode.org/worg/code/awk/ical2org.awk;
      8     sha256 = version;
      9   };
     10 
     11   phases = [ "installPhase" ];
     12 
     13   buildInputs = [ gawk ];
     14 
     15   installPhase = ''
     16     mkdir -p $out/bin
     17     cp $src $out/bin/ical2org
     18     chmod +x $out/bin/ical2org
     19     substituteInPlace $out/bin/ical2org \
     20       --replace "/usr/bin/awk" "${gawk}/bin/gawk" \
     21       --replace "max_age = 7" "max_age = -1" \
     22       --replace "condense = 0" "condense = 1" \
     23       --replace "original = 1" "original = 0" \
     24       --replace "preamble = 1" "preamble = 0" \
     25       --replace 'author = "Eric S Fraga"' 'author = "William Casarin"' \
     26       --replace 'emailaddress = "e.fraga@ucl.ac.uk"' 'emailaddress = "bill@casarin.me"'
     27   '';
     28 
     29   meta = with stdenv.lib; {
     30     description = "Convert ical to org";
     31     homepage = "http://orgmode.org/worg/org-tutorials/org-google-sync.html";
     32     license = licenses.free;
     33     platforms = with platforms;  linux ++ darwin ;
     34     maintainers = with maintainers; [ jb55 ];
     35   };
     36 }