mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #219821 from Ma27/element-maintainer-pings
element-{web,desktop}: hack to make ofborg maintainer pings work again
This commit is contained in:
commit
214717621c
@ -19,25 +19,25 @@
|
||||
}:
|
||||
|
||||
let
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
pinData = import ./pin.nix;
|
||||
inherit (pinData.hashes) desktopSrcHash desktopYarnHash;
|
||||
executableName = "element-desktop";
|
||||
keytar = callPackage ./keytar { inherit Security AppKit; };
|
||||
seshat = callPackage ./seshat { inherit CoreServices; };
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
|
||||
pname = "element-desktop";
|
||||
inherit (pinData) version;
|
||||
name = "${pname}-${version}";
|
||||
name = "${finalAttrs.pname}-${finalAttrs.version}";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vector-im";
|
||||
repo = "element-desktop";
|
||||
rev = "v${version}";
|
||||
sha256 = pinData.desktopSrcHash;
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = desktopSrcHash;
|
||||
};
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = src + "/yarn.lock";
|
||||
sha256 = pinData.desktopYarnHash;
|
||||
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||
sha256 = desktopYarnHash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ yarn fixup_yarn_lock nodejs makeWrapper ]
|
||||
@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# desktop item
|
||||
mkdir -p "$out/share"
|
||||
ln -s "${desktopItem}/share/applications" "$out/share/applications"
|
||||
ln -s "${finalAttrs.desktopItem}/share/applications" "$out/share/applications"
|
||||
|
||||
# executable wrapper
|
||||
# LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102
|
||||
@ -117,7 +117,7 @@ stdenv.mkDerivation rec {
|
||||
icon = "element";
|
||||
desktopName = "Element";
|
||||
genericName = "Matrix Client";
|
||||
comment = meta.description;
|
||||
comment = finalAttrs.meta.description;
|
||||
categories = [ "Network" "InstantMessaging" "Chat" ];
|
||||
startupWMClass = "element";
|
||||
mimeTypes = [ "x-scheme-handler/element" ];
|
||||
@ -141,9 +141,9 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
description = "A feature-rich client for Matrix.org";
|
||||
homepage = "https://element.io/";
|
||||
changelog = "https://github.com/vector-im/element-desktop/blob/v${version}/CHANGELOG.md";
|
||||
changelog = "https://github.com/vector-im/element-desktop/blob/v${finalAttrs.version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.matrix.members;
|
||||
inherit (electron.meta) platforms;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -12,25 +12,25 @@
|
||||
}:
|
||||
|
||||
let
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
pinData = import ./pin.nix;
|
||||
inherit (pinData.hashes) webSrcHash webYarnHash;
|
||||
noPhoningHome = {
|
||||
disable_guests = true; # disable automatic guest account registration at matrix.org
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
|
||||
pname = "element-web";
|
||||
inherit (pinData) version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vector-im";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = pinData.webSrcHash;
|
||||
repo = finalAttrs.pname;
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = webSrcHash;
|
||||
};
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = src + "/yarn.lock";
|
||||
sha256 = pinData.webYarnHash;
|
||||
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||
sha256 = webYarnHash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ yarn fixup_yarn_lock jq nodejs ];
|
||||
@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export VERSION=${version}
|
||||
export VERSION=${finalAttrs.version}
|
||||
yarn build:res --offline
|
||||
yarn build:module_system --offline
|
||||
yarn build:bundle --offline
|
||||
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
cp -R webapp $out
|
||||
cp ${jitsi-meet}/libs/external_api.min.js $out/jitsi_external_api.min.js
|
||||
echo "${version}" > "$out/version"
|
||||
echo "${finalAttrs.version}" > "$out/version"
|
||||
jq -s '.[0] * $conf' "config.sample.json" --argjson "conf" '${builtins.toJSON noPhoningHome}' > "$out/config.json"
|
||||
|
||||
runHook postInstall
|
||||
@ -79,9 +79,9 @@ stdenv.mkDerivation rec {
|
||||
meta = {
|
||||
description = "A glossy Matrix collaboration client for the web";
|
||||
homepage = "https://element.io/";
|
||||
changelog = "https://github.com/vector-im/element-web/blob/v${version}/CHANGELOG.md";
|
||||
changelog = "https://github.com/vector-im/element-web/blob/v${finalAttrs.version}/CHANGELOG.md";
|
||||
maintainers = lib.teams.matrix.members;
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": "1.11.24",
|
||||
"desktopSrcHash": "eAcJwoifIg0yCcYyeueVOL6CeGVMwmHpbr58MOUpK9I=",
|
||||
"desktopYarnHash": "175ln40xp4djzc9wrx2vfg6did4rxy7nyxm6vs95pcbpv1i84g97",
|
||||
"webSrcHash": "45xyfflTGA9LQxKi2WghYdDN0+R4ntjIPONnm+CJ5Dk=",
|
||||
"webYarnHash": "1rwlx73chgq7x4zki9w4y3br8ypvk37vi6agqhk2dvq6y4znr93y"
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"version" = "1.11.24";
|
||||
"hashes" = {
|
||||
"desktopSrcHash" = "eAcJwoifIg0yCcYyeueVOL6CeGVMwmHpbr58MOUpK9I=";
|
||||
"desktopYarnHash" = "175ln40xp4djzc9wrx2vfg6did4rxy7nyxm6vs95pcbpv1i84g97";
|
||||
"webSrcHash" = "45xyfflTGA9LQxKi2WghYdDN0+R4ntjIPONnm+CJ5Dk=";
|
||||
"webYarnHash" = "1rwlx73chgq7x4zki9w4y3br8ypvk37vi6agqhk2dvq6y4znr93y";
|
||||
};
|
||||
}
|
@ -42,12 +42,14 @@ wget "$desktop_src/yarn.lock"
|
||||
desktop_yarn_hash=$(prefetch-yarn-deps yarn.lock)
|
||||
popd
|
||||
|
||||
cat > pin.json << EOF
|
||||
cat > pin.nix << EOF
|
||||
{
|
||||
"version": "$version",
|
||||
"desktopSrcHash": "$desktop_src_hash",
|
||||
"desktopYarnHash": "$desktop_yarn_hash",
|
||||
"webSrcHash": "$web_src_hash",
|
||||
"webYarnHash": "$web_yarn_hash"
|
||||
"version" = "$version";
|
||||
"hashes" = {
|
||||
"desktopSrcHash" = "$desktop_src_hash";
|
||||
"desktopYarnHash" = "$desktop_yarn_hash";
|
||||
"webSrcHash" = "$web_src_hash";
|
||||
"webYarnHash" = "$web_yarn_hash";
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user