Skip to content

Commit e4f52f3

Browse files
the-way: pull source from github to be able to run unit tests (#405637)
2 parents e2458bf + 3a055bb commit e4f52f3

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

pkgs/by-name/th/the-way/package.nix

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
{
22
lib,
3+
stdenv,
34
rustPlatform,
4-
fetchCrate,
5+
fetchFromGitHub,
56
installShellFiles,
67
}:
78

89
rustPlatform.buildRustPackage rec {
910
pname = "the-way";
1011
version = "0.20.3";
1112

12-
src = fetchCrate {
13-
inherit pname version;
14-
hash = "sha256-/vG5LkQiA8iPP+UV1opLeJwbYfmzqYwpsoMizpGT98o=";
13+
src = fetchFromGitHub {
14+
owner = "out-of-cheese-error";
15+
repo = "the-way";
16+
tag = "v${version}";
17+
hash = "sha256-zsfk5APxbnssMKud9xGc70N+57LSc+vk6sSb2XzFUyA=";
1518
};
1619

1720
useFetchCargoVendor = true;
1821
cargoHash = "sha256-GBr0z2iJuk86xkgZd2sAz+ISTRfESDt99g6ssxXhzhI=";
1922

2023
nativeBuildInputs = [ installShellFiles ];
2124

25+
doCheck = !stdenv.hostPlatform.isDarwin;
2226
useNextest = true;
2327

24-
postInstall = ''
28+
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
2529
$out/bin/the-way config default tmp.toml
2630
for shell in bash fish zsh; do
2731
THE_WAY_CONFIG=tmp.toml $out/bin/the-way complete $shell > the-way.$shell
@@ -35,6 +39,7 @@ rustPlatform.buildRustPackage rec {
3539
homepage = "https://github.com/out-of-cheese-error/the-way";
3640
changelog = "https://github.com/out-of-cheese-error/the-way/blob/v${version}/CHANGELOG.md";
3741
license = with licenses; [ mit ];
42+
platforms = lib.platforms.unix;
3843
maintainers = with maintainers; [
3944
figsoda
4045
numkem

0 commit comments

Comments
 (0)