Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 47 lines 1.2 kB view raw
1{ 2 lib, 3 buildGoModule, 4 src, 5 version, 6 tilt-assets, 7 stdenv, 8 installShellFiles, 9}: 10 11buildGoModule rec { 12 pname = "tilt"; 13 /* 14 Do not use "dev" as a version. If you do, Tilt will consider itself 15 running in development environment and try to serve assets from the 16 source tree, which is not there once build completes. 17 */ 18 inherit src version; 19 20 vendorHash = null; 21 22 subPackages = [ "cmd/tilt" ]; 23 24 ldflags = [ "-X main.version=${version}" ]; 25 26 nativeBuildInputs = [ installShellFiles ]; 27 28 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 29 installShellCompletion --cmd tilt \ 30 --bash <($out/bin/tilt completion bash) \ 31 --fish <($out/bin/tilt completion fish) \ 32 --zsh <($out/bin/tilt completion zsh) 33 ''; 34 35 preBuild = '' 36 mkdir -p pkg/assets/build 37 cp -r ${tilt-assets}/* pkg/assets/build/ 38 ''; 39 40 meta = { 41 description = "Local development tool to manage your developer instance when your team deploys to Kubernetes in production"; 42 mainProgram = "tilt"; 43 homepage = "https://tilt.dev/"; 44 license = lib.licenses.asl20; 45 maintainers = with lib.maintainers; [ anton-dessiatov ]; 46 }; 47}