uvtools: init at 5.0.7

This commit is contained in:
2025-02-24 07:33:26 +00:00
parent d399a824e4
commit 621cc83740
3 changed files with 1075 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
{
buildDotnetModule,
dotnetCorePackages,
fetchFromGitHub,
lib,
}:
buildDotnetModule rec {
pname = "UVtools";
version = "5.0.7";
src = fetchFromGitHub {
owner = "sn4k3";
repo = "UVtools";
rev = "v${version}";
hash = "sha256-QF+cGdz0Y5dreeKBlITX9z9PomLpcmlOQ5ft8/Sau2g=";
};
nugetDeps = ./deps.json;
dotnet-sdk = dotnetCorePackages.sdk_9_0;
dotnet-runtime = dotnetCorePackages.runtime_9_0;
# available projects:
# - UVtools.Installer/UVtools.Installer.wixproj (needs WixToolset, not in nixpkgs)
# - UVtools.Core/UVtools.Core.csproj
# - UVtools.UI/UVtools.UI.csproj
# - Scripts/UVtools.ScriptSample/UVtools.ScriptSample.csproj
# - UVtools.AvaloniaControls/UVtools.AvaloniaControls.csproj
# - UVtools.Cmd/UVtools.Cmd.csproj
# TODO: install the UI, and maybe AvaloniaControls too
projectFile = "UVtools.Cmd/UVtools.Cmd.csproj";
passthru.updateScript = ./update.sh;
meta = {
description = "MSLA/DLP, file analysis, calibration, repair, conversion and manipulation";
maintainers = with lib.maintainers; [ colinsane ];
};
}

20
pkgs/by-name/uvtools/update.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
#shellcheck shell=bash
#
# TAKEN FROM <repo:nixos/nixpkgs:pkgs/by-name/ma/marksman/update.sh>
set -eu -o pipefail
version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
https://api.github.com/repos/sn4k3/UVtools/releases/latest | jq -e -r .tag_name)
old_version=$(nix-instantiate --eval -A uvtools.version | jq -e -r)
if [[ $version == "$old_version" ]]; then
echo "New version same as old version, nothing to do." >&2
exit 0
fi
update-source-version uvtools "${version/v/}"
$(nix-build -A uvtools.fetch-deps --no-out-link)