about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2018-09-17 22:23:44 +0200
committerBob van der Linden <bobvanderlinden@gmail.com>2018-09-17 22:23:44 +0200
commit6ab1ee495150d73b95bdcde3034d5145285f5174 (patch)
tree187b5032647a34932ca5d888db5ee0142987b317 /pkgs
parent9f768ff43cece413e922f93cf861a28eaa969c41 (diff)
downloadnixlib-6ab1ee495150d73b95bdcde3034d5145285f5174.tar
nixlib-6ab1ee495150d73b95bdcde3034d5145285f5174.tar.gz
nixlib-6ab1ee495150d73b95bdcde3034d5145285f5174.tar.bz2
nixlib-6ab1ee495150d73b95bdcde3034d5145285f5174.tar.lz
nixlib-6ab1ee495150d73b95bdcde3034d5145285f5174.tar.xz
nixlib-6ab1ee495150d73b95bdcde3034d5145285f5174.tar.zst
nixlib-6ab1ee495150d73b95bdcde3034d5145285f5174.zip
heroku: 5.6.32 -> 7.16.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/heroku/default.nix79
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 22 insertions, 61 deletions
diff --git a/pkgs/development/tools/heroku/default.nix b/pkgs/development/tools/heroku/default.nix
index 9c5cbb1aa285..ab4864829050 100644
--- a/pkgs/development/tools/heroku/default.nix
+++ b/pkgs/development/tools/heroku/default.nix
@@ -1,70 +1,29 @@
-{ stdenv, lib, fetchurl, makeWrapper, buildGoPackage, fetchFromGitHub
-, nodejs-6_x, postgresql, ruby }:
+{ stdenv, lib, fetchurl, makeWrapper, nodejs }:
 
-with stdenv.lib;
-
-let
-  cli = buildGoPackage rec {
-    name = "cli-${version}";
-    version = "5.6.32";
-
-    goPackagePath = "github.com/heroku/cli";
-
-    src = fetchFromGitHub {
-      owner  = "heroku";
-      repo   = "cli";
-      rev    = "v${version}";
-      sha256 = "062aa79mv2njjb0ix7isbz6646wxmsldv27bsz5v2pbv597km0vz";
-    };
-
-    buildFlagsArray = ''
-      -ldflags=
-        -X=main.Version=${version}
-        -X=main.Channel=stable
-        -X=main.Autoupdate=no
-    '';
-
-    preCheck = ''
-      export HOME=/tmp
-    '';
-
-    doCheck = true;
-  };
-
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   name = "heroku-${version}";
-  version = "3.43.16";
+  version = "7.16.0";
 
-  meta = {
-    homepage = https://toolbelt.heroku.com;
-    description = "Everything you need to get started using Heroku";
-    maintainers = with maintainers; [ aflatter mirdhyn peterhoeg ];
-    license = licenses.mit;
-    platforms = with platforms; unix;
-    broken = true; # Outdated function, not supported upstream. https://github.com/NixOS/nixpkgs/issues/27447
+  src = fetchurl {
+    url = "https://cli-assets.heroku.com/heroku-v${version}/heroku-v${version}.tar.xz";
+    sha256 = "434573b4773ce7ccbb21b43b19529475d941fa7dd219b01b75968b42e6b62abe";
   };
 
-  binPath = lib.makeBinPath [ postgresql ruby ];
-
   buildInputs = [ makeWrapper ];
 
-  doUnpack = false;
-
-  src = fetchurl {
-    url = "https://s3.amazonaws.com/assets.heroku.com/heroku-client/heroku-client-${version}.tgz";
-    sha256 = "08pai3cjaj7wshhyjcmkvyr1qxv5ab980whcm406798ng8f91hn7";
-  };
-
   installPhase = ''
-    mkdir -p $out
-
-    tar xzf $src -C $out --strip-components=1
-    install -Dm755 ${cli}/bin/cli $out/share/heroku/cli/bin/heroku
-
-    wrapProgram $out/bin/heroku \
-      --set HEROKU_NODE_PATH ${nodejs-6_x}/bin/node \
-      --set XDG_DATA_HOME    $out/share \
-      --set XDG_DATA_DIRS    $out/share \
-      --prefix PATH : ${binPath}
+    mkdir -p $out/share/heroku $out/bin
+    cp -pr * $out/share/heroku
+    substituteInPlace $out/share/heroku/bin/run \
+      --replace "/usr/bin/env node" "${nodejs}/bin/node"
+    makeWrapper $out/share/heroku/bin/run $out/bin/heroku
   '';
+
+  meta = {
+    homepage = https://toolbelt.heroku.com;
+    description = "Everything you need to get started using Heroku";
+    maintainers = with lib.maintainers; [ aflatter mirdhyn peterhoeg ];
+    license = lib.licenses.mit;
+    platforms = with lib.platforms; unix;
+  };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7acf0e4df12f..af6e8538e8b0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8386,7 +8386,9 @@ with pkgs;
     inherit (perlPackages) LocaleGettext;
   };
 
-  heroku = callPackage ../development/tools/heroku { };
+  heroku = callPackage ../development/tools/heroku {
+    nodejs = nodejs-10_x;
+  };
 
   htmlunit-driver = callPackage ../development/tools/selenium/htmlunit-driver { };