mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
Merge pull request #79416 from jtojnar/flatpak-1.6
flatpak: 1.4.2 → 1.6.1
This commit is contained in:
commit
09f7e376c2
@ -42,6 +42,10 @@ with lib;
|
||||
let
|
||||
cfg = config.xdg.portal;
|
||||
packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals;
|
||||
joinedPortals = pkgs.symlinkJoin {
|
||||
name = "xdg-portals";
|
||||
paths = cfg.extraPortals;
|
||||
};
|
||||
|
||||
in mkIf cfg.enable {
|
||||
|
||||
@ -56,7 +60,7 @@ with lib;
|
||||
|
||||
environment.variables = {
|
||||
GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1";
|
||||
XDG_DESKTOP_PORTAL_PATH = map (p: "${p}/share/xdg-desktop-portal/portals") cfg.extraPortals;
|
||||
XDG_DESKTOP_PORTAL_DIR = "${joinedPortals}/share/xdg-desktop-portal/portals";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -90,7 +90,9 @@ in
|
||||
graphene = callInstalledTest ./graphene.nix {};
|
||||
ibus = callInstalledTest ./ibus.nix {};
|
||||
libgdata = callInstalledTest ./libgdata.nix {};
|
||||
glib-testing = callInstalledTest ./glib-testing.nix {};
|
||||
libxmlb = callInstalledTest ./libxmlb.nix {};
|
||||
malcontent = callInstalledTest ./malcontent.nix {};
|
||||
ostree = callInstalledTest ./ostree.nix {};
|
||||
xdg-desktop-portal = callInstalledTest ./xdg-desktop-portal.nix {};
|
||||
}
|
||||
|
5
nixos/tests/installed-tests/glib-testing.nix
Normal file
5
nixos/tests/installed-tests/glib-testing.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ pkgs, makeInstalledTest, ... }:
|
||||
|
||||
makeInstalledTest {
|
||||
tested = pkgs.glib-testing;
|
||||
}
|
5
nixos/tests/installed-tests/malcontent.nix
Normal file
5
nixos/tests/installed-tests/malcontent.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ pkgs, makeInstalledTest, ... }:
|
||||
|
||||
makeInstalledTest {
|
||||
tested = pkgs.malcontent;
|
||||
}
|
@ -2,4 +2,8 @@
|
||||
|
||||
makeInstalledTest {
|
||||
tested = pkgs.xdg-desktop-portal;
|
||||
|
||||
# Ton of breakage.
|
||||
# https://github.com/flatpak/xdg-desktop-portal/pull/428
|
||||
meta.broken = true;
|
||||
}
|
||||
|
@ -1,56 +1,159 @@
|
||||
{ stdenv, fetchurl, autoreconfHook, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43, docbook_xsl, which, libxml2
|
||||
, gobject-introspection, gtk-doc, intltool, libxslt, pkgconfig, xmlto, appstream-glib, substituteAll, glibcLocales, yacc, xdg-dbus-proxy, p11-kit
|
||||
, bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, hicolor-icon-theme, fuse, nixosTests
|
||||
, libsoup, lzma, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking, wrapGAppsHook, dconf, gsettings-desktop-schemas, librsvg }:
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, autoreconfHook
|
||||
, docbook_xml_dtd_412
|
||||
, docbook_xml_dtd_42
|
||||
, docbook_xml_dtd_43
|
||||
, docbook_xsl
|
||||
, which
|
||||
, libxml2
|
||||
, gobject-introspection
|
||||
, gtk-doc
|
||||
, intltool
|
||||
, libxslt
|
||||
, pkgconfig
|
||||
, xmlto
|
||||
, appstream-glib
|
||||
, substituteAll
|
||||
, glibcLocales
|
||||
, yacc
|
||||
, xdg-dbus-proxy
|
||||
, p11-kit
|
||||
, bubblewrap
|
||||
, bzip2
|
||||
, dbus
|
||||
, glib
|
||||
, gpgme
|
||||
, json-glib
|
||||
, libarchive
|
||||
, libcap
|
||||
, libseccomp
|
||||
, coreutils
|
||||
, socat
|
||||
, gettext
|
||||
, hicolor-icon-theme
|
||||
, shared-mime-info
|
||||
, desktop-file-utils
|
||||
, gtk3
|
||||
, fuse
|
||||
, malcontent
|
||||
, nixosTests
|
||||
, libsoup
|
||||
, lzma
|
||||
, ostree
|
||||
, polkit
|
||||
, python3
|
||||
, systemd
|
||||
, xorg
|
||||
, valgrind
|
||||
, glib-networking
|
||||
, wrapGAppsHook
|
||||
, dconf
|
||||
, gsettings-desktop-schemas
|
||||
, librsvg
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "flatpak";
|
||||
version = "1.4.2";
|
||||
version = "1.6.1";
|
||||
|
||||
# TODO: split out lib once we figure out what to do with triggerdir
|
||||
outputs = [ "out" "man" "doc" "installedTests" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/flatpak/flatpak/releases/download/${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "08nmpp26mgv0vp3mlwk97rnp0j7i108h4hr9nllja19sjxnrlygj";
|
||||
sha256 = "1x3zh2xashsq1nh4s85qq45hcnwfbnwzln2wlk10g7149nia6f7w";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Hardcode paths used by tests and change test runtime generation to use files from Nix store.
|
||||
# https://github.com/flatpak/flatpak/issues/1460
|
||||
(substituteAll {
|
||||
src = ./fix-test-paths.patch;
|
||||
inherit coreutils gettext glibcLocales;
|
||||
inherit coreutils gettext glibcLocales socat gtk3;
|
||||
smi = shared-mime-info;
|
||||
dfu = desktop-file-utils;
|
||||
hicolorIconTheme = hicolor-icon-theme;
|
||||
})
|
||||
|
||||
# Hardcode paths used by Flatpak itself.
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
p11 = p11-kit;
|
||||
})
|
||||
|
||||
# Adapt paths exposed to sandbox for NixOS.
|
||||
(substituteAll {
|
||||
src = ./bubblewrap-paths.patch;
|
||||
inherit (builtins) storeDir;
|
||||
})
|
||||
# patch taken from gtk_doc
|
||||
|
||||
# Allow gtk-doc to find schemas using XML_CATALOG_FILES environment variable.
|
||||
# Patch taken from gtk-doc expression.
|
||||
./respect-xml-catalog-files-var.patch
|
||||
|
||||
# Don’t hardcode flatpak binary path in launchers stored under user’s profile otherwise they will break after Flatpak update.
|
||||
# https://github.com/NixOS/nixpkgs/issues/43581
|
||||
./use-flatpak-from-path.patch
|
||||
|
||||
# Nix environment hacks should not leak into the apps.
|
||||
# https://github.com/NixOS/nixpkgs/issues/53441
|
||||
./unset-env-vars.patch
|
||||
|
||||
# But we want the GDK_PIXBUF_MODULE_FILE from the wrapper affect the icon validator.
|
||||
./validate-icon-pixbuf.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook libxml2 docbook_xml_dtd_412 docbook_xml_dtd_42 docbook_xml_dtd_43 docbook_xsl which gobject-introspection
|
||||
gtk-doc intltool libxslt pkgconfig xmlto appstream-glib yacc wrapGAppsHook
|
||||
autoreconfHook
|
||||
libxml2
|
||||
docbook_xml_dtd_412
|
||||
docbook_xml_dtd_42
|
||||
docbook_xml_dtd_43
|
||||
docbook_xsl
|
||||
which
|
||||
gobject-introspection
|
||||
gtk-doc
|
||||
intltool
|
||||
libxslt
|
||||
pkgconfig
|
||||
xmlto
|
||||
appstream-glib
|
||||
yacc
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bubblewrap bzip2 dbus dconf glib gpgme json-glib libarchive libcap libseccomp
|
||||
libsoup lzma ostree polkit python3 systemd xorg.libXau fuse
|
||||
gsettings-desktop-schemas glib-networking
|
||||
bubblewrap
|
||||
bzip2
|
||||
dbus
|
||||
dconf
|
||||
glib
|
||||
gpgme
|
||||
json-glib
|
||||
libarchive
|
||||
libcap
|
||||
libseccomp
|
||||
libsoup
|
||||
lzma
|
||||
ostree
|
||||
polkit
|
||||
python3
|
||||
systemd
|
||||
xorg.libXau
|
||||
fuse
|
||||
malcontent
|
||||
gsettings-desktop-schemas
|
||||
glib-networking
|
||||
librsvg # for flatpak-validate-icon
|
||||
];
|
||||
|
||||
checkInputs = [ valgrind ];
|
||||
checkInputs = [
|
||||
valgrind
|
||||
];
|
||||
|
||||
doCheck = false; # TODO: some issues with temporary files
|
||||
# TODO: some issues with temporary files
|
||||
doCheck = false;
|
||||
|
||||
NIX_LDFLAGS = "-lpthread";
|
||||
|
||||
@ -65,8 +168,8 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"installed_testdir=$(installedTests)/libexec/installed-tests/flatpak"
|
||||
"installed_test_metadir=$(installedTests)/share/installed-tests/flatpak"
|
||||
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/flatpak"
|
||||
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/flatpak"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -82,7 +185,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Linux application sandboxing and distribution framework";
|
||||
homepage = https://flatpak.org/;
|
||||
homepage = "https://flatpak.org/";
|
||||
license = licenses.lgpl21;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.linux;
|
||||
|
@ -1,8 +1,21 @@
|
||||
diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c
|
||||
index 5de89d62..bf6bdb52 100644
|
||||
--- a/app/flatpak-builtins-build-export.c
|
||||
+++ b/app/flatpak-builtins-build-export.c
|
||||
@@ -458,7 +458,7 @@ validate_desktop_file (GFile *desktop_file,
|
||||
subprocess = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE |
|
||||
G_SUBPROCESS_FLAGS_STDERR_PIPE |
|
||||
G_SUBPROCESS_FLAGS_STDERR_MERGE,
|
||||
- &local_error, "desktop-file-validate", path, NULL);
|
||||
+ &local_error, "@dfu@/bin/desktop-file-validate", path, NULL);
|
||||
if (!subprocess)
|
||||
{
|
||||
if (!g_error_matches (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
|
||||
diff --git a/tests/libtest.sh b/tests/libtest.sh
|
||||
index 46bcefb3..0134425e 100644
|
||||
index e64be49f..a9a53e12 100644
|
||||
--- a/tests/libtest.sh
|
||||
+++ b/tests/libtest.sh
|
||||
@@ -352,7 +352,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then
|
||||
@@ -367,7 +367,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then
|
||||
# running installed-tests: assume we know what we're doing
|
||||
_flatpak_bwrap_works=true
|
||||
elif ! "$FLATPAK_BWRAP" --unshare-ipc --unshare-net --unshare-pid \
|
||||
@ -11,7 +24,7 @@ index 46bcefb3..0134425e 100644
|
||||
_flatpak_bwrap_works=false
|
||||
else
|
||||
_flatpak_bwrap_works=true
|
||||
@@ -426,12 +426,12 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
|
||||
@@ -440,7 +440,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
|
||||
export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
|
||||
DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
|
||||
|
||||
@ -20,17 +33,20 @@ index 46bcefb3..0134425e 100644
|
||||
assert_not_reached "Failed to start dbus-daemon"
|
||||
fi
|
||||
|
||||
@@ -449,7 +449,7 @@ gdb_bt () {
|
||||
}
|
||||
|
||||
cleanup () {
|
||||
- /bin/kill -9 $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-}
|
||||
+ @coreutils@/bin/kill -9 $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-}
|
||||
- /bin/kill -9 $DBUS_SESSION_BUS_PID
|
||||
+ @coreutils@/bin/kill -9 $DBUS_SESSION_BUS_PID
|
||||
gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true
|
||||
fusermount -u $XDG_RUNTIME_DIR/doc || :
|
||||
if test -n "${TEST_SKIP_CLEANUP:-}"; then
|
||||
kill $(jobs -p) &> /dev/null || true
|
||||
diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh
|
||||
index 0a0a28f1..16fd51fe 100755
|
||||
index e51e21a6..7d39efb5 100755
|
||||
--- a/tests/make-test-app.sh
|
||||
+++ b/tests/make-test-app.sh
|
||||
@@ -129,13 +129,13 @@ msgid "Hello world"
|
||||
@@ -149,13 +149,13 @@ msgid "Hello world"
|
||||
msgstr "Hallo Welt"
|
||||
EOF
|
||||
mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES
|
||||
@ -47,18 +63,22 @@ index 0a0a28f1..16fd51fe 100755
|
||||
flatpak build-finish ${DIR}
|
||||
mkdir -p repos
|
||||
diff --git a/tests/make-test-runtime.sh b/tests/make-test-runtime.sh
|
||||
index 57899b75..9236996f 100755
|
||||
index 5d2c309b..cf61a3cf 100755
|
||||
--- a/tests/make-test-runtime.sh
|
||||
+++ b/tests/make-test-runtime.sh
|
||||
@@ -28,6 +28,7 @@ EOF
|
||||
PATH="$PATH:/usr/sbin:/sbin"
|
||||
@@ -25,9 +25,10 @@ EOF
|
||||
|
||||
# On Debian derivatives, /usr/sbin and /sbin aren't in ordinary users'
|
||||
# PATHs, but ldconfig is kept in /sbin
|
||||
-PATH="$PATH:/usr/sbin:/sbin"
|
||||
+PATH="$PATH:@socat@/bin:/usr/sbin:/sbin"
|
||||
|
||||
# Add bash and dependencies
|
||||
+mkdir -p ${DIR}/nix/store
|
||||
mkdir -p ${DIR}/usr/bin
|
||||
mkdir -p ${DIR}/usr/lib
|
||||
ln -s ../lib ${DIR}/usr/lib64
|
||||
@@ -37,48 +38,23 @@ if test -f /sbin/ldconfig.real; then
|
||||
@@ -37,48 +38,24 @@ if test -f /sbin/ldconfig.real; then
|
||||
else
|
||||
cp `which ldconfig` ${DIR}/usr/bin
|
||||
fi
|
||||
@ -85,18 +105,19 @@ index 57899b75..9236996f 100755
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
for i in $@ bash ls cat echo readlink; do
|
||||
for i in $@ bash ls cat echo readlink socat; do
|
||||
- I=`which $i`
|
||||
- add_bin $I
|
||||
-done
|
||||
-for i in `cat $BINS`; do
|
||||
- echo Adding binary $i 1>&2
|
||||
- #echo Adding binary $i 1>&2
|
||||
- cp "$i" ${DIR}/usr/bin/
|
||||
-done
|
||||
-for i in `cat $LIBS`; do
|
||||
- echo Adding library $i 1>&2
|
||||
- #echo Adding library $i 1>&2
|
||||
- cp "$i" ${DIR}/usr/lib/
|
||||
+ I=$(readlink -f $(which $i))
|
||||
+ [ -e ${DIR}/usr/bin/$i ] && continue
|
||||
+ requisites=$(nix-store --query --requisites "$I")
|
||||
+ for r in $requisites; do
|
||||
+ # a single store item can be needed by multiple paths, no need to copy it again
|
||||
@ -121,10 +142,10 @@ index 57899b75..9236996f 100755
|
||||
if [ x$COLLECTION_ID != x ]; then
|
||||
collection_args=--collection-id=${COLLECTION_ID}
|
||||
diff --git a/tests/testlibrary.c b/tests/testlibrary.c
|
||||
index f2773dc8..3af9026f 100644
|
||||
index 44ae28e3..76bf619f 100644
|
||||
--- a/tests/testlibrary.c
|
||||
+++ b/tests/testlibrary.c
|
||||
@@ -1053,7 +1053,7 @@ check_bwrap_support (void)
|
||||
@@ -1343,7 +1343,7 @@ check_bwrap_support (void)
|
||||
{
|
||||
gint exit_code = 0;
|
||||
char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net",
|
||||
@ -133,16 +154,45 @@ index f2773dc8..3af9026f 100644
|
||||
g_autofree char *argv_str = g_strjoinv (" ", argv);
|
||||
g_test_message ("Spawning %s", argv_str);
|
||||
g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &exit_code, &error);
|
||||
diff --git a/triggers/gtk-icon-cache.trigger b/triggers/gtk-icon-cache.trigger
|
||||
index 711cfab2..10c220ec 100755
|
||||
--- a/triggers/gtk-icon-cache.trigger
|
||||
+++ b/triggers/gtk-icon-cache.trigger
|
||||
@@ -1,7 +1,7 @@
|
||||
diff --git a/triggers/desktop-database.trigger b/triggers/desktop-database.trigger
|
||||
index 2188f535..d8283061 100755
|
||||
--- a/triggers/desktop-database.trigger
|
||||
+++ b/triggers/desktop-database.trigger
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test \( -x "$(which gtk-update-icon-cache 2>/dev/null)" \) -a \( -d $1/exports/share/icons/hicolor \); then
|
||||
-if test \( -x "$(which update-desktop-database 2>/dev/null)" \) -a \( -d $1/exports/share/applications \); then
|
||||
- exec update-desktop-database -q $1/exports/share/applications
|
||||
+if test \( -d $1/exports/share/applications \); then
|
||||
+ exec @dfu@/bin/update-desktop-database -q $1/exports/share/applications
|
||||
fi
|
||||
diff --git a/triggers/gtk-icon-cache.trigger b/triggers/gtk-icon-cache.trigger
|
||||
index 711cfab2..07baa2ac 100755
|
||||
--- a/triggers/gtk-icon-cache.trigger
|
||||
+++ b/triggers/gtk-icon-cache.trigger
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
-if test \( -x "$(which gtk-update-icon-cache 2>/dev/null)" \) -a \( -d $1/exports/share/icons/hicolor \); then
|
||||
- cp /usr/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/
|
||||
+if test \( -d $1/exports/share/icons/hicolor \); then
|
||||
+ cp @hicolorIconTheme@/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/
|
||||
for dir in $1/exports/share/icons/*; do
|
||||
if test -f $dir/index.theme; then
|
||||
if ! gtk-update-icon-cache --quiet $dir; then
|
||||
- if ! gtk-update-icon-cache --quiet $dir; then
|
||||
+ if ! @gtk3@/bin/gtk-update-icon-cache --quiet $dir; then
|
||||
echo "Failed to run gtk-update-icon-cache for $dir"
|
||||
exit 1
|
||||
fi
|
||||
diff --git a/triggers/mime-database.trigger b/triggers/mime-database.trigger
|
||||
index 2067d8ec..a49a8777 100755
|
||||
--- a/triggers/mime-database.trigger
|
||||
+++ b/triggers/mime-database.trigger
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
-if test \( -x "$(which update-mime-database 2>/dev/null)" \) -a \( -d $1/exports/share/mime/packages \); then
|
||||
- exec update-mime-database $1/exports/share/mime
|
||||
+if test \( -d $1/exports/share/mime/packages \); then
|
||||
+ exec @smi@/bin/update-mime-database $1/exports/share/mime
|
||||
fi
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
|
||||
index 8f9dc66c..d3ab6e5f 100644
|
||||
index 52b222ea..9489441f 100644
|
||||
--- a/common/flatpak-dir.c
|
||||
+++ b/common/flatpak-dir.c
|
||||
@@ -6701,7 +6701,7 @@ export_desktop_file (const char *app,
|
||||
@@ -6956,7 +6956,7 @@ export_desktop_file (const char *app,
|
||||
|
||||
new_exec = g_string_new ("");
|
||||
g_string_append_printf (new_exec,
|
||||
@ -11,7 +11,7 @@ index 8f9dc66c..d3ab6e5f 100644
|
||||
escaped_branch,
|
||||
escaped_arch);
|
||||
|
||||
@@ -7891,8 +7891,8 @@ flatpak_dir_deploy (FlatpakDir *self,
|
||||
@@ -8290,8 +8290,8 @@ flatpak_dir_deploy (FlatpakDir *self,
|
||||
error))
|
||||
return FALSE;
|
||||
|
||||
@ -23,10 +23,10 @@ index 8f9dc66c..d3ab6e5f 100644
|
||||
G_FILE_CREATE_REPLACE_DESTINATION, NULL, cancellable, error))
|
||||
return FALSE;
|
||||
diff --git a/tests/test-bundle.sh b/tests/test-bundle.sh
|
||||
index dff17f33..a9857adc 100755
|
||||
index d1682344..5e2b9a97 100755
|
||||
--- a/tests/test-bundle.sh
|
||||
+++ b/tests/test-bundle.sh
|
||||
@@ -59,7 +59,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/files
|
||||
@@ -67,7 +67,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/files
|
||||
assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/export
|
||||
assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
|
||||
# Ensure Exec key is rewritten
|
||||
@ -36,7 +36,7 @@ index dff17f33..a9857adc 100755
|
||||
assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png
|
||||
|
||||
diff --git a/tests/test-run.sh b/tests/test-run.sh
|
||||
index 233df9ad..76e0b23b 100644
|
||||
index fecb756e..64043281 100644
|
||||
--- a/tests/test-run.sh
|
||||
+++ b/tests/test-run.sh
|
||||
@@ -45,7 +45,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/files
|
||||
@ -45,6 +45,6 @@ index 233df9ad..76e0b23b 100644
|
||||
# Ensure Exec key is rewritten
|
||||
-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
||||
+assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
||||
assert_has_file $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini
|
||||
assert_file_has_content $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini "^DefaultDisabled=true$"
|
||||
assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
|
||||
assert_not_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/dont-export.png
|
||||
assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png
|
||||
|
63
pkgs/development/libraries/glib-testing/default.nix
Normal file
63
pkgs/development/libraries/glib-testing/default.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{ stdenv
|
||||
, fetchFromGitLab
|
||||
, meson
|
||||
, ninja
|
||||
, pkgconfig
|
||||
, gtk-doc
|
||||
, docbook-xsl-nons
|
||||
, docbook_xml_dtd_43
|
||||
, glib
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "glib-testing";
|
||||
version = "0.1.0";
|
||||
|
||||
outputs = [ "out" "dev" "devdoc" "installedTests" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "pwithnall";
|
||||
repo = "libglib-testing";
|
||||
rev = version;
|
||||
sha256 = "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# allow installing installed tests to a separate output
|
||||
./installed-tests-path.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkgconfig
|
||||
gtk-doc
|
||||
docbook-xsl-nons
|
||||
docbook_xml_dtd_43
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
glib
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dinstalled_tests=true"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
installedTests = nixosTests.installed-tests.glib-testing;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Test library providing test harnesses and mock classes complementing the classes provided by GLib";
|
||||
homepage = "https://gitlab.gnome.org/pwithnall/libglib-testing";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
diff --git a/libglib-testing/tests/meson.build b/libglib-testing/tests/meson.build
|
||||
index 4789c63..2b8525d 100644
|
||||
--- a/libglib-testing/tests/meson.build
|
||||
+++ b/libglib-testing/tests/meson.build
|
||||
@@ -15,9 +15,9 @@ test_programs = [
|
||||
['signal-logger', [], deps],
|
||||
]
|
||||
|
||||
-installed_tests_metadir = join_paths(datadir, 'installed-tests',
|
||||
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
|
||||
'libglib-testing-' + libglib_testing_api_version)
|
||||
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
|
||||
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
|
||||
'libglib-testing-' + libglib_testing_api_version)
|
||||
|
||||
foreach program: test_programs
|
||||
@@ -48,4 +48,4 @@ foreach program: test_programs
|
||||
exe,
|
||||
env: envs,
|
||||
)
|
||||
-endforeach
|
||||
\ No newline at end of file
|
||||
+endforeach
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index e69263e..7cb1ee8 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -4,3 +4,4 @@ option(
|
||||
value: false,
|
||||
description: 'enable installed tests'
|
||||
)
|
||||
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
|
59
pkgs/development/libraries/libportal/default.nix
Normal file
59
pkgs/development/libraries/libportal/default.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, meson
|
||||
, ninja
|
||||
, pkgconfig
|
||||
, gtk-doc
|
||||
, docbook-xsl-nons
|
||||
, docbook_xml_dtd_45
|
||||
, glib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libportal";
|
||||
version = "0.3";
|
||||
|
||||
outputs = [ "out" "dev" "devdoc" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flatpak";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1s3g17zbbmq3m5jfs62fl94p4irln9hfhpybj7jb05z0p1939rk3";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix build and .pc file
|
||||
# https://github.com/flatpak/libportal/pull/20
|
||||
(fetchpatch {
|
||||
url = "https://github.com/flatpak/libportal/commit/7828be4ec8f05f8de7b129a1e35b5039d8baaee3.patch";
|
||||
sha256 = "04nadcxx69mbnzljwjrzm88cgapn14x3mghpkhr8b9yrjn7yj86h";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/flatpak/libportal/commit/bf5de2f6fefec65f701b4ec8712b48b29a33fb71.patch";
|
||||
sha256 = "1v0b09diq49c01j5gg2bpvn5f5gfw1a5nm1l8grc4qg4z9jck1z8";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkgconfig
|
||||
gtk-doc
|
||||
docbook-xsl-nons
|
||||
docbook_xml_dtd_45
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
glib
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Flatpak portal library";
|
||||
homepage = "https://github.com/flatpak/libportal";
|
||||
license = licenses.lgpl2Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
87
pkgs/development/libraries/malcontent/default.nix
Normal file
87
pkgs/development/libraries/malcontent/default.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{ stdenv
|
||||
, fetchFromGitLab
|
||||
, meson
|
||||
, ninja
|
||||
, pkgconfig
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
, glib
|
||||
, coreutils
|
||||
, dbus
|
||||
, polkit
|
||||
, glib-testing
|
||||
, python3
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "malcontent";
|
||||
version = "0.4.0";
|
||||
|
||||
outputs = [ "bin" "out" "dev" "man" "installedTests" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "pwithnall";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0d703r20djvrgy711jvn90i8dwbb0p7qj4j43z101afpkiizq810";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow installing installed tests to a separate output.
|
||||
./installed-tests-path.patch
|
||||
|
||||
# This is unnecessary and breaks when submodules are not available.
|
||||
# https://gitlab.freedesktop.org/pwithnall/malcontent/merge_requests/3
|
||||
./use-system-dependencies.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkgconfig
|
||||
gobject-introspection
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
polkit
|
||||
glib-testing
|
||||
(python3.withPackages (pp: with pp; [
|
||||
pygobject3
|
||||
]))
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
glib
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dinstalled_tests=true"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace libmalcontent/tests/app-filter.c \
|
||||
--replace "/usr/bin/true" "${coreutils}/bin/true" \
|
||||
--replace "/bin/true" "${coreutils}/bin/true" \
|
||||
--replace "/usr/bin/false" "${coreutils}/bin/false" \
|
||||
--replace "/bin/false" "${coreutils}/bin/false"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
installedTests = nixosTests.installed-tests.malcontent;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Parental controls library";
|
||||
homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
diff --git a/libmalcontent/tests/meson.build b/libmalcontent/tests/meson.build
|
||||
index a8a815a..0b1d242 100644
|
||||
--- a/libmalcontent/tests/meson.build
|
||||
+++ b/libmalcontent/tests/meson.build
|
||||
@@ -61,9 +61,9 @@ test_programs = [
|
||||
], deps],
|
||||
]
|
||||
|
||||
-installed_tests_metadir = join_paths(datadir, 'installed-tests',
|
||||
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
|
||||
'libmalcontent-' + libmalcontent_api_version)
|
||||
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
|
||||
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
|
||||
'libmalcontent-' + libmalcontent_api_version)
|
||||
|
||||
foreach program: test_programs
|
||||
@@ -94,4 +94,4 @@ foreach program: test_programs
|
||||
env: envs,
|
||||
args: ['--tap'],
|
||||
)
|
||||
-endforeach
|
||||
\ No newline at end of file
|
||||
+endforeach
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 96a517d..7cb1ee8 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -3,4 +3,5 @@ option(
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
description: 'enable installed tests'
|
||||
-)
|
||||
\ No newline at end of file
|
||||
+)
|
||||
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
|
@ -0,0 +1,22 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index f4a05ba..dd31537 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -33,9 +33,8 @@ polkit_gobject = dependency('polkit-gobject-1')
|
||||
polkitpolicydir = polkit_gobject.get_pkgconfig_variable('policydir',
|
||||
define_variable: ['prefix', prefix])
|
||||
|
||||
-libglib_testing = subproject('libglib-testing')
|
||||
libglib_testing_dep = dependency(
|
||||
- 'libglib-testing',
|
||||
+ 'glib-testing-0',
|
||||
fallback: ['libglib-testing', 'libglib_testing_dep'],
|
||||
)
|
||||
|
||||
@@ -120,4 +119,4 @@ test_env = [
|
||||
|
||||
subdir('accounts-service')
|
||||
subdir('malcontent-client')
|
||||
-subdir('libmalcontent')
|
||||
\ No newline at end of file
|
||||
+subdir('libmalcontent')
|
@ -1,4 +1,12 @@
|
||||
{ stdenv, fetchurl, pkgconfig, libxslt, docbook_xsl, docbook_xml_dtd_43, dbus, glib }:
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, pkgconfig
|
||||
, libxslt
|
||||
, docbook_xsl
|
||||
, docbook_xml_dtd_43
|
||||
, dbus
|
||||
, glib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xdg-dbus-proxy";
|
||||
@ -9,9 +17,20 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "03sj1h0c2l08xa8phw013fnxr4fgav7l2mkjhzf9xk3dykwxcj8p";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig libxslt docbook_xsl docbook_xml_dtd_43 ];
|
||||
buildInputs = [ glib ];
|
||||
checkInputs = [ dbus ];
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
libxslt
|
||||
docbook_xsl
|
||||
docbook_xml_dtd_43
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
dbus
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-man"
|
||||
@ -22,7 +41,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "DBus proxy for Flatpak and others";
|
||||
homepage = https://flatpak.org/;
|
||||
homepage = "https://github.com/flatpak/xdg-dbus-proxy";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.linux;
|
||||
|
@ -5,6 +5,7 @@
|
||||
, libxml2
|
||||
, xdg-desktop-portal
|
||||
, gtk3
|
||||
, gnome3
|
||||
, glib
|
||||
, wrapGAppsHook
|
||||
, gsettings-desktop-schemas
|
||||
@ -12,13 +13,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xdg-desktop-portal-gtk";
|
||||
version = "1.4.0";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flatpak";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1zryfg6232vz1pmv0zqcxvl4clnbb15kjf55b24cimkcnidklbap";
|
||||
sha256 = "1gpbjkfkrpk96krc1zbccrq7sih282mg303ifxaaxbnj6d8drm5h";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -33,6 +34,7 @@ stdenv.mkDerivation rec {
|
||||
glib
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
gnome3.gnome-desktop
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,8 +1,27 @@
|
||||
{ stdenv, fetchFromGitHub, nixosTests, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, json-glib, wrapGAppsHook }:
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, nixosTests
|
||||
, substituteAll
|
||||
, autoreconfHook
|
||||
, pkgconfig
|
||||
, libxml2
|
||||
, glib
|
||||
, pipewire
|
||||
, fontconfig
|
||||
, flatpak
|
||||
, gsettings-desktop-schemas
|
||||
, acl
|
||||
, dbus
|
||||
, fuse
|
||||
, libportal
|
||||
, geoclue2
|
||||
, json-glib
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xdg-desktop-portal";
|
||||
version = "1.4.2";
|
||||
version = "1.6.0";
|
||||
|
||||
outputs = [ "out" "installedTests" ];
|
||||
|
||||
@ -10,29 +29,49 @@ stdenv.mkDerivation rec {
|
||||
owner = "flatpak";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1rs3kmpczkr6nm08kb9njnl7n3rmhh0ral0xav6f0y70pyh8whx6";
|
||||
sha256 = "0fbsfpilwbv7j6cimsmmz6g0r96bw0ziwyk9z4zg2rd1mfkmmp9a";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./respect-path-env-var.patch
|
||||
# Hardcode paths used by x-d-p itself.
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
inherit flatpak;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig libxml2 wrapGAppsHook ];
|
||||
buildInputs = [ glib pipewire fontconfig flatpak acl dbus geoclue2 fuse gsettings-desktop-schemas json-glib ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkgconfig
|
||||
libxml2
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
doCheck = true; # XXX: investigate!
|
||||
buildInputs = [
|
||||
glib
|
||||
pipewire
|
||||
fontconfig
|
||||
flatpak
|
||||
acl
|
||||
dbus
|
||||
geoclue2
|
||||
fuse
|
||||
libportal
|
||||
gsettings-desktop-schemas
|
||||
json-glib
|
||||
];
|
||||
|
||||
# Seems to get stuck after "PASS: test-portals 39 /portal/inhibit/monitor"
|
||||
# TODO: investigate!
|
||||
doCheck = false;
|
||||
|
||||
configureFlags = [
|
||||
"--enable-installed-tests"
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"installed_testdir=$(installedTests)/libexec/installed-tests/xdg-desktop-portal"
|
||||
"installed_test_metadir=$(installedTests)/share/installed-tests/xdg-desktop-portal"
|
||||
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/xdg-desktop-portal"
|
||||
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/xdg-desktop-portal"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
|
@ -1,13 +1,13 @@
|
||||
diff --git a/src/notification.c b/src/notification.c
|
||||
index 1367114..72ba033 100644
|
||||
index 5412609..4243e98 100644
|
||||
--- a/src/notification.c
|
||||
+++ b/src/notification.c
|
||||
@@ -401,7 +401,7 @@ validate_icon_more (GVariant *v)
|
||||
@@ -366,7 +366,7 @@
|
||||
int status;
|
||||
g_autofree char *err = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
- const char *icon_validator = LIBEXECDIR "/flatpak-validate-icon";
|
||||
+ const char *icon_validator = "@flatpak@/libexec/flatpak-validate-icon";
|
||||
const char *args[6];
|
||||
|
||||
|
||||
if (G_IS_THEMED_ICON (icon))
|
||||
|
@ -1,78 +0,0 @@
|
||||
diff --git a/src/portal-impl.c b/src/portal-impl.c
|
||||
index 4fd48ff..346da7c 100644
|
||||
--- a/src/portal-impl.c
|
||||
+++ b/src/portal-impl.c
|
||||
@@ -116,38 +116,50 @@ sort_impl_by_name (gconstpointer a,
|
||||
void
|
||||
load_installed_portals (gboolean opt_verbose)
|
||||
{
|
||||
- const char *portal_dir = DATADIR "/xdg-desktop-portal/portals";
|
||||
- g_autoptr(GFile) dir = g_file_new_for_path (portal_dir);
|
||||
- g_autoptr(GFileEnumerator) enumerator = NULL;
|
||||
|
||||
- enumerator = g_file_enumerate_children (dir, "*", G_FILE_QUERY_INFO_NONE, NULL, NULL);
|
||||
+ g_auto(GStrv) portal_dir_list;
|
||||
+ int i;
|
||||
+ const char *portal_dir = g_getenv ("XDG_DESKTOP_PORTAL_PATH");
|
||||
+
|
||||
+ if (portal_dir == NULL)
|
||||
+ portal_dir = DATADIR "/portals";
|
||||
|
||||
- if (enumerator == NULL)
|
||||
- return;
|
||||
+ portal_dir_list = g_strsplit (portal_dir, G_SEARCHPATH_SEPARATOR_S, 0);
|
||||
|
||||
- while (TRUE)
|
||||
+ for (i = 0; portal_dir_list[i] != NULL; i++)
|
||||
{
|
||||
- g_autoptr(GFileInfo) info = g_file_enumerator_next_file (enumerator, NULL, NULL);
|
||||
- g_autoptr(GFile) child = NULL;
|
||||
- g_autofree char *path = NULL;
|
||||
- const char *name;
|
||||
- g_autoptr(GError) error = NULL;
|
||||
+ portal_dir = portal_dir_list[i];
|
||||
+ g_autoptr(GFile) dir = g_file_new_for_path (portal_dir);
|
||||
+ g_autoptr(GFileEnumerator) enumerator = NULL;
|
||||
+ enumerator = g_file_enumerate_children (dir, "*", G_FILE_QUERY_INFO_NONE, NULL, NULL);
|
||||
|
||||
- if (info == NULL)
|
||||
- break;
|
||||
+ if (enumerator == NULL)
|
||||
+ continue;
|
||||
|
||||
- name = g_file_info_get_name (info);
|
||||
+ while (TRUE)
|
||||
+ {
|
||||
+ g_autoptr(GFileInfo) info = g_file_enumerator_next_file (enumerator, NULL, NULL);
|
||||
+ g_autoptr(GFile) child = NULL;
|
||||
+ g_autofree char *path = NULL;
|
||||
+ const char *name;
|
||||
+ g_autoptr(GError) error = NULL;
|
||||
|
||||
- if (!g_str_has_suffix (name, ".portal"))
|
||||
- continue;
|
||||
+ if (info == NULL)
|
||||
+ break;
|
||||
|
||||
- child = g_file_enumerator_get_child (enumerator, info);
|
||||
- path = g_file_get_path (child);
|
||||
+ name = g_file_info_get_name (info);
|
||||
|
||||
- if (!register_portal (path, opt_verbose, &error))
|
||||
- {
|
||||
- g_warning ("Error loading %s: %s", path, error->message);
|
||||
- continue;
|
||||
+ if (!g_str_has_suffix (name, ".portal"))
|
||||
+ continue;
|
||||
+
|
||||
+ child = g_file_enumerator_get_child (enumerator, info);
|
||||
+ path = g_file_get_path (child);
|
||||
+
|
||||
+ if (!register_portal (path, opt_verbose, &error))
|
||||
+ {
|
||||
+ g_warning ("Error loading %s: %s", path, error->message);
|
||||
+ continue;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
41
pkgs/development/libraries/zchunk/default.nix
Normal file
41
pkgs/development/libraries/zchunk/default.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, pkgconfig
|
||||
, meson
|
||||
, ninja
|
||||
, zstd
|
||||
, curl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zchunk";
|
||||
version = "1.1.5";
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zchunk";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "13sqjslk634mkklnmzdlzk9l9rc6g6migig5rln3irdnjrxvjf69";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zstd
|
||||
curl
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "File format designed for highly efficient deltas while maintaining good compression";
|
||||
homepage = "https://github.com/zchunk/zchunk";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -1,25 +1,39 @@
|
||||
{ stdenv, glib, autoreconfHook, pkgconfig, systemd, fetchgit }:
|
||||
{ stdenv
|
||||
, glib
|
||||
, autoreconfHook
|
||||
, pkgconfig
|
||||
, systemd
|
||||
, fetchFromGitLab
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2018.1";
|
||||
pname = "gnome-desktop-testing";
|
||||
version = "unstable-2019-12-11";
|
||||
|
||||
src = fetchgit {
|
||||
url = https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git;
|
||||
rev = "v${version}";
|
||||
sha256 = "1bcd8v101ynsv2p5swh30hnajjf6z8dxzd89h9racp847hgjgyxc";
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "GNOME";
|
||||
repo = "gnome-desktop-testing";
|
||||
rev = "57239dc8ef49ba74d442603a07a3e132b0cfdc6a";
|
||||
sha256 = "01c4jhpk23kfcnw3l9kfwjw9v5kgqmfhhqypw4k2d2sdkf4mgfv4";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
buildInputs = [ glib systemd ];
|
||||
buildInputs = [
|
||||
glib
|
||||
systemd
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GNOME OSTree testing code";
|
||||
homepage = https://live.gnome.org/Initiatives/GnomeGoals/InstalledTests;
|
||||
license = licenses.lgpl21;
|
||||
description = "GNOME test runner for installed tests";
|
||||
homepage = "https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests";
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.jtojnar ];
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a9a62d7c7adf6fc0237c7d04937b538a4cea87ad Mon Sep 17 00:00:00 2001
|
||||
From 977fdfad2ceba7232b4f78144b20640d7fd0aedb Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Tue, 19 Jun 2018 09:34:18 -0400
|
||||
Subject: [PATCH] Drop "ostree trivial-httpd" CLI, move to tests directory
|
||||
@ -13,22 +13,22 @@ Also at this point nothing should depend on `ostree trivial-httpd`.
|
||||
Makefile-man.am | 6 --
|
||||
Makefile-ostree.am | 7 ---
|
||||
Makefile-tests.am | 7 +++
|
||||
configure.ac | 10 ---
|
||||
configure.ac | 9 ---
|
||||
man/ostree-trivial-httpd.xml | 118 -----------------------------------
|
||||
src/ostree/main.c | 5 --
|
||||
tests/libtest.sh | 13 ++--
|
||||
7 files changed, 12 insertions(+), 154 deletions(-)
|
||||
7 files changed, 12 insertions(+), 153 deletions(-)
|
||||
delete mode 100644 man/ostree-trivial-httpd.xml
|
||||
|
||||
diff --git a/Makefile-man.am b/Makefile-man.am
|
||||
index 8ccbba8c..d204aa3e 100644
|
||||
index bc58103b..bcfde285 100644
|
||||
--- a/Makefile-man.am
|
||||
+++ b/Makefile-man.am
|
||||
@@ -34,12 +34,6 @@ ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 \
|
||||
ostree-pull.1 ostree-refs.1 ostree-remote.1 ostree-reset.1 \
|
||||
ostree-rev-parse.1 ostree-show.1 ostree-summary.1 \
|
||||
ostree-static-delta.1
|
||||
-if BUILDOPT_TRIVIAL_HTTPD
|
||||
-if USE_LIBSOUP
|
||||
-man1_files += ostree-trivial-httpd.1
|
||||
-else
|
||||
-# We still want to distribute the source, even if we are not building it
|
||||
@ -38,10 +38,10 @@ index 8ccbba8c..d204aa3e 100644
|
||||
if BUILDOPT_FUSE
|
||||
man1_files += rofiles-fuse.1
|
||||
diff --git a/Makefile-ostree.am b/Makefile-ostree.am
|
||||
index 8d352e38..1471b3e5 100644
|
||||
index f861afe4..497d99b0 100644
|
||||
--- a/Makefile-ostree.am
|
||||
+++ b/Makefile-ostree.am
|
||||
@@ -133,13 +133,6 @@ ostree_SOURCES += src/ostree/ot-builtin-pull.c
|
||||
@@ -144,13 +144,6 @@ ostree_SOURCES += src/ostree/ot-builtin-pull.c
|
||||
endif
|
||||
|
||||
if USE_LIBSOUP
|
||||
@ -56,12 +56,12 @@ index 8d352e38..1471b3e5 100644
|
||||
# This is necessary for the cookie jar bits
|
||||
ostree_CFLAGS += $(OT_INTERNAL_SOUP_CFLAGS)
|
||||
diff --git a/Makefile-tests.am b/Makefile-tests.am
|
||||
index 2c0916f6..b11fde89 100644
|
||||
index fc2f2d91..7343b63f 100644
|
||||
--- a/Makefile-tests.am
|
||||
+++ b/Makefile-tests.am
|
||||
@@ -248,6 +248,13 @@ _installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-u
|
||||
tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum \
|
||||
tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h
|
||||
@@ -263,6 +263,13 @@ _installed_or_uninstalled_test_programs += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
+if USE_LIBSOUP
|
||||
+test_extra_programs += ostree-trivial-httpd
|
||||
@ -74,10 +74,10 @@ index 2c0916f6..b11fde89 100644
|
||||
test_programs += tests/test-repo-finder-avahi
|
||||
endif
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e6e145db..1e36e6a0 100644
|
||||
index 46a900f5..2f91cdec 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -187,15 +187,6 @@ if test x$with_soup != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libsoup"; fi
|
||||
@@ -190,14 +190,6 @@ if test x$with_soup != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libsoup"; fi
|
||||
AM_CONDITIONAL(USE_LIBSOUP, test x$with_soup != xno)
|
||||
AM_CONDITIONAL(HAVE_LIBSOUP_CLIENT_CERTS, test x$have_libsoup_client_certs = xyes)
|
||||
|
||||
@ -85,15 +85,14 @@ index e6e145db..1e36e6a0 100644
|
||||
- [AS_HELP_STRING([--enable-trivial-httpd-cmdline],
|
||||
- [Continue to support "ostree trivial-httpd" [default=no]])],,
|
||||
- enable_trivial_httpd_cmdline=no)
|
||||
-AM_CONDITIONAL(BUILDOPT_TRIVIAL_HTTPD, test x$enable_trivial_httpd_cmdline = xyes)
|
||||
-AM_COND_IF(BUILDOPT_TRIVIAL_HTTPD,
|
||||
-AS_IF([test x$enable_trivial_httpd_cmdline = xyes],
|
||||
- [AC_DEFINE([BUILDOPT_ENABLE_TRIVIAL_HTTPD_CMDLINE], 1, [Define if we are enabling ostree trivial-httpd entrypoint])]
|
||||
-)
|
||||
-
|
||||
AS_IF([test x$with_curl = xyes && test x$with_soup = xno], [
|
||||
AC_MSG_WARN([Curl enabled, but libsoup is not; libsoup is needed for tests (make check, etc.)])
|
||||
])
|
||||
@@ -602,7 +593,6 @@ echo "
|
||||
@@ -617,7 +609,6 @@ echo "
|
||||
Rust (internal oxidation): $rust_debug_release
|
||||
rofiles-fuse: $enable_rofiles_fuse
|
||||
HTTP backend: $fetcher_backend
|
||||
@ -226,10 +225,10 @@ index d03c12be..00000000
|
||||
- </refsect1>
|
||||
-</refentry>
|
||||
diff --git a/src/ostree/main.c b/src/ostree/main.c
|
||||
index c5b45012..6478a62b 100644
|
||||
index a523ff9a..61ea742d 100644
|
||||
--- a/src/ostree/main.c
|
||||
+++ b/src/ostree/main.c
|
||||
@@ -116,11 +116,6 @@ static OstreeCommand commands[] = {
|
||||
@@ -118,11 +118,6 @@ static OstreeCommand commands[] = {
|
||||
{ "summary", OSTREE_BUILTIN_FLAG_NONE,
|
||||
ostree_builtin_summary,
|
||||
"Manage summary metadata" },
|
||||
@ -242,10 +241,10 @@ index c5b45012..6478a62b 100644
|
||||
};
|
||||
|
||||
diff --git a/tests/libtest.sh b/tests/libtest.sh
|
||||
index e0022512..b07dc962 100755
|
||||
index 3f5fd931..eacd96de 100755
|
||||
--- a/tests/libtest.sh
|
||||
+++ b/tests/libtest.sh
|
||||
@@ -149,15 +149,12 @@ fi
|
||||
@@ -160,15 +160,12 @@ fi
|
||||
if test -n "${OSTREE_UNINSTALLED:-}"; then
|
||||
OSTREE_HTTPD=${OSTREE_UNINSTALLED}/ostree-trivial-httpd
|
||||
else
|
||||
@ -267,5 +266,5 @@ index e0022512..b07dc962 100755
|
||||
|
||||
files_are_hardlinked() {
|
||||
--
|
||||
2.22.0
|
||||
2.25.0
|
||||
|
||||
|
@ -1,40 +1,105 @@
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gjs, nixosTests
|
||||
, glib, systemd, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse, utillinuxMinimal, libselinux
|
||||
, libarchive, libcap, bzip2, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42, python3
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, substituteAll
|
||||
, pkgconfig
|
||||
, gtk-doc
|
||||
, gobject-introspection
|
||||
, gjs
|
||||
, nixosTests
|
||||
, glib
|
||||
, systemd
|
||||
, xz
|
||||
, e2fsprogs
|
||||
, libsoup
|
||||
, gpgme
|
||||
, which
|
||||
, makeWrapper
|
||||
, autoconf
|
||||
, automake
|
||||
, libtool
|
||||
, fuse
|
||||
, utillinuxMinimal
|
||||
, libselinux
|
||||
, libarchive
|
||||
, libcap
|
||||
, bzip2
|
||||
, yacc
|
||||
, libxslt
|
||||
, docbook_xsl
|
||||
, docbook_xml_dtd_42
|
||||
, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let
|
||||
testPython = (python3.withPackages (p: with p; [
|
||||
pyyaml
|
||||
]));
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "ostree";
|
||||
version = "2019.2";
|
||||
version = "2019.6";
|
||||
|
||||
outputs = [ "out" "dev" "man" "installedTests" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz";
|
||||
sha256 = "0nbbrz3p4ms6vpl272q6fimqvizryw2a8mnfqcn69xf03sz5204y";
|
||||
sha256 = "1bhrfbjna3rnymijxagzkdq2zl74g71s2xmimihjhvcw2zybi0jl";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Workarounds for https://github.com/ostreedev/ostree/issues/1592
|
||||
./fix-1592.patch
|
||||
# Disable test-gpg-verify-result.test,
|
||||
# https://github.com/ostreedev/ostree/issues/1634
|
||||
./disable-test-gpg-verify-result.patch
|
||||
# Tests access the helper using relative path
|
||||
# https://github.com/ostreedev/ostree/issues/1593
|
||||
# Patch from https://github.com/ostreedev/ostree/pull/1633
|
||||
./01-Drop-ostree-trivial-httpd-CLI-move-to-tests-director.patch
|
||||
|
||||
# Fix tests running in Catalan instead of C locale.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/ostreedev/ostree/commit/5135a1e58ade2bfafc8c1fda359540eafd72531e.patch";
|
||||
sha256 = "1crzaagw1zzx8v6rsnxb9jnc3ij9hlpvdl91w3skqdm28adx7yx8";
|
||||
})
|
||||
|
||||
# Workarounds for https://github.com/ostreedev/ostree/issues/1592
|
||||
./fix-1592.patch
|
||||
|
||||
# Hard-code paths in tests
|
||||
(substituteAll {
|
||||
src = ./fix-test-paths.patch;
|
||||
python3 = testPython.interpreter;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf automake libtool pkgconfig gtk-doc gobject-introspection which yacc
|
||||
libxslt docbook_xsl docbook_xml_dtd_42
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
pkgconfig
|
||||
gtk-doc
|
||||
gobject-introspection
|
||||
which
|
||||
makeWrapper
|
||||
yacc
|
||||
libxslt
|
||||
docbook_xsl
|
||||
docbook_xml_dtd_42
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib systemd e2fsprogs libsoup gpgme fuse libselinux libcap
|
||||
libarchive bzip2 xz
|
||||
glib
|
||||
systemd
|
||||
e2fsprogs
|
||||
libsoup
|
||||
gpgme
|
||||
fuse
|
||||
libselinux
|
||||
libcap
|
||||
libarchive
|
||||
bzip2
|
||||
xz
|
||||
utillinuxMinimal # for libmount
|
||||
(python3.withPackages (p: with p; [ pyyaml ])) gjs # for tests
|
||||
|
||||
# for installed tests
|
||||
testPython
|
||||
gjs
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
@ -54,6 +119,12 @@ stdenv.mkDerivation rec {
|
||||
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/libostree"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
for test in $installedTests/libexec/installed-tests/libostree/*.js; do
|
||||
wrapProgram "$test" --prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
installedTests = nixosTests.installed-tests.ostree;
|
||||
@ -62,7 +133,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Git for operating system binaries";
|
||||
homepage = https://ostree.readthedocs.io/en/latest/;
|
||||
homepage = "https://ostree.readthedocs.io/en/latest/";
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/Makefile-tests.am b/Makefile-tests.am
|
||||
index b11fde89..82937a67 100644
|
||||
--- a/Makefile-tests.am
|
||||
+++ b/Makefile-tests.am
|
||||
@@ -245,7 +245,6 @@ endif
|
||||
|
||||
_installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
|
||||
tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \
|
||||
- tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum \
|
||||
tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h
|
||||
|
||||
if USE_LIBSOUP
|
26
pkgs/tools/misc/ostree/fix-test-paths.patch
Normal file
26
pkgs/tools/misc/ostree/fix-test-paths.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/tests/test-basic-user-only.sh b/tests/test-basic-user-only.sh
|
||||
index f65094fd..105be893 100755
|
||||
--- a/tests/test-basic-user-only.sh
|
||||
+++ b/tests/test-basic-user-only.sh
|
||||
@@ -29,7 +29,7 @@ extra_basic_tests=5
|
||||
. $(dirname $0)/basic-test.sh
|
||||
|
||||
$CMD_PREFIX ostree --version > version.yaml
|
||||
-python3 -c 'import yaml; yaml.safe_load(open("version.yaml"))'
|
||||
+@python3@ -c 'import yaml; yaml.safe_load(open("version.yaml"))'
|
||||
echo "ok yaml version"
|
||||
|
||||
# Reset things so we don't inherit a lot of state from earlier tests
|
||||
diff --git a/tests/test-remote-headers.sh b/tests/test-remote-headers.sh
|
||||
index a41d087a..77b34c90 100755
|
||||
--- a/tests/test-remote-headers.sh
|
||||
+++ b/tests/test-remote-headers.sh
|
||||
@@ -26,7 +26,7 @@ echo '1..2'
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
V=$($CMD_PREFIX ostree --version | \
|
||||
- python3 -c 'import sys, yaml; print(yaml.safe_load(sys.stdin)["libostree"]["Version"])')
|
||||
+ @python3@ -c 'import sys, yaml; print(yaml.safe_load(sys.stdin)["libostree"]["Version"])')
|
||||
|
||||
setup_fake_remote_repo1 "archive" "" \
|
||||
--expected-header foo=bar \
|
@ -1,41 +1,95 @@
|
||||
{ stdenv, fetchurl, ostree, rpm, which, autoconf, automake, libtool, pkgconfig, cargo, rustc,
|
||||
gobject-introspection, gtk-doc, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_43, gperf, cmake,
|
||||
libcap, glib, systemd, json-glib, libarchive, libsolv, librepo, polkit,
|
||||
bubblewrap, pcre, check, python, json_c, libmodulemd_1, utillinux, sqlite, cppunit, fetchpatch }:
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, ostree
|
||||
, rpm
|
||||
, which
|
||||
, autoconf
|
||||
, automake
|
||||
, libtool
|
||||
, pkgconfig
|
||||
, cargo
|
||||
, rustc
|
||||
, gobject-introspection
|
||||
, gtk-doc
|
||||
, libxml2
|
||||
, libxslt
|
||||
, docbook_xsl
|
||||
, docbook_xml_dtd_42
|
||||
, docbook_xml_dtd_43
|
||||
, gperf
|
||||
, cmake
|
||||
, libcap
|
||||
, glib
|
||||
, systemd
|
||||
, json-glib
|
||||
, libarchive
|
||||
, libsolv
|
||||
, librepo
|
||||
, polkit
|
||||
, bubblewrap
|
||||
, pcre
|
||||
, check
|
||||
, python
|
||||
, json_c
|
||||
, zchunk
|
||||
, libmodulemd_1
|
||||
, utillinux
|
||||
, sqlite
|
||||
, cppunit
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rpm-ostree";
|
||||
version = "2019.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/projectatomic/${pname}/releases/download/v${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0innbrjj086mslbf55bcvs9a3rv9hg1y2nhzxdjy3nhpqxqlzdnn";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# gobject-introspection requires curl in cflags
|
||||
# https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-449777169
|
||||
# https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-452177080
|
||||
./fix-introspection-build.patch
|
||||
|
||||
# Don't use etc/dbus-1/system.d
|
||||
(fetchpatch {
|
||||
url = "https://github.com/coreos/rpm-ostree/commit/60053d0d3d2279d120ae7007c6048e499d2c4d14.patch";
|
||||
sha256 = "0ig21zip09iy2da7ksg87jykaj3q8jyzh8r7yrpzyql85qxiwm0m";
|
||||
})
|
||||
];
|
||||
version = "2020.1";
|
||||
|
||||
outputs = [ "out" "dev" "man" "devdoc" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/coreos/${pname}/releases/download/v${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1xgfppq4fqqvg3cs327bckjpiz6rrn3bbbhg3q5p4j2bzsq89xiz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgconfig which autoconf automake libtool cmake gperf cargo rustc
|
||||
gobject-introspection gtk-doc libxml2 libxslt docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_43
|
||||
pkgconfig
|
||||
which
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
cmake
|
||||
gperf
|
||||
cargo
|
||||
rustc
|
||||
gobject-introspection
|
||||
gtk-doc
|
||||
libxml2
|
||||
libxslt
|
||||
docbook_xsl
|
||||
docbook_xml_dtd_42
|
||||
docbook_xml_dtd_43
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libcap ostree rpm glib systemd polkit bubblewrap
|
||||
json-glib libarchive libsolv librepo
|
||||
pcre check python
|
||||
# libdnf
|
||||
json_c libmodulemd_1 utillinux sqlite cppunit
|
||||
libcap
|
||||
ostree
|
||||
rpm
|
||||
glib
|
||||
systemd
|
||||
polkit
|
||||
bubblewrap
|
||||
json-glib
|
||||
libarchive
|
||||
libsolv
|
||||
librepo
|
||||
pcre
|
||||
check
|
||||
python
|
||||
# libdnf
|
||||
json_c
|
||||
zchunk
|
||||
libmodulemd_1
|
||||
utillinux
|
||||
sqlite
|
||||
cppunit
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
@ -60,7 +114,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A hybrid image/package system. It uses OSTree as an image format, and uses RPM as a component model";
|
||||
homepage = https://rpm-ostree.readthedocs.io/en/latest/;
|
||||
homepage = "https://rpm-ostree.readthedocs.io/en/latest/";
|
||||
license = licenses.lgpl2Plus;
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.linux;
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -103,7 +103,7 @@
|
||||
ostree-1 >= 2018.9
|
||||
libsystemd
|
||||
polkit-gobject-1
|
||||
- rpm librepo libsolv
|
||||
+ rpm librepo libsolv libcurl
|
||||
libarchive])
|
||||
|
||||
dnl -ldl: https://github.com/ostreedev/ostree/commit/1f832597fc83fda6cb8daf48c4495a9e1590774c
|
@ -1,30 +1,66 @@
|
||||
{ stdenv, fetchFromGitHub, cmake, python, pkgconfig, libxml2, glib, openssl, curl, check, gpgme }:
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, python
|
||||
, pkgconfig
|
||||
, libxml2
|
||||
, glib
|
||||
, openssl
|
||||
, zchunk
|
||||
, curl
|
||||
, check
|
||||
, gpgme
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.9.2";
|
||||
version = "1.11.2";
|
||||
pname = "librepo";
|
||||
|
||||
outputs = [ "out" "dev" "py" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rpm-software-management";
|
||||
repo = "librepo";
|
||||
rev = version;
|
||||
sha256 = "0xa9ng9mhpianhjy2a0jnj8ha1zckk2sz91y910daggm1qcv5asx";
|
||||
owner = "rpm-software-management";
|
||||
repo = "librepo";
|
||||
rev = version;
|
||||
sha256 = "0f04qky61dlh5h71xdmpngpy98cmlsfyp2pkyj5sbkplvrmh1wzw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
cmakeFlags = ["-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}" ];
|
||||
|
||||
buildInputs = [ python libxml2 glib openssl curl check gpgme ];
|
||||
buildInputs = [
|
||||
python
|
||||
libxml2
|
||||
glib
|
||||
openssl
|
||||
zchunk
|
||||
curl
|
||||
check
|
||||
gpgme
|
||||
];
|
||||
|
||||
# librepo/fastestmirror.h includes curl/curl.h, and pkg-config specfile refers to others in here
|
||||
propagatedBuildInputs = [ curl gpgme libxml2 ];
|
||||
propagatedBuildInputs = [
|
||||
curl
|
||||
gpgme
|
||||
libxml2
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
moveToOutput "lib/${python.libPrefix}" "$py"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Library providing C and Python (libcURL like) API for downloading linux repository metadata and packages";
|
||||
homepage = https://rpm-software-management.github.io/librepo/;
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://rpm-software-management.github.io/librepo/";
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
};
|
||||
}
|
||||
|
@ -4825,6 +4825,8 @@ in
|
||||
|
||||
libpointmatcher = callPackage ../development/libraries/libpointmatcher { };
|
||||
|
||||
libportal = callPackage ../development/libraries/libportal { };
|
||||
|
||||
libmicrodns = callPackage ../development/libraries/libmicrodns { };
|
||||
|
||||
libnids = callPackage ../tools/networking/libnids { };
|
||||
@ -11738,6 +11740,8 @@ in
|
||||
|
||||
glib-networking = callPackage ../development/libraries/glib-networking {};
|
||||
|
||||
glib-testing = callPackage ../development/libraries/glib-testing { };
|
||||
|
||||
glirc = haskell.lib.justStaticExecutables haskellPackages.glirc;
|
||||
|
||||
gom = callPackage ../development/libraries/gom { };
|
||||
@ -12669,7 +12673,9 @@ in
|
||||
|
||||
librelp = callPackage ../development/libraries/librelp { };
|
||||
|
||||
librepo = callPackage ../tools/package-management/librepo { };
|
||||
librepo = callPackage ../tools/package-management/librepo {
|
||||
python = python3;
|
||||
};
|
||||
|
||||
libresample = callPackage ../development/libraries/libresample {};
|
||||
|
||||
@ -12772,6 +12778,8 @@ in
|
||||
|
||||
libmad = callPackage ../development/libraries/libmad { };
|
||||
|
||||
malcontent = callPackage ../development/libraries/malcontent { };
|
||||
|
||||
libmanette = callPackage ../development/libraries/libmanette { };
|
||||
|
||||
libmatchbox = callPackage ../development/libraries/libmatchbox { };
|
||||
@ -14767,6 +14775,8 @@ in
|
||||
|
||||
yubikey-personalization-gui = libsForQt5.callPackage ../tools/misc/yubikey-personalization-gui { };
|
||||
|
||||
zchunk = callPackage ../development/libraries/zchunk { };
|
||||
|
||||
zeitgeist = callPackage ../development/libraries/zeitgeist { };
|
||||
|
||||
zlib = callPackage ../development/libraries/zlib { };
|
||||
|
@ -4043,9 +4043,21 @@ in {
|
||||
|
||||
libkeepass = callPackage ../development/python-modules/libkeepass { };
|
||||
|
||||
librepo = toPythonModule (pkgs.librepo.override {
|
||||
inherit python;
|
||||
});
|
||||
librepo = pipe pkgs.librepo [
|
||||
toPythonModule
|
||||
|
||||
(p: p.overrideAttrs (super: {
|
||||
meta = super.meta // {
|
||||
outputsToInstall = [ "py" ];
|
||||
};
|
||||
}))
|
||||
|
||||
(p: p.override {
|
||||
inherit python;
|
||||
})
|
||||
|
||||
(p: p.py)
|
||||
];
|
||||
|
||||
libnacl = callPackage ../development/python-modules/libnacl {
|
||||
inherit (pkgs) libsodium;
|
||||
|
Loading…
Reference in New Issue
Block a user