nixpkgs/pkgs/applications/networking/instant-messengers/rambox/sencha/bare.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2017-11-02 08:49:28 -07:00
{ stdenv, fetchurl, gzip, which, unzip, jdk }:
let
version = "6.6.0.13";
2017-11-02 08:49:28 -07:00
srcs = {
i686-linux = fetchurl {
url = "https://cdn.sencha.com/cmd/${version}/no-jre/SenchaCmd-${version}-linux-i386.sh.zip";
sha256 = "15b197108b49mf0afpihkh3p68lxm7580zz2w0xsbahglnvhwyfz";
2017-11-02 08:49:28 -07:00
};
x86_64-linux = fetchurl {
url = "https://cdn.sencha.com/cmd/${version}/no-jre/SenchaCmd-${version}-linux-amd64.sh.zip";
sha256 = "1cxhckmx1802p9qiw09cgb1v5f30wcvnrwkshmia8p8n0q47lpp4";
2017-11-02 08:49:28 -07:00
};
};
in
2019-08-13 14:52:01 -07:00
stdenv.mkDerivation {
2017-11-02 08:49:28 -07:00
inherit version;
pname = "sencha-bare";
src = srcs.${stdenv.hostPlatform.system};
2017-11-02 08:49:28 -07:00
nativeBuildInputs = [ gzip which unzip ];
buildInputs = [ jdk ];
sourceRoot = ".";
configurePhase = ''
substituteAll ${./response.varfile} response.varfile
'';
installPhase = ''
./SenchaCmd*.sh -q -dir $out -varfile response.varfile
2017-11-08 11:57:23 -08:00
# disallow sencha writing into /nix/store/repo
echo "repo.local.dir=$TMP/repo" >> $out/sencha.cfg
2017-11-02 08:49:28 -07:00
rm $out/shell-wrapper.sh $out/Uninstaller
'';
meta = with stdenv.lib; {
license = licenses.unfree;
platforms = attrNames srcs;
};
}