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-04-11 23:58:52 +00:00
|
|
|
version = "765";
|
2023-01-28 21:57:06 +00:00
|
|
|
|
2023-01-29 17:57:55 +00:00
|
|
|
cpuArch = stdenv.buildPlatform.parsed.cpu.name;
|
2023-01-28 21:57:06 +00:00
|
|
|
|
2023-04-11 23:58:52 +00:00
|
|
|
srcDir = ./go-appimage;
|
2023-01-28 21:57:06 +00:00
|
|
|
|
2023-04-11 23:58:52 +00:00
|
|
|
# https://github.com/probonopd/go-appimage
|
|
|
|
# The author of go-appimage has set up some crazy continuous integration build
|
|
|
|
# system with github, which is really cool, except that it doesn't preserve
|
|
|
|
# any older builds of the project. And it's pretty difficult to build it
|
|
|
|
# ourselves. So fuck it, just embed a tarball into the repo.
|
|
|
|
src = {
|
|
|
|
"x86_64" = "${srcDir}/appimagetool-${version}-x86_64.AppImage";
|
|
|
|
"aarch64" = "${srcDir}/go-appimage/appimagetool-${version}-aarch64.AppImage";
|
|
|
|
"armv7l" = "${srcDir}/go-appimage/appimagetool-${version}-armhf.AppImage";
|
|
|
|
"i686" = "${srcDir}/go-appimage/appimagetool-${version}-i686.AppImage";
|
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
|
|
|
|
'';
|
|
|
|
}
|