lol

elvish: rewrite

+31 -17
+31 -17
pkgs/shells/elvish/default.nix
··· 1 - { lib, buildGoModule, fetchFromGitHub, runCommand }: 2 3 - buildGoModule rec { 4 pname = "elvish"; 5 version = "0.19.2"; 6 - 7 - subPackages = [ "cmd/elvish" ]; 8 - 9 - ldflags = [ "-s" "-w" "-X src.elv.sh/pkg/buildinfo.Version==${version}" ]; 10 11 src = fetchFromGitHub { 12 owner = "elves"; 13 - repo = pname; 14 rev = "v${version}"; 15 - sha256 = "sha256-eCPJXCgmMvrJ2yVqYgXHXJWb6Ec0sutc91LNs4yRBYk="; 16 }; 17 18 - vendorSha256 = "sha256-VMI20IP1jVkUK3rJm35szaFDfZGEEingUEL/xfVJ1cc="; 19 20 strictDeps = true; 21 - doCheck = false; 22 23 doInstallCheck = true; 24 installCheckPhase = '' 25 runHook preInstallCheck 26 27 - $out${passthru.shellPath} -c " 28 fn expect {|key expected| 29 var actual = \$buildinfo[\$key] 30 if (not-eq \$actual \$expected) { ··· 38 runHook postInstallCheck 39 ''; 40 41 - meta = with lib; { 42 description = "A friendly and expressive command shell"; 43 longDescription = '' 44 Elvish is a friendly interactive shell and an expressive programming 45 language. It runs on Linux, BSDs, macOS and Windows. Despite its pre-1.0 46 status, it is already suitable for most daily interactive use. 47 ''; 48 - homepage = "https://elv.sh/"; 49 - license = licenses.bsd2; 50 - maintainers = with maintainers; [ vrthra AndersonTorres ]; 51 }; 52 - 53 - passthru.shellPath = "/bin/elvish"; 54 }
··· 1 + { lib 2 + , buildGoModule 3 + , fetchFromGitHub 4 + , runCommand 5 + }: 6 7 + let 8 pname = "elvish"; 9 version = "0.19.2"; 10 + shellPath = "/bin/elvish"; 11 + in 12 + buildGoModule { 13 + inherit pname version; 14 15 src = fetchFromGitHub { 16 owner = "elves"; 17 + repo = "elvish"; 18 rev = "v${version}"; 19 + hash = "sha256-eCPJXCgmMvrJ2yVqYgXHXJWb6Ec0sutc91LNs4yRBYk="; 20 }; 21 22 + vendorHash = "sha256-VMI20IP1jVkUK3rJm35szaFDfZGEEingUEL/xfVJ1cc="; 23 + 24 + subPackages = [ "cmd/elvish" ]; 25 + 26 + ldflags = [ 27 + "-s" 28 + "-w" 29 + "-X src.elv.sh/pkg/buildinfo.Version==${version}" 30 + ]; 31 32 strictDeps = true; 33 34 + doCheck = false; 35 doInstallCheck = true; 36 installCheckPhase = '' 37 runHook preInstallCheck 38 39 + $out${shellPath} -c " 40 fn expect {|key expected| 41 var actual = \$buildinfo[\$key] 42 if (not-eq \$actual \$expected) { ··· 50 runHook postInstallCheck 51 ''; 52 53 + passthru = { 54 + inherit shellPath; 55 + }; 56 + 57 + meta = { 58 + homepage = "https://elv.sh/"; 59 description = "A friendly and expressive command shell"; 60 longDescription = '' 61 Elvish is a friendly interactive shell and an expressive programming 62 language. It runs on Linux, BSDs, macOS and Windows. Despite its pre-1.0 63 status, it is already suitable for most daily interactive use. 64 ''; 65 + license = lib.licenses.bsd2; 66 + maintainers = with lib.maintainers; [ vrthra AndersonTorres ]; 67 }; 68 }