blob: f759620d63fd08028e060392e2e17eb353154ef7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{ lib, buildGoModule, fetchFromGitHub, fetchzip, installShellFiles }:
buildGoModule rec {
pname = "mutagen";
version = "0.17.1";
src = fetchFromGitHub {
owner = "mutagen-io";
repo = pname;
rev = "v${version}";
hash = "sha256-M7h8qlqqGK4Nl4yXL7ZhGTq/CL+LdDpI/nv90koyu3Y=";
};
vendorHash = "sha256-kfzT+230KY2TJVc0qKMi4TysmltZSgF/OvL5nPLPcbM=";
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;
postFetch = ''
rm $out/mutagen # Keep only mutagen-agents.tar.gz.
'';
hash = "sha256-RFB1/gzLjs9w8mebEd4M9Ldv3BrLIj2RsN/QAIJi45E=";
};
nativeBuildInputs = [ installShellFiles ];
doCheck = false;
subPackages = [ "cmd/mutagen" "cmd/mutagen-agent" ];
tags = [ "mutagencli" "mutagenagent" ];
postInstall = ''
install -d $out/libexec
ln -s ${agents}/mutagen-agents.tar.gz $out/libexec/
$out/bin/mutagen generate \
--bash-completion-script mutagen.bash \
--fish-completion-script mutagen.fish \
--zsh-completion-script mutagen.zsh
installShellCompletion \
--cmd mutagen \
--bash mutagen.bash \
--fish mutagen.fish \
--zsh mutagen.zsh
'';
meta = with lib; {
description = "Make remote development work with your local tools";
homepage = "https://mutagen.io/";
changelog = "https://github.com/mutagen-io/mutagen/releases/tag/v${version}";
maintainers = [ maintainers.marsam ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.mit;
};
}
|