summary refs log tree commit diff
path: root/pkgs/os-specific/linux/chromium-os/modp_b64/default.nix
blob: 4908443f9b77614a541e8bdc78f4e79c4e88ca2d (plain) (blame)
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
{ common-mk, lib, fetchFromGitiles, upstreamInfo }:

common-mk {
  platformSubdir = "modp_b64";

  src = fetchFromGitiles upstreamInfo.components."aosp/platform/external/modp_b64";

  patches = [
    # We could just use the Makefile, but it's going to be removed in
    # the next release anyway so let's just get on the GN train early.
    ./0001-modp_b64-Fix-GN-build-and-add-fuzzers.patch
    ./0002-Use-regular-archives.patch
  ];

  installPhase = ''
    mkdir -p $out/lib
    install -m 0644 libmodp_b64.a $out/lib

    mkdir $out/include
    cp -r ../../modp_b64/modp_b64 $out/include
  '';

  meta = with lib; {
    description = "High performance base64 encoder/decoder";
    homepage = "https://github.com/client9/stringencoders";
    license = licenses.bsd3;
    maintainers = with maintainers; [ qyliss ];
    platform = platforms.all;
  };
}