-
Notifications
You must be signed in to change notification settings - Fork 41
/
libvfio.nimble
42 lines (34 loc) · 994 Bytes
/
libvfio.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Package
version = "1.0.5"
author = "2666680 Ontario Inc."
description = "Release 1"
license = "AGPL"
srcDir = "src"
installExt = @["nim", "xml"]
bin = @["arcd"]
# Dependencies
requires "nim >= 1.4.8",
"yaml",
"uuids",
"psutil",
"terminaltables"
proc set_capabilities(s: string) =
exec("sudo setcap cap_setgid,cap_fsetid,cap_setuid=+ep " & s)
after build:
echo "Finished building the process, we are now"
echo "fixing the permissions to allow libvf.io to"
echo "become root without asking for passwords."
for i in bin:
echo "Providing root permissions to: ", i
set_capabilities("./" & i)
before install:
echo "Removing existing file."
for i in bin:
echo "Removing file: ", i
exec("rm -f ~/.nimble/bin/" & i)
after install:
echo "Moving files to avoid symbolic linking."
for i in bin:
echo "Moving file: ", i
exec("mv " & i & " ~/.nimble/bin")
set_capabilities("~/.nimble/bin/" & i)