2020-10-15 19:05:13 +11:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, makeWrapper
|
|
|
|
|
|
|
|
, pkg-config
|
|
|
|
, qmake
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "go-qt";
|
2020-12-09 09:51:29 +11:00
|
|
|
version = "20200904";
|
2020-10-15 19:05:13 +11:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "therecipe";
|
|
|
|
repo = "qt";
|
2020-12-09 09:51:29 +11:00
|
|
|
rev = "c0c124a5770d357908f16fa57e0aa0ec6ccd3f91";
|
|
|
|
sha256 = "197wdh2v0g5g2dpb1gcd5gp0g4wqzip34cawisvy6z7mygmsc8rd";
|
2020-10-15 19:05:13 +11:00
|
|
|
};
|
|
|
|
|
2020-10-17 12:49:26 +11:00
|
|
|
vendorSha256 = "00wghn93xz240ddj47b8mkbx3cg7c0486igp6vv0x9r6ylhywsm6";
|
2020-10-15 19:05:13 +11:00
|
|
|
subPackages = [ "cmd/..." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
# Fixes inconsistent vendoring.
|
|
|
|
postPatch = ''
|
|
|
|
cat <<EOM >>go.mod
|
|
|
|
require (
|
|
|
|
github.com/therecipe/env_darwin_amd64_513 v0.0.0-20190626001412-d8e92e8db4d0
|
|
|
|
github.com/therecipe/env_linux_amd64_513 v0.0.0-20190626000307-e137a3934da6
|
|
|
|
github.com/therecipe/env_windows_amd64_513 v0.0.0-20190626000028-79ec8bd06fb2
|
|
|
|
github.com/therecipe/env_windows_amd64_513/Tools v0.0.0-20190626000028-79ec8bd06fb2
|
2020-10-17 12:49:26 +11:00
|
|
|
github.com/therecipe/qt/internal/binding/files/docs/5.12.0 v0.0.0-20200904063919-c0c124a5770d
|
|
|
|
github.com/therecipe/qt/internal/binding/files/docs/5.13.0 v0.0.0-20200904063919-c0c124a5770d
|
2020-10-15 19:05:13 +11:00
|
|
|
)
|
|
|
|
EOM
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
$GOPATH/bin/qtsetup test
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
for bin in $out/bin/*; do
|
|
|
|
wrapProgram $bin \
|
|
|
|
--set QT_PKG_CONFIG true \
|
|
|
|
--prefix PATH : ${pkg-config}/bin \
|
|
|
|
--prefix PATH : ${qmake}/bin
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/therecipe/qt";
|
|
|
|
description = "Qt bindings for Go";
|
|
|
|
license = licenses.lgpl3;
|
2020-12-09 09:51:29 +11:00
|
|
|
broken = true; # -mod=vendor -trimpath not supported (can be '', 'mod', 'readonly', or 'vendor'); not sure what's changed in nixpkgs
|
2020-10-15 19:05:13 +11:00
|
|
|
};
|
|
|
|
}
|