defpkgbuild(jansson, #:pkgname, "jansson", #:pkgver, "2.14", #:pkgrel, 1, #:pkgdesc, "JSON encoding, decoding and data manipulation", #:arch, [#:x86-64, #:aarch64], #:url, "https://digip.org/jansson/", #:license, "MIT", #:depends, ["musl"], #:source, ["https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz"], #:sha256sums, ["5798d010e41cf8d76b66236cfb2f2543c8d082181d16bc3085ab49538d4b9929"], #:build, fn() { run("vinix-configure", "jansson-2.14/configure") run("make") }, #:check, fn() { run("vinix-cc", "-Isrc", "-Ijansson-2.14/src", "jansson-2.14/test/suites/api/test_load.c", "-Lsrc/.libs", "-ljansson", "-o", "test-load") run("vinix-run", "--library-path", "src/.libs", "./test-load") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "jansson-2.14/LICENSE", string-append(pkgdir(), "/usr/share/licenses/jansson/LICENSE")) })