diff options
author | Josselin Poiret <dev@jpoiret.xyz> | 2021-12-14 22:47:51 +0100 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-12-19 13:17:30 +0100 |
commit | 360c10ba7e43f31bee2150ee5f93ba4c65108645 (patch) | |
tree | 2bd77276930a72a7c09d0f3ed8a916570396c8c1 /gnu/packages/patches | |
parent | 5a507c0080c0d36181ddd3e26397c287490fb2f3 (diff) | |
download | guix-360c10ba7e43f31bee2150ee5f93ba4c65108645.tar.gz guix-360c10ba7e43f31bee2150ee5f93ba4c65108645.zip |
gnu: xdg-desktop-portal-wlr: Add binary dependencies.
* gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch:
Add it.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/freedesktop.scm (xdg-desktop-portal-wlr): Add
dependencies on bash-minimal, grim and slurp, and hardcode the paths
in source.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch b/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch new file mode 100644 index 0000000000..b499a039e8 --- /dev/null +++ b/gnu/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch @@ -0,0 +1,28 @@ +From 3121eeb5e68bedd6e2398f35b9bd60b69709a47e Mon Sep 17 00:00:00 2001 +From: Josselin Poiret <dev@jpoiret.xyz> +Date: Tue, 14 Dec 2021 18:49:54 +0100 +Subject: [PATCH] Replace hardcoded command length + +--- + src/screenshot/screenshot.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/screenshot/screenshot.c b/src/screenshot/screenshot.c +index 9df0ea7..5f27681 100644 +--- a/src/screenshot/screenshot.c ++++ b/src/screenshot/screenshot.c +@@ -42,8 +42,9 @@ static bool exec_screenshooter_interactive(const char *path) { + perror("fork"); + return false; + } else if (pid == 0) { +- char cmd[strlen(path) + 25]; +- snprintf(cmd, sizeof(cmd), "grim -g \"$(slurp)\" -- %s", path); ++ const char cmd_fmt[] = "grim -g \"$(slurp)\" -- %s"; ++ char cmd[strlen(path) + sizeof(cmd_fmt)]; ++ snprintf(cmd, sizeof(cmd), cmd_fmt, path); + execl("/bin/sh", "/bin/sh", "-c", cmd, NULL); + perror("execl"); + exit(127); +-- +2.34.0 + |