Files
nixpkgs/pkgs/by-name/kr/krunker/linux.nix
bitbloxhub c831bab4ac appimageTools: warn on deprecated type-specific aliases
Also migrates away from them with these commands, using ast-grep 0.43.0
with these commands in bash (assisted by ChatGPT):
```bash
for old in extractType1 extractType2; do
  ast-grep \
    --lang nix \
    --pattern "\$TOOLS.$old" \
    --rewrite '$TOOLS.extract' \
    --update-all \
    pkgs
done

ast-grep \
  --lang nix \
  --pattern '$TOOLS.wrapType1' \
  --rewrite '$TOOLS.wrapType2' \
  --update-all \
  pkgs
```

Assisted-by: GPT-5.6-Sol Medium via ChatGPT
2026-07-30 00:21:21 +00:00

31 lines
832 B
Nix

{ appimageTools, fetchurl }:
let
pname = "krunker";
version = "2.1.3";
appId = "io.krunker.desktop";
src = fetchurl {
url = "https://client2.krunker.io/Official%20Krunker.io%20Client-${version}.AppImage";
hash = "sha512-a8E5heLsKXOtv/wRKlrnV0GD48cY1mOiSSDW93c7YZ+HoeuBQDxtRaHKg5EqU51Yi+d4tPF5nOh10jZW36c7WQ==";
};
appimageContents = appimageTools.extract {
inherit pname version src;
};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mkdir -p $out/share/{applications,pixmaps}
install -Dm644 ${appimageContents}/${appId}.desktop -t $out/share/applications
install -Dm644 ${appimageContents}/${appId}.png -t $out/share/pixmaps
substituteInPlace $out/share/applications/${appId}.desktop \
--replace-fail 'Exec=AppRun' "Exec=$pname"
'';
}