Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub }: 2 3stdenv.mkDerivation { 4 pname = "memorymapping"; 5 version = "unstable-2014-02-20"; 6 7 src = fetchFromGitHub { 8 owner = "NimbusKit"; 9 repo = "memorymapping"; 10 rev = "fc285afe13cb9d56a40c647b8ed6d6bd40636af7"; 11 sha256 = "sha256-9u/QvK9TDsKxcubINH2OAbx5fXXkKF0+YT7LoLDaF0M="; 12 }; 13 14 dontConfigure = true; 15 16 buildPhase = '' 17 runHook preBuild 18 19 $CC -c src/fmemopen.c 20 $AR rcs libmemorymapping.a fmemopen.o 21 sed -e '1i#include <stdio.h>' -i src/fmemopen.h 22 23 runHook postBuild 24 ''; 25 26 installPhase = '' 27 runHook preInstall 28 29 install -D libmemorymapping.a "$out"/lib/libmemorymapping.a 30 install -D src/fmemopen.h "$out"/include/fmemopen.h 31 32 runHook postInstall 33 ''; 34 35 meta = with lib; { 36 homepage = "https://nimbuskit.github.io/memorymapping/"; 37 description = "fmemopen for Mac OS and iOS"; 38 license = licenses.asl20; 39 maintainers = with maintainers; [ veprbl ]; 40 # Uses BSD-style funopen() to implement glibc-style fmemopen(). 41 # Add more BSDs if you need to. 42 platforms = platforms.darwin; 43 broken = stdenv.isAarch64; 44 }; 45}