about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ws/wslay/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/ws/wslay/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/ws/wslay/package.nix30
1 files changed, 25 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/by-name/ws/wslay/package.nix b/nixpkgs/pkgs/by-name/ws/wslay/package.nix
index ed6c0c9b6735..294a98f9d6a0 100644
--- a/nixpkgs/pkgs/by-name/ws/wslay/package.nix
+++ b/nixpkgs/pkgs/by-name/ws/wslay/package.nix
@@ -1,4 +1,13 @@
-{ stdenv, lib, fetchFromGitHub, cmake, cunit }:
+{
+  stdenv,
+  lib,
+  fetchFromGitHub,
+  pkg-config,
+  cunit,
+  sphinx,
+  autoreconfHook,
+  nettle,
+}:
 
 stdenv.mkDerivation rec {
   pname = "wslay";
@@ -11,18 +20,29 @@ stdenv.mkDerivation rec {
     hash = "sha256-xKQGZO5hNzMg+JYKeqOBsu73YO+ucBEOcNhG8iSNYvA=";
   };
 
-  strictDeps = true;
+  postPatch = ''
+    substituteInPlace doc/sphinx/conf.py.in \
+      --replace-fail "add_stylesheet" "add_css_file"
+  '';
 
-  nativeBuildInputs = [ cmake ];
+  strictDeps = true;
 
-  cmakeFlags = [
-    (lib.cmakeBool "WSLAY_TESTS" true)
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    sphinx
   ];
 
+  buildInputs = [ nettle ];
+
   doCheck = true;
 
   checkInputs = [ cunit ];
 
+  preCheck = lib.optionalString stdenv.isDarwin ''
+    export DYLD_LIBRARY_PATH=$(pwd)/lib/.libs
+  '';
+
   meta = with lib; {
     homepage = "https://tatsuhiro-t.github.io/wslay/";
     description = "The WebSocket library in C";