2022-08-21 13:32:41 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pkg-config, glib }:
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libglibutil";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.0.75";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sailfishos";
|
2021-10-04 12:37:57 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-YHK5gRXBIhZJTY7F8b7QIUnftCIgOHwXVM3D35M3DC4=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Fix pkg-config name for cross-compilation
|
|
|
|
substituteInPlace Makefile --replace "pkg-config" "$PKG_CONFIG"
|
|
|
|
'';
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
makeFlags = [
|
|
|
|
"LIBDIR=$(out)/lib"
|
|
|
|
"INSTALL_INCLUDE_DIR=$(dev)/include/gutil"
|
|
|
|
"INSTALL_PKGCONFIG_DIR=$(dev)/lib/pkgconfig"
|
|
|
|
];
|
|
|
|
|
|
|
|
installTargets = [ "install" "install-dev" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
sed -i -e "s@includedir=/usr@includedir=$dev@g" $dev/lib/pkgconfig/$pname.pc
|
|
|
|
sed -i -e "s@Cflags: @Cflags: $($PKG_CONFIG --cflags glib-2.0) @g" $dev/lib/pkgconfig/$pname.pc
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = {
|
2021-10-04 12:37:57 +00:00
|
|
|
description = "Library of glib utilities.";
|
|
|
|
homepage = "https://git.sailfishos.org/mer-core/libglibutil";
|
2024-01-02 11:29:13 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ mcaju ];
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
}
|