···11+{ lib
22+, buildGoModule
33+, src, version
44+, tilt-assets
55+}:
66+77+buildGoModule rec {
88+ pname = "tilt";
99+ /* Do not use "dev" as a version. If you do, Tilt will consider itself
1010+ running in development environment and try to serve assets from the
1111+ source tree, which is not there once build completes. */
1212+ inherit src version;
1313+1414+ vendorHash = null;
1515+1616+ subPackages = [ "cmd/tilt" ];
1717+1818+ ldflags = [ "-X main.version=${version}" ];
1919+2020+ preBuild = ''
2121+ mkdir -p pkg/assets/build
2222+ cp -r ${tilt-assets}/* pkg/assets/build/
2323+ '';
2424+2525+ meta = {
2626+ description = "Local development tool to manage your developer instance when your team deploys to Kubernetes in production";
2727+ homepage = "https://tilt.dev/";
2828+ license = lib.licenses.asl20;
2929+ maintainers = with lib.maintainers; [ anton-dessiatov ];
3030+ };
3131+}
···11-{ lib
22-, buildGoModule
33-, fetchFromGitHub
11+{ fetchFromGitHub
22+, callPackage
43}:
55-66-buildGoModule rec {
77- pname = "tilt";
88- /* Do not use "dev" as a version. If you do, Tilt will consider itself
99- running in development environment and try to serve assets from the
1010- source tree, which is not there once build completes. */
1111- version = "0.33.6";
1212-1313- src = fetchFromGitHub {
1414- owner = "tilt-dev";
1515- repo = "tilt";
1616- rev = "v${version}";
1717- hash = "sha256-WtE8ExUKFRtdYeg0+My/DB+L/qT+J1EaKHKChNjC5oI=";
1818- };
1919-2020- vendorHash = null;
44+let args = rec {
55+ /* Do not use "dev" as a version. If you do, Tilt will consider itself
66+ running in development environment and try to serve assets from the
77+ source tree, which is not there once build completes. */
88+ version = "0.33.6";
2192222- subPackages = [ "cmd/tilt" ];
1010+ src = fetchFromGitHub {
1111+ owner = "tilt-dev";
1212+ repo = "tilt";
1313+ rev = "v${version}";
1414+ hash = "sha256-WtE8ExUKFRtdYeg0+My/DB+L/qT+J1EaKHKChNjC5oI=";
1515+ };
1616+ };
23172424- ldflags = [ "-X main.version=${version}" ];
1818+ tilt-assets = callPackage ./assets.nix args;
1919+in callPackage ./binary.nix (args // { inherit tilt-assets; })
25202626- meta = {
2727- description = "Local development tool to manage your developer instance when your team deploys to Kubernetes in production";
2828- homepage = "https://tilt.dev/";
2929- license = lib.licenses.asl20;
3030- maintainers = with lib.maintainers; [ anton-dessiatov ];
3131- };
3232-}