2019-05-22 16:04:45 +00:00
|
|
|
{ stdenv, fetchurl, unzip }:
|
2019-03-21 16:56:22 +00:00
|
|
|
|
2019-05-07 06:43:53 +00:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2019-05-07 13:51:28 +00:00
|
|
|
let
|
|
|
|
package = stdenv.mkDerivation rec {
|
|
|
|
name = "StatusIm-Windows-base-image";
|
2019-05-15 10:49:01 +00:00
|
|
|
version = "20190515";
|
2019-05-07 13:51:28 +00:00
|
|
|
|
|
|
|
src =
|
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
|
|
|
fetchurl {
|
|
|
|
url = "https://desktop-app-files.ams3.digitaloceanspaces.com/${name}_${version}.zip";
|
2019-05-15 10:49:01 +00:00
|
|
|
sha256 = "0wkq0khllms2hnbznb1j8l8yfw6z7phzrdg4ndyik20jkl0faj8f";
|
2019-05-07 13:51:28 +00:00
|
|
|
}
|
|
|
|
else throw "${name} is not supported on ${stdenv.hostPlatform.system}";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
unpackPhase = ''
|
|
|
|
mkdir -p $out/src
|
|
|
|
unzip $src -d $out/src
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
echo $out
|
|
|
|
ls $out -al
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2019-05-22 16:04:45 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-05-07 13:51:28 +00:00
|
|
|
description = "A base image for Windows Status Desktop release distributions";
|
|
|
|
homepage = https://desktop-app-files.ams3.digitaloceanspaces.com/;
|
2019-05-22 16:04:45 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.pombeirp ];
|
|
|
|
platforms = platforms.linux;
|
2019-05-07 13:51:28 +00:00
|
|
|
};
|
|
|
|
};
|
2019-03-21 16:56:22 +00:00
|
|
|
|
2019-05-07 13:51:28 +00:00
|
|
|
in package // {
|
|
|
|
shellHook = ''
|
|
|
|
export STATUSREACT_WINDOWS_BASEIMAGE_PATH="${package}/src"
|
2019-03-21 16:56:22 +00:00
|
|
|
'';
|
2019-05-15 10:49:01 +00:00
|
|
|
}
|