2023-06-22 20:01:50 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pyenv";
|
2023-09-07 15:19:32 +00:00
|
|
|
version = "2.3.26";
|
2023-06-22 20:01:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyenv";
|
|
|
|
repo = "pyenv";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-09-07 15:19:32 +00:00
|
|
|
hash = "sha256-3pLH8/k+9T8lDBw/qd9WcYE4o3SwG/WXGWR0sLGUWLE=";
|
2023-06-22 20:01:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs --build src/configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
configureScript = "src/configure";
|
|
|
|
|
|
|
|
makeFlags = ["-C" "src"];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p "$out"
|
|
|
|
cp -R bin "$out/bin"
|
|
|
|
cp -R libexec "$out/libexec"
|
|
|
|
cp -R plugins "$out/plugins"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage man/man1/pyenv.1
|
|
|
|
installShellCompletion completions/pyenv.{bash,fish,zsh}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple Python version management";
|
|
|
|
homepage = "https://github.com/pyenv/pyenv";
|
|
|
|
changelog = "https://github.com/pyenv/pyenv/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ tjni ];
|
|
|
|
platforms = platforms.all;
|
2023-08-03 12:31:09 +00:00
|
|
|
mainProgram = "pyenv";
|
2023-06-22 20:01:50 +00:00
|
|
|
};
|
|
|
|
}
|