mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
}:
|
|
buildGoModule rec {
|
|
pname = "turso-cli";
|
|
version = "0.97.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tursodatabase";
|
|
repo = "turso-cli";
|
|
rev = "v${version}";
|
|
hash = "sha256-6Ci1QESSN6wNpUAQoWtTyHWrGaI/3xs/jGCSkJsYC8o=";
|
|
};
|
|
|
|
vendorHash = "sha256-tBO21IgUczwMgrEyV7scV3YTY898lYHASaLeXqvBopU=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [
|
|
"-X github.com/tursodatabase/turso-cli/internal/cmd.version=v${version}"
|
|
];
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd turso \
|
|
--bash <($out/bin/turso completion bash) \
|
|
--fish <($out/bin/turso completion fish) \
|
|
--zsh <($out/bin/turso completion zsh)
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
description = "This is the command line interface (CLI) to Turso";
|
|
homepage = "https://turso.tech";
|
|
mainProgram = "turso";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ zestsystem kashw2 fryuni ];
|
|
};
|
|
}
|