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