Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httplib: 0.17.3 -> 0.18.0 #343963

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
alsa-lib,
asio,
curl,
libremidi,
nlohmann_json,
obs-studio,
opencv,
Expand All @@ -16,12 +17,17 @@
stdenv,
tesseract,
websocketpp,
xorg,

httplib,
libremidi,
libXScrnSaver,
}:

let
httplib-src = fetchFromGitHub {
owner = "yhirose";
repo = "cpp-httplib";
rev = "v0.17.3";
hash = "sha256-yvaPIbRqJGkiob3Nrv3H1ieFAC5b+h1tTncJWTy4dmk=";
};
in
stdenv.mkDerivation rec {
pname = "advanced-scene-switcher";
version = "1.27.2";
Expand Down Expand Up @@ -50,13 +56,13 @@ stdenv.mkDerivation rec {
qtbase
tesseract
websocketpp
xorg.libXScrnSaver
libXScrnSaver
];

dontWrapQtApps = true;

postUnpack = ''
cp -r ${httplib.src}/* $sourceRoot/deps/cpp-httplib
cp -r ${httplib-src}/* $sourceRoot/deps/cpp-httplib
cp -r ${libremidi.src}/* $sourceRoot/deps/libremidi
chmod -R +w $sourceRoot/deps/cpp-httplib
chmod -R +w $sourceRoot/deps/libremidi
Expand Down
36 changes: 36 additions & 0 deletions pkgs/by-name/ht/httplib/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
lib,
cmake,
fetchFromGitHub,
openssl,
stdenv,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "httplib";
version = "0.18.0";

src = fetchFromGitHub {
owner = "yhirose";
repo = "cpp-httplib";
rev = "v${finalAttrs.version}";
hash = "sha256-cR1yRqZ6hZeGtMhiW003zcN0d/f/v1gMMNiL0hA1r6I=";
};

nativeBuildInputs = [ cmake ];

buildInputs = [ openssl ];

strictDeps = true;

meta = {
homepage = "https://github.com/yhirose/cpp-httplib";
description = "C++ header-only HTTP/HTTPS server and client library";
changelog = "https://github.com/yhirose/cpp-httplib/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
AndersonTorres
];
platforms = lib.platforms.all;
};
})
Original file line number Diff line number Diff line change
@@ -1,44 +1,58 @@
{ alsa-lib
, cmake
, CoreAudio
, CoreFoundation
, CoreMIDI
, CoreServices
, fetchFromGitHub
, lib
, stdenv
{
lib,
alsa-lib,
cmake,
darwin,
fetchFromGitHub,
stdenv,
}:

stdenv.mkDerivation rec {
let
inherit (darwin.apple_sdk.frameworks)
CoreAudio
CoreFoundation
CoreMIDI
CoreServices
;
in
stdenv.mkDerivation (finalAttrs: {
pname = "libremidi";
version = "4.4.0";

src = fetchFromGitHub {
owner = "jcelerier";
repo = "libremidi";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-raVBJ75/UmM3P69s8VNUXRE/2jV4WqPIfI4eXaf6UEg=";
};

nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
];

buildInputs = lib.optional stdenv.isLinux alsa-lib
buildInputs =
lib.optionals stdenv.isLinux [
alsa-lib
]
++ lib.optionals stdenv.isDarwin [
CoreAudio
CoreFoundation
CoreMIDI
CoreServices
];
CoreAudio
CoreFoundation
CoreMIDI
CoreServices
];

# Bug: set this as true breaks obs-studio-plugins.advanced-scene-switcher
strictDeps = false;

postInstall = ''
cp -r $src/include $out
'';

meta = {
description = "Modern C++ MIDI real-time & file I/O library";
homepage = "https://github.com/jcelerier/libremidi";
maintainers = [ ];
description = "Modern C++ MIDI real-time & file I/O library";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.all;
};
}
})
30 changes: 0 additions & 30 deletions pkgs/development/libraries/httplib/default.nix

This file was deleted.

10 changes: 0 additions & 10 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19931,8 +19931,6 @@ with pkgs;

hnswlib = callPackage ../development/libraries/hnswlib { };

httplib = callPackage ../development/libraries/httplib { };

icon-lang = callPackage ../development/interpreters/icon-lang { };

libgit2 = callPackage ../development/libraries/libgit2 {
Expand Down Expand Up @@ -21402,14 +21400,6 @@ with pkgs;

librem = callPackage ../development/libraries/librem { };

libremidi = callPackage ../development/libraries/libremidi {
inherit (darwin.apple_sdk.frameworks)
CoreAudio
CoreFoundation
CoreMIDI
CoreServices;
};

libremines = qt6.callPackage ../games/libremines { };

librelp = callPackage ../development/libraries/librelp { };
Expand Down