libk  libk.nix at [1abe29c598]

File dist/libk.nix artifact 1899f7d930 part of check-in 1abe29c598


{stdenv, m4, yasm, cmark, groff}:

stdenv.mkDerivation {
  name = "libk";
  version = "0.0.0";

  src = stdenv.lib.cleanSource ../.;

  # Need to figure out how split builds work... but that also kinda needs
  # an install script first, so.
  nativeBuildInputs = [ m4 yasm cmark groff ];

  buildPhase = ''
    patchShebangs --build global/build-id.sh global/build-manpage.sh
    env os=lin arch=x86 bits=64 doc_pdf=false library=both \
    bash build.sh
  '';

  installPhase = ''
    env prefix=$prefix bash install.sh
  '';

  meta = with stdenv.lib; {
    description = "A modern replacement for libc";
    homepage = https://c.comint.su/libk;
    changelog = "https://c.comint.su/libk/timeline";
    license = licenses.agpl3;
    # Doesn't actually match w/ supported platforms, but...
    platforms = platforms.unix;
  };
}