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