base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / libetebase / package.nix
blobc76b5a2320f71805cc1d49735102517ce30954f0
1 { rustPlatform
2 , fetchFromGitHub
3 , pkg-config
4 , openssl
5 , lib
6 , stdenv
7 , testers
8 , libetebase
9 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "libetebase";
12   version = "0.5.6";
14   src = fetchFromGitHub {
15     owner = "etesync";
16     repo = "libetebase";
17     rev = "v${version}";
18     hash = "sha256-cXuOKfyMdk+YzDi0G8i44dyBRf4Ez5+AlCKG43BTSSU=";
19   };
21   cargoHash = "sha256-GUNj5GrY04CXnej3WDKZmW4EeJhoCl2blHSDfEkQKtE=";
23   nativeBuildInputs = [ pkg-config ];
25   buildInputs = [ openssl ];
27   postInstall = ''
28     install -d $out/lib/pkgconfig
29     sed s#@prefix@#$out#g etebase.pc.in > $out/lib/pkgconfig/etebase.pc
30     install -Dm644 EtebaseConfig.cmake -t $out/lib/cmake/Etebase
31     install -Dm644 target/etebase.h -t $out/include/etebase
32     ln -s $out/lib/libetebase.so $out/lib/libetebase.so.0
33   '';
35   passthru.tests.pkgs-config = testers.testMetaPkgConfig libetebase;
37   meta = with lib; {
38     description = "A C library for Etebase";
39     homepage = "https://www.etebase.com/";
40     license = licenses.bsd3;
41     broken = stdenv.hostPlatform.isDarwin;
42     maintainers = with maintainers; [ laalsaas ];
43     pkgConfigModules = [ "etebase" ];
44   };