mud: init at 1.0.1 (#350895)

This commit is contained in:
Gaétan Lepage 2024-10-29 14:40:26 +01:00 committed by GitHub
commit 68681138e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "mud";
version = "1.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "jasursadikov";
repo = "mud";
rev = "refs/tags/v${version}";
hash = "sha256-pW4B4+RN7hKtG2enJ33OHBeGsLj8w20ylvjcOL6owAk=";
};
build-system = with python3Packages; [
hatchling
];
dependencies = with python3Packages; [
prettytable
];
pythonImportsCheck = [ "mud" ];
# Version checking fails on darwin with:
# PermissionError: [Errno 1] Operation not permitted: '/var/empty/.mudsettings'
# despite adding `export HOME=$(mktemp -d)` in the `preVersionCheck` phase.
# The tool
nativeCheckInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
meta = {
description = "multi-directory git runner which allows you to run git commands in a multiple repositories";
homepage = "https://github.com/jasursadikov/mud";
license = lib.licenses.mit;
changelog = "https://github.com/jasursadikov/mud/releases/tag/v${version}";
maintainers = with lib.maintainers; [ genga898 ];
mainProgram = "mud";
};
}