init nix flake for running arrowvortex via wine
This commit is contained in:
commit
c5acd887a0
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
result
|
||||||
|
AGENTS.md
|
||||||
41
README.md
Normal file
41
README.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# ArrowVortex (Nix flake)
|
||||||
|
|
||||||
|
This flake packages [ArrowVortex](https://github.com/uvcat7/ArrowVortex) from the upstream Windows release zip and runs it with Wine. The default Wine prefix is `$XDG_DATA_HOME/arrowvortex/wine` (or `~/.local/share/arrowvortex/wine` when `XDG_DATA_HOME` is unset). Override with `WINEPREFIX` if you want a different prefix.
|
||||||
|
|
||||||
|
## Run from a local checkout
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix run .
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix build .
|
||||||
|
./result/bin/arrowvortex
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run directly from Git
|
||||||
|
|
||||||
|
This flake lives at [https://git.plebsaber.stream/arrowvortex-wine](https://git.plebsaber.stream/arrowvortex-wine). Use a `git+https` flake reference (not the `github:` shorthand):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix run git+https://git.plebsaber.stream/arrowvortex-wine
|
||||||
|
```
|
||||||
|
|
||||||
|
Optional: install into your user profile:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix profile install git+https://git.plebsaber.stream/arrowvortex-wine
|
||||||
|
```
|
||||||
|
|
||||||
|
Pin a branch or revision for reproducibility:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix run 'git+https://git.plebsaber.stream/arrowvortex-wine?ref=main'
|
||||||
|
nix run 'git+https://git.plebsaber.stream/arrowvortex-wine?rev=<commit-sha>'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Nix with flakes enabled (`experimental-features = nix-command flakes`).
|
||||||
|
|
||||||
|
Wine and GUI dependencies come from nixpkgs; you need a working display (X11 or Wayland) for the editor window.
|
||||||
75
default.nix
Normal file
75
default.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
})
|
||||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1777954456,
|
||||||
|
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
53
flake.nix
Normal file
53
flake.nix
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
description = "ArrowVortex (Windows release) wrapped with Wine";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
forAllSystems = f: lib.genAttrs systems (system: f system);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = forAllSystems (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = { };
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default = pkgs.callPackage ./default.nix { };
|
||||||
|
arrowvortex = pkgs.callPackage ./default.nix { };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
apps = forAllSystems (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = { };
|
||||||
|
};
|
||||||
|
arrowvortex = pkgs.callPackage ./default.nix { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${lib.getExe arrowvortex}";
|
||||||
|
meta = {
|
||||||
|
inherit (arrowvortex.meta) description homepage license;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user