Loading pkgs/development/libraries/babl/default.nix +22 −7 Original line number Diff line number Diff line { stdenv , lib , fetchpatch , fetchurl , meson , ninja , pkg-config , gi-docgen , gobject-introspection , lcms2 , vala }: stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: { pname = "babl"; version = "0.1.106"; version = "0.1.108"; outputs = [ "out" "dev" ]; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor version}/babl-${version}.tar.xz"; hash = "sha256-0yUTXTME8IjBNMxiABOs8DXeLl0SWlCi2RBU5zd8QV8="; url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor finalAttrs.version}/babl-${finalAttrs.version}.tar.xz"; hash = "sha256-Jt7+neqresTQ4HbKtJwqDW69DfDDH9IJklpfB+3uFHU="; }; patches = [ # Allow overriding path to dev output that will be hardcoded e.g. in pkg-config file. ./dev-prefix.patch ]; nativeBuildInputs = [ meson ninja pkg-config gi-docgen gobject-introspection vala ]; Loading @@ -33,6 +39,15 @@ stdenv.mkDerivation rec { lcms2 ]; mesonFlags = [ "-Dprefix-dev=${placeholder "dev"}" ]; postFixup = '' # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. moveToOutput "share/doc" "$devdoc" ''; meta = with lib; { description = "Image pixel format conversion library"; mainProgram = "babl"; Loading @@ -42,4 +57,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ jtojnar ]; platforms = platforms.unix; }; } }) pkgs/development/libraries/babl/dev-prefix.patch 0 → 100644 +29 −0 Original line number Diff line number Diff line diff --git a/meson.build b/meson.build index 2350a1f..56f015d 100644 --- a/meson.build +++ b/meson.build @@ -551,7 +551,7 @@ pkgconfig.generate( variables: [ 'datadir=${prefix}/share', 'pluginsdir=${libdir}/@0@'.format(lib_name), - 'girdir=${datadir}/gir-1.0', + 'girdir=@0@/share/gir-1.0'.format(get_option('prefix-dev')), 'typelibdir=${libdir}/girepository-1.0', ], uninstalled_variables: [ diff --git a/meson_options.txt b/meson_options.txt index f9d558c..3cac593 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -9,6 +9,11 @@ option('enable-gir', choices: ['auto', 'true', 'false'], description: 'gobject introspection .gir generation' ) +option('prefix-dev', + type: 'string', + value: '', + description: 'Like prefix but for dev output of the package' +) option('enable-vapi', type: 'boolean', value: 'true', Loading
pkgs/development/libraries/babl/default.nix +22 −7 Original line number Diff line number Diff line { stdenv , lib , fetchpatch , fetchurl , meson , ninja , pkg-config , gi-docgen , gobject-introspection , lcms2 , vala }: stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: { pname = "babl"; version = "0.1.106"; version = "0.1.108"; outputs = [ "out" "dev" ]; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor version}/babl-${version}.tar.xz"; hash = "sha256-0yUTXTME8IjBNMxiABOs8DXeLl0SWlCi2RBU5zd8QV8="; url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor finalAttrs.version}/babl-${finalAttrs.version}.tar.xz"; hash = "sha256-Jt7+neqresTQ4HbKtJwqDW69DfDDH9IJklpfB+3uFHU="; }; patches = [ # Allow overriding path to dev output that will be hardcoded e.g. in pkg-config file. ./dev-prefix.patch ]; nativeBuildInputs = [ meson ninja pkg-config gi-docgen gobject-introspection vala ]; Loading @@ -33,6 +39,15 @@ stdenv.mkDerivation rec { lcms2 ]; mesonFlags = [ "-Dprefix-dev=${placeholder "dev"}" ]; postFixup = '' # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. moveToOutput "share/doc" "$devdoc" ''; meta = with lib; { description = "Image pixel format conversion library"; mainProgram = "babl"; Loading @@ -42,4 +57,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ jtojnar ]; platforms = platforms.unix; }; } })
pkgs/development/libraries/babl/dev-prefix.patch 0 → 100644 +29 −0 Original line number Diff line number Diff line diff --git a/meson.build b/meson.build index 2350a1f..56f015d 100644 --- a/meson.build +++ b/meson.build @@ -551,7 +551,7 @@ pkgconfig.generate( variables: [ 'datadir=${prefix}/share', 'pluginsdir=${libdir}/@0@'.format(lib_name), - 'girdir=${datadir}/gir-1.0', + 'girdir=@0@/share/gir-1.0'.format(get_option('prefix-dev')), 'typelibdir=${libdir}/girepository-1.0', ], uninstalled_variables: [ diff --git a/meson_options.txt b/meson_options.txt index f9d558c..3cac593 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -9,6 +9,11 @@ option('enable-gir', choices: ['auto', 'true', 'false'], description: 'gobject introspection .gir generation' ) +option('prefix-dev', + type: 'string', + value: '', + description: 'Like prefix but for dev output of the package' +) option('enable-vapi', type: 'boolean', value: 'true',