git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107638 from thiagokokada/opentabletdriver-init

opentabletdriver: init at 0.4.2/add module

commit58f3c19b78594e1839abf702fa73ddf9d7a96437 authorKevin Cox <kevincox@kevincox.ca> dateWed 30 Dec 2020, 09:18 (6 years ago) parentac02f26791ef2e
7 files changed+754
nixos/modules/hardware/opentabletdriver.nix+58 nixos/modules/module-list.nix+1 pkgs/tools/X11/opentabletdriver/default.nix+152 pkgs/tools/X11/opentabletdriver/deps.nix+462 pkgs/tools/X11/opentabletdriver/shell.nix+12 pkgs/tools/X11/opentabletdriver/update.sh+64 pkgs/top-level/all-packages.nix+5
nixos/modules/hardware/opentabletdriver.nixnew file+58
@@ -0,0 +1,58 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+let
5+ cfg = config.hardware.opentabletdriver;
6+in
7+{
8+ options = {
9+ hardware.opentabletdriver = {
10+ enable = mkOption {
11+ default = false;
12+ type = types.bool;
13+ description = ''
14+ Enable OpenTabletDriver udev rules, user service and blacklist kernel
15+ modules known to conflict with OpenTabletDriver.
16+ '';
17+ };
18+
19+ blacklistedKernelModules = mkOption {
20+ type = types.listOf types.str;
21+ default = [ "hid-uclogic" "wacom" ];
22+ description = ''
23+ Blacklist of kernel modules known to conflict with OpenTabletDriver.
24+ '';
25+ };
26+
27+ daemon = {
28+ enable = mkOption {
29+ default = true;
30+ type = types.bool;
31+ description = ''
32+ Whether to start OpenTabletDriver daemon as a systemd user service.
33+ '';
34+ };
35+ };
36+ };
37+ };
38+
39+ config = mkIf cfg.enable {
40+ environment.systemPackages = with pkgs; [ opentabletdriver ];
41+
42+ services.udev.packages = with pkgs; [ opentabletdriver ];
43+
44+ boot.blacklistedKernelModules = cfg.blacklistedKernelModules;
45+
46+ systemd.user.services.opentabletdriver = with pkgs; mkIf cfg.daemon.enable {
47+ description = "Open source, cross-platform, user-mode tablet driver";
48+ wantedBy = [ "graphical-session.target" ];
49+ partOf = [ "graphical-session.target" ];
50+
51+ serviceConfig = {
52+ Type = "simple";
53+ ExecStart = "${opentabletdriver}/bin/otd-daemon -c ${opentabletdriver}/lib/OpenTabletDriver/Configurations";
54+ Restart = "on-failure";
55+ };
56+ };
57+ };
58+}
nixos/modules/module-list.nix+1
@@ -66,6 +66,7 @@
6666 ./hardware/tuxedo-keyboard.nix
6767 ./hardware/usb-wwan.nix
6868 ./hardware/onlykey.nix
69+ ./hardware/opentabletdriver.nix
6970 ./hardware/wooting.nix
7071 ./hardware/uinput.nix
7172 ./hardware/video/amdgpu.nix
pkgs/tools/X11/opentabletdriver/default.nixnew file+152
@@ -0,0 +1,152 @@
1+{ stdenv
2+, lib
3+, fetchFromGitHub
4+, fetchurl
5+, makeWrapper
6+, linkFarmFromDrvs
7+, dotnet-netcore
8+, dotnet-sdk
9+, dotnetPackages
10+, dpkg
11+, gtk3
12+, libX11
13+, libXrandr
14+, libappindicator
15+, libevdev
16+, libnotify
17+, udev
18+, makeDesktopItem
19+, wrapGAppsHook
20+}:
21+
22+stdenv.mkDerivation rec {
23+ pname = "OpenTabletDriver";
24+ version = "0.4.2";
25+
26+ src = fetchFromGitHub {
27+ owner = "InfinityGhost";
28+ repo = "OpenTabletDriver";
29+ rev = "v${version}";
30+ sha256 = "048y7gjlk2yw4vh62px1d9w0va6ap1a0cndcpbirlyj9q6b8jxax";
31+ };
32+
33+ debPkg = fetchurl {
34+ url = "https://github.com/InfinityGhost/OpenTabletDriver/releases/download/v${version}/OpenTabletDriver.deb";
35+ sha256 = "13gg0dhvjy88h9lhcrp30fjiwgb9dzjsgk1k760pi1ki71a5vz2r";
36+ };
37+
38+ nativeBuildInputs = [
39+ dotnet-sdk
40+ dotnetPackages.Nuget
41+ dpkg
42+ makeWrapper
43+ wrapGAppsHook
44+ ];
45+
46+ nugetDeps = linkFarmFromDrvs "${pname}-nuget-deps" (import ./deps.nix {
47+ fetchNuGet = { name, version, sha256 }: fetchurl {
48+ name = "nuget-${name}-${version}.nupkg";
49+ url = "https://www.nuget.org/api/v2/package/${name}/${version}";
50+ inherit sha256;
51+ };
52+ });
53+
54+ runtimeDeps = [
55+ gtk3
56+ libX11
57+ libXrandr
58+ libappindicator
59+ libevdev
60+ libnotify
61+ udev
62+ ];
63+
64+ configurePhase = ''
65+ export HOME=$(mktemp -d)
66+ export DOTNET_CLI_TELEMETRY_OPTOUT=1
67+ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
68+
69+ nuget sources Add -Name nixos -Source "$PWD/nixos"
70+ nuget init "$nugetDeps" "$PWD/nixos"
71+
72+ # FIXME: https://github.com/NuGet/Home/issues/4413
73+ mkdir -p $HOME/.nuget/NuGet
74+ cp $HOME/.config/NuGet/NuGet.Config $HOME/.nuget/NuGet
75+
76+ for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do
77+ dotnet restore --source "$PWD/nixos" $project
78+ done
79+ '';
80+
81+ buildPhase = ''
82+ for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do
83+ dotnet build $project \
84+ --no-restore \
85+ --configuration Release \
86+ --framework net5
87+ done
88+ '';
89+
90+ installPhase = ''
91+ mkdir -p $out/lib/OpenTabletDriver/
92+ cp -r ./OpenTabletDriver/Configurations/ $out/lib/OpenTabletDriver/
93+
94+ for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do
95+ dotnet publish $project \
96+ --no-build \
97+ --no-self-contained \
98+ --configuration Release \
99+ --framework net5 \
100+ --output $out/lib
101+ done
102+
103+ # Give a more "*nix" name to the binaries
104+ makeWrapper $out/lib/OpenTabletDriver.Console $out/bin/otd \
105+ "''${gappsWrapperArgs[@]}" \
106+ --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
107+ --set DOTNET_ROOT "${dotnet-netcore}" \
108+ --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}"
109+
110+ makeWrapper $out/lib/OpenTabletDriver.Daemon $out/bin/otd-daemon \
111+ "''${gappsWrapperArgs[@]}" \
112+ --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
113+ --set DOTNET_ROOT "${dotnet-netcore}" \
114+ --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}"
115+
116+ makeWrapper $out/lib/OpenTabletDriver.UX.Gtk $out/bin/otd-gui \
117+ "''${gappsWrapperArgs[@]}" \
118+ --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
119+ --set DOTNET_ROOT "${dotnet-netcore}" \
120+ --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}"
121+
122+ mkdir -p $out/share/{applications,pixmaps}
123+
124+ cp -r $src/OpenTabletDriver.UX/Assets/* $out/share/pixmaps
125+
126+ cp -r ${makeDesktopItem {
127+ desktopName = "OpenTabletDriver";
128+ name = "OpenTabletDriver";
129+ exec = "otd-gui";
130+ icon = "otd";
131+ comment = meta.description;
132+ type = "Application";
133+ categories = "Utility;";
134+ }}/share/applications/* $out/share/applications
135+
136+ # TODO: Ideally this should be build from OpenTabletDriver/OpenTabletDriver-udev instead
137+ dpkg-deb --fsys-tarfile ${debPkg} | tar xf - ./usr/lib/udev/rules.d/30-opentabletdriver.rules
138+ mkdir -p $out/lib/udev/rules.d
139+ cp ./usr/lib/udev/rules.d/* $out/lib/udev/rules.d
140+ '';
141+
142+ dontWrapGApps = true;
143+ dontStrip = true;
144+
145+ meta = with lib; {
146+ description = "Open source, cross-platform, user-mode tablet driver";
147+ homepage = "https://github.com/InfinityGhost/OpenTabletDriver";
148+ license = licenses.lgpl3Plus;
149+ maintainers = with maintainers; [ thiagokokada ];
150+ platforms = platforms.linux;
151+ };
152+}
pkgs/tools/X11/opentabletdriver/deps.nixnew file+462
@@ -0,0 +1,462 @@
1+{ fetchNuGet }: [
2+ (fetchNuGet {
3+ name = "AtkSharp";
4+ version = "3.22.25.74";
5+ sha256 = "04zjpjrddw5clac0mjpk0q00rbmv45bh1bsqa4s3pc5pb7fm9cd9";
6+ })
7+ (fetchNuGet {
8+ name = "CairoSharp";
9+ version = "3.22.25.74";
10+ sha256 = "0sx7vmwcrfbkg3g887v051iklcdmdhh43ndp96nk4bccjimmmwl6";
11+ })
12+ (fetchNuGet {
13+ name = "Eto.Forms";
14+ version = "2.5.6";
15+ sha256 = "035ny8jlanchwq16gcq0xb6ywabjl71c7qbpv26sjwg96na8vz51";
16+ })
17+ (fetchNuGet {
18+ name = "Eto.Platform.Gtk";
19+ version = "2.5.6";
20+ sha256 = "1ijkjd3lc7x59yk369kxipzgk1zhyr9g6k319wc0n033vij26mwl";
21+ })
22+ (fetchNuGet {
23+ name = "GdkSharp";
24+ version = "3.22.25.74";
25+ sha256 = "07sdfvqk2jmyjj7fyd0mikhnzsk52zd3g2dhip8kz3006cczqm81";
26+ })
27+ (fetchNuGet {
28+ name = "GioSharp";
29+ version = "3.22.25.74";
30+ sha256 = "01l4216bm5jxbxypkkq4d2527c6zd68kbywr3h1lr1darc9nf1d1";
31+ })
32+ (fetchNuGet {
33+ name = "GLibSharp";
34+ version = "3.22.25.74";
35+ sha256 = "0k2p79z4wcswi528v0ykc37rsqfqi6xd6pl0j4csdj9zf19svgx2";
36+ })
37+ (fetchNuGet {
38+ name = "GtkSharp";
39+ version = "3.22.25.74";
40+ sha256 = "0vazfvkjyzppcynqa1h70s1jmp4vq2j30v5x2scg8n2c5dxaj0k3";
41+ })
42+ (fetchNuGet {
43+ name = "HidSharpCore";
44+ version = "1.1.0";
45+ sha256 = "122s5j3wrv8hcgnbxrnjqydvcfz7gdm8xq0wlwzrgwdjk44lr45a";
46+ })
47+ (fetchNuGet {
48+ name = "MessagePack.Annotations";
49+ version = "2.1.194";
50+ sha256 = "1jkhq3hiy4brvzsywl4p4jb9jrnzs3vmgr3s8fxpb1dzafadw8b0";
51+ })
52+ (fetchNuGet {
53+ name = "MessagePack";
54+ version = "2.1.194";
55+ sha256 = "1v2gyd9sd6hppfhlzngmzzhnpr39b95rwrqq0r9zzp480b6vzaj0";
56+ })
57+ (fetchNuGet {
58+ name = "Microsoft.Bcl.AsyncInterfaces";
59+ version = "1.1.1";
60+ sha256 = "0a1ahssqds2ympr7s4xcxv5y8jgxs7ahd6ah6fbgglj4rki1f1vw";
61+ })
62+ (fetchNuGet {
63+ name = "Microsoft.CSharp";
64+ version = "4.4.1";
65+ sha256 = "0z6d1i6xcf0c00z6rs75rgw4ncs9q2m8amasf6mmbf40fm02ry7g";
66+ })
67+ (fetchNuGet {
68+ name = "Microsoft.NETCore.Platforms";
69+ version = "1.1.0";
70+ sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm";
71+ })
72+ (fetchNuGet {
73+ name = "Microsoft.NETCore.Platforms";
74+ version = "1.1.1";
75+ sha256 = "164wycgng4mi9zqi2pnsf1pq6gccbqvw6ib916mqizgjmd8f44pj";
76+ })
77+ (fetchNuGet {
78+ name = "Microsoft.NETCore.Platforms";
79+ version = "3.0.0";
80+ sha256 = "1bk8r4r3ihmi6322jmcag14jmw11mjqys202azqjzglcx59pxh51";
81+ })
82+ (fetchNuGet {
83+ name = "Microsoft.NETCore.Targets";
84+ version = "1.1.0";
85+ sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh";
86+ })
87+ (fetchNuGet {
88+ name = "Microsoft.VisualStudio.Threading.Analyzers";
89+ version = "16.7.56";
90+ sha256 = "04v9df0k7bsc0rzgkw4mnvi43pdrh42vk6xdcwn9m6im33m0nnz2";
91+ })
92+ (fetchNuGet {
93+ name = "Microsoft.VisualStudio.Threading";
94+ version = "16.7.56";
95+ sha256 = "13x0xrsjxd86clf9cjjwmpzlyp8pkrf13riya7igs8zy93zw2qap";
96+ })
97+ (fetchNuGet {
98+ name = "Microsoft.VisualStudio.Validation";
99+ version = "15.5.31";
100+ sha256 = "1ah99rn922qa0sd2k3h64m324f2r32pw8cn4cfihgvwx4qdrpmgw";
101+ })
102+ (fetchNuGet {
103+ name = "Microsoft.Win32.Primitives";
104+ version = "4.3.0";
105+ sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq";
106+ })
107+ (fetchNuGet {
108+ name = "Microsoft.Win32.Registry";
109+ version = "4.6.0";
110+ sha256 = "0i4y782yrqqyx85pg597m20gm0v126w0j9ddk5z7xb3crx4z9f2s";
111+ })
112+ (fetchNuGet {
113+ name = "Nerdbank.Streams";
114+ version = "2.6.77";
115+ sha256 = "13dnfwxa8syx7vfjmd5pcrqz31k0q8y3mmh6yz6bmljhjri65q5c";
116+ })
117+ (fetchNuGet {
118+ name = "Newtonsoft.Json";
119+ version = "12.0.2";
120+ sha256 = "0w2fbji1smd2y7x25qqibf1qrznmv4s6s0jvrbvr6alb7mfyqvh5";
121+ })
122+ (fetchNuGet {
123+ name = "Newtonsoft.Json";
124+ version = "12.0.3";
125+ sha256 = "17dzl305d835mzign8r15vkmav2hq8l6g7942dfjpnzr17wwl89x";
126+ })
127+ (fetchNuGet {
128+ name = "PangoSharp";
129+ version = "3.22.25.74";
130+ sha256 = "172i1hjpz4rgqlilir8a57kgmciw9x0shz4zwbhhlr59mndvqbih";
131+ })
132+ (fetchNuGet {
133+ name = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl";
134+ version = "4.3.2";
135+ sha256 = "0rwpqngkqiapqc5c2cpkj7idhngrgss5qpnqg0yh40mbyflcxf8i";
136+ })
137+ (fetchNuGet {
138+ name = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl";
139+ version = "4.3.2";
140+ sha256 = "1n06gxwlinhs0w7s8a94r1q3lwqzvynxwd3mp10ws9bg6gck8n4r";
141+ })
142+ (fetchNuGet {
143+ name = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl";
144+ version = "4.3.2";
145+ sha256 = "0404wqrc7f2yc0wxv71y3nnybvqx8v4j9d47hlscxy759a525mc3";
146+ })
147+ (fetchNuGet {
148+ name = "runtime.native.System.Net.Http";
149+ version = "4.3.0";
150+ sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk";
151+ })
152+ (fetchNuGet {
153+ name = "runtime.native.System.Security.Cryptography.Apple";
154+ version = "4.3.0";
155+ sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q";
156+ })
157+ (fetchNuGet {
158+ name = "runtime.native.System.Security.Cryptography.OpenSsl";
159+ version = "4.3.2";
160+ sha256 = "0zy5r25jppz48i2bkg8b9lfig24xixg6nm3xyr1379zdnqnpm8f6";
161+ })
162+ (fetchNuGet {
163+ name = "runtime.native.System";
164+ version = "4.3.0";
165+ sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4";
166+ })
167+ (fetchNuGet {
168+ name = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl";
169+ version = "4.3.2";
170+ sha256 = "096ch4n4s8k82xga80lfmpimpzahd2ip1mgwdqgar0ywbbl6x438";
171+ })
172+ (fetchNuGet {
173+ name = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl";
174+ version = "4.3.2";
175+ sha256 = "1dm8fifl7rf1gy7lnwln78ch4rw54g0pl5g1c189vawavll7p6rj";
176+ })
177+ (fetchNuGet {
178+ name = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple";
179+ version = "4.3.0";
180+ sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi";
181+ })
182+ (fetchNuGet {
183+ name = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl";
184+ version = "4.3.2";
185+ sha256 = "1m9z1k9kzva9n9kwinqxl97x2vgl79qhqjlv17k9s2ymcyv2bwr6";
186+ })
187+ (fetchNuGet {
188+ name = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl";
189+ version = "4.3.2";
190+ sha256 = "1cpx56mcfxz7cpn57wvj18sjisvzq8b5vd9rw16ihd2i6mcp3wa1";
191+ })
192+ (fetchNuGet {
193+ name = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl";
194+ version = "4.3.2";
195+ sha256 = "15gsm1a8jdmgmf8j5v1slfz8ks124nfdhk2vxs2rw3asrxalg8hi";
196+ })
197+ (fetchNuGet {
198+ name = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl";
199+ version = "4.3.2";
200+ sha256 = "0q0n5q1r1wnqmr5i5idsrd9ywl33k0js4pngkwq9p368mbxp8x1w";
201+ })
202+ (fetchNuGet {
203+ name = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl";
204+ version = "4.3.2";
205+ sha256 = "1x0g58pbpjrmj2x2qw17rdwwnrcl0wvim2hdwz48lixvwvp22n9c";
206+ })
207+ (fetchNuGet {
208+ name = "StreamJsonRpc";
209+ version = "2.6.121";
210+ sha256 = "0xzvpk17w2skndzdg47j7gkrrvw6521db4mv8lc3v8hm97vs9m76";
211+ })
212+ (fetchNuGet {
213+ name = "System.Collections.Concurrent";
214+ version = "4.3.0";
215+ sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8";
216+ })
217+ (fetchNuGet {
218+ name = "System.Collections.Immutable";
219+ version = "1.7.1";
220+ sha256 = "1nh4nlxfc7lbnbl86wwk1a3jwl6myz5j6hvgh5sp4krim9901hsq";
221+ })
222+ (fetchNuGet {
223+ name = "System.Collections";
224+ version = "4.3.0";
225+ sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9";
226+ })
227+ (fetchNuGet {
228+ name = "System.CommandLine";
229+ version = "2.0.0-beta1.20253.1";
230+ sha256 = "16saf1fm9q80bb624fkqz0ksrwpnbw9617d7xg3jib7a2wgagm2r";
231+ })
232+ (fetchNuGet {
233+ name = "System.CommandLine";
234+ version = "2.0.0-beta1.20303.1";
235+ sha256 = "0isnz8ipqlqim06hf56zlaq2vnsy5facvf5nvq6kzm5h1dm3l2vn";
236+ })
237+ (fetchNuGet {
238+ name = "System.ComponentModel.Annotations";
239+ version = "4.7.0";
240+ sha256 = "06x1m46ddxj0ng28d7gry9gjkqdg2kp89jyf480g5gznyybbs49z";
241+ })
242+ (fetchNuGet {
243+ name = "System.Diagnostics.Debug";
244+ version = "4.3.0";
245+ sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y";
246+ })
247+ (fetchNuGet {
248+ name = "System.Diagnostics.DiagnosticSource";
249+ version = "4.3.0";
250+ sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq";
251+ })
252+ (fetchNuGet {
253+ name = "System.Diagnostics.Tracing";
254+ version = "4.3.0";
255+ sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4";
256+ })
257+ (fetchNuGet {
258+ name = "System.Globalization.Calendars";
259+ version = "4.3.0";
260+ sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq";
261+ })
262+ (fetchNuGet {
263+ name = "System.Globalization.Extensions";
264+ version = "4.3.0";
265+ sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls";
266+ })
267+ (fetchNuGet {
268+ name = "System.Globalization";
269+ version = "4.3.0";
270+ sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki";
271+ })
272+ (fetchNuGet {
273+ name = "System.IO.FileSystem.Primitives";
274+ version = "4.3.0";
275+ sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c";
276+ })
277+ (fetchNuGet {
278+ name = "System.IO.FileSystem";
279+ version = "4.3.0";
280+ sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw";
281+ })
282+ (fetchNuGet {
283+ name = "System.IO.Pipelines";
284+ version = "4.7.2";
285+ sha256 = "16v4qaypm72cfsfqr8z3k6yrpzn0m3apgkh6aljfwpycdk150sf9";
286+ })
287+ (fetchNuGet {
288+ name = "System.IO";
289+ version = "4.3.0";
290+ sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f";
291+ })
292+ (fetchNuGet {
293+ name = "System.Linq";
294+ version = "4.3.0";
295+ sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7";
296+ })
297+ (fetchNuGet {
298+ name = "System.Memory";
299+ version = "4.5.3";
300+ sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a";
301+ })
302+ (fetchNuGet {
303+ name = "System.Memory";
304+ version = "4.5.4";
305+ sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y";
306+ })
307+ (fetchNuGet {
308+ name = "System.Net.Http";
309+ version = "4.3.4";
310+ sha256 = "0kdp31b8819v88l719j6my0yas6myv9d1viql3qz5577mv819jhl";
311+ })
312+ (fetchNuGet {
313+ name = "System.Net.Primitives";
314+ version = "4.3.0";
315+ sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii";
316+ })
317+ (fetchNuGet {
318+ name = "System.Net.WebSockets";
319+ version = "4.3.0";
320+ sha256 = "1gfj800078kggcgl0xyl00a6y5k4wwh2k2qm69rjy22wbmq7fy4p";
321+ })
322+ (fetchNuGet {
323+ name = "System.Numerics.Vectors";
324+ version = "4.5.0";
325+ sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59";
326+ })
327+ (fetchNuGet {
328+ name = "System.Reflection.Emit.Lightweight";
329+ version = "4.6.0";
330+ sha256 = "0hry2k6b7kicg4zxnq0hhn0ys52711pxy7l9v5sp7gvp9cicwpgp";
331+ })
332+ (fetchNuGet {
333+ name = "System.Reflection.Emit";
334+ version = "4.7.0";
335+ sha256 = "121l1z2ypwg02yz84dy6gr82phpys0njk7yask3sihgy214w43qp";
336+ })
337+ (fetchNuGet {
338+ name = "System.Reflection.Primitives";
339+ version = "4.3.0";
340+ sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276";
341+ })
342+ (fetchNuGet {
343+ name = "System.Reflection";
344+ version = "4.3.0";
345+ sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m";
346+ })
347+ (fetchNuGet {
348+ name = "System.Resources.ResourceManager";
349+ version = "4.3.0";
350+ sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49";
351+ })
352+ (fetchNuGet {
353+ name = "System.Runtime.CompilerServices.Unsafe";
354+ version = "4.5.2";
355+ sha256 = "1vz4275fjij8inf31np78hw50al8nqkngk04p3xv5n4fcmf1grgi";
356+ })
357+ (fetchNuGet {
358+ name = "System.Runtime.CompilerServices.Unsafe";
359+ version = "4.7.1";
360+ sha256 = "119br3pd85lq8zcgh4f60jzmv1g976q1kdgi3hvqdlhfbw6siz2j";
361+ })
362+ (fetchNuGet {
363+ name = "System.Runtime.Extensions";
364+ version = "4.3.0";
365+ sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60";
366+ })
367+ (fetchNuGet {
368+ name = "System.Runtime.Handles";
369+ version = "4.3.0";
370+ sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8";
371+ })
372+ (fetchNuGet {
373+ name = "System.Runtime.InteropServices";
374+ version = "4.3.0";
375+ sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j";
376+ })
377+ (fetchNuGet {
378+ name = "System.Runtime.Numerics";
379+ version = "4.3.0";
380+ sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z";
381+ })
382+ (fetchNuGet {
383+ name = "System.Runtime";
384+ version = "4.3.0";
385+ sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7";
386+ })
387+ (fetchNuGet {
388+ name = "System.Security.AccessControl";
389+ version = "4.6.0";
390+ sha256 = "1wl1dyghi0qhpap1vgfhg2ybdyyhy9vc2a7dpm1xb30vfgmlkjmf";
391+ })
392+ (fetchNuGet {
393+ name = "System.Security.Cryptography.Algorithms";
394+ version = "4.3.0";
395+ sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml";
396+ })
397+ (fetchNuGet {
398+ name = "System.Security.Cryptography.Cng";
399+ version = "4.3.0";
400+ sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv";
401+ })
402+ (fetchNuGet {
403+ name = "System.Security.Cryptography.Csp";
404+ version = "4.3.0";
405+ sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1";
406+ })
407+ (fetchNuGet {
408+ name = "System.Security.Cryptography.Encoding";
409+ version = "4.3.0";
410+ sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32";
411+ })
412+ (fetchNuGet {
413+ name = "System.Security.Cryptography.OpenSsl";
414+ version = "4.3.0";
415+ sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc";
416+ })
417+ (fetchNuGet {
418+ name = "System.Security.Cryptography.Primitives";
419+ version = "4.3.0";
420+ sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby";
421+ })
422+ (fetchNuGet {
423+ name = "System.Security.Cryptography.X509Certificates";
424+ version = "4.3.0";
425+ sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h";
426+ })
427+ (fetchNuGet {
428+ name = "System.Security.Principal.Windows";
429+ version = "4.6.0";
430+ sha256 = "1jmfzfz1n8hp63s5lja5xxpzkinbp6g59l3km9h8avjiisdrg5wm";
431+ })
432+ (fetchNuGet {
433+ name = "System.Text.Encoding";
434+ version = "4.3.0";
435+ sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr";
436+ })
437+ (fetchNuGet {
438+ name = "System.Threading.Tasks.Dataflow";
439+ version = "4.11.1";
440+ sha256 = "09fbfsiay1xcbpvnq2j38b6mb2scvf0s8mpn78bcqsldidg7k2vw";
441+ })
442+ (fetchNuGet {
443+ name = "System.Threading.Tasks.Extensions";
444+ version = "4.5.4";
445+ sha256 = "0y6ncasgfcgnjrhynaf0lwpkpkmv4a07sswwkwbwb5h7riisj153";
446+ })
447+ (fetchNuGet {
448+ name = "System.Threading.Tasks";
449+ version = "4.3.0";
450+ sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7";
451+ })
452+ (fetchNuGet {
453+ name = "System.Threading";
454+ version = "4.3.0";
455+ sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34";
456+ })
457+ (fetchNuGet {
458+ name = "WaylandNET";
459+ version = "0.2.0";
460+ sha256 = "1qjpvra08vdqdw4j1gamz6451x5sd5r1j86lsvrl8akq4nymfr8k";
461+ })
462+]
pkgs/tools/X11/opentabletdriver/shell.nixnew file+12
@@ -0,0 +1,12 @@
1+{ pkgs ? import ../../../../. {} }:
2+
3+with pkgs;
4+
5+mkShell {
6+ buildInputs = [
7+ common-updater-scripts
8+ curl
9+ dotnetCorePackages.sdk_5_0
10+ jq
11+ ];
12+}
pkgs/tools/X11/opentabletdriver/update.shnew file+64
@@ -0,0 +1,64 @@
1+#!/usr/bin/env nix-shell
2+#!nix-shell shell.nix -i bash
3+
4+set -eo pipefail
5+
6+cd "$(dirname "${BASH_SOURCE[0]}")"
7+
8+deps_file="$(realpath "./deps.nix")"
9+
10+new_version="$(curl -s "https://api.github.com/repos/InfinityGhost/OpenTabletDriver/releases" | jq -r '.[0].tag_name' | sed 's|[^0-9.]||g')"
11+old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
12+if [[ "$new_version" == "$old_version" ]]; then
13+ echo "Up to date"
14+ [[ "${1}" != "--force" ]] && exit 0
15+fi
16+
17+cd ../../../..
18+update-source-version opentabletdriver "$new_version"
19+store_src="$(nix-build . -A opentabletdriver.src --no-out-link)"
20+src="$(mktemp -d /tmp/opentabletdriver-src.XXX)"
21+echo "Temp src dir: $src"
22+cp -rT "$store_src" "$src"
23+chmod -R +w "$src"
24+
25+pushd "$src"
26+
27+# Setup empty nuget package folder to force reinstall.
28+mkdir ./nuget_tmp.packages
29+cat >./nuget_tmp.config <<EOF
30+<?xml version="1.0" encoding="utf-8"?>
31+<configuration>
32+ <packageSources>
33+ <add key="nuget" value="https://api.nuget.org/v3/index.json" />
34+ </packageSources>
35+ <config>
36+ <add key="globalPackagesFolder" value="$(realpath ./nuget_tmp.packages)" />
37+ </config>
38+</configuration>
39+EOF
40+
41+export DOTNET_CLI_TELEMETRY_OPTOUT=1
42+
43+for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do
44+ dotnet restore $project --configfile ./nuget_tmp.config
45+done
46+
47+echo "{ fetchNuGet }: [" >"$deps_file"
48+while read pkg_spec; do
49+ { read pkg_name; read pkg_version; } < <(
50+ # Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3`
51+ sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec")
52+ pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
53+ cat >>"$deps_file" <<EOF
54+ (fetchNuGet {
55+ name = "$pkg_name";
56+ version = "$pkg_version";
57+ sha256 = "$pkg_sha256";
58+ })
59+EOF
60+done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
61+echo "]" >>"$deps_file"
62+
63+popd
64+rm -r "$src"
pkgs/top-level/all-packages.nix+5
@@ -23392,6 +23392,11 @@ in
2339223392 libtiff = callPackage ../applications/graphics/opentoonz/libtiff.nix { };
2339323393 })).callPackage ../applications/graphics/opentoonz { };
2339423394
23395+ opentabletdriver = callPackage ../tools/X11/opentabletdriver {
23396+ dotnet-sdk = dotnetCorePackages.sdk_5_0;
23397+ dotnet-netcore = dotnetCorePackages.net_5_0;
23398+ };
23399+
2339523400 opentx = libsForQt5.callPackage ../applications/misc/opentx { };
2339623401
2339723402 opera = callPackage ../applications/networking/browsers/opera {};