nur-packages

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

default.nix (1251B)


      1 { lib, stdenv, fetchwebarchive, fetchpatch, readline, ncurses, bison, flex, installShellFiles }:
      2 
      3 stdenv.mkDerivation (finalAttrs: {
      4   pname = "aamath";
      5   version = "0.3";
      6 
      7   src = fetchwebarchive {
      8     url = "http://fuse.superglue.se/aamath/aamath-${finalAttrs.version}.tar.gz";
      9     timestamp = "20190303013301";
     10     hash = "sha256-mEP0WIaV4s1Vzl2PWJIdTyVeDmXtlWnh3N3z9o93tjE=";
     11   };
     12 
     13   patches = (fetchpatch {
     14     url = "https://raw.githubusercontent.com/macports/macports-ports/6c3088afddcf34ca2bcc5c209f85f264dcf0bc69/math/aamath/files/patch-expr.h.diff";
     15     hash = "sha256-JtLcqdBq/88Bemj4NQYnpEVVTUyiCLWX2zE3CuXtRlM=";
     16   });
     17 
     18   patchFlags = [ "-p0" ];
     19 
     20   postPatch = ''
     21     substituteInPlace Makefile \
     22       --replace-fail "lex " "flex " \
     23       --replace-fail "-ltermcap" "-lncurses"
     24   '';
     25 
     26   nativeBuildInputs = [ bison flex installShellFiles ];
     27 
     28   buildInputs = [ readline ncurses ];
     29 
     30   installPhase = ''
     31     install -Dm755 aamath -t $out/bin
     32     installManPage aamath.1
     33   '';
     34 
     35   meta = with lib; {
     36     description = "ASCII art mathematics";
     37     homepage = "http://fuse.superglue.se/aamath/";
     38     license = licenses.gpl2Only;
     39     maintainers = [ maintainers.sikmir ];
     40     platforms = platforms.linux;
     41     skip.ci = stdenv.isDarwin;
     42   };
     43 })