Closed Millrocious closed 1 year ago
It looks like this is depending on an unreleased version of https://gitlab.gnome.org/GNOME/gcr. You could try changing the gcr package to point to master instead of the release.
so i have this package for gcr
{ lib, stdenv
, fetchurl
, fetchpatch
, pkg-config
, meson
, ninja
, gettext
, gnupg
, p11-kit
, glib
, libgcrypt
, libtasn1
, gtk4
, pango
, libsecret
, openssh
, systemd
, gobject-introspection
, wrapGAppsHook
, libxslt
, vala
, gnome
, python3
, shared-mime-info
}:
stdenv.mkDerivation rec {
pname = "gcr-4-gtk4";
src = fetchurl {
url = "https://gitlab.gnome.org/GNOME/gcr/-/archive/master/gcr-master.tar.gz";
sha256 = lib.fakeSha256;
};
patches = [
# Pull upstream fix for meson-0.60:
# https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/81
(fetchpatch {
name = "meson-0.60.patch";
url = "https://gitlab.gnome.org/GNOME/gcr/-/commit/b3ca1d02bb0148ca787ac4aead164d7c8ce2c4d8.patch";
sha256 = "15gwxkcm5q5p87p5lrqwgykpzx5gmk179xd3481yak93yhbvy165";
})
];
nativeBuildInputs = [
pkg-config
meson
python3
ninja
gettext
gobject-introspection
libxslt
wrapGAppsHook
vala
shared-mime-info
];
buildInputs = [
gnupg
libgcrypt
libtasn1
pango
libsecret
openssh
systemd
];
propagatedBuildInputs = [
glib
gtk4
p11-kit
];
checkInputs = [
python3
];
mesonFlags = [
"-Dgtk_doc=false"
# We are still using ssh-agent from gnome-keyring.
# https://github.com/NixOS/nixpkgs/issues/140824
"-Dssh_agent=false"
];
doCheck = false; # fails 21 out of 603 tests, needs dbus daemon
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
postPatch = ''
patchShebangs build/ gcr/fixtures/
chmod +x meson_post_install.py
patchShebangs meson_post_install.py
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
};
};
meta = with lib; {
platforms = platforms.unix;
maintainers = teams.gnome.members;
description = "GNOME crypto services (daemon and tools)";
homepage = "https://gitlab.gnome.org/GNOME/gcr";
license = licenses.lgpl2Plus;
longDescription = ''
GCR is a library for displaying certificates, and crypto UI, accessing
key stores. It also provides the viewer for crypto files on the GNOME
desktop.
GCK is a library for accessing PKCS#11 modules like smart cards, in a
(G)object oriented way.
'';
};
}
But when i type nix-build -E 'with import <nixos-unstable> {}; callPackage ./gcr4.nix {}'
command, i have this issue:
error: derivation name missing
if i simply use nix-build
command i have this:
error: cannot evaluate a function that has an argument without a value ('wrapGAppsHook')
Nix attempted to evaluate a function as a top level expression; in
this case it must have its arguments supplied either by default
values, or passed explicitly with '--arg' or '--argstr'. See
https://nixos.org/manual/nix/stable/#ss-functions.
at /home/eog/tmp/gnome-epiphany/gcr/gcr4.nix:19:3:
18| , gobject-introspection
19| , wrapGAppsHook
| ^
20| , libxslt
You need to set the version (below the pname): version = "whatever";
. You probably also want to use a commit hash in fetchurl: src = "https://gitlab.gnome.org/GNOME/gcr/-/archive/5924eced679b3a2caea2fd4637e52b85c85f6f0c/gcr-5924eced679b3a2caea2fd4637e52b85c85f6f0c.tar";
After i put a version package successfully builds. But how to use this package like as dependency to build epiphany?
I have created a git repo with some work on this, just clone it and run nix-build
(you will have to build webkitgtk, which will probably take quite a while).
The repo mentioned above: https://github.com/ReplayCoding/epiphany-gtk4
By the way, webkitgtk_5_0
is packaged in Nixpkgs now but Epiphany moved to WebKitGTK 2.39.3 development release.
Gnome web (epiphany) on gtk4 from source build fails
output:
The package.nix:
Technical details
"x86_64-linux"
Linux 5.17.2, NixOS, 22.05 (Quokka)
yes
yes
nix-env (Nix) 2.7.0
/nix/var/nix/profiles/per-user/root/channels/nixos