lock: 1.3.0 -> 1.3.4 (#364295)
[NixPkgs.git] / pkgs / by-name / be / bencode / package.nix
blobb3df112d910185f98dbdf9436f3cf8dfa436c57c
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   catch2,
6   cmake,
7   expected-lite,
8   fmt,
9   gsl-lite,
10   ninja,
13 stdenv.mkDerivation rec {
14   pname = "bencode";
15   version = "1.0.1";
17   src = fetchFromGitHub {
18     owner = "fbdtemme";
19     repo = "bencode";
20     rev = version;
21     hash = "sha256-zpxvADZfYTUdlNLMZJSCanPL40EGl9BBCxR7oDhvOTw=";
22   };
24   nativeBuildInputs = [
25     cmake
26     ninja
27   ];
29   buildInputs = [
30     catch2
31     expected-lite
32     fmt
33     gsl-lite
34   ];
36   postPatch = ''
37     # Disable a test that requires an internet connection.
38     substituteInPlace tests/CMakeLists.txt \
39       --replace "add_subdirectory(cmake_fetch_content)" ""
40   '';
42   doCheck = true;
44   postInstall = ''
45     rm -rf $out/lib64
46   '';
48   meta = with lib; {
49     description = "Header-only C++20 bencode serialization/deserialization library";
50     homepage = "https://github.com/fbdtemme/bencode";
51     changelog = "https://github.com/fbdtemme/bencode/blob/${src.rev}/CHANGELOG.md";
52     license = licenses.mit;
53     maintainers = with maintainers; [ azahi ];
54     platforms = platforms.unix;
55     # Broken because the default stdenv on these targets doesn't support C++20.
56     broken = with stdenv; isDarwin || (isLinux && isAarch64);
57   };