wehat-uos: link license to prevent being garbage collected
Co-authored-by: Bu Kun <65808665+pokon548@users.noreply.github.com>
This commit is contained in:
parent
d0a7011604
commit
bfd8b17879
|
@ -60,11 +60,7 @@
|
||||||
└── uos
|
└── uos
|
||||||
└── .license.key
|
└── .license.key
|
||||||
*/
|
*/
|
||||||
uosLicense ? requireFile {
|
uosLicense ? null
|
||||||
name = "license.tar.gz";
|
|
||||||
url = "https://www.uniontech.com";
|
|
||||||
sha256 = "53760079c1a5b58f2fa3d5effe1ed35239590b288841d812229ef4e55b2dbd69";
|
|
||||||
}
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
wechat-uos-env = stdenvNoCC.mkDerivation {
|
wechat-uos-env = stdenvNoCC.mkDerivation {
|
||||||
|
@ -87,6 +83,30 @@ let
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
uosLicenseUnzipped = stdenvNoCC.mkDerivation {
|
||||||
|
name = "uos-license-unzipped";
|
||||||
|
src =
|
||||||
|
if uosLicense == null then
|
||||||
|
requireFile
|
||||||
|
{
|
||||||
|
name = "license.tar.gz";
|
||||||
|
url = "https://www.uniontech.com";
|
||||||
|
sha256 = "53760079c1a5b58f2fa3d5effe1ed35239590b288841d812229ef4e55b2dbd69";
|
||||||
|
} else uosLicense;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r * $out/
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
outputHashAlgo = "sha256";
|
||||||
|
outputHashMode = "recursive";
|
||||||
|
outputHash = "sha256-pNftwtUZqBsKBSPQsEWlYLlb6h2Xd9j56ZRMi8I82ME=";
|
||||||
|
};
|
||||||
|
|
||||||
wechat-uos-runtime = with xorg; [
|
wechat-uos-runtime = with xorg; [
|
||||||
stdenv.cc.cc
|
stdenv.cc.cc
|
||||||
stdenv.cc.libc
|
stdenv.cc.libc
|
||||||
|
@ -195,11 +215,10 @@ let
|
||||||
dpkg -x $src ./wechat-uos
|
dpkg -x $src ./wechat-uos
|
||||||
dpkg -x $uosSrc ./wechat-uos-old-source
|
dpkg -x $uosSrc ./wechat-uos-old-source
|
||||||
|
|
||||||
tar -xvf $uosLicense
|
|
||||||
|
|
||||||
runHook postUnpack
|
runHook postUnpack
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Use ln for license to prevent being garbage collection
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
@ -207,7 +226,7 @@ let
|
||||||
cp -r wechat-uos/* $out
|
cp -r wechat-uos/* $out
|
||||||
|
|
||||||
mkdir -pv $out/usr/lib/wechat-uos/license
|
mkdir -pv $out/usr/lib/wechat-uos/license
|
||||||
cp -r license/* $out/usr/lib/wechat-uos/license
|
ln -s ${uosLicenseUnzipped}/* $out/usr/lib/wechat-uos/license/
|
||||||
cp -r wechat-uos-old-source/usr/lib/license/libuosdevicea.so $out/usr/lib/wechat-uos/license/
|
cp -r wechat-uos-old-source/usr/lib/license/libuosdevicea.so $out/usr/lib/wechat-uos/license/
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|
Loading…
Reference in New Issue
Block a user