Unverified Commit 555e8f20 authored by Sebastián Mancilla's avatar Sebastián Mancilla Committed by GitHub
Browse files

Merge pull request #326320 from idlip/bump_dotool

dotool: 1.3 -> 1.5
parents e5d7d560 9e655beb
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -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; {
+11 −11
Original line number Diff line number Diff line
@@ -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 $!