2023-11-04 09:46:17 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
2023-12-08 14:48:10 +00:00
|
|
|
, nix-update-script
|
2023-11-04 09:46:17 +00:00
|
|
|
, testers
|
|
|
|
, symfony-cli
|
2024-01-06 21:45:09 +00:00
|
|
|
, nssTools
|
|
|
|
, makeBinaryWrapper
|
2023-11-04 09:46:17 +00:00
|
|
|
}:
|
2021-06-09 12:16:23 +00:00
|
|
|
|
2022-01-04 10:27:32 +00:00
|
|
|
buildGoModule rec {
|
2021-11-29 19:31:34 +00:00
|
|
|
pname = "symfony-cli";
|
2024-02-11 22:22:34 +00:00
|
|
|
version = "5.8.8";
|
2024-01-24 19:25:52 +00:00
|
|
|
vendorHash = "sha256-ACK0JCaS1MOCgUi2DMEjIcKf/nMCcrdDyIdioBZv7qw=";
|
2022-01-04 10:27:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symfony-cli";
|
|
|
|
repo = "symfony-cli";
|
|
|
|
rev = "v${version}";
|
2024-02-11 22:22:34 +00:00
|
|
|
hash = "sha256-GdmFRGyp4s5G5RTEFKjcrY/OpaEVCgRhNVJbY1F8vk0=";
|
2022-01-04 10:27:32 +00:00
|
|
|
};
|
2021-11-29 19:31:34 +00:00
|
|
|
|
2022-12-08 23:37:43 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.version=${version}"
|
2023-12-08 14:48:10 +00:00
|
|
|
"-X main.channel=stable"
|
2022-12-08 23:37:43 +00:00
|
|
|
];
|
|
|
|
|
2024-01-06 21:45:09 +00:00
|
|
|
buildInputs = [ makeBinaryWrapper ];
|
|
|
|
|
2022-04-08 08:27:01 +00:00
|
|
|
postInstall = ''
|
2024-01-06 21:45:09 +00:00
|
|
|
mkdir $out/libexec
|
|
|
|
mv $out/bin/symfony-cli $out/libexec/symfony
|
|
|
|
|
|
|
|
makeBinaryWrapper $out/libexec/symfony $out/bin/symfony \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ nssTools ]}
|
2022-04-08 08:27:01 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-04 10:27:32 +00:00
|
|
|
# Tests requires network access
|
2023-11-04 09:46:17 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-12-08 14:48:10 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
inherit version;
|
|
|
|
package = symfony-cli;
|
|
|
|
command = "symfony version --no-ansi";
|
|
|
|
};
|
2023-11-04 09:46:17 +00:00
|
|
|
};
|
2021-06-09 12:16:23 +00:00
|
|
|
|
2023-07-21 10:29:37 +00:00
|
|
|
meta = {
|
2023-11-04 09:46:17 +00:00
|
|
|
changelog = "https://github.com/symfony-cli/symfony-cli/releases/tag/v${version}";
|
2021-06-09 12:16:23 +00:00
|
|
|
description = "Symfony CLI";
|
2022-01-04 10:27:32 +00:00
|
|
|
homepage = "https://github.com/symfony-cli/symfony-cli";
|
2023-07-21 10:29:37 +00:00
|
|
|
license = lib.licenses.agpl3Plus;
|
2023-07-04 09:20:55 +00:00
|
|
|
mainProgram = "symfony";
|
2023-07-21 10:29:37 +00:00
|
|
|
maintainers = with lib.maintainers; [ drupol ];
|
2021-06-09 12:16:23 +00:00
|
|
|
};
|
|
|
|
}
|