nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

dotool: init at 1.3

+81
+46
pkgs/tools/dotool/default.nix
··· 1 + { lib 2 + , buildGoModule 3 + , fetchFromSourcehut 4 + , libxkbcommon 5 + , pkg-config 6 + }: 7 + 8 + buildGoModule rec { 9 + pname = "dotool"; 10 + version = "1.3"; 11 + 12 + src = fetchFromSourcehut { 13 + owner = "~geb"; 14 + repo = "dotool"; 15 + rev = version; 16 + hash = "sha256-z0fQ+qenHjtoriYSD2sOjEvfLVtZcMJbvnjKZFRSsMA="; 17 + }; 18 + 19 + vendorHash = "sha256-v0uoG9mNaemzhQAiG85RequGjkSllPd4UK2SrLjfm7A="; 20 + 21 + # uses nix store path for the dotool binary 22 + # also replaces /bin/echo with echo 23 + patches = [ ./fix-paths.patch ]; 24 + 25 + postPatch = '' 26 + substituteInPlace ./dotoold --replace "@dotool@" "$out/bin/dotool" 27 + ''; 28 + 29 + buildInputs = [ libxkbcommon ]; 30 + nativeBuildInputs = [ pkg-config ]; 31 + 32 + ldflags = [ "-s" "-w" "-X main.Version=${version}" ]; 33 + 34 + postInstall = '' 35 + mkdir -p $out/bin 36 + cp ./dotoold ./dotoolc $out/bin 37 + ''; 38 + 39 + meta = with lib; { 40 + description = "Command to simulate input anywhere"; 41 + homepage = "https://git.sr.ht/~geb/dotool"; 42 + changelog = "https://git.sr.ht/~geb/dotool/tree/${version}/item/CHANGELOG.md"; 43 + license = licenses.gpl3Only; 44 + maintainers = with maintainers; [ dit7ya ]; 45 + }; 46 + }
+33
pkgs/tools/dotool/fix-paths.patch
··· 1 + diff --git a/dotoolc b/dotoolc 2 + index e2f7bba..6d1879e 100755 3 + --- a/dotoolc 4 + +++ b/dotoolc 5 + @@ -7,7 +7,7 @@ is $DOTOOL_PIPE else /tmp/dotool-pipe.' >&2 6 + fi 7 + 8 + fifo_being_read(){ 9 + - [ -p "$1" ] && /bin/echo 1<>"$1" >"$1" 10 + + [ -p "$1" ] && echo 1<>"$1" >"$1" 11 + } 12 + 13 + p="${DOTOOL_PIPE:-/tmp/dotool-pipe}" 14 + diff --git a/dotoold b/dotoold 15 + index d2d39a3..e46129c 100755 16 + --- a/dotoold 17 + +++ b/dotoold 18 + @@ -7,7 +7,7 @@ for the pipe is $DOTOOL_PIPE else /tmp/dotool-pipe.' >&2 19 + fi 20 + 21 + fifo_being_read(){ 22 + - [ -p "$1" ] && /bin/echo 1<>"$1" >"$1" 23 + + [ -p "$1" ] && echo 1<>"$1" >"$1" 24 + } 25 + 26 + p="${DOTOOL_PIPE:-/tmp/dotool-pipe}" 27 + @@ -20,5 +20,5 @@ fi 28 + rm -f -- "$p" || exit 1 29 + trap 'rm -f -- "$p"; pkill -P $$; trap - EXIT; exit' EXIT INT TERM HUP 30 + mkfifo -m 660 "$p" || exit 1 31 + -dotool <> "$p" & 32 + +@dotool@ <> "$p" & 33 + wait
+2
pkgs/top-level/all-packages.nix
··· 4598 4598 inherit (darwin.apple_sdk.frameworks) Security; 4599 4599 }; 4600 4600 4601 + dotool = callPackage ../tools/dotool { }; 4602 + 4601 4603 inherit (ocamlPackages) dot-merlin-reader; 4602 4604 4603 4605 dozenal = callPackage ../applications/misc/dozenal { };