Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 meson, 6 ninja, 7 pkg-config, 8 gi-docgen, 9 gobject-introspection, 10 lcms2, 11 vala, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "babl"; 16 version = "0.1.114"; 17 18 outputs = [ 19 "out" 20 "dev" 21 "devdoc" 22 ]; 23 24 src = fetchurl { 25 url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor finalAttrs.version}/babl-${finalAttrs.version}.tar.xz"; 26 hash = "sha256-vLt3hsHkR3A9s7x/o01i0NLRF7IvBNiDTHstXe1FZIc="; 27 }; 28 29 patches = [ 30 # Allow overriding path to dev output that will be hardcoded e.g. in pkg-config file. 31 ./dev-prefix.patch 32 ]; 33 34 nativeBuildInputs = [ 35 meson 36 ninja 37 pkg-config 38 gi-docgen 39 gobject-introspection 40 vala 41 ]; 42 43 buildInputs = [ 44 lcms2 45 ]; 46 47 mesonFlags = [ 48 "-Dprefix-dev=${placeholder "dev"}" 49 ] 50 ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ 51 # Docs are opt-out in native but opt-in in cross builds. 52 "-Dwith-docs=true" 53 "-Denable-gir=true" 54 ]; 55 56 postFixup = '' 57 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. 58 moveToOutput "share/doc" "$devdoc" 59 ''; 60 61 meta = with lib; { 62 description = "Image pixel format conversion library"; 63 mainProgram = "babl"; 64 homepage = "https://gegl.org/babl/"; 65 changelog = "https://gitlab.gnome.org/GNOME/babl/-/blob/BABL_${ 66 replaceStrings [ "." ] [ "_" ] finalAttrs.version 67 }/NEWS"; 68 license = licenses.lgpl3Plus; 69 maintainers = with maintainers; [ jtojnar ]; 70 platforms = platforms.unix; 71 }; 72})