nur-packages

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

default.nix (922B)


      1 {
      2   lib,
      3   stdenvNoCC,
      4   fetchwebarchive,
      5   dict,
      6   jq,
      7   stardict-tools,
      8 }:
      9 
     10 stdenvNoCC.mkDerivation {
     11   pname = "komputeko";
     12   version = "2021-05-28";
     13 
     14   src = fetchwebarchive {
     15     url = "https://komputeko.net/data.json";
     16     timestamp = "20210630073336";
     17     hash = "sha256-dIvzbfqMjfogkj3Zld6lQ9PmNth712fw2lNr/OCvUEQ=";
     18   };
     19 
     20   dontUnpack = true;
     21 
     22   nativeBuildInputs = [
     23     dict
     24     jq
     25     stardict-tools
     26   ];
     27 
     28   buildPhase = ''
     29     cat $src | \
     30       jq -r '.words[]|select(has("en") and has("eo"))|[.en[0].word,([.eo[].word]|join(", "))]|@tsv' > komputeko.tsv
     31     stardict-tabfile komputeko.tsv
     32   '';
     33 
     34   installPhase = "install -Dm644 *.{dict*,idx,ifo} -t $out";
     35 
     36   meta = {
     37     homepage = "https://komputeko.net/";
     38     description = "Prikomputila terminokolekto";
     39     maintainers = [ lib.maintainers.sikmir ];
     40     license = lib.licenses.cc-by-sa-40;
     41     platforms = lib.platforms.all;
     42     skip.ci = true;
     43   };
     44 }