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

44 lines
1.1 KiB
Nix
Raw Normal View History

2017-11-02 15:49:28 +00:00
{ stdenv, fetchurl, gzip, which, unzip, jdk }:
let
2018-06-25 19:29:25 +00:00
version = "6.5.3.6";
2017-11-02 15:49:28 +00:00
srcs = {
i686-linux = fetchurl {
url = "https://cdn.sencha.com/cmd/${version}/no-jre/SenchaCmd-${version}-linux-i386.sh.zip";
2018-06-10 02:40:31 +00:00
sha256 = "0g3hk3fdgmkdsr6ck1fgsmaxa9wbj2fpk84rk382ff9ny55bbzv9";
2017-11-02 15:49:28 +00:00
};
x86_64-linux = fetchurl {
url = "https://cdn.sencha.com/cmd/${version}/no-jre/SenchaCmd-${version}-linux-amd64.sh.zip";
2018-06-10 02:40:31 +00:00
sha256 = "08j8gak1xsxdjgkv6s24jv97jc49pi5yf906ynjmxb27wqpxn9mz";
2017-11-02 15:49:28 +00:00
};
};
in
stdenv.mkDerivation rec {
inherit version;
name = "sencha-bare-${version}";
src = srcs.${stdenv.system};
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 19:57:23 +00:00
# disallow sencha writing into /nix/store/repo
echo "repo.local.dir=$TMP/repo" >> $out/sencha.cfg
2017-11-02 15:49:28 +00:00
rm $out/shell-wrapper.sh $out/Uninstaller
'';
meta = with stdenv.lib; {
license = licenses.unfree;
platforms = attrNames srcs;
};
}