1 Commits

Author SHA1 Message Date
c05f49c3a4 stupid fucking slippi 2025-08-14 21:45:53 -06:00
6 changed files with 23 additions and 70 deletions

View File

@@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v31
with:

Binary file not shown.

View File

@@ -19,5 +19,22 @@
lib.filterAttrs
(_: v: lib.isDerivation v)
self.legacyPackages.${system});
devShells.x86_64-linux.slippi =
let
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
in self.packages.x86_64-linux.slippi-launcher.env.overrideAttrs
(final: prev: {
shellHook =
builtins.replaceStrings
["exec \"\${cmd[@]}\""]
[''
echo "''${cmd[-1]}"
unset cmd[-1]
cmd+=("$SHELL")
exec "''${cmd[@]}"
'']
prev.shellHook;
});
};
}

View File

@@ -1,65 +0,0 @@
{ 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 = "9872f3f9265f92643387239e76042c8d3ffeb410";
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-wSyCzUSLUL5nzUe5E4RdWv44WGd4C9WO6udkKY9cyBs=";
};
npmDeps = fetchNpmDeps {
src = "${final.src}/service-worker";
hash = "sha256-xlww7Yfle58Qdwn/IcA6E6Fy7ZvH/ltKdlk6hvcC4UM=";
};
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;
};
})

View File

@@ -27,10 +27,11 @@ 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=";
};
src = ./Slippi-Launcher-2.11.10-x86_64.AppImage;
# 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