about summary refs log tree commit diff
diff options
context:
space:
mode:
authordavidak <davidak@users.noreply.github.com>2021-04-26 12:26:44 +0200
committerGitHub <noreply@github.com>2021-04-26 12:26:44 +0200
commit45e57e917d623aa71e9e72947cf9c2dae4f015dc (patch)
tree45b3b2cc490716957b6fe1c3d46912499ff990d5
parent43d751a574d057bf3ae9010a615505324aa74a3b (diff)
parent303e476a6e28b371d47e0884baea59bff2f26d45 (diff)
downloadnixlib-45e57e917d623aa71e9e72947cf9c2dae4f015dc.tar
nixlib-45e57e917d623aa71e9e72947cf9c2dae4f015dc.tar.gz
nixlib-45e57e917d623aa71e9e72947cf9c2dae4f015dc.tar.bz2
nixlib-45e57e917d623aa71e9e72947cf9c2dae4f015dc.tar.lz
nixlib-45e57e917d623aa71e9e72947cf9c2dae4f015dc.tar.xz
nixlib-45e57e917d623aa71e9e72947cf9c2dae4f015dc.tar.zst
nixlib-45e57e917d623aa71e9e72947cf9c2dae4f015dc.zip
Merge pull request #120587 from Mephistophiles/new_packages/simple-http-server
simple-http-server: init at 0.6.1
-rw-r--r--pkgs/servers/simple-http-server/default.nix29
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/servers/simple-http-server/default.nix b/pkgs/servers/simple-http-server/default.nix
new file mode 100644
index 000000000000..d93b4664019e
--- /dev/null
+++ b/pkgs/servers/simple-http-server/default.nix
@@ -0,0 +1,29 @@
+{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "simple-http-server";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "TheWaWaR";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "01a129i1ph3m8k6zkdcqnnkqbhlqpk7qvvdsz2i2kas54csbgsww";
+  };
+
+  cargoSha256 = "050avk6wff8v1dlsfvxwvldmmgfakdxmhglv2bhvc2f3q8cf1d5d";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ];
+
+  # Currently no tests are implemented, so we avoid building the package twice
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Simple HTTP server in Rust";
+    homepage = "https://github.com/TheWaWaR/simple-http-server";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mephistophiles ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7a26bf57adb5..75a57362d93c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -31019,6 +31019,8 @@ in
 
   simplehttp2server = callPackage ../servers/simplehttp2server { };
 
+  simple-http-server = callPackage ../servers/simple-http-server { };
+
   diceware = with python3Packages; toPythonApplication diceware;
 
   xml2rfc = with python3Packages; toPythonApplication xml2rfc;