-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(pistache): Improve derivation
* List all deps explicitly and remove `with pkgs;` * Remove unused `gtest` and `doxygen` deps * Enable OpenSSL support and make it optional * Replace `with lib; with platforms;` with `lib.platforms.*` * Use `pname` attribute instead of name * Set platforms to Linux only, as per: pistacheio/pistache#6 (comment)
- Loading branch information
1 parent
e99a10e
commit 65fc15c
Showing
1 changed file
with
36 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,39 @@ | ||
{pkgs}: | ||
with pkgs; | ||
stdenv.mkDerivation rec { | ||
name = "pistache-${version}"; | ||
version = "2023-02-25"; | ||
src = fetchFromGitHub { | ||
owner = "pistacheio"; | ||
repo = "pistache"; | ||
rev = "ae073a0709ed1d6f0c28db90766c64b06f0366e6"; | ||
hash = "sha256-4mqiQRL3ucXudNRvjCExPUAlz8Q5BzEqJUMVK6f30ug="; | ||
}; | ||
{ | ||
stdenv, | ||
lib, | ||
fetchFromGitHub, | ||
meson, | ||
cmake, | ||
ninja, | ||
pkgconfig, | ||
openssl, | ||
rapidjson, | ||
howard-hinnant-date, | ||
}: | ||
stdenv.mkDerivation rec { | ||
pname = "pistache"; | ||
version = "2023-02-25"; | ||
src = fetchFromGitHub { | ||
owner = "pistacheio"; | ||
repo = "pistache"; | ||
rev = "ae073a0709ed1d6f0c28db90766c64b06f0366e6"; | ||
hash = "sha256-4mqiQRL3ucXudNRvjCExPUAlz8Q5BzEqJUMVK6f30ug="; | ||
}; | ||
|
||
nativeBuildInputs = with pkgs; [meson cmake ninja pkgconfig gtest]; | ||
nativeBuildInputs = [meson cmake ninja pkgconfig]; | ||
|
||
buildInputs = with pkgs; [ | ||
doxygen | ||
openssl | ||
rapidjson | ||
howard-hinnant-date | ||
]; | ||
buildInputs = [ | ||
openssl | ||
rapidjson | ||
howard-hinnant-date | ||
]; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/pistacheio/pistache"; | ||
platforms = with platforms; linux ++ darwin; | ||
}; | ||
} | ||
mesonFlags = | ||
lib.optional (openssl != null) | ||
(lib.mesonOption "PISTACHE_USE_SSL" "true"); | ||
|
||
meta = { | ||
homepage = "https://github.com/pistacheio/pistache"; | ||
platforms = lib.platforms.linux; | ||
}; | ||
} |