about summary refs log tree commit diff
path: root/pkgs/tools/misc/miniserve
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2020-04-14 14:43:26 +1000
committerGitHub <noreply@github.com>2020-04-14 00:43:26 -0400
commit1a3d41d41223675fcdc61f30b2bfb063f7a69fe1 (patch)
tree9f369961019547037b037130e16905ba72adebc4 /pkgs/tools/misc/miniserve
parent7c309eceebfdfc01ed9f1e5fb2bf42583e5610e7 (diff)
miniserve: build on darwin (#85187)
Diffstat (limited to 'pkgs/tools/misc/miniserve')
-rw-r--r--pkgs/tools/misc/miniserve/default.nix25
1 files changed, 16 insertions, 9 deletions
diff --git a/pkgs/tools/misc/miniserve/default.nix b/pkgs/tools/misc/miniserve/default.nix
index 9add75acee207..ea3afdab0982f 100644
--- a/pkgs/tools/misc/miniserve/default.nix
+++ b/pkgs/tools/misc/miniserve/default.nix
@@ -1,13 +1,20 @@
-{ stdenv, rustPlatform, fetchFromGitHub, cmake, pkg-config, zlib, openssl }:
+{ stdenv
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, zlib
+, openssl
+, Security
+}:
 
 rustPlatform.buildRustPackage rec {
   pname = "miniserve";
   version = "0.6.0";
 
   src = fetchFromGitHub {
-    owner  = "svenstaro";
-    repo   = "miniserve";
-    rev    = "v${version}";
+    owner = "svenstaro";
+    repo = "miniserve";
+    rev = "v${version}";
     sha256 = "0ybxnxjg0vqm4q60z4zjl3hfls0s2rvy44m6jgyhlj1p6cr3dbyw";
   };
 
@@ -15,14 +22,14 @@ rustPlatform.buildRustPackage rec {
 
   RUSTC_BOOTSTRAP = 1;
 
-  nativeBuildInputs = [ cmake pkg-config zlib ];
-  buildInputs = [ openssl ];
+  nativeBuildInputs = [ pkg-config zlib ];
+  buildInputs = if stdenv.isDarwin then [ Security ] else [ openssl ];
 
   meta = with stdenv.lib; {
     description = "For when you really just want to serve some files over HTTP right now!";
-    homepage    = "https://github.com/svenstaro/miniserve";
-    license     = with licenses; [ mit ];
+    homepage = "https://github.com/svenstaro/miniserve";
+    license = with licenses; [ mit ];
     maintainers = with maintainers; [ nequissimus ];
-    platforms   = platforms.linux;
+    platforms = platforms.unix;
   };
 }