nur-packages

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

default.nix (701B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   memstreamHook,
      6 }:
      7 
      8 stdenv.mkDerivation (finalAttrs: {
      9   pname = "chibicc";
     10   version = "0-unstable-2020-12-07";
     11 
     12   src = fetchFromGitHub {
     13     owner = "rui314";
     14     repo = "chibicc";
     15     rev = "90d1f7f199cc55b13c7fdb5839d1409806633fdb";
     16     hash = "sha256-sGSPQv9JPXTnyv+7CnmzWq1objCJRctK4wKII8GM26s=";
     17   };
     18 
     19   buildInputs = lib.optional stdenv.isDarwin memstreamHook;
     20 
     21   installPhase = ''
     22     install -Dm755 chibicc -t $out/bin
     23   '';
     24 
     25   meta = {
     26     description = "A small C compiler";
     27     homepage = "https://github.com/rui314/chibicc";
     28     license = lib.licenses.mit;
     29     platforms = lib.platforms.unix;
     30     maintainers = [ lib.maintainers.sikmir ];
     31   };
     32 })