nur-packages

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

commit 319ef33e9f3e5c546e22b58af7a42145b4cdccb0
parent 5839d3ceb16e4d1738e558e7a8c9e363e9bd9bcd
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed, 27 Oct 2021 14:51:48 +0300

Add chibicc

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/suckless/chibicc/default.nix | 27+++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -339,6 +339,7 @@ lib.makeScope newScope ( ### SUCKLESS blind = callPackage ./suckless/blind { }; + chibicc = callPackage ./suckless/chibicc { }; cproc = callPackage ./suckless/cproc { }; farbfeld-utils = callPackage ./suckless/farbfeld-utils { }; hurl = callPackage ./suckless/hurl { }; diff --git a/pkgs/suckless/chibicc/default.nix b/pkgs/suckless/chibicc/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchFromGitHub, memstreamHook }: + +stdenv.mkDerivation rec { + pname = "chibicc"; + version = "2020-12-07"; + + src = fetchFromGitHub { + owner = "rui314"; + repo = pname; + rev = "90d1f7f199cc55b13c7fdb5839d1409806633fdb"; + hash = "sha256-sGSPQv9JPXTnyv+7CnmzWq1objCJRctK4wKII8GM26s="; + }; + + buildInputs = lib.optional stdenv.isDarwin memstreamHook; + + installPhase = '' + install -Dm755 chibicc -t $out/bin + ''; + + meta = with lib; { + description = "A small C compiler"; + inherit (src.meta) homepage; + license = licenses.mit; + platforms = platforms.unix; + maintainers = [ maintainers.sikmir ]; + }; +}