2022-03-11 18:18:30 +01:00
|
|
|
{ stdenv, lib, bundlerEnv, bundlerUpdateScript, makeWrapper, ruby }:
|
|
|
|
|
|
|
|
let
|
|
|
|
rubyEnv = bundlerEnv {
|
|
|
|
name = "shopify-cli";
|
|
|
|
gemdir = ./.;
|
2022-11-25 00:36:39 +01:00
|
|
|
ruby = ruby;
|
2022-03-11 18:18:30 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "shopify-cli";
|
|
|
|
version = (import ./gemset.nix).shopify-cli.version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${rubyEnv}/bin/shopify $out/bin/shopify
|
|
|
|
wrapProgram $out/bin/shopify \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ ruby ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = bundlerUpdateScript "shopify-cli";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI which helps you build against the Shopify platform faster";
|
|
|
|
homepage = "https://github.com/Shopify/shopify-cli";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
2022-05-05 02:46:39 +02:00
|
|
|
mainProgram = "shopify";
|
|
|
|
platforms = ruby.meta.platforms;
|
2022-03-11 18:18:30 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|