defpkgbuild(nghttp2, #:pkgname, "nghttp2", #:pkgver, "1.69.0", #:pkgrel, 1, #:pkgdesc, "HTTP/2 client and server protocol library", #:arch, [#:x86-64, #:aarch64], #:url, "https://nghttp2.org/", #:license, "MIT", #:depends, ["musl"], #:source, ["https://github.com/nghttp2/nghttp2/releases/download/v1.69.0/nghttp2-1.69.0.tar.xz"], #:sha256sums, ["1fb324b6ec2c56f6bde0658f4139ffd8209fa9e77ce98fd7a5f63af8d0e508ad"], #:build, fn() { run("vinix-configure", "nghttp2-1.69.0/configure", "--enable-lib-only") run("make") }, #:check, fn() { run("vinix-cc", "-Inghttp2-1.69.0/lib/includes", "-Ilib/includes", "nghttp2-1.69.0/examples/deflate.c", "-Llib/.libs", "-lnghttp2", "-o", "hpack-roundtrip") run("vinix-run", "--library-path", "lib/.libs", "./hpack-roundtrip") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "nghttp2-1.69.0/COPYING", string-append(pkgdir(), "/usr/share/licenses/nghttp2/COPYING")) })