
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ stdenv, lib, fetchFromGitHub, pkg-config, glib }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libglibutil";
|
|
version = "1.0.79";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sailfishos";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-UJsKjvigZuwDL4DyjUE6fXEecgoHrTE+5pO0hVyCwP4=";
|
|
};
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
glib
|
|
];
|
|
|
|
postPatch = ''
|
|
# Fix pkg-config name for cross-compilation
|
|
substituteInPlace Makefile --replace "pkg-config" "$PKG_CONFIG"
|
|
'';
|
|
|
|
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 = {
|
|
description = "Library of glib utilities";
|
|
homepage = "https://git.sailfishos.org/mer-core/libglibutil";
|
|
license = lib.licenses.bsd3;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = with lib.maintainers; [ ];
|
|
};
|
|
}
|