about summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorhappysalada <raphael@megzari.com>2022-04-02 12:03:41 -0400
committerYt <raphael@megzari.com>2022-04-03 07:58:14 -0400
commitf4edf20487ef7493b4f797e7b6e51c7ab332c3e3 (patch)
tree7c2d13d39f17953c4b8db9f54c7bee01a74a02d9 /pkgs/servers
parent459d04132d0398b175b3915d3e4e3eb2adf1eb3e (diff)
roapi-http: init at 0.6.0
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/roapi/http.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/servers/roapi/http.nix b/pkgs/servers/roapi/http.nix
new file mode 100644
index 0000000000000..775850ea32e04
--- /dev/null
+++ b/pkgs/servers/roapi/http.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, lib
+, fetchurl
+}:
+let
+  pname = "roapi-http";
+  version = "0.6.0";
+  target = if stdenv.isDarwin then "apple-darwin" else "";
+in
+# TODO build from source, currently compilation fails on darwin on snmalloc with
+#  ./mem/../ds/../pal/pal_apple.h:277:64: error: use of undeclared identifier 'kCCSuccess'
+#            reinterpret_cast<void*>(&result), sizeof(result)) != kCCSuccess)
+#
+# rustPlatform.buildRustPackage {
+#   pname = "roapi-http";
+#   inherit version;
+
+#   src = fetchFromGitHub {
+#     owner = "roapi";
+#     repo = "roapi";
+#     rev = "roapi-http-v${version}";
+#     sha256 = "sha256-qHAO3h+TTCQQ7vdd4CoXVGfKZ1fIxTWKqbUNnRsJaok=";
+#   };
+
+#   cargoSha256 = "sha256-qDJKC6MXeKerPFwJsNND3WkziFtGkTvCgVEsdPbBGAo=";
+
+#   buildAndTestSubdir = "roapi-http";
+
+#   nativeBuildInputs = [ cmake ];
+
+stdenv.mkDerivation rec {
+  inherit pname version;
+
+  src = fetchurl {
+    url = "https://github.com/roapi/roapi/releases/download/${pname}-v${version}/${pname}-${target}.tar.gz";
+    sha256 = "sha256-lv6BHg/LkrOlyq8D1udAYW8/AbZRb344YCcVnwo3ZHk=";
+  };
+  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    tar xvzf $src
+    mkdir -p "$out/bin"
+    cp roapi-http $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Create full-fledged APIs for static datasets without writing a single line of code. ";
+    homepage = "https://roapi.github.io/docs/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ happysalada ];
+    platforms = platforms.darwin;
+  };
+}