2023-01-29 14:31:11 +00:00
|
|
|
{ stdenv, fetchurl }:
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2023-01-28 21:57:06 +00:00
|
|
|
let
|
2021-04-20 21:31:37 +00:00
|
|
|
|
2023-01-28 21:57:06 +00:00
|
|
|
version = "745";
|
|
|
|
|
2023-01-29 17:57:55 +00:00
|
|
|
cpuArch = stdenv.buildPlatform.parsed.cpu.name;
|
2023-01-28 21:57:06 +00:00
|
|
|
|
|
|
|
src = {
|
|
|
|
|
2023-02-14 19:46:28 +00:00
|
|
|
"x86_64" = fetchurl {
|
2023-01-28 21:57:06 +00:00
|
|
|
url = "https://github.com/probonopd/go-appimage/releases/download/continuous/appimagetool-${version}-x86_64.AppImage";
|
|
|
|
sha256 = "sha256-HQ7d9LQDaPm6sGZ5boWZdmGTNqiGN9NWHUWPiDhl2Xc=";
|
|
|
|
};
|
|
|
|
|
2023-01-29 14:31:11 +00:00
|
|
|
"aarch64" = fetchurl {
|
|
|
|
url = "https://github.com/probonopd/go-appimage/releases/download/continuous/appimagetool-${version}-aarch64.AppImage";
|
|
|
|
sha256 = "sha256-VvH2qXULliCiyFrisaIJbM0ApXp++ZAtxHiS6FM3XT0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
"armv7l" = fetchurl {
|
|
|
|
url = "https://github.com/probonopd/go-appimage/releases/download/continuous/appimagetool-${version}-armhf.AppImage";
|
|
|
|
sha256 = "sha256-ytJjN2dLYOSwqCCFZvqnt+wt2wX/lZ1R+nVz5C+Akvo=";
|
|
|
|
};
|
|
|
|
|
|
|
|
"i686" = fetchurl {
|
|
|
|
url = "https://github.com/probonopd/go-appimage/releases/download/continuous/appimagetool-${version}-i686.AppImage";
|
|
|
|
sha256 = "sha256-GLEhn3dcrwdU3mG0lB6H7PQ5JwEIGqWlGrO1IifeQv4=";
|
|
|
|
};
|
2023-01-28 21:57:06 +00:00
|
|
|
|
|
|
|
}."${cpuArch}";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
pname = "go-appimage";
|
2023-01-29 14:31:11 +00:00
|
|
|
inherit version src;
|
2023-01-28 21:57:06 +00:00
|
|
|
|
|
|
|
sourceRoot = "squashfs-root";
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
cp $src appimagetool
|
|
|
|
chmod u+wx appimagetool
|
|
|
|
./appimagetool --appimage-extract
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r usr/* $out
|
|
|
|
'';
|
|
|
|
}
|