about summary refs log tree commit diff
path: root/pkgs/by-name/ph
diff options
context:
space:
mode:
authorSigmanificient <edhyjox@gmail.com>2024-05-21 03:57:49 +0200
committerSigmanificient <edhyjox@gmail.com>2024-05-21 08:34:37 +0200
commitf192a3fe9590713abee64d28052fd0dfc0c31e0d (patch)
tree92ef0258b15131c69f75b69eca28cf90f906f627 /pkgs/by-name/ph
parenteac8f3589db398718ea899564d5876fcb1c482a5 (diff)
physac: init at 2.5-unstable-2024-05-21
physac: fix
Diffstat (limited to 'pkgs/by-name/ph')
-rw-r--r--pkgs/by-name/ph/physac/package.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/by-name/ph/physac/package.nix b/pkgs/by-name/ph/physac/package.nix
new file mode 100644
index 0000000000000..292d5ce6bd24e
--- /dev/null
+++ b/pkgs/by-name/ph/physac/package.nix
@@ -0,0 +1,47 @@
+{
+  stdenvNoCC,
+  fetchFromGitHub,
+  lib
+}:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
+  name = "physac";
+  version = "2.5-unstable-2023-12-11";
+
+  src = fetchFromGitHub {
+    owner = "victorfisac";
+    repo = "Physac";
+    rev = "29d9fc06860b54571a02402fff6fa8572d19bd12";
+    hash = "sha256-PTlV1tT0axQbmGmJ7JD1n6wmbIxUdu7xho78EO0HNNk=";
+  };
+
+  dontBuild = true;
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{include,lib/pkgconfig}
+
+    install -Dm644 $src/src/physac.h $out/include/physac.h
+
+    cat <<EOF > $out/lib/pkgconfig/physac.pc
+    prefix=$out
+    includedir=$out/include
+
+    Name: physac
+    Description: ${finalAttrs.meta.description}
+    URL: ${finalAttrs.meta.homepage}
+    Version: ${finalAttrs.version}
+    Cflags: -I"{includedir}"
+    EOF
+
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "2D physics header-only library for raylib";
+    homepage = "https://github.com/victorfisac/Physac";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ sigmanificient ];
+    platforms = lib.platforms.unix;
+  };
+})