nixpkgs/pkgs/by-name/sy/symfony-cli/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.6 KiB
Nix
Raw Normal View History

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
, 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 {
pname = "symfony-cli";
2024-07-26 17:48:52 +00:00
version = "5.10.2";
vendorHash = "sha256-WSZM/9inaFLlZIAwH3E8hWyRQaOvY8BJ6ECpbkqJN6g=";
2022-01-04 10:27:32 +00:00
src = fetchFromGitHub {
owner = "symfony-cli";
repo = "symfony-cli";
rev = "v${version}";
2024-07-26 17:48:52 +00:00
hash = "sha256-/fJ9Ovk2gXCIvvieCXxnI8gDjwrhQHJoF3Ia47dSdgQ=";
leaveDotGit = true;
postFetch = ''
git --git-dir $out/.git log -1 --pretty=%cd --date=format:'%Y-%m-%dT%H:%M:%SZ' > $out/SOURCE_DATE
rm -rf $out/.git
'';
2022-01-04 10:27:32 +00:00
};
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
2023-12-08 14:48:10 +00:00
"-X main.channel=stable"
];
preBuild = ''
ldflags+=" -X main.buildDate=$(cat SOURCE_DATE)"
'';
buildInputs = [ makeBinaryWrapper ];
postInstall = ''
mkdir $out/libexec
mv $out/bin/symfony-cli $out/libexec/symfony
makeBinaryWrapper $out/libexec/symfony $out/bin/symfony \
--prefix PATH : ${lib.makeBinPath [ nssTools ]}
'';
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
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";
license = lib.licenses.agpl3Plus;
2023-07-04 09:20:55 +00:00
mainProgram = "symfony";
maintainers = with lib.maintainers; [ drupol ];
2021-06-09 12:16:23 +00:00
};
}