Created
August 14, 2023 02:59
-
-
Save jordanisaacs/64590ccc801d3cfd29567c92bc58fbc4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages.objectbox-c = with pkgs; let | |
pname = "objectbox-c"; | |
version = "0.18.1"; | |
src = fetchurl { | |
url = "https://github.com/objectbox/${pname}/releases/download/v${version}/objectbox-linux-x64.tar.gz"; | |
hash = "sha256-oYz8ZBNdoTG3NDOuiu0JbmiAmSg4jQf9DQQIMZaNfNQ="; | |
}; | |
in | |
stdenv.mkDerivation rec { | |
inherit pname version src; | |
nativeBuildInputs = [ | |
autoPatchelfHook | |
]; | |
buildInputs = [ | |
stdenv.cc.cc.lib | |
]; | |
sourceRoot = "."; | |
installPhase = '' | |
mkdir $out | |
mv $PWD/* $out | |
mkdir $out/lib/pkgconfig | |
cat >$out/lib/pkgconfig/objectbox.pc <<EOF | |
prefix=$out | |
includedir=$out/include | |
libdir=''${prefix}/lib | |
Name: libobjectbox | |
Description: Database Library | |
Version: ${version} | |
Libs: -L\''${libdir} -lobjectbox | |
Cflags: -I\''${includedir} | |
EOF | |
''; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment