diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-03-21 23:16:39 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-03-22 07:30:37 -0300 |
commit | 6477d7f0eae45ca9dffb04127616ec26b9ebaeb2 (patch) | |
tree | 88afe4d9fdfd54905e7a41496fc3e141246624a8 /pkgs/shells | |
parent | 4dc8a5c2dcb80cbdd00b4010d41a75dd26379e86 (diff) |
elvish: rewrite
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/elvish/default.nix | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/pkgs/shells/elvish/default.nix b/pkgs/shells/elvish/default.nix index 38ab7cb8dccee..1bd0c138c9c0d 100644 --- a/pkgs/shells/elvish/default.nix +++ b/pkgs/shells/elvish/default.nix @@ -1,30 +1,42 @@ -{ lib, buildGoModule, fetchFromGitHub, runCommand }: +{ lib +, buildGoModule +, fetchFromGitHub +, runCommand +}: -buildGoModule rec { +let pname = "elvish"; version = "0.19.2"; - - subPackages = [ "cmd/elvish" ]; - - ldflags = [ "-s" "-w" "-X src.elv.sh/pkg/buildinfo.Version==${version}" ]; + shellPath = "/bin/elvish"; +in +buildGoModule { + inherit pname version; src = fetchFromGitHub { owner = "elves"; - repo = pname; + repo = "elvish"; rev = "v${version}"; - sha256 = "sha256-eCPJXCgmMvrJ2yVqYgXHXJWb6Ec0sutc91LNs4yRBYk="; + hash = "sha256-eCPJXCgmMvrJ2yVqYgXHXJWb6Ec0sutc91LNs4yRBYk="; }; - vendorSha256 = "sha256-VMI20IP1jVkUK3rJm35szaFDfZGEEingUEL/xfVJ1cc="; + vendorHash = "sha256-VMI20IP1jVkUK3rJm35szaFDfZGEEingUEL/xfVJ1cc="; + + subPackages = [ "cmd/elvish" ]; + + ldflags = [ + "-s" + "-w" + "-X src.elv.sh/pkg/buildinfo.Version==${version}" + ]; strictDeps = true; - doCheck = false; + doCheck = false; doInstallCheck = true; installCheckPhase = '' runHook preInstallCheck - $out${passthru.shellPath} -c " + $out${shellPath} -c " fn expect {|key expected| var actual = \$buildinfo[\$key] if (not-eq \$actual \$expected) { @@ -38,17 +50,19 @@ buildGoModule rec { runHook postInstallCheck ''; - meta = with lib; { + passthru = { + inherit shellPath; + }; + + meta = { + homepage = "https://elv.sh/"; description = "A friendly and expressive command shell"; longDescription = '' Elvish is a friendly interactive shell and an expressive programming language. It runs on Linux, BSDs, macOS and Windows. Despite its pre-1.0 status, it is already suitable for most daily interactive use. ''; - homepage = "https://elv.sh/"; - license = licenses.bsd2; - maintainers = with maintainers; [ vrthra AndersonTorres ]; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ vrthra AndersonTorres ]; }; - - passthru.shellPath = "/bin/elvish"; } |