libk  Check-in [a26e579866]

Overview
Comment:Add initial build setup for Nix
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a26e579866718983cdee5413626c2c4ea93d44308798a166d265085032658861
User & Date: glow on 2019-08-21 04:50:41
Other Links: manifest | tags
Context
2019-08-21
06:00
move modules to a subdirectory in order to keep the directory tree organized and make room for OS-specific build files check-in: 14172a910a user: lexi tags: trunk
04:50
Add initial build setup for Nix check-in: a26e579866 user: glow tags: trunk
04:24
modify build system to replace extremely fragile error code generation mechanism check-in: d77ef26adf user: lexi tags: trunk
Changes

Added default.nix version [eeefb2d05d].





>
>
1
2
with import <nixpkgs> {};
callPackage ./libk.nix {}

Added libk.nix version [09f8c0f00b].







































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{stdenv, m4, yasm}:

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

  src = stdenv.lib.cleanSource ./.;

  nativeBuildInputs = [ m4 yasm ];

  buildPhase = ''
    substituteInPlace global/build-id.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
    substituteInPlace global/build-manpage.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
    env os=lin arch=x86 bits=64 to=$prefix debug=yes \
    bash build.sh
  '';

  # No proper install yet...
  dontInstall = true;

  # This doesn't seem to work anyways?
  dontStrip = true;
  dontPatchELF = true;

  hardeningDisable = [ "stackprotector" ];

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