Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 32273ab1359f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6c0247c972f5
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 27, 2021

  1. librest: enable on Darwin

    Not sure if it will work since the certificates file is not present on MacOS AFAICT but it is needed for GTK 4 so 🤷‍♀️.
    
    Also clean up the expression and correct license.
    jtojnar committed Apr 27, 2021
    Copy the full SHA
    fe1ff9e View commit details
  2. Copy the full SHA
    36634a4 View commit details
  3. gtk4: fix build on Darwin

    jtojnar committed Apr 27, 2021
    Copy the full SHA
    6c0247c View commit details
Showing with 50 additions and 10 deletions.
  1. +10 −0 pkgs/development/libraries/gstreamer/bad/default.nix
  2. +16 −4 pkgs/development/libraries/gtk/4.x.nix
  3. +24 −6 pkgs/development/libraries/librest/default.nix
10 changes: 10 additions & 0 deletions pkgs/development/libraries/gstreamer/bad/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, meson
, ninja
, gettext
@@ -103,6 +104,15 @@ stdenv.mkDerivation rec {
patches = [
# Use pkgconfig to inject the includedirs
./fix_pkgconfig_includedir.patch
] ++ lib.optionals stdenv.isDarwin [
# Fix “error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference<decltype(*(&opencv_dilate_erode_type))>::type *' (aka 'volatile unsigned long *')” on Darwin.
(fetchpatch {
url = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/640a65bf966df065d41a511e2d76d1f26a2e770c.patch";
sha256 = "E5pig+qEfR58Jticr6ydFxZOhM3ZJ8zgrf5K4BdiB/Y=";
includes = [
"ext/opencv/gstcvdilateerode.cpp"
];
})
];

nativeBuildInputs = [
20 changes: 16 additions & 4 deletions pkgs/development/libraries/gtk/4.x.nix
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
pname = "gtk4";
version = "4.2.0";

outputs = [ "out" "dev" "devdoc" ];
outputs = [ "out" "dev" ] ++ lib.optionals x11Support [ "devdoc" ];
outputBin = "dev";

setupHooks = [
@@ -95,7 +95,9 @@ stdenv.mkDerivation rec {
epoxy
json-glib
isocodes
] ++ lib.optionals (!stdenv.isDarwin) [
vulkan-headers
] ++ [
librest
libsoup
ffmpeg
@@ -134,18 +136,27 @@ stdenv.mkDerivation rec {
glib
graphene
pango
vulkan-loader # TODO: Possibly not used on Darwin

] ++ lib.optionals (!stdenv.isDarwin) [
vulkan-loader
] ++ [
# Required for GSettings schemas at runtime.
# Will be picked up by wrapGAppsHook.
gsettings-desktop-schemas
];

mesonFlags = [
"-Dgtk_doc=true"
# ../docs/tools/shooter.c:4:10: fatal error: 'cairo-xlib.h' file not found
"-Dgtk_doc=${lib.boolToString x11Support}"
"-Dbuild-tests=false"
"-Dtracker=${if trackerSupport then "enabled" else "disabled"}"
"-Dbroadway-backend=${lib.boolToString broadwaySupport}"
] ++ lib.optionals (!cupsSupport) [
"-Dprint-cups=disabled"
] ++ lib.optionals stdenv.isDarwin [
"-Dvulkan=disabled"
"-Dmedia-gstreamer=disabled" # requires gstreamer-gl
] ++ lib.optionals (!x11Support) [
"-Dx11-backend=false"
];

doCheck = false; # needs X11
@@ -188,6 +199,7 @@ stdenv.mkDerivation rec {
wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
done
'' + lib.optionalString x11Support ''
# So that devhelp can find this.
mkdir -p "$devdoc/share/devhelp"
mv "$out/share/doc/gtk4/reference" "$devdoc/share/devhelp/books"
30 changes: 24 additions & 6 deletions pkgs/development/libraries/librest/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{ lib, stdenv, fetchurl, pkg-config, glib, libsoup, gobject-introspection, gnome3 }:
{ lib
, stdenv
, fetchurl
, pkg-config
, glib
, libsoup
, gobject-introspection
, gnome3
}:

stdenv.mkDerivation rec {
pname = "rest";
@@ -9,10 +17,20 @@ stdenv.mkDerivation rec {
sha256 = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9";
};

nativeBuildInputs = [ pkg-config gobject-introspection ];
buildInputs = [ glib libsoup ];
nativeBuildInputs = [
pkg-config
gobject-introspection
];

configureFlags = [ "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt" ];
buildInputs = [
glib
libsoup
];

configureFlags = [
# Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged.
"--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt"
];

passthru = {
updateScript = gnome3.updateScript {
@@ -25,8 +43,8 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Helper library for RESTful services";
homepage = "https://wiki.gnome.org/Projects/Librest";
license = licenses.lgpl21;
platforms = platforms.linux;
license = licenses.lgpl21Only;
platforms = platforms.unix;
maintainers = teams.gnome.members;
};
}