openasar: remove unzip hotfix
This commit is contained in:
parent
5bb06a6970
commit
aacc2f67f8
@ -1,15 +1,5 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, nodejs, bash, nodePackages, unzip }:
|
{ lib, stdenv, fetchFromGitHub, nodejs, bash, nodePackages, unzip }:
|
||||||
|
|
||||||
let
|
|
||||||
# OpenAsar fails with default unzip, throwing "lchmod (file attributes) error: Operation not supported"
|
|
||||||
unzipFix =
|
|
||||||
if stdenv.isLinux then
|
|
||||||
unzip.overrideAttrs (oldAttrs: {
|
|
||||||
buildFlags = oldAttrs.buildFlags ++ [ "LOCAL_UNZIP=-DNO_LCHMOD" ];
|
|
||||||
})
|
|
||||||
else
|
|
||||||
unzip;
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "openasar";
|
pname = "openasar";
|
||||||
version = "unstable-2022-06-27";
|
version = "unstable-2022-06-27";
|
||||||
@ -24,7 +14,7 @@ stdenv.mkDerivation rec {
|
|||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Hardcode unzip path
|
# Hardcode unzip path
|
||||||
substituteInPlace ./src/updater/moduleUpdater.js \
|
substituteInPlace ./src/updater/moduleUpdater.js \
|
||||||
--replace \'unzip\' \'${unzipFix}/bin/unzip\'
|
--replace \'unzip\' \'${unzip}/bin/unzip\'
|
||||||
# Remove auto-update feature
|
# Remove auto-update feature
|
||||||
echo "module.exports = async () => log('AsarUpdate', 'Removed');" > ./src/asarUpdate.js
|
echo "module.exports = async () => log('AsarUpdate', 'Removed');" > ./src/asarUpdate.js
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user