Loading pkgs/development/libraries/flatpak/default.nix +13 −8 Original line number Diff line number Diff line Loading @@ -11,14 +11,15 @@ , libxslt , pkg-config , xmlto , appstream-glib , substituteAll , runCommand , bison , xdg-dbus-proxy , p11-kit , appstream , bubblewrap , bzip2 , curl , dbus , glib , gpgme Loading @@ -33,9 +34,8 @@ , shared-mime-info , desktop-file-utils , gtk3 , fuse , fuse3 , nixosTests , libsoup , xz , zstd , ostree Loading @@ -54,14 +54,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "flatpak"; version = "1.12.7"; version = "1.14.0"; # TODO: split out lib once we figure out what to do with triggerdir outputs = [ "out" "dev" "man" "doc" "devdoc" "installedTests" ]; src = fetchurl { url = "https://github.com/flatpak/flatpak/releases/download/${finalAttrs.version}/flatpak-${finalAttrs.version}.tar.xz"; sha256 = "sha256-bbUqUxzieCgqx+v7mfZqC7PsyvROhkhEwslcHuW6kxY="; # Taken from https://github.com/flatpak/flatpak/releases/ sha256 = "sha256-jidpc3cOok3fJZetSuzTa5g5PmvekeSOF0OqymfyeBU="; # Taken from https://github.com/flatpak/flatpak/releases/ }; patches = [ Loading Loading @@ -89,6 +89,10 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/NixOS/nixpkgs/issues/53441 ./unset-env-vars.patch # Do not clear XDG_DATA_DIRS in fish shell # https://github.com/flatpak/flatpak/pull/5123 ./no-breaking-fish.patch # The icon validator needs to access the gdk-pixbuf loaders in the Nix store # and cannot bind FHS paths since those are not available on NixOS. finalAttrs.passthru.icon-validator-patch Loading @@ -106,14 +110,15 @@ stdenv.mkDerivation (finalAttrs: { libxslt pkg-config xmlto appstream-glib bison wrapGAppsNoGuiHook ]; buildInputs = [ appstream bubblewrap bzip2 curl dbus dconf gpgme Loading @@ -121,14 +126,13 @@ stdenv.mkDerivation (finalAttrs: { libarchive libcap libseccomp libsoup xz zstd polkit python3 systemd xorg.libXau fuse fuse3 gsettings-desktop-schemas glib-networking librsvg # for flatpak-validate-icon Loading @@ -152,6 +156,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; configureFlags = [ "--with-curl" "--with-system-bubblewrap=${bubblewrap}/bin/bwrap" "--with-system-dbus-proxy=${xdg-dbus-proxy}/bin/xdg-dbus-proxy" "--with-dbus-config-dir=${placeholder "out"}/share/dbus-1/system.d" Loading pkgs/development/libraries/flatpak/fix-test-paths.patch +44 −45 Original line number Diff line number Diff line diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c index 43fd0563..4067bd36 100644 index 3f5d8a1f..79493e61 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, @@ -464,7 +464,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, Loading @@ -12,10 +12,10 @@ index 43fd0563..4067bd36 100644 { if (!g_error_matches (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT)) diff --git a/tests/libtest.sh b/tests/libtest.sh index acb2095b..b361da16 100644 index 36d39ac4..3ad2c7a6 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -431,7 +431,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then @@ -511,7 +511,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 \ Loading @@ -24,7 +24,7 @@ index acb2095b..b361da16 100644 _flatpak_bwrap_works=false else _flatpak_bwrap_works=true @@ -504,7 +504,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \ @@ -591,7 +591,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)" Loading @@ -33,20 +33,20 @@ index acb2095b..b361da16 100644 assert_not_reached "Failed to start dbus-daemon" fi @@ -519,7 +519,7 @@ commit_to_path () { @@ -606,7 +606,7 @@ commit_to_path () { } cleanup () { - /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 || : gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye >&2 || true fusermount -u $XDG_RUNTIME_DIR/doc >&2 || : kill $(jobs -p) &> /dev/null || true diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh index 612f914f..4b890da2 100755 index afa11a6b..5b12055f 100755 --- a/tests/make-test-app.sh +++ b/tests/make-test-app.sh @@ -151,13 +151,13 @@ msgid "Hello world" @@ -190,13 +190,13 @@ msgid "Hello world" msgstr "Hallo Welt" EOF mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES Loading @@ -60,10 +60,10 @@ index 612f914f..4b890da2 100755 -msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po +@gettext@/bin/msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po flatpak build-finish ${DIR} flatpak build-finish ${DIR} >&2 mkdir -p repos diff --git a/tests/make-test-runtime.sh b/tests/make-test-runtime.sh index af289625..7db51c17 100755 index 4ba950df..fd50fab3 100755 --- a/tests/make-test-runtime.sh +++ b/tests/make-test-runtime.sh @@ -28,9 +28,10 @@ EOF Loading @@ -80,7 +80,7 @@ index af289625..7db51c17 100755 ln -s ../lib ${DIR}/usr/lib64 @@ -40,40 +41,17 @@ if test -f /sbin/ldconfig.real; then else cp `which ldconfig` ${DIR}/usr/bin cp "$(type -P ldconfig)" "${DIR}/usr/bin" fi -LIBS=`mktemp` -BINS=`mktemp` Loading @@ -106,8 +106,8 @@ index af289625..7db51c17 100755 -} - for i in $@ bash ls cat echo readlink socat; do - I=`which $i` - add_bin $I - I=$(type -P "$i") - add_bin "$I" -done -for i in `cat $BINS`; do - #echo Adding binary $i 1>&2 Loading @@ -116,16 +116,16 @@ index af289625..7db51c17 100755 -for i in `cat $LIBS`; do - #echo Adding library $i 1>&2 - cp "$i" ${DIR}/usr/lib/ + I=$(readlink -f $(which $i)) + [ -e ${DIR}/usr/bin/$i ] && continue + I=$(readlink -f "$(type -P "$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 + if [ ! -e ${DIR}/$r ]; then + cp -r $r ${DIR}/$r + if [ ! -e "${DIR}/$r" ]; then + cp -r "$r" "${DIR}/$r" + fi + done + ln -s $I ${DIR}/usr/bin/$i + ln -s "$I" "${DIR}/usr/bin/$i" done ln -s bash ${DIR}/usr/bin/sh Loading @@ -141,18 +141,18 @@ index af289625..7db51c17 100755 +# We do not copy C.UTF8 locale because it is in locale archive and +# that is already copied with glibc. + +mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store +chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed +find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths +find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets +mv "${DIR}/nix/store" "${DIR}/usr/store" # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store +chmod -R u+w "${DIR}" # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed +find "${DIR}" -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths +find "${DIR}" -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets if [ x$COLLECTION_ID != x ]; then collection_args=--collection-id=${COLLECTION_ID} diff --git a/tests/testlibrary.c b/tests/testlibrary.c index 509ce6cc..6a333c9c 100644 index 831d85c1..ae4f03d0 100644 --- a/tests/testlibrary.c +++ b/tests/testlibrary.c @@ -1399,7 +1399,7 @@ check_bwrap_support (void) @@ -1601,7 +1601,7 @@ check_bwrap_support (void) { gint exit_code = 0; char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net", Loading @@ -162,44 +162,43 @@ index 509ce6cc..6a333c9c 100644 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/desktop-database.trigger b/triggers/desktop-database.trigger index 2188f535..d8283061 100755 index 1037466d..c4c7ed6d 100755 --- a/triggers/desktop-database.trigger +++ b/triggers/desktop-database.trigger @@ -1,5 +1,5 @@ #!/bin/sh -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 -if command -v update-desktop-database >/dev/null && test -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 index d9fc8251..d8ddb96e 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 ! @gtk3@/bin/gtk-update-icon-cache --quiet $dir; then if command -v gtk-update-icon-cache >/dev/null && test -d "$1/exports/share/icons/hicolor"; then - cp /usr/share/icons/hicolor/index.theme "$1/exports/share/icons/hicolor/" + 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 ! @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 index 10ddbbb3..c270998a 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 -if command -v update-mime-database >/dev/null && test -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 pkgs/development/libraries/flatpak/no-breaking-fish.patch 0 → 100644 +11 −0 Original line number Diff line number Diff line --- a/profile/flatpak.fish +++ b/profile/flatpak.fish @@ -1,7 +1,7 @@ if type -q flatpak # Set XDG_DATA_DIRS to include Flatpak installations - set -x --path XDG_DATA_DIRS + set -x --path XDG_DATA_DIRS $XDG_DATA_DIRS set -q XDG_DATA_DIRS[1]; or set XDG_DATA_DIRS /usr/local/share /usr/share set -q XDG_DATA_HOME; or set -l XDG_DATA_HOME $HOME/.local/share Loading
pkgs/development/libraries/flatpak/default.nix +13 −8 Original line number Diff line number Diff line Loading @@ -11,14 +11,15 @@ , libxslt , pkg-config , xmlto , appstream-glib , substituteAll , runCommand , bison , xdg-dbus-proxy , p11-kit , appstream , bubblewrap , bzip2 , curl , dbus , glib , gpgme Loading @@ -33,9 +34,8 @@ , shared-mime-info , desktop-file-utils , gtk3 , fuse , fuse3 , nixosTests , libsoup , xz , zstd , ostree Loading @@ -54,14 +54,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "flatpak"; version = "1.12.7"; version = "1.14.0"; # TODO: split out lib once we figure out what to do with triggerdir outputs = [ "out" "dev" "man" "doc" "devdoc" "installedTests" ]; src = fetchurl { url = "https://github.com/flatpak/flatpak/releases/download/${finalAttrs.version}/flatpak-${finalAttrs.version}.tar.xz"; sha256 = "sha256-bbUqUxzieCgqx+v7mfZqC7PsyvROhkhEwslcHuW6kxY="; # Taken from https://github.com/flatpak/flatpak/releases/ sha256 = "sha256-jidpc3cOok3fJZetSuzTa5g5PmvekeSOF0OqymfyeBU="; # Taken from https://github.com/flatpak/flatpak/releases/ }; patches = [ Loading Loading @@ -89,6 +89,10 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/NixOS/nixpkgs/issues/53441 ./unset-env-vars.patch # Do not clear XDG_DATA_DIRS in fish shell # https://github.com/flatpak/flatpak/pull/5123 ./no-breaking-fish.patch # The icon validator needs to access the gdk-pixbuf loaders in the Nix store # and cannot bind FHS paths since those are not available on NixOS. finalAttrs.passthru.icon-validator-patch Loading @@ -106,14 +110,15 @@ stdenv.mkDerivation (finalAttrs: { libxslt pkg-config xmlto appstream-glib bison wrapGAppsNoGuiHook ]; buildInputs = [ appstream bubblewrap bzip2 curl dbus dconf gpgme Loading @@ -121,14 +126,13 @@ stdenv.mkDerivation (finalAttrs: { libarchive libcap libseccomp libsoup xz zstd polkit python3 systemd xorg.libXau fuse fuse3 gsettings-desktop-schemas glib-networking librsvg # for flatpak-validate-icon Loading @@ -152,6 +156,7 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; configureFlags = [ "--with-curl" "--with-system-bubblewrap=${bubblewrap}/bin/bwrap" "--with-system-dbus-proxy=${xdg-dbus-proxy}/bin/xdg-dbus-proxy" "--with-dbus-config-dir=${placeholder "out"}/share/dbus-1/system.d" Loading
pkgs/development/libraries/flatpak/fix-test-paths.patch +44 −45 Original line number Diff line number Diff line diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c index 43fd0563..4067bd36 100644 index 3f5d8a1f..79493e61 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, @@ -464,7 +464,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, Loading @@ -12,10 +12,10 @@ index 43fd0563..4067bd36 100644 { if (!g_error_matches (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT)) diff --git a/tests/libtest.sh b/tests/libtest.sh index acb2095b..b361da16 100644 index 36d39ac4..3ad2c7a6 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -431,7 +431,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then @@ -511,7 +511,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 \ Loading @@ -24,7 +24,7 @@ index acb2095b..b361da16 100644 _flatpak_bwrap_works=false else _flatpak_bwrap_works=true @@ -504,7 +504,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \ @@ -591,7 +591,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)" Loading @@ -33,20 +33,20 @@ index acb2095b..b361da16 100644 assert_not_reached "Failed to start dbus-daemon" fi @@ -519,7 +519,7 @@ commit_to_path () { @@ -606,7 +606,7 @@ commit_to_path () { } cleanup () { - /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 || : gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye >&2 || true fusermount -u $XDG_RUNTIME_DIR/doc >&2 || : kill $(jobs -p) &> /dev/null || true diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh index 612f914f..4b890da2 100755 index afa11a6b..5b12055f 100755 --- a/tests/make-test-app.sh +++ b/tests/make-test-app.sh @@ -151,13 +151,13 @@ msgid "Hello world" @@ -190,13 +190,13 @@ msgid "Hello world" msgstr "Hallo Welt" EOF mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES Loading @@ -60,10 +60,10 @@ index 612f914f..4b890da2 100755 -msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po +@gettext@/bin/msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po flatpak build-finish ${DIR} flatpak build-finish ${DIR} >&2 mkdir -p repos diff --git a/tests/make-test-runtime.sh b/tests/make-test-runtime.sh index af289625..7db51c17 100755 index 4ba950df..fd50fab3 100755 --- a/tests/make-test-runtime.sh +++ b/tests/make-test-runtime.sh @@ -28,9 +28,10 @@ EOF Loading @@ -80,7 +80,7 @@ index af289625..7db51c17 100755 ln -s ../lib ${DIR}/usr/lib64 @@ -40,40 +41,17 @@ if test -f /sbin/ldconfig.real; then else cp `which ldconfig` ${DIR}/usr/bin cp "$(type -P ldconfig)" "${DIR}/usr/bin" fi -LIBS=`mktemp` -BINS=`mktemp` Loading @@ -106,8 +106,8 @@ index af289625..7db51c17 100755 -} - for i in $@ bash ls cat echo readlink socat; do - I=`which $i` - add_bin $I - I=$(type -P "$i") - add_bin "$I" -done -for i in `cat $BINS`; do - #echo Adding binary $i 1>&2 Loading @@ -116,16 +116,16 @@ index af289625..7db51c17 100755 -for i in `cat $LIBS`; do - #echo Adding library $i 1>&2 - cp "$i" ${DIR}/usr/lib/ + I=$(readlink -f $(which $i)) + [ -e ${DIR}/usr/bin/$i ] && continue + I=$(readlink -f "$(type -P "$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 + if [ ! -e ${DIR}/$r ]; then + cp -r $r ${DIR}/$r + if [ ! -e "${DIR}/$r" ]; then + cp -r "$r" "${DIR}/$r" + fi + done + ln -s $I ${DIR}/usr/bin/$i + ln -s "$I" "${DIR}/usr/bin/$i" done ln -s bash ${DIR}/usr/bin/sh Loading @@ -141,18 +141,18 @@ index af289625..7db51c17 100755 +# We do not copy C.UTF8 locale because it is in locale archive and +# that is already copied with glibc. + +mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store +chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed +find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths +find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets +mv "${DIR}/nix/store" "${DIR}/usr/store" # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store +chmod -R u+w "${DIR}" # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed +find "${DIR}" -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths +find "${DIR}" -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets if [ x$COLLECTION_ID != x ]; then collection_args=--collection-id=${COLLECTION_ID} diff --git a/tests/testlibrary.c b/tests/testlibrary.c index 509ce6cc..6a333c9c 100644 index 831d85c1..ae4f03d0 100644 --- a/tests/testlibrary.c +++ b/tests/testlibrary.c @@ -1399,7 +1399,7 @@ check_bwrap_support (void) @@ -1601,7 +1601,7 @@ check_bwrap_support (void) { gint exit_code = 0; char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net", Loading @@ -162,44 +162,43 @@ index 509ce6cc..6a333c9c 100644 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/desktop-database.trigger b/triggers/desktop-database.trigger index 2188f535..d8283061 100755 index 1037466d..c4c7ed6d 100755 --- a/triggers/desktop-database.trigger +++ b/triggers/desktop-database.trigger @@ -1,5 +1,5 @@ #!/bin/sh -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 -if command -v update-desktop-database >/dev/null && test -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 index d9fc8251..d8ddb96e 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 ! @gtk3@/bin/gtk-update-icon-cache --quiet $dir; then if command -v gtk-update-icon-cache >/dev/null && test -d "$1/exports/share/icons/hicolor"; then - cp /usr/share/icons/hicolor/index.theme "$1/exports/share/icons/hicolor/" + 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 ! @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 index 10ddbbb3..c270998a 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 -if command -v update-mime-database >/dev/null && test -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
pkgs/development/libraries/flatpak/no-breaking-fish.patch 0 → 100644 +11 −0 Original line number Diff line number Diff line --- a/profile/flatpak.fish +++ b/profile/flatpak.fish @@ -1,7 +1,7 @@ if type -q flatpak # Set XDG_DATA_DIRS to include Flatpak installations - set -x --path XDG_DATA_DIRS + set -x --path XDG_DATA_DIRS $XDG_DATA_DIRS set -q XDG_DATA_DIRS[1]; or set XDG_DATA_DIRS /usr/local/share /usr/share set -q XDG_DATA_HOME; or set -l XDG_DATA_HOME $HOME/.local/share