Compare commits
20 Commits
init-slipp
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 233479ab27 | |||
| 7a3eaf6788 | |||
| ed4942cd58 | |||
| 32fe0d26fa | |||
| 2c56bb6153 | |||
| 7bf331a498 | |||
| b95632af08 | |||
| 5802980437 | |||
| c540e0ab83 | |||
| aa06f12b29 | |||
| c431dbcd7a | |||
| 1a8091bc17 | |||
| 9fb0f35d84 | |||
| 1eadfac548 | |||
| 7ce5863058 | |||
| c29d6d5b3c | |||
|
|
9f584e890f | ||
| 9e0f705eae | |||
| 4183e23bcb | |||
|
|
18e6f895e2 |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -36,14 +36,14 @@ jobs:
|
|||||||
- sydpkgs
|
- sydpkgs
|
||||||
nixPath:
|
nixPath:
|
||||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz
|
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz
|
||||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
|
# - nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
|
||||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-24.05.tar.gz
|
# - nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-24.05.tar.gz
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Install nix
|
- name: Install nix
|
||||||
uses: cachix/install-nix-action@v30
|
uses: cachix/install-nix-action@v31
|
||||||
with:
|
with:
|
||||||
nix_path: "${{ matrix.nixPath }}"
|
nix_path: "${{ matrix.nixPath }}"
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
result
|
result
|
||||||
result-*
|
result-*
|
||||||
|
|
||||||
|
|
||||||
|
slippi-ld-log.*
|
||||||
@@ -19,5 +19,7 @@
|
|||||||
lib.filterAttrs
|
lib.filterAttrs
|
||||||
(_: v: lib.isDerivation v)
|
(_: v: lib.isDerivation v)
|
||||||
self.legacyPackages.${system});
|
self.legacyPackages.${system});
|
||||||
|
|
||||||
|
overlays.default = import ./overlay.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ let
|
|||||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||||
nameValuePair = n: v: { name = n; value = v; };
|
nameValuePair = n: v: { name = n; value = v; };
|
||||||
nurAttrs = import ./default.nix { pkgs = super; };
|
nurAttrs = import ./default.nix { pkgs = super; };
|
||||||
|
|
||||||
in
|
in
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
(map (n: nameValuePair n nurAttrs.${n})
|
(map (n: nameValuePair n nurAttrs.${n})
|
||||||
|
|||||||
@@ -6,17 +6,20 @@
|
|||||||
, ansilove
|
, ansilove
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
# We use `fix` explicitly since `buildPythonApplication` rejects the typical
|
||||||
version = "0.29.0";
|
# stdenv.mkDerivation (finalAttrs: {
|
||||||
in python3Packages.buildPythonApplication {
|
# ...
|
||||||
|
# })
|
||||||
|
# syntax.
|
||||||
|
python3Packages.buildPythonApplication (lib.fix (finalAttrs: {
|
||||||
pname = "durdraw";
|
pname = "durdraw";
|
||||||
inherit version;
|
version = "0.29.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "cmang";
|
owner = "cmang";
|
||||||
repo = "durdraw";
|
repo = "durdraw";
|
||||||
rev = version;
|
rev = finalAttrs.version;
|
||||||
hash = "sha256-a+4DGWBD5XLaNAfTN/fmI/gALe76SCoWrnjyglNhVPY=";
|
hash = "sha256-a+4DGWBD5XLaNAfTN/fmI/gALe76SCoWrnjyglNhVPY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -24,7 +27,12 @@ in python3Packages.buildPythonApplication {
|
|||||||
python3Packages.setuptools
|
python3Packages.setuptools
|
||||||
];
|
];
|
||||||
|
|
||||||
dependencies = [];
|
dependencies =
|
||||||
|
lib.optionals withGifExport finalAttrs.optional-dependencies.gif-export;
|
||||||
|
|
||||||
|
optional-dependencies.gif-export = [
|
||||||
|
python3Packages.pillow
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper
|
makeWrapper
|
||||||
@@ -37,13 +45,14 @@ in python3Packages.buildPythonApplication {
|
|||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
changelog =
|
changelog =
|
||||||
"https://github.com/cmang/durdraw/releases/tag/${version}";
|
"https://github.com/cmang/durdraw/releases/tag/${finalAttrs.version}";
|
||||||
description = ''
|
description = ''
|
||||||
Versatile ASCII and ANSI Art text editor for drawing in the
|
Versatile ASCII and ANSI Art text editor for drawing in the
|
||||||
Linux/Unix/macOS terminal, with animation, 256 and 16 colors, Unicode and
|
Linux/Unix/macOS terminal, with animation, 256 and 16 colors, Unicode and
|
||||||
CP437, and customizable themes.
|
CP437, and customizable themes.
|
||||||
'';
|
'';
|
||||||
homepage = "https://github.com/cmang/durdraw/";
|
homepage = "https://durdraw.org";
|
||||||
license = lib.licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
|
mainProgram = "durdraw";
|
||||||
};
|
};
|
||||||
}
|
}))
|
||||||
|
|||||||
30
pkgs/iropke-batang/default.nix
Normal file
30
pkgs/iropke-batang/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ stdenvNoCC
|
||||||
|
, fetchFromGitHub
|
||||||
|
, lib
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
|
pname = "iropke-batang";
|
||||||
|
version = "1.2";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "iropke";
|
||||||
|
repo = "font-iropke-batang";
|
||||||
|
rev = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-wsu7JK0hHYn9aegaMeNV9fWvQ6KoMzHwOFWymWHYvxo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
find . -type f -name '*.otf' \
|
||||||
|
-exec install -Dm644 {} -t $out/share/fonts/opentype \;
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Korean serif font";
|
||||||
|
homepage = "http://font.iropke.com/batang/";
|
||||||
|
changelog = "https://github.com/iropke/font-iropke-batang/releases";
|
||||||
|
license = lib.licenses.ofl;
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
};
|
||||||
|
})
|
||||||
46
pkgs/moresampler/default.nix
Normal file
46
pkgs/moresampler/default.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{ wine
|
||||||
|
, stdenv
|
||||||
|
, makeWrapper
|
||||||
|
, lib
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (final: {
|
||||||
|
pname = "moresampler";
|
||||||
|
version = "0.8.4";
|
||||||
|
|
||||||
|
src = ./moresampler-${final.version}.tar.gz;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin $out/opt/moresampler
|
||||||
|
|
||||||
|
mv moresampler.exe moreconfig.txt $out/opt/moresampler/
|
||||||
|
|
||||||
|
cat > $out/bin/moresampler << EOF
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
LANG=ja_JP.UTF8 "${lib.getExe wine}" \
|
||||||
|
"$out/opt/moresampler/moresampler.exe" "\''${@,-1}"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x $out/bin/moresampler
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Synthesis backend for singing voice synthesis program UTAU";
|
||||||
|
longDescription = ''
|
||||||
|
Moresampler is a synthesis backend for singing voice synthesis program
|
||||||
|
UTAU. Literally the name suggests that Moresampler is not only a UTAU
|
||||||
|
resampler. In fact, it is a resampler, a wavtool and an automatic
|
||||||
|
voicebank configurator combined in one executable.
|
||||||
|
'';
|
||||||
|
license = lib.licenses.unfree;
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
|
};
|
||||||
|
})
|
||||||
BIN
pkgs/moresampler/moresampler-0.8.4.tar.gz
Normal file
BIN
pkgs/moresampler/moresampler-0.8.4.tar.gz
Normal file
Binary file not shown.
73
pkgs/quiver/default.nix
Normal file
73
pkgs/quiver/default.nix
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{ stdenv
|
||||||
|
, fetchNpmDeps
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchzip
|
||||||
|
, fetchurl
|
||||||
|
, lib
|
||||||
|
, imagemagick
|
||||||
|
, nodejs_20
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
vendoredKatex = fetchzip {
|
||||||
|
url = "https://github.com/KaTeX/KaTeX/releases/download/v0.16.9/katex.zip";
|
||||||
|
hash = "sha256-Nca52SW4Q0P5/fllDFQEaOQyak7ojCs0ShlqJ1mWZOM=";
|
||||||
|
};
|
||||||
|
vendoredWorkbox = fetchurl {
|
||||||
|
url = "https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-window.prod.mjs";
|
||||||
|
hash = "sha256-YR3m/DqqF+yahPQAk/2k0yRmdoYtQNBEHsL6fQTDmlc=";
|
||||||
|
};
|
||||||
|
vendoredWorkboxMap = fetchurl {
|
||||||
|
url = "https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-window.prod.mjs.map";
|
||||||
|
hash = "sha256-tUBiVoiKi3OCT+wctUYl0FVnT7StsGBDx7EzculcF5I=";
|
||||||
|
};
|
||||||
|
rev = "1816fb788e4d315bf1dc30053a5e1646eb0af9b8";
|
||||||
|
in stdenv.mkDerivation (final: {
|
||||||
|
pname = "quiver";
|
||||||
|
version = lib.substring 0 7 rev;
|
||||||
|
inherit vendoredKatex vendoredWorkbox vendoredWorkboxMap;
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "varkor";
|
||||||
|
repo = "quiver";
|
||||||
|
inherit rev;
|
||||||
|
hash = "sha256-29x2x0fLemkxhv+85wPnDrrlRW2h5qJtF/QTbGa6ghE=";
|
||||||
|
};
|
||||||
|
npmDeps = fetchNpmDeps {
|
||||||
|
src = "${final.src}/service-worker";
|
||||||
|
hash = "sha256-1CdgZFvpyJFyh5x9ljTau6vrR7FeHRYZ1MG/ZOEoou8=";
|
||||||
|
};
|
||||||
|
preBuild = ''
|
||||||
|
cp -r $vendoredKatex src/KaTeX
|
||||||
|
mkdir src/Workbox
|
||||||
|
cp $vendoredWorkbox src/Workbox/workbox-window.prod.mjs
|
||||||
|
cp $vendoredWorkboxMap src/Workbox/workbox-window.prod.mjs.map
|
||||||
|
'';
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
pushd service-worker
|
||||||
|
npm install --cache $npmDeps
|
||||||
|
node build.js
|
||||||
|
popd
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/opt
|
||||||
|
cp -r src $out/opt/quiver
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
nativeBuildInputs = [
|
||||||
|
imagemagick
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
nodejs_20
|
||||||
|
];
|
||||||
|
meta = {
|
||||||
|
description = ''
|
||||||
|
A modern commutative diagram editor for the web.
|
||||||
|
'';
|
||||||
|
homepage = "https://q.uiver.app/";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
};
|
||||||
|
})
|
||||||
58
pkgs/slippi-launcher-bin/default.nix
Normal file
58
pkgs/slippi-launcher-bin/default.nix
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{ lib
|
||||||
|
, appimageTools
|
||||||
|
, fetchurl
|
||||||
|
, fuse3
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
|
|
||||||
|
# WARNING: This package is a fucking hack! Two things:
|
||||||
|
#
|
||||||
|
# - You must manually patch the Dolphin emulator installed by Slippi. After
|
||||||
|
# Dolphin is installed (i.e. once the 'play' button is clickable), you must
|
||||||
|
# navigate to ~/.cache/appimage-run/*/apprun-hooks/linux-env.sh and
|
||||||
|
# delete/comment the lines modifying LD_LIBRARY_PATH. I hope to fix this at
|
||||||
|
# some point, but it took me like 15 hours just to attain this bare minimum
|
||||||
|
# functionality, rofl. Good luck. Open an issue or contact me (msyds) if you
|
||||||
|
# need assistance.
|
||||||
|
#
|
||||||
|
# - Requires
|
||||||
|
# programs.appimage = {
|
||||||
|
# enable = true;
|
||||||
|
# binfmt = true;
|
||||||
|
# };
|
||||||
|
# in your NixOS config. This is because Slippi tries to run the Dolphin
|
||||||
|
# AppImage like a normal executable.
|
||||||
|
|
||||||
|
appimageTools.wrapType2 rec {
|
||||||
|
pname = "slippi-launcher";
|
||||||
|
version = "2.11.10";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/project-slippi/slippi-launcher/releases/download/v${version}/Slippi-Launcher-${version}-x86_64.AppImage";
|
||||||
|
hash = "sha256-OrWd0jVqe6CzNbVRNlm2alt2NZ8uBYeHiASaB74ouW4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
extraPkgs = pkgs: [
|
||||||
|
pkgs.fuse3
|
||||||
|
];
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
wrapProgram $out/bin/slippi-launcher \
|
||||||
|
--set FUSERMOUNT_PROG "${fuse3}/bin/fusermount3" \
|
||||||
|
--add-flags "''${NIXOS_OZONE_WL:+''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# note to madddy./.. DELETE "ubuntu is stupid" LINE FROM ~/.cache/appimage-run/XXXXX/shell-hooks/a
|
||||||
|
meta = {
|
||||||
|
description = "The way to play Slippi Online and watch replays.";
|
||||||
|
homepage = "https://github.com/project-slippi/slippi-launcher";
|
||||||
|
downloadPage = "https://github.com/project-slippi/slippi-launcher/releases";
|
||||||
|
license = lib.licenses.gpl3;
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
184
pkgs/slippi-launcher/default.nix
Normal file
184
pkgs/slippi-launcher/default.nix
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, electron
|
||||||
|
, nodejs
|
||||||
|
, makeWrapper
|
||||||
|
, git
|
||||||
|
, stdenv
|
||||||
|
, yarnConfigHook
|
||||||
|
, fetchYarnDeps
|
||||||
|
}:
|
||||||
|
|
||||||
|
# Similar derivations:
|
||||||
|
# - Logseq: https://github.com/NixOS/nixpkgs/blob/nixos-25.05/pkgs/by-name/lo/logseq/package.nix#L283
|
||||||
|
# - Podman: https://github.com/NixOS/nixpkgs/blob/224042e9a3039291f22f4f2ded12af95a616cca0/pkgs/applications/virtualization/podman-desktop/default.nix
|
||||||
|
|
||||||
|
stdenv.mkDerivation (final: {
|
||||||
|
pname = "slippi-launcher";
|
||||||
|
version = "2.11.10";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "project-slippi";
|
||||||
|
repo = "slippi-launcher";
|
||||||
|
rev = "v${final.version}";
|
||||||
|
hash = "sha256-EWKxzGLjyJ15wGioUtfh3biU7Pfa5bYtV1Om2w5IZW8=";
|
||||||
|
leaveDotGit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Dependency with git+https protocol breaks yarnConfigHook.
|
||||||
|
./fix-git-deps.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
# Avoid network error during build.
|
||||||
|
# https://stackoverflow.com/questions/78004799/78004800
|
||||||
|
env.ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
electron
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
yarnConfigHook
|
||||||
|
nodejs
|
||||||
|
electron
|
||||||
|
git
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
# Disable the default usage of yarnConfigHook. We instead opt to run the hook
|
||||||
|
# manually (several times) for reasons made clear in the commentary on this
|
||||||
|
# package's `postConfigure` script.
|
||||||
|
dontYarnInstallDeps = true;
|
||||||
|
|
||||||
|
configurePhase =
|
||||||
|
let
|
||||||
|
# Constants to be set in the .env file. Slippi contains an example .env
|
||||||
|
# file here:
|
||||||
|
# https://github.com/project-slippi/slippi-launcher/blob/main/.env.example
|
||||||
|
dotenv = {
|
||||||
|
# N.B. although these values are *not* secrets (yes, even the API key), they
|
||||||
|
# were extracted from the AppImage release.
|
||||||
|
FIREBASE_API_KEY = "AIzaSyAuQqc_wgqcUu3FqrICEPZ9Av_hPxMR_i4";
|
||||||
|
FIREBASE_AUTH_DOMAIN = "slippi.firebaseapp.com";
|
||||||
|
FIREBASE_DATABASE_URL = "https://slippi.firebaseio.com";
|
||||||
|
FIREBASE_PROJECT_ID = "slippi";
|
||||||
|
FIREBASE_STORAGE_BUCKET = "slippi.appspot.com";
|
||||||
|
FIREBASE_MESSAGING_SENDER_ID = "101358986051";
|
||||||
|
FIREBASE_APP_ID = "1:101358986051:web:1e361ce2a76dfd1b0f85f6";
|
||||||
|
FIREBASE_MEASUREMENT_ID = "G-VNB1EB87Y2";
|
||||||
|
|
||||||
|
# Ditto.
|
||||||
|
SLIPPI_WS_SERVER = "ws://broadcast-dot-slippi.uc.r.appspot.com/";
|
||||||
|
SLIPPI_GRAPHQL_ENDPOINT = "/graphql";
|
||||||
|
};
|
||||||
|
in ''
|
||||||
|
runHook preConfigure
|
||||||
|
|
||||||
|
# For reasons I don't quite understand[1], this package is split across two
|
||||||
|
# `package.json` files. We call yarnConfigHook once for each package.json
|
||||||
|
# to install their respective dependencies. Each yarnConfigHook call uses a
|
||||||
|
# separate offline cache.
|
||||||
|
#
|
||||||
|
# [1]: https://www.electron.build/tutorials/two-package-structure.html
|
||||||
|
yarnOfflineCache="$yarnOfflineCacheRoot" yarnConfigHook
|
||||||
|
|
||||||
|
pushd release/app
|
||||||
|
yarnOfflineCache="$yarnOfflineCacheRelease" yarnConfigHook
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Merge the dependencies listed in release/app/package.json into the
|
||||||
|
# node_modules/ directory corresponding to the top-level package.json.
|
||||||
|
# This feels very wrong! Surely there's a better way…
|
||||||
|
for i in release/app/node_modules/*; do
|
||||||
|
dest="node_modules/$(basename "$i")"
|
||||||
|
if [[ ! -f "$dest" ]]; then
|
||||||
|
mv "$i" "$dest"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Populate the .env file.
|
||||||
|
tee .env << EOF
|
||||||
|
${lib.concatLines
|
||||||
|
(lib.mapAttrsToList (k: v: "${k}=${v}") dotenv)}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
runHook postConfigure
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
cp -r ${electron.dist} electron-dist
|
||||||
|
chmod -R u+w electron-dist
|
||||||
|
|
||||||
|
# Run builds concurrently. Taken from Slippi's `yarn run package` script,
|
||||||
|
# but we've added the `--ofline` flag.
|
||||||
|
yarn --offline run build:main &
|
||||||
|
yarn --offline run build:renderer &
|
||||||
|
yarn --offline run build:migrations &
|
||||||
|
wait
|
||||||
|
|
||||||
|
# Build to release/build/linux-unwrapped. The flag `--dir` stops
|
||||||
|
# electron-builder before creating an AppImage.
|
||||||
|
./node_modules/.bin/electron-builder \
|
||||||
|
build --dir --publish never \
|
||||||
|
-c.electronDist=electron-dist \
|
||||||
|
-c.electronVersion=${electron.version}
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/{bin,opt/slippi-launcher}
|
||||||
|
cp -r release/build/linux-unpacked/* $out/opt/slippi-launcher
|
||||||
|
|
||||||
|
# Electron programs need to differentiate between production and
|
||||||
|
# non-production builds, and they do so by testing if argv[0] is 'electron'
|
||||||
|
# or not. Thus, --inherit-argv0 should be all we need; however, this is not
|
||||||
|
# the case. God knows why. Just suck it up and set
|
||||||
|
# ELECTRON_FORCE_IS_PACKAGED=true.
|
||||||
|
makeWrapper '${lib.getExe electron}' $out/bin/slippi-launcher \
|
||||||
|
--add-flags "$out/opt/slippi-launcher/resources/app.asar" \
|
||||||
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
|
||||||
|
--prefix LD_LIBRARY_PATH : $out/opt/slippi-launcher \
|
||||||
|
--inherit-argv0 \
|
||||||
|
--set ELECTRON_FORCE_IS_PACKAGED true
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
yarnOfflineCacheRoot = fetchYarnDeps {
|
||||||
|
name = "slippi-launcher-yarn-deps-root";
|
||||||
|
# One of our patches modifies the (top-level) Yarn lockfile and thus must be
|
||||||
|
# visible to fetchYarnDeps.
|
||||||
|
inherit (final) src patches;
|
||||||
|
hash = "sha256-Crq9XywLtEc8IImkldodZJ823YG6dB8D9qGksH/lb3I=";
|
||||||
|
};
|
||||||
|
|
||||||
|
yarnOfflineCacheRelease = fetchYarnDeps {
|
||||||
|
name = "slippi-launcher-yarn-deps-resources";
|
||||||
|
# Our patches don't touch the lockfile at release/app/yarn.lock, so there's
|
||||||
|
# no need to inherit patches }:).
|
||||||
|
inherit (final) src;
|
||||||
|
sourceRoot = "${final.src.name}/release/app";
|
||||||
|
hash = "sha256-iCFqgy+jRaMCoGC77iXkEh964cZAtXFRfdOOJaRTfLc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "The way to play Slippi Online and watch replays.";
|
||||||
|
longDescription = ''
|
||||||
|
The Slippi Launcher acts as a one stop shop for everything Slippi
|
||||||
|
related. It handles updating Slippi Dolphin, playing Slippi Online,
|
||||||
|
launching and analyzing replays, and more.
|
||||||
|
'';
|
||||||
|
license = lib.licenses.gpl3;
|
||||||
|
homepage = "https://github.com/project-slippi/slippi-launcher";
|
||||||
|
changelog =
|
||||||
|
"https://github.com/project-slippi/slippi-launcher/releases/tag/v${final.version}";
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
broken = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
16
pkgs/slippi-launcher/fix-git-deps.patch
Normal file
16
pkgs/slippi-launcher/fix-git-deps.patch
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/yarn.lock b/yarn.lock
|
||||||
|
index 6b2fba28..40ed0fc4 100644
|
||||||
|
--- a/yarn.lock
|
||||||
|
+++ b/yarn.lock
|
||||||
|
@@ -1848,9 +1848,9 @@
|
||||||
|
global-agent "^3.0.0"
|
||||||
|
global-tunnel-ng "^2.7.1"
|
||||||
|
|
||||||
|
-"@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2":
|
||||||
|
+"@electron/node-gyp@https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2":
|
||||||
|
version "10.2.0-electron.1"
|
||||||
|
- resolved "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2"
|
||||||
|
+ resolved "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2"
|
||||||
|
dependencies:
|
||||||
|
env-paths "^2.2.0"
|
||||||
|
exponential-backoff "^3.1.1"
|
||||||
32
pkgs/syd-plex-latex/default.nix
Normal file
32
pkgs/syd-plex-latex/default.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ stdenvNoCC
|
||||||
|
, texlive
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenvNoCC.mkDerivation (final: {
|
||||||
|
pname = "syd-plex-latex";
|
||||||
|
version = "1.0.0";
|
||||||
|
src = ./.;
|
||||||
|
nativeBuildInputs = [ texlive.combined.scheme-small ];
|
||||||
|
passthru = {
|
||||||
|
pkgs = [ final.finalPackage ];
|
||||||
|
tlDeps = with texlive; [
|
||||||
|
plex
|
||||||
|
plex-otf
|
||||||
|
fontaxes
|
||||||
|
unicode-math
|
||||||
|
xetex
|
||||||
|
fontspec
|
||||||
|
xltxtra
|
||||||
|
realscripts
|
||||||
|
xecjk
|
||||||
|
];
|
||||||
|
tlType = "run";
|
||||||
|
};
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
dir="$out/tex/latex/syd-plex"
|
||||||
|
mkdir -p "$dir"
|
||||||
|
mv syd-plex.sty "$dir"
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
})
|
||||||
15
pkgs/syd-plex-latex/syd-plex.sty
Executable file
15
pkgs/syd-plex-latex/syd-plex.sty
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{syd-plex}[2025/12/01 Configure IBM Plex fonts]
|
||||||
|
|
||||||
|
% Redefine some commands to make unicode-math work lol. See §3.1 of the
|
||||||
|
% unicode-math manual.
|
||||||
|
\renewcommand*{\mathrm}[1]{\symup{#1}}
|
||||||
|
|
||||||
|
\RequirePackage{plex-otf}
|
||||||
|
\RequirePackage{xeCJK}
|
||||||
|
\setmathfont{IBM Plex Math}
|
||||||
|
\setmainfont{IBM Plex Serif}
|
||||||
|
\setCJKmainfont{IBM Plex Sans KR}
|
||||||
|
|
||||||
|
% Use sans-serif for \operatorname
|
||||||
|
\setoperatorfont\mathsf
|
||||||
Reference in New Issue
Block a user