Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 56 lines 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchurl, 5}: 6let 7 pname = "roapi-http"; 8 version = "0.6.0"; 9 target = lib.optionalString stdenv.hostPlatform.isDarwin "apple-darwin"; 10in 11# TODO build from source, currently compilation fails on darwin on snmalloc with 12# ./mem/../ds/../pal/pal_apple.h:277:64: error: use of undeclared identifier 'kCCSuccess' 13# reinterpret_cast<void*>(&result), sizeof(result)) != kCCSuccess) 14# 15# rustPlatform.buildRustPackage { 16# pname = "roapi-http"; 17# inherit version; 18 19# src = fetchFromGitHub { 20# owner = "roapi"; 21# repo = "roapi"; 22# rev = "roapi-http-v${version}"; 23# sha256 = "sha256-qHAO3h+TTCQQ7vdd4CoXVGfKZ1fIxTWKqbUNnRsJaok="; 24# }; 25 26# cargoHash = "sha256-qDJKC6MXeKerPFwJsNND3WkziFtGkTvCgVEsdPbBGAo="; 27 28# buildAndTestSubdir = "roapi-http"; 29 30# nativeBuildInputs = [ cmake ]; 31 32stdenv.mkDerivation rec { 33 inherit pname version; 34 35 src = fetchurl { 36 url = "https://github.com/roapi/roapi/releases/download/${pname}-v${version}/${pname}-${target}.tar.gz"; 37 sha256 = "sha256-lv6BHg/LkrOlyq8D1udAYW8/AbZRb344YCcVnwo3ZHk="; 38 }; 39 dontUnpack = true; 40 dontConfigure = true; 41 dontBuild = true; 42 43 installPhase = '' 44 tar xvzf $src 45 mkdir -p "$out/bin" 46 cp roapi-http $out/bin 47 ''; 48 49 meta = with lib; { 50 description = "Create full-fledged APIs for static datasets without writing a single line of code"; 51 homepage = "https://roapi.github.io/docs/"; 52 license = licenses.asl20; 53 maintainers = with maintainers; [ happysalada ]; 54 platforms = platforms.darwin; 55 }; 56}