mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
dotool: 1.3 -> 1.5
This commit is contained in:
parent
bed9309adc
commit
9e655bebf1
@ -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; {
|
||||
|
@ -4,30 +4,30 @@ index e2f7bba..6d1879e 100755
|
||||
+++ b/dotoolc
|
||||
@@ -7,7 +7,7 @@ is $DOTOOL_PIPE else /tmp/dotool-pipe.' >&2
|
||||
fi
|
||||
|
||||
|
||||
fifo_being_read(){
|
||||
- [ -p "$1" ] && /bin/echo 1<>"$1" >"$1"
|
||||
+ [ -p "$1" ] && echo 1<>"$1" >"$1"
|
||||
}
|
||||
|
||||
|
||||
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"
|
||||
+ [ -p "$1" ] && echo 1<>"$1" >"$1"
|
||||
}
|
||||
|
||||
|
||||
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 $!
|
||||
|
Loading…
Reference in New Issue
Block a user