nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 69 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 installShellFiles, 7 versionCheckHook, 8}: 9 10buildGoModule (finalAttrs: { 11 pname = "gdu"; 12 version = "5.31.0"; 13 14 src = fetchFromGitHub { 15 owner = "dundee"; 16 repo = "gdu"; 17 tag = "v${finalAttrs.version}"; 18 hash = "sha256-MAkD4Mh7aXWc8Y4TkXH7NSDgPQugB7Gjhr4nfOr/X1U="; 19 }; 20 21 vendorHash = "sha256-aKhHC3sPRyi/l9BxeUgx+3TdYulb0cI9WxuPvbLoswg="; 22 23 nativeBuildInputs = [ 24 installShellFiles 25 versionCheckHook 26 ]; 27 28 ldflags = [ 29 "-s" 30 "-w" 31 "-X=github.com/dundee/gdu/v${lib.versions.major finalAttrs.version}/build.Version=${finalAttrs.version}" 32 ]; 33 34 postPatch = '' 35 substituteInPlace cmd/gdu/app/app_test.go \ 36 --replace-fail "development" "${finalAttrs.version}" 37 ''; 38 39 postInstall = '' 40 installManPage gdu.1 41 ''; 42 43 doCheck = !stdenv.hostPlatform.isDarwin; 44 45 checkFlags = [ 46 # https://github.com/dundee/gdu/issues/371 47 "-skip=TestStoredAnalyzer" 48 "-skip=TestAnalyzePathWithIgnoring" 49 ]; 50 51 doInstallCheck = true; 52 53 meta = { 54 description = "Disk usage analyzer with console interface"; 55 longDescription = '' 56 Gdu is intended primarily for SSD disks where it can fully 57 utilize parallel processing. However HDDs work as well, but 58 the performance gain is not so huge. 59 ''; 60 homepage = "https://github.com/dundee/gdu"; 61 changelog = "https://github.com/dundee/gdu/releases/tag/${finalAttrs.src.tag}"; 62 license = with lib.licenses; [ mit ]; 63 maintainers = with lib.maintainers; [ 64 fab 65 zowoq 66 ]; 67 mainProgram = "gdu"; 68 }; 69})