Merge pull request #326320 from idlip/bump_dotool

dotool: 1.3 -> 1.5
This commit is contained in:
Sebastián Mancilla 2024-08-13 21:16:55 -04:00 committed by GitHub
commit 555e8f20d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 15 deletions

View File

@ -3,20 +3,22 @@
, fetchFromSourcehut
, libxkbcommon
, pkg-config
, installShellFiles
, scdoc
}:
buildGoModule rec {
pname = "dotool";
version = "1.3";
version = "1.5";
src = fetchFromSourcehut {
owner = "~geb";
repo = "dotool";
rev = version;
hash = "sha256-z0fQ+qenHjtoriYSD2sOjEvfLVtZcMJbvnjKZFRSsMA=";
hash = "sha256-4QmTHeU3TnpRATKIvilkIA3i2hDjM5zQwSvmRvoWuNE=";
};
vendorHash = "sha256-v0uoG9mNaemzhQAiG85RequGjkSllPd4UK2SrLjfm7A=";
vendorHash = "sha256-IQ847LHDYJPboWL/6lQNJ4vPPD/+xkrGI2LSZ7kBnp4=";
# uses nix store path for the dotool binary
# also replaces /bin/echo with echo
@ -27,13 +29,15 @@ buildGoModule rec {
'';
buildInputs = [ libxkbcommon ];
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ installShellFiles pkg-config scdoc ];
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
postInstall = ''
mkdir -p $out/bin
cp ./dotoold ./dotoolc $out/bin
scdoc < doc/dotool.1.scd > doc/dotool.1
installManPage doc/dotool.1
'';
meta = with lib; {

View File

@ -12,11 +12,11 @@ index e2f7bba..6d1879e 100755
p="${DOTOOL_PIPE:-/tmp/dotool-pipe}"
diff --git a/dotoold b/dotoold
index d2d39a3..e46129c 100755
index 48a7789..c405312 100755
--- a/dotoold
+++ b/dotoold
@@ -7,7 +7,7 @@ for the pipe is $DOTOOL_PIPE else /tmp/dotool-pipe.' >&2
fi
@@ -12,7 +12,7 @@ for the pipe is $DOTOOL_PIPE else /tmp/dotool-pipe.' >&2
done
fifo_being_read(){
- [ -p "$1" ] && /bin/echo 1<>"$1" >"$1"
@ -24,10 +24,10 @@ index d2d39a3..e46129c 100755
}
p="${DOTOOL_PIPE:-/tmp/dotool-pipe}"
@@ -20,5 +20,5 @@ fi
@@ -25,5 +25,5 @@ fi
rm -f -- "$p" || exit 1
trap 'rm -f -- "$p"; pkill -P $$; trap - EXIT; exit' EXIT INT TERM HUP
mkfifo -m 660 "$p" || exit 1
-dotool <> "$p" &
+@dotool@ <> "$p" &
wait
-dotool "$@" <> "$p" &
+@dotool@ "$@" <> "$p" &
wait $!