nur-packages

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

default.nix (989B)


      1 { lib, stdenv, fetchFromGitHub, ncurses }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "libst";
      5   version = "2021-06-06";
      6 
      7   src = fetchFromGitHub {
      8     owner = "jeremybobbin";
      9     repo = "libst";
     10     rev = "4bcd511e6dd0d88730b9359fd5a4d12781c2344a";
     11     hash = "sha256-vpU1Hbd6c/c0M/eUvQqW7RXHG2bz707LkcKlgFrzHtc=";
     12   };
     13 
     14   postPatch = ''
     15     substituteInPlace Makefile \
     16       --replace "ar rcs" "\$(AR) rcs"
     17   '';
     18 
     19   nativeBuildInputs = [ ncurses ];
     20 
     21   buildInputs = [ ncurses ];
     22 
     23   postBuild = ''
     24     make -C examples/svt CFLAGS=-I$PWD LDFLAGS=-L$PWD
     25   '';
     26 
     27   preInstall = ''
     28     export HOME=$TMP
     29     mkdir -p $out/{lib,include}
     30   '';
     31 
     32   installFlags = [ "PREFIX=$(out)" ];
     33 
     34   postInstall = ''
     35     make -C examples/svt install PREFIX=$out
     36   '';
     37 
     38   meta = with lib; {
     39     description = "Suckless Terminal ANSI parser";
     40     inherit (src.meta) homepage;
     41     license = licenses.mit;
     42     platforms = platforms.linux;
     43     maintainers = [ maintainers.sikmir ];
     44     skip.ci = stdenv.isDarwin;
     45   };
     46 }