the-way: pull source from github to be able to run unit tests (#405637)

This commit is contained in:
Arne Keller
2025-05-12 11:07:14 +02:00
committed by GitHub
+10 -5
View File
@@ -1,7 +1,8 @@
{
lib,
stdenv,
rustPlatform,
fetchCrate,
fetchFromGitHub,
installShellFiles,
}:
@@ -9,9 +10,11 @@ rustPlatform.buildRustPackage rec {
pname = "the-way";
version = "0.20.3";
src = fetchCrate {
inherit pname version;
hash = "sha256-/vG5LkQiA8iPP+UV1opLeJwbYfmzqYwpsoMizpGT98o=";
src = fetchFromGitHub {
owner = "out-of-cheese-error";
repo = "the-way";
tag = "v${version}";
hash = "sha256-zsfk5APxbnssMKud9xGc70N+57LSc+vk6sSb2XzFUyA=";
};
useFetchCargoVendor = true;
@@ -19,9 +22,10 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ installShellFiles ];
doCheck = !stdenv.hostPlatform.isDarwin;
useNextest = true;
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
$out/bin/the-way config default tmp.toml
for shell in bash fish zsh; do
THE_WAY_CONFIG=tmp.toml $out/bin/the-way complete $shell > the-way.$shell
@@ -35,6 +39,7 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/out-of-cheese-error/the-way";
changelog = "https://github.com/out-of-cheese-error/the-way/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
platforms = lib.platforms.unix;
maintainers = with maintainers; [
figsoda
numkem