2024-06-05 15:53:02 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule, installShellFiles, testers, juju }:
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "juju";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "3.5.2";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "juju";
|
|
|
|
repo = "juju";
|
2024-06-05 15:53:02 +00:00
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-HdV6bRAMQ7LynEGjrFOX36g7+1Zb9AiFtF6O4yu7+NU=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
vendorHash = "sha256-FCN+0Wx2fYQcj5CRgPubAWbGGyVQcSSfu/Om6SUB6TQ=";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
subPackages = [
|
|
|
|
"cmd/juju"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
# Disable tests because it attempts to use a mongodb instance
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for file in etc/bash_completion.d/*; do
|
|
|
|
installShellCompletion --bash "$file"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = juju;
|
|
|
|
command = "HOME=\"$(mktemp -d)\" juju --version";
|
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Open source modelling tool for operating software in the cloud";
|
|
|
|
homepage = "https://juju.is";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ citadelcore ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "juju";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
}
|