From 082e33ccdea0d3e6ec8a3a748d1ce55015e2cb6c Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 22 Jun 2023 13:01:50 -0700 Subject: [PATCH] pyenv: init at 2.3.21 --- pkgs/development/tools/pyenv/default.nix | 54 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/tools/pyenv/default.nix diff --git a/pkgs/development/tools/pyenv/default.nix b/pkgs/development/tools/pyenv/default.nix new file mode 100644 index 000000000000..beeb266f70d2 --- /dev/null +++ b/pkgs/development/tools/pyenv/default.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromGitHub +, installShellFiles +}: + +stdenv.mkDerivation rec { + pname = "pyenv"; + version = "2.3.21"; + + src = fetchFromGitHub { + owner = "pyenv"; + repo = "pyenv"; + rev = "refs/tags/v${version}"; + hash = "sha256-+rMkbrRSQBHX9qdifIpdLmQ8Uk39ott0xyJTD/mb+9w="; + }; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ce8a07758aff..54a6253cbb41 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5893,6 +5893,8 @@ with pkgs; psrecord = python3Packages.callPackage ../tools/misc/psrecord { }; + pyenv = callPackage ../development/tools/pyenv { }; + r53-ddns = callPackage ../applications/networking/r53-ddns { }; rare = python3Packages.callPackage ../games/rare { };