Skip to content

Instantly share code, notes, and snippets.

@greg-hellings
Created April 10, 2024 03:20
Show Gist options
  • Save greg-hellings/35e0e9a6e0fa4632771450276af0ca7c to your computer and use it in GitHub Desktop.
Save greg-hellings/35e0e9a6e0fa4632771450276af0ca7c to your computer and use it in GitHub Desktop.
{
lib,
buildGoModule,
fetchFromGitHub,
dbus,
libGL,
libX11,
libXcursor,
libXinerama,
libXi,
libXrandr,
libXxf86vm,
pkg-config,
}:
let
version = "2.4.4";
in buildGoModule {
pname = "fyne";
inherit version;
src = fetchFromGitHub {
owner = "fyne-io";
repo = "fyne";
rev = "v${version}";
hash = "sha256-6gDHURcf4dVmaiXleeRKogAtCAgcHU437TjEHhfGdj8=";
};
vendorHash = "sha256-0P2YqXq+c20F2hVkRcvwV5PpqUoZ3PnRIvTHt/qAMPA=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libGL
libX11
libXcursor
libXinerama
libXi
libXrandr
libXxf86vm
];
checkInputs = [
dbus
];
doCheck = true;
preCheck = ''
export HOME=$(mktemp -d)
export GOPATH=$(mktemp -d)
OLD_DIR=$PWD
cd $HOME
'';
postInstall = ''
cd $OLD_DIR
ls -lR $out
mv build/bin/fyne $out/bin
'';
meta = with lib; {
homepage = "https://fyne.io";
description = "A GUI library and tools for golang";
license = licenses.bsd3;
maintainers = [ maintainers.greg ];
mainProgram = "fyne";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment