Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 47 lines 1.1 kB view raw
1{ 2 stdenvNoCC, 3 fetchFromGitHub, 4 lib, 5}: 6 7stdenvNoCC.mkDerivation (finalAttrs: { 8 pname = "physac"; 9 version = "1.1-unstable-2023-12-11"; 10 11 src = fetchFromGitHub { 12 owner = "victorfisac"; 13 repo = "Physac"; 14 rev = "29d9fc06860b54571a02402fff6fa8572d19bd12"; 15 hash = "sha256-PTlV1tT0axQbmGmJ7JD1n6wmbIxUdu7xho78EO0HNNk="; 16 }; 17 18 dontBuild = true; 19 installPhase = '' 20 runHook preInstall 21 22 mkdir -p $out/{include,lib/pkgconfig} 23 24 install -Dm644 $src/src/physac.h $out/include/physac.h 25 26 cat <<EOF > $out/lib/pkgconfig/physac.pc 27 prefix=$out 28 includedir=$out/include 29 30 Name: physac 31 Description: ${finalAttrs.meta.description} 32 URL: ${finalAttrs.meta.homepage} 33 Version: ${finalAttrs.version} 34 Cflags: -I"{includedir}" 35 EOF 36 37 runHook postInstall 38 ''; 39 40 meta = { 41 description = "2D physics header-only library for raylib"; 42 homepage = "https://github.com/victorfisac/Physac"; 43 license = lib.licenses.mit; 44 maintainers = with lib.maintainers; [ sigmanificient ]; 45 platforms = lib.platforms.unix; 46 }; 47})