tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
magento-cloud: init at 1.46.1
Piotr Kwiecinski
1 year ago
e5aac151
53ae2f05
+59
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
ma
magento-cloud
package.nix
update.sh
+53
pkgs/by-name/ma/magento-cloud/package.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
stdenvNoCC,
4
4
+
fetchurl,
5
5
+
makeBinaryWrapper,
6
6
+
php,
7
7
+
testers,
8
8
+
}:
9
9
+
stdenvNoCC.mkDerivation (finalAttrs: {
10
10
+
pname = "magento-cloud";
11
11
+
version = "1.46.1";
12
12
+
13
13
+
src = fetchurl {
14
14
+
url = "https://accounts.magento.cloud/sites/default/files/magento-cloud-v${finalAttrs.version}.phar";
15
15
+
hash = "sha256-QrrD5pz6Juov1u3QYcuLr6aEKe/4DX5wFKs+hp6KjJ8=";
16
16
+
};
17
17
+
18
18
+
dontUnpack = true;
19
19
+
dontBuild = true;
20
20
+
dontConfigure = true;
21
21
+
22
22
+
nativeBuildInputs = [ makeBinaryWrapper ];
23
23
+
24
24
+
installPhase = ''
25
25
+
runHook preInstall
26
26
+
27
27
+
mkdir -p $out/bin
28
28
+
install -D ${finalAttrs.src} $out/libexec/magento-cloud/magento-cloud.phar
29
29
+
makeWrapper ${lib.getExe php} $out/bin/magento-cloud \
30
30
+
--add-flags "$out/libexec/magento-cloud/magento-cloud.phar"
31
31
+
32
32
+
runHook postInstall
33
33
+
'';
34
34
+
35
35
+
passthru = {
36
36
+
updateScript = ./update.sh;
37
37
+
tests.version = testers.testVersion {
38
38
+
package = finalAttrs.finalPackage;
39
39
+
command = "HOME=$TMPDIR magento-cloud --version";
40
40
+
};
41
41
+
};
42
42
+
43
43
+
meta = {
44
44
+
homepage = "https://experienceleague.adobe.com/en/docs/commerce-cloud-service/user-guide/dev-tools/cloud-cli/cloud-cli-overview";
45
45
+
description = "Adobe Commerce Cloud CLI";
46
46
+
longDescription = ''
47
47
+
Adobe Commerce Cloud CLI enables developers and system administrators the ability to manage Cloud projects and environments, perform routines and run automation tasks locally.
48
48
+
'';
49
49
+
mainProgram = "magento-cloud";
50
50
+
maintainers = with lib.maintainers; [ piotrkwiecinski ];
51
51
+
license = lib.licenses.unfree;
52
52
+
};
53
53
+
})
+6
pkgs/by-name/ma/magento-cloud/update.sh
···
1
1
+
#!/usr/bin/env nix-shell
2
2
+
#!nix-shell --pure -i bash -p bash curl jq nix-update cacert git
3
3
+
set -euo pipefail
4
4
+
5
5
+
new_version="$(curl https://accounts.magento.cloud/cli/manifest.json | jq --raw-output .[0].version)"
6
6
+
nix-update magento-cloud --version "$new_version"