From b64692dcc667ce94a0078380db1f79e0d86b32ba Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Mon, 30 Nov 2020 16:21:07 -0800 Subject: [PATCH] libcork: init at 1.0.0--rc3 --- .../development/libraries/libcork/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/libraries/libcork/default.nix diff --git a/pkgs/development/libraries/libcork/default.nix b/pkgs/development/libraries/libcork/default.nix new file mode 100644 index 000000000000..3875ff91185a --- /dev/null +++ b/pkgs/development/libraries/libcork/default.nix @@ -0,0 +1,45 @@ +{ stdenv +, fetchFromGitHub +, cmake +, lib +, pkg-config +, check +}: +stdenv.mkDerivation rec { + pname = "libcork"; + version = "1.0.0--rc3"; + + src = fetchFromGitHub { + owner = "dcreager"; + repo = pname; + rev = version; + sha256 = "152gqnmr6wfmflf5l6447am4clmg3p69pvy3iw7yhaawjqa797sk"; + }; + + # N.B. We need to create this file, otherwise it tries to use git to + # determine the package version, which we do not want. + # + # N.B. We disable tests by force, since their build is broken. + postPatch = '' + echo "${version}" > .version-stamp + echo "${version}" > .commit-stamp + sed -i '/add_subdirectory(tests)/d' ./CMakeLists.txt + ''; + + nativeBuildInputs = [ cmake pkg-config ]; + buildInputs = [ check ]; + + doCheck = false; + + postInstall = '' + ln -s $out/lib/libcork.so $out/lib/libcork.so.1 + ''; + + meta = with lib; { + homepage = "https://github.com/dcreager/libcork"; + description = "A simple, easily embeddable cross-platform C library"; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = with maintainers; [ lovesegfault ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c7d2fbb6241..8fcce1abc317 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5360,6 +5360,8 @@ in libck = callPackage ../development/libraries/libck { }; + libcork = callPackage ../development/libraries/libcork { }; + libconfig = callPackage ../development/libraries/libconfig { }; libcmis = callPackage ../development/libraries/libcmis { };