2020-12-12 10:43:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, buildFHSUserEnv
|
2020-12-31 03:08:49 +00:00
|
|
|
, binutils
|
2020-12-12 10:43:21 +00:00
|
|
|
, dejavu_fonts
|
2020-12-31 03:08:49 +00:00
|
|
|
, pkg-config
|
2020-12-12 10:43:21 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, roboto
|
|
|
|
, writeScript
|
|
|
|
, xorg
|
|
|
|
, libglvnd
|
|
|
|
, addOpenGLRunpath
|
|
|
|
, makeWrapper
|
|
|
|
, gcc
|
|
|
|
, go
|
|
|
|
, flutter
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "hover";
|
2021-12-26 20:44:39 +00:00
|
|
|
version = "0.47.0";
|
2020-12-12 10:43:21 +00:00
|
|
|
|
|
|
|
libs = with xorg; [
|
|
|
|
libX11.dev
|
|
|
|
libXcursor.dev
|
|
|
|
libXext.dev
|
|
|
|
libXi.dev
|
|
|
|
libXinerama.dev
|
|
|
|
libXrandr.dev
|
|
|
|
libXrender.dev
|
|
|
|
libXfixes.dev
|
|
|
|
libXxf86vm
|
|
|
|
libglvnd.dev
|
|
|
|
xorgproto
|
|
|
|
];
|
|
|
|
hover = buildGoModule rec {
|
|
|
|
inherit pname version;
|
|
|
|
|
2020-12-31 03:08:49 +00:00
|
|
|
meta = with lib; {
|
2020-12-12 10:43:21 +00:00
|
|
|
description = "A build tool to run Flutter applications on desktop";
|
|
|
|
homepage = "https://github.com/go-flutter-desktop/hover";
|
|
|
|
license = licenses.bsd3;
|
2020-12-31 03:08:49 +00:00
|
|
|
platforms = platforms.linux;
|
2021-11-23 16:26:07 +00:00
|
|
|
maintainers = with maintainers; [ ericdallo flexagoon ];
|
2020-12-12 10:43:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-12-26 20:44:39 +00:00
|
|
|
vendorSha256 = "sha256-GDoX5d2aDfaAx9JsKuS4r8137t3swT6rgcCghmaThSM=";
|
2020-12-12 10:43:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "go-flutter-desktop";
|
|
|
|
repo = pname;
|
2021-12-26 20:44:39 +00:00
|
|
|
sha256 = "sha256-ch59Wx4g72u7x99807ppURI4I+5aJ/W8Zr35q8X68v4=";
|
2020-12-12 10:43:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ addOpenGLRunpath makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = libs;
|
|
|
|
|
|
|
|
checkRun = false;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./fix-assets-path.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's|@assetsFolder@|'"''${out}/share/assets"'|g' internal/fileutils/assets.go
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r assets $out/share/assets
|
|
|
|
chmod -R a+rx $out/share/assets
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/hover" \
|
2020-12-31 03:08:49 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs}
|
2020-12-12 10:43:21 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
addOpenGLRunpath $out/bin/hover
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
buildFHSUserEnv rec {
|
|
|
|
name = pname;
|
|
|
|
targetPkgs = pkgs: [
|
2020-12-31 03:08:49 +00:00
|
|
|
binutils
|
2020-12-12 10:43:21 +00:00
|
|
|
dejavu_fonts
|
|
|
|
flutter
|
|
|
|
gcc
|
|
|
|
go
|
|
|
|
hover
|
2020-12-31 03:08:49 +00:00
|
|
|
pkg-config
|
2020-12-12 10:43:21 +00:00
|
|
|
roboto
|
|
|
|
] ++ libs;
|
|
|
|
|
|
|
|
runScript = "hover";
|
|
|
|
}
|