nur-packages

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

default.nix (943B)


      1 { lib, stdenvNoCC, fetchFromGitHub, dict, pandoc, stardict-tools }:
      2 
      3 stdenvNoCC.mkDerivation rec {
      4   pname = "it-sanasto";
      5   version = "2020-02-27";
      6 
      7   src = fetchFromGitHub {
      8     owner = "HankiDesign";
      9     repo = "IT-sanasto";
     10     rev = "e31974edd50a50db6ef1b95aab81a18f33800e67";
     11     hash = "sha256-+YLKG4kqflWkRdrER0A7GRYXluZpuf1TO0zyk3gVzU4=";
     12   };
     13 
     14   nativeBuildInputs = [ dict pandoc stardict-tools ];
     15 
     16   buildPhase = ''
     17     for i in *.md; do
     18       pandoc -f markdown -t html -s $i | awk -F "</*td>" '/<\/*td>.*/ {print $2}'
     19     done | paste -d"#" - - - | sed 's/#/\t/;s/#/\\n/' > it-sanasto.tab
     20 
     21     stardict-tabfile it-sanasto.tab
     22   '';
     23 
     24   installPhase = "install -Dm644 *.{dict*,idx,ifo} -t $out";
     25 
     26   meta = with lib; {
     27     description = "IT-alan englanti-suomi -sanasto";
     28     inherit (src.meta) homepage;
     29     license = licenses.mit;
     30     maintainers = [ maintainers.sikmir ];
     31     platforms = platforms.all;
     32     skip.ci = true;
     33   };
     34 }