nixpkgs/pkgs/development/libraries/libglibutil/default.nix
2021-10-03 21:22:53 +03:00

46 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitLab, pkg-config, glib }:
stdenv.mkDerivation rec {
pname = "libglibutil";
version = "1.0.55";
src = fetchFromGitLab {
domain = "git.sailfishos.org";
owner = "mer-core";
repo = pname;
rev = version;
sha256 = "0zrxccpyfz4jf14zr6fj9b88p340s66lw5cnqkapfa72kl1rnp4q";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
glib
];
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
'';
meta = with lib; {
description = "Library of glib utilities.";
homepage = "https://git.sailfishos.org/mer-core/libglibutil";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ mcaju ];
};
}