Change:
<ins> #!/usr/bin/env nix-shell #!nix-shell shell.nix -i bash set -eo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" deps_file="$(realpath "./deps.nix")" new_version="$(curl -s "https://api.github.com/repos/InfinityGhost/OpenTabletDriver/releases" | jq -r '.[0].tag_name' | sed 's|[^0-9.]||g')" old_version="$(sed -nE 's/s*version = "(.*)".*/1/p' ./default.nix)" if [[ "$new_version" == "$old_version" ]]; then echo "Up to date" [[ "${1}" != "--force" ]] && exit 0 fi cd ../../../.. update-source-version opentabletdriver "$new_version" store_src="$(nix-build . -A opentabletdriver.src --no-out-link)" src="$(mktemp -d /tmp/opentabletdriver-src.XXX)" echo "Temp src dir: $src" cp -rT "$store_src" "$src" chmod -R +w "$src" pushd "$src" # Setup empty nuget package folder to force reinstall. mkdir ./nuget_tmp.packages cat >./nuget_tmp.config <<EOF <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget" value="https://api.nuget.org/v3/index.json" /> </packageSources> <config> <add key="globalPackagesFolder" value="$(realpath ./nuget_tmp.packages)" /> </config> </configuration> EOF export DOTNET_CLI_TELEMETRY_OPTOUT=1 for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do dotnet restore $project --configfile ./nuget_tmp.config done echo "{ fetchNuGet }: [" >"$deps_file" while read pkg_spec; do { read pkg_name; read pkg_version; } < <( # Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3` sed -nE 's/.*<id>([^<]*).*/1/p; s/.*<version>([^<+]*).*/1/p' "$pkg_spec") pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)" cat >>"$deps_file" <<EOF (fetchNuGet { name = "$pkg_name"; version = "$pkg_version"; sha256 = "$pkg_sha256"; }) EOF done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort) echo "]" >>"$deps_file" popd rm -r "$src" </ins>

Discussion:
Project description OpenTabletDriver is an open source, cross platform, user mode tablet driver. The goal of OpenTabletDriver is to be cross platform as possible with the highest compatibility in an easily configurable graphical user interface. It supports multiple tablets that are badly supported in Linux. Even for tablets already supported by other means (i.e.: or ), OpenTabletDriver offers a graphical interface, plugins and more customization. List of supported tablets: Metadata homepage URL: source URL: license: LGPLv3 platforms: Linux, Darwin
I tried to create a package but I can't wrap my head on how to build a .NET 5 application. Trying to follow just made me more and more confused. If it helps, here it is the from Arch Linux:
I have a older OTD package in my nix overlay , I just currently don't have the time to mess with it, I have a WIP .NET 5 package on my local machine that I could upload to a gist if needed
This would be great, since I am stuck on trying to compile thanks to some .NET 5 issue.
I tested your recipe in overlay and seems to work well. Still need to figure how to fix some of the following issues, though: Generate the file automatically, so we can update this package without updating every dependency by hand Wrap the launcher script so the daemon is launched automatically (as it happens in the Debian package I think?). Or as an alternative, just start this as a systemd service (as the AUR package does) Generate the udev rules and copy it to the appropriate place. Alternatively we can just extract the udev file from the .deb package, but this involves some manual operation Except for the first issue, for the other ones I think maybe it would be better to have a module (for example, ) so we could automatically enable the systemd service, set the udev rules and add the GUI to the . This seems the cleanest way to fix those issues.
have an initial build of OpenTabletDriver 0.4.2. It almost works, but needs some manual setup: Start the manually before opening . Alternatively, you can start the daemon as an systemd user service, something like this: For now, you need to add manually to your .

This can be fixed if we add a module, that once enabled do this automatically (and it may also create a systemd user service, fixing the first issue too) Now, while it builds and kinda works, I can't seem to make it detect my tablet (Huion HS64). I thought something was wrong with the udev rules but looking at the udev logs it seems that the rules are being applied correctly. The connection between the GUI and daemon itself seems fine, since it does redirect the logs to the daemon. So now I am stuck. Do you have some idea on how to solve the issue above?
Got the package to work with the help of OpenTabletDriver's Discord. It was missing the .