nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 46 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 cmake, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "libccd"; 11 version = "2.1"; 12 13 src = fetchFromGitHub { 14 owner = "danfis"; 15 repo = "libccd"; 16 rev = "v${finalAttrs.version}"; 17 sha256 = "0sfmn5pd7k5kyhbxnd689xmsa5v843r7sska96dlysqpljd691jc"; 18 }; 19 20 patches = [ 21 # Fix pkgconfig file with absolute CMAKE_INSTALL_*DIR 22 # https://github.com/danfis/libccd/pull/76 23 (fetchpatch { 24 url = "https://github.com/danfis/libccd/commit/cd16c4f168ae308e4c77db66ac97a2eaf47e059e.patch"; 25 sha256 = "02wj21c185kwf8bn4qi4cnna0ypzqm481xw9rr8jy1i0cb1r9idg"; 26 }) 27 ]; 28 29 # fix for CMake v4 30 # ref https://github.com/danfis/libccd/pull/82, not merged yet 31 postPatch = '' 32 substituteInPlace CMakeLists.txt --replace-fail \ 33 "cmake_minimum_required(VERSION 2.8.11)" \ 34 "cmake_minimum_required(VERSION 3.12)" 35 ''; 36 37 nativeBuildInputs = [ cmake ]; 38 39 meta = { 40 description = "Library for collision detection between two convex shapes"; 41 homepage = "https://github.com/danfis/libccd"; 42 license = lib.licenses.bsd3; 43 maintainers = with lib.maintainers; [ lopsided98 ]; 44 platforms = lib.platforms.unix; 45 }; 46})