nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 installShellFiles,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "rbenv";
10 version = "1.3.2";
11
12 nativeBuildInputs = [ installShellFiles ];
13
14 src = fetchFromGitHub {
15 owner = "rbenv";
16 repo = "rbenv";
17 rev = "v${finalAttrs.version}";
18 sha256 = "sha256-vkwYl+cV5laDfevAHfju5G+STA3Y+wcMBtW1NWzJ4po=";
19 };
20
21 postPatch = ''
22 patchShebangs src/configure
23 pushd src
24 '';
25
26 installPhase = ''
27 popd
28 mkdir -p $out/bin
29 mv libexec $out
30 ln -s $out/libexec/rbenv $out/bin/rbenv
31
32 installShellCompletion --zsh completions/_rbenv
33 installShellCompletion --bash completions/rbenv.bash
34 '';
35
36 meta = {
37 description = "Version manager tool for the Ruby programming language on Unix-like systems";
38 longDescription = ''
39 Use rbenv to pick a Ruby version for your application and guarantee that your development environment matches production.
40 Put rbenv to work with Bundler for painless Ruby upgrades and bulletproof deployments.
41 '';
42 homepage = "https://github.com/rbenv/rbenv";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [ fzakaria ];
45 mainProgram = "rbenv";
46 platforms = lib.platforms.all;
47 };
48})