depot/third_party/nixpkgs/pkgs/development/libraries/the-foundation/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

55 lines
1 KiB
Nix

{
lib,
stdenv,
fetchFromGitea,
cmake,
pkg-config,
curl,
libunistring,
openssl,
pcre,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "the-foundation";
version = "1.9.0";
src = fetchFromGitea {
domain = "git.skyjake.fi";
owner = "skyjake";
repo = "the_Foundation";
rev = "v${finalAttrs.version}";
hash = "sha256-hrwnY8m4xW8Sr2RunwD5VB+gnYUtZxXyGoiO3N23qGM=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
curl
libunistring
openssl
pcre
zlib
];
cmakeFlags = [
(lib.cmakeFeature "UNISTRING_DIR" "${libunistring}")
];
postFixup = ''
substituteInPlace "$out"/lib/pkgconfig/the_Foundation.pc \
--replace '="''${prefix}//' '="/'
'';
meta = {
description = "Opinionated C11 library for low-level functionality";
homepage = "https://git.skyjake.fi/skyjake/the_Foundation";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ sikmir ];
platforms = lib.platforms.unix;
};
})