about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/binserve/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/binserve/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/binserve/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/binserve/default.nix b/nixpkgs/pkgs/servers/binserve/default.nix
new file mode 100644
index 000000000000..23ebe0c270f8
--- /dev/null
+++ b/nixpkgs/pkgs/servers/binserve/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "binserve";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "mufeedvh";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Chm2xPB0BrLXSZslg9wnbDyHSJRQAvOtpH0Rw6w1q1s=";
+  };
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    CoreServices
+  ];
+
+  cargoLock.lockFile = ./Cargo.lock;
+  postPatch = ''
+    cp ${./Cargo.lock} Cargo.lock
+  '';
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A fast production-ready static web server";
+    homepage = "https://github.com/mufeedvh/binserve";
+    longDescription = ''
+      A fast production-ready static web server with TLS
+      (HTTPS), routing, hot reloading, caching, templating, and security in a
+      single-binary you can set up with zero code
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ snapdgn ];
+    platforms = platforms.unix;
+  };
+}