about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/the-foundation
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/the-foundation')
-rw-r--r--nixpkgs/pkgs/development/libraries/the-foundation/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/the-foundation/default.nix b/nixpkgs/pkgs/development/libraries/the-foundation/default.nix
new file mode 100644
index 000000000000..69d88f508dac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/the-foundation/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitea
+, cmake
+, pkg-config
+, curl
+, libunistring
+, openssl
+, pcre
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "the-foundation";
+  version = "1.6.1";
+
+  src = fetchFromGitea {
+    domain = "git.skyjake.fi";
+    owner = "skyjake";
+    repo = "the_Foundation";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-GOvdnmutSQcsNT57tADLSkJAUX0JDVsualII+y21a+I=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ curl libunistring openssl pcre zlib ];
+
+  postFixup = ''
+    substituteInPlace "$out"/lib/pkgconfig/the_Foundation.pc \
+      --replace '="''${prefix}//' '="/'
+  '';
+
+  meta = with lib; {
+    description = "Opinionated C11 library for low-level functionality";
+    homepage = "https://git.skyjake.fi/skyjake/the_Foundation";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+})