From da247171b13fc62498e5b7c758ae2c19ed8c56a5 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Tue, 22 Dec 2020 02:46:52 +0000 Subject: [PATCH] mutagen: install agents bundle (#107297) Fixes #81219 --- pkgs/tools/misc/mutagen/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/mutagen/default.nix b/pkgs/tools/misc/mutagen/default.nix index 8d71f75622c7..7e824cf90ca4 100644 --- a/pkgs/tools/misc/mutagen/default.nix +++ b/pkgs/tools/misc/mutagen/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, fetchzip }: buildGoModule rec { pname = "mutagen"; @@ -13,10 +13,26 @@ buildGoModule rec { vendorSha256 = "0szs9yc49fyh55ra1wf8zj76kdah0x49d45cgivk3gqh2hl17j6l"; + agents = fetchzip { + name = "mutagen-agents-${version}"; + # The package architecture does not matter since all packages contain identical mutagen-agents.tar.gz. + url = "https://github.com/mutagen-io/mutagen/releases/download/v${version}/mutagen_linux_amd64_v${version}.tar.gz"; + stripRoot = false; + extraPostFetch = '' + rm $out/mutagen # Keep only mutagen-agents.tar.gz. + ''; + sha256 = "0k8iif09kvxfxx6qm5qmkf3lr7ar6i98ivkndimj680ah9v1hkj8"; + }; + doCheck = false; subPackages = [ "cmd/mutagen" "cmd/mutagen-agent" ]; + postInstall = '' + install -d $out/libexec + ln -s ${agents}/mutagen-agents.tar.gz $out/libexec/ + ''; + meta = with lib; { description = "Make remote development work with your local tools"; homepage = "https://mutagen.io/";