libk  Check-in [49da7c1eeb]

Overview
Comment:Greatly clean up Nix build.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 49da7c1eeb8ad2759fae3f0f977684eb9dca51f46bfb465fe13c0261e1db75cb
User & Date: glowpelt on 2020-01-31 20:04:17
Other Links: manifest | tags
Context
2020-03-03
16:02
update distro URLs check-in: 1abe29c598 user: lexi tags: trunk
2020-01-31
20:04
Greatly clean up Nix build. check-in: 49da7c1eeb user: glowpelt tags: trunk
06:05
Merge install script branch. Seems to be Good Enough for now, and shouldn't break anything at all to merge this. check-in: 12a51d9c50 user: glowpelt tags: trunk
Changes

Modified dist/libk.nix from [ce494d8fd7] to [8f964856d4].

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
36
37
38
39
40
41
42

  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 ];

  # TODO: maybe make this more generic? IIRC I couldn't use the
  # patch-everything whatever, for some reason. It also probably should be in
  # an earlier build step.
  buildPhase = ''
    substituteInPlace global/build-id.sh --replace "/usr/bin/env bash" "${stdenv.shell}"
    substituteInPlace global/build-manpage.sh --replace "/usr/bin/env bash" "${stdenv.shell}"

    env os=lin arch=x86 bits=64 to=$prefix debug=yes doc_pdf=false \
    bash build.sh
  '';

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

  # Not sure if these work or are needed, but better safe than sorry, here.
  dontStrip = true;
  dontPatchELF = true;

  # I think there's supposed to be a stack check fail fn now, so maybe this
  # is okay? TODO: test if this is still needed.
  hardeningDisable = [ "stackprotector" ];


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







<
<
<

<
<
>
|



|
|
<
<
<
<
<
<
<
<
>










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

  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.hale.su/libk;
    changelog = "https://c.hale.su/libk/timeline";
    license = licenses.agpl3;
    # Doesn't actually match w/ supported platforms, but...
    platforms = platforms.unix;
  };
}