at 22.05-pre 47 lines 1.2 kB view raw
1{ lib 2, fetchFromGitHub 3, rustPlatform 4, installShellFiles 5}: 6 7rustPlatform.buildRustPackage rec { 8 pname = "lsd"; 9 version = "0.20.1"; 10 11 src = fetchFromGitHub { 12 owner = "Peltoche"; 13 repo = pname; 14 rev = version; 15 sha256 = "sha256-r/Rllu+tgKqz+vkxA8BSN+3V0lUUd6dEATfickQp4+s="; 16 }; 17 18 cargoSha256 = "sha256-O8P29eYlHgmmAADZ/DgTBmj0ZOa+4u/Oee+TMF+/4Ro="; 19 20 nativeBuildInputs = [ installShellFiles ]; 21 postInstall = '' 22 installShellCompletion $releaseDir/build/lsd-*/out/{_lsd,lsd.{bash,fish}} 23 ''; 24 25 # Found argument '--test-threads' which wasn't expected, or isn't valid in this context 26 doCheck = false; 27 28 doInstallCheck = true; 29 installCheckPhase = '' 30 runHook preInstallCheck 31 32 testFile=$(mktemp /tmp/lsd-test.XXXX) 33 echo 'abc' > $testFile 34 $out/bin/lsd --classic --blocks "size,name" -l $testFile | grep "4 B $testFile" 35 $out/bin/lsd --version | grep "${version}" 36 rm $testFile 37 38 runHook postInstallCheck 39 ''; 40 41 meta = with lib; { 42 homepage = "https://github.com/Peltoche/lsd"; 43 description = "The next gen ls command"; 44 license = licenses.asl20; 45 maintainers = with maintainers; [ Br1ght0ne marsam zowoq SuperSandro2000 ]; 46 }; 47}