nixpkgs/pkgs/by-name/ty/tyson/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

46 lines
1.0 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "tyson";
version = "0.1.1-unstable-2024-04-10";
src = fetchFromGitHub {
owner = "jetpack-io";
repo = "tyson";
rev = "d6b38819db9b260928b29f4d39bf4c72841c6a01";
hash = "sha256-NoQJBEedV3NDNQ4PVvvjjsO7N+rq40LWKp962P+naEY=";
};
vendorHash = "sha256-kJIfKgVaHuCYvvTZXyuZ/Hg8z1BlW4oW6+5s1inFizg=";
nativeBuildInputs = [
installShellFiles
];
ldflags = [
"-s"
"-w"
];
postInstall = ''
installShellCompletion --cmd tyson \
--bash <($out/bin/tyson completion bash) \
--fish <($out/bin/tyson completion fish) \
--zsh <($out/bin/tyson completion zsh)
'';
meta = with lib; {
description = "TypeScript as a configuration language";
mainProgram = "tyson";
homepage = "https://github.com/jetify-com/tyson";
changelog = "https://github.com/jetify-com/tyson/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
};
}