From 8b2f440b364a4f470d940af4578ec7f271a171b5 Mon Sep 17 00:00:00 2001 From: xeals Date: Thu, 10 Dec 2020 10:40:22 +1100 Subject: [PATCH] go-qt: manually remove references Fixes an issue where part of the tests fail due to over-quoting of `GOFLAGS` and treating `-trimpath` as part of `-mod`. --- pkgs/development/go-modules/qt/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/go-modules/qt/default.nix b/pkgs/development/go-modules/qt/default.nix index ac4cf36..6ea4300 100644 --- a/pkgs/development/go-modules/qt/default.nix +++ b/pkgs/development/go-modules/qt/default.nix @@ -3,8 +3,10 @@ , buildGoModule , makeWrapper +, go , pkg-config , qmake +, removeReferencesTo }: buildGoModule rec { @@ -18,6 +20,12 @@ buildGoModule rec { sha256 = "197wdh2v0g5g2dpb1gcd5gp0g4wqzip34cawisvy6z7mygmsc8rd"; }; + # fails with `GOFLAGS=-vendor=mod -trimpath` + allowGoReference = true; + preFixup = '' + find $out -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${go} '{}' + + ''; + vendorSha256 = "00wghn93xz240ddj47b8mkbx3cg7c0486igp6vv0x9r6ylhywsm6"; subPackages = [ "cmd/..." ]; @@ -55,6 +63,5 @@ buildGoModule rec { homepage = "https://github.com/therecipe/qt"; description = "Qt bindings for Go"; license = licenses.lgpl3; - broken = true; # -mod=vendor -trimpath not supported (can be '', 'mod', 'readonly', or 'vendor'); not sure what's changed in nixpkgs }; }