Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 46 lines 1.2 kB view raw
1{ 2 fetchFromGitHub, 3 buildGoModule, 4 lib, 5 testers, 6 git, 7}: 8 9buildGoModule (finalAttrs: { 10 pname = "gitmux"; 11 version = "0.11.3"; 12 13 src = fetchFromGitHub { 14 owner = "arl"; 15 repo = "gitmux"; 16 rev = "v${finalAttrs.version}"; 17 sha256 = "sha256-Jw2yl95vCQ5JcRGvBeLlGuAagTHUf+IEF7XvzehcMvU="; 18 }; 19 20 vendorHash = "sha256-MvvJGB9KPMYeqYclmAAF6qlU7vrJFMPToogbGDRoCpU="; 21 22 nativeCheckInputs = [ git ]; 23 24 # After bump of Go toolchain to version >1.22, tests fail with: 25 # vendor/github.com/rogpeppe/go-internal/testscript/exe_go118.go:14:27: 26 # cannot use nopTestDeps{} (value of struct type nopTestDeps) as testing.testDeps value in argument to testing.MainStart: 27 # nopTestDeps does not implement testing.testDeps (missing method InitRuntimeCoverage)'. 28 doCheck = false; 29 30 ldflags = [ "-X main.version=${finalAttrs.version}" ]; 31 32 passthru.tests.version = testers.testVersion { 33 package = finalAttrs.finalPackage; 34 command = "gitmux -V"; 35 }; 36 37 subPackages = [ "." ]; 38 39 meta = with lib; { 40 description = "Git in your tmux status bar"; 41 homepage = "https://github.com/arl/gitmux"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ nialov ]; 44 mainProgram = "gitmux"; 45 }; 46})