miniserve: build on darwin (#85187)

This commit is contained in:
zowoq 2020-04-14 14:43:26 +10:00 committed by GitHub
parent 7c309eceeb
commit 1a3d41d412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 10 deletions

View file

@ -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;
};
}

View file

@ -2009,7 +2009,9 @@ in
mididings = callPackage ../tools/audio/mididings { };
miniserve = callPackage ../tools/misc/miniserve { };
miniserve = callPackage ../tools/misc/miniserve {
inherit (darwin.apple_sdk.frameworks) Security;
};
mkspiffs = callPackage ../tools/filesystems/mkspiffs { };