init nix flake for running arrowvortex via wine
This commit is contained in:
+75
@@ -0,0 +1,75 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchzip,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
makeWrapper,
|
||||
wineWow64Packages,
|
||||
}:
|
||||
|
||||
let
|
||||
winePkg = wineWow64Packages.stableFull;
|
||||
in
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "arrowvortex";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/uvcat7/ArrowVortex/releases/download/v${finalAttrs.version}/ArrowVortex-${finalAttrs.version}-Windows.zip";
|
||||
hash = "sha256-gVhP2O4GHLii1K9Jr2GKyp+FJYP8eoL1s1qmAec6x0w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/arrowvortex
|
||||
# fetchzip normalizes the zip root; files land directly under $src
|
||||
cp -r $src/. $out/share/arrowvortex/
|
||||
|
||||
install -Dm644 "$out/share/arrowvortex/assets/arrow vortex icon.png" \
|
||||
$out/share/icons/hicolor/128x128/apps/arrowvortex.png
|
||||
|
||||
makeWrapper ${lib.getExe winePkg} $out/bin/arrowvortex \
|
||||
--set WINEDEBUG "-all" \
|
||||
--set WINEARCH "win64" \
|
||||
--run 'export WINEPREFIX="''${WINEPREFIX:-''${XDG_DATA_HOME:-''$HOME/.local/share}/arrowvortex/wine}"' \
|
||||
--run 'mkdir -p "''$WINEPREFIX"' \
|
||||
--chdir "$out/share/arrowvortex" \
|
||||
--add-flags "ArrowVortex.exe"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "arrowvortex";
|
||||
desktopName = "ArrowVortex";
|
||||
comment = "Simfile editor for StepMania, ITG, osu!, and similar rhythm games";
|
||||
exec = "arrowvortex";
|
||||
icon = "arrowvortex";
|
||||
categories = [
|
||||
"AudioVideo"
|
||||
"Utility"
|
||||
];
|
||||
startupWMClass = "arrowvortex.exe";
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Simfile editor for StepMania, ITG, osu!, and similar rhythm games";
|
||||
homepage = "https://github.com/uvcat7/ArrowVortex";
|
||||
changelog = "https://github.com/uvcat7/ArrowVortex/releases";
|
||||
downloadPage = "https://github.com/uvcat7/ArrowVortex/releases";
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
license = lib.licenses.gpl3Plus;
|
||||
mainProgram = "arrowvortex";
|
||||
maintainers = [ ];
|
||||
platforms = winePkg.meta.platforms;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user