nixpkgs/pkgs/development/libraries/mysocketw/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.4 KiB
Nix
Raw Normal View History

2022-03-19 19:52:15 +00:00
{ lib
, stdenv
, fetchFromGitHub
2022-05-18 12:13:49 +00:00
, fetchpatch
, fetchurl
2022-03-19 19:52:15 +00:00
, openssl
, cmake
}:
2022-05-18 12:13:49 +00:00
let
joinpaths-src = fetchurl {
url = "https://github.com/AnotherFoxGuy/CMakeCM/raw/afe41f4536ae21f6f11f83e8c0b8b8c450ef1332/modules/JoinPaths.cmake";
hash = "sha256-eUsNj6YqO3mMffEtUBFFgNGkeiNL+2tNgwkutkam7MQ=";
};
in
2021-06-22 13:21:29 +00:00
stdenv.mkDerivation rec {
pname = "mysocketw";
2022-03-19 00:34:44 +00:00
version = "3.11.0";
src = fetchFromGitHub {
owner = "RigsOfRods";
repo = "socketw";
rev = version;
2022-03-19 19:52:15 +00:00
hash = "sha256-mpfhmKE2l59BllkOjmURIfl17lAakXpmGh2x9SFSaAo=";
};
2022-05-18 12:13:49 +00:00
patches = [
# in master post 3.11.0, see https://github.com/RigsOfRods/socketw/issues/16
(fetchpatch {
name = "fix-pkg-config.patch";
url = "https://github.com/RigsOfRods/socketw/commit/17cad062c3673bd0da74a2fecadb01dbf9813a07.patch";
sha256 = "01b019gfm01g0r1548cizrf7mqigsda8jnrzhg8dhi9c49nfw1bp";
})
];
2022-03-19 19:52:15 +00:00
nativeBuildInputs = [
cmake
];
buildInputs = [
openssl
];
2022-05-18 12:13:49 +00:00
postUnpack = ''(
mkdir -p source/build/_cmcm-modules/resolved && cd $_
cp ${joinpaths-src} JoinPaths.cmake
printf %s 'https://AnotherFoxGuy.com/CMakeCM::modules/JoinPaths.cmake.1' > JoinPaths.cmake.whence
)'';
2022-03-19 19:52:15 +00:00
meta = with lib; {
description = "Cross platform (Linux/FreeBSD/Unix/Win32) streaming socket C++";
2022-03-19 19:52:15 +00:00
homepage = "https://github.com/RigsOfRods/socketw";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ ];
2022-12-05 02:02:27 +00:00
platforms = platforms.unix;
};
}