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-06-20 14:57:18 +00:00
|
|
|
version = "3.5.1";
|
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-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-VOGkAv42dus2uxoffffIn6dwC18idwF2tycEHLd6I4s=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
vendorHash = "sha256-2JNEN8fmxflEyP5lHAv75Bjt9sbKoWL5O+87hxK89vU=";
|
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
|
|
|
};
|
|
|
|
}
|