mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +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
|
let
|
||||||
pinData = lib.importJSON ./pin.json;
|
pinData = import ./pin.nix;
|
||||||
|
inherit (pinData.hashes) desktopSrcHash desktopYarnHash;
|
||||||
executableName = "element-desktop";
|
executableName = "element-desktop";
|
||||||
keytar = callPackage ./keytar { inherit Security AppKit; };
|
keytar = callPackage ./keytar { inherit Security AppKit; };
|
||||||
seshat = callPackage ./seshat { inherit CoreServices; };
|
seshat = callPackage ./seshat { inherit CoreServices; };
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
|
||||||
pname = "element-desktop";
|
pname = "element-desktop";
|
||||||
inherit (pinData) version;
|
name = "${finalAttrs.pname}-${finalAttrs.version}";
|
||||||
name = "${pname}-${version}";
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "vector-im";
|
owner = "vector-im";
|
||||||
repo = "element-desktop";
|
repo = "element-desktop";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
sha256 = pinData.desktopSrcHash;
|
sha256 = desktopSrcHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
offlineCache = fetchYarnDeps {
|
offlineCache = fetchYarnDeps {
|
||||||
yarnLock = src + "/yarn.lock";
|
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||||
sha256 = pinData.desktopYarnHash;
|
sha256 = desktopYarnHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ yarn fixup_yarn_lock nodejs makeWrapper ]
|
nativeBuildInputs = [ yarn fixup_yarn_lock nodejs makeWrapper ]
|
||||||
@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
# desktop item
|
# desktop item
|
||||||
mkdir -p "$out/share"
|
mkdir -p "$out/share"
|
||||||
ln -s "${desktopItem}/share/applications" "$out/share/applications"
|
ln -s "${finalAttrs.desktopItem}/share/applications" "$out/share/applications"
|
||||||
|
|
||||||
# executable wrapper
|
# executable wrapper
|
||||||
# LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102
|
# LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102
|
||||||
@ -117,7 +117,7 @@ stdenv.mkDerivation rec {
|
|||||||
icon = "element";
|
icon = "element";
|
||||||
desktopName = "Element";
|
desktopName = "Element";
|
||||||
genericName = "Matrix Client";
|
genericName = "Matrix Client";
|
||||||
comment = meta.description;
|
comment = finalAttrs.meta.description;
|
||||||
categories = [ "Network" "InstantMessaging" "Chat" ];
|
categories = [ "Network" "InstantMessaging" "Chat" ];
|
||||||
startupWMClass = "element";
|
startupWMClass = "element";
|
||||||
mimeTypes = [ "x-scheme-handler/element" ];
|
mimeTypes = [ "x-scheme-handler/element" ];
|
||||||
@ -141,9 +141,9 @@ stdenv.mkDerivation rec {
|
|||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A feature-rich client for Matrix.org";
|
description = "A feature-rich client for Matrix.org";
|
||||||
homepage = "https://element.io/";
|
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;
|
license = licenses.asl20;
|
||||||
maintainers = teams.matrix.members;
|
maintainers = teams.matrix.members;
|
||||||
inherit (electron.meta) platforms;
|
inherit (electron.meta) platforms;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
@ -12,25 +12,25 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pinData = lib.importJSON ./pin.json;
|
pinData = import ./pin.nix;
|
||||||
|
inherit (pinData.hashes) webSrcHash webYarnHash;
|
||||||
noPhoningHome = {
|
noPhoningHome = {
|
||||||
disable_guests = true; # disable automatic guest account registration at matrix.org
|
disable_guests = true; # disable automatic guest account registration at matrix.org
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
|
||||||
pname = "element-web";
|
pname = "element-web";
|
||||||
inherit (pinData) version;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "vector-im";
|
owner = "vector-im";
|
||||||
repo = pname;
|
repo = finalAttrs.pname;
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
sha256 = pinData.webSrcHash;
|
sha256 = webSrcHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
offlineCache = fetchYarnDeps {
|
offlineCache = fetchYarnDeps {
|
||||||
yarnLock = src + "/yarn.lock";
|
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||||
sha256 = pinData.webYarnHash;
|
sha256 = webYarnHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ yarn fixup_yarn_lock jq nodejs ];
|
nativeBuildInputs = [ yarn fixup_yarn_lock jq nodejs ];
|
||||||
@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
export VERSION=${version}
|
export VERSION=${finalAttrs.version}
|
||||||
yarn build:res --offline
|
yarn build:res --offline
|
||||||
yarn build:module_system --offline
|
yarn build:module_system --offline
|
||||||
yarn build:bundle --offline
|
yarn build:bundle --offline
|
||||||
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cp -R webapp $out
|
cp -R webapp $out
|
||||||
cp ${jitsi-meet}/libs/external_api.min.js $out/jitsi_external_api.min.js
|
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"
|
jq -s '.[0] * $conf' "config.sample.json" --argjson "conf" '${builtins.toJSON noPhoningHome}' > "$out/config.json"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
@ -79,9 +79,9 @@ stdenv.mkDerivation rec {
|
|||||||
meta = {
|
meta = {
|
||||||
description = "A glossy Matrix collaboration client for the web";
|
description = "A glossy Matrix collaboration client for the web";
|
||||||
homepage = "https://element.io/";
|
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;
|
maintainers = lib.teams.matrix.members;
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
platforms = lib.platforms.all;
|
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)
|
desktop_yarn_hash=$(prefetch-yarn-deps yarn.lock)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
cat > pin.json << EOF
|
cat > pin.nix << EOF
|
||||||
{
|
{
|
||||||
"version": "$version",
|
"version" = "$version";
|
||||||
"desktopSrcHash": "$desktop_src_hash",
|
"hashes" = {
|
||||||
"desktopYarnHash": "$desktop_yarn_hash",
|
"desktopSrcHash" = "$desktop_src_hash";
|
||||||
"webSrcHash": "$web_src_hash",
|
"desktopYarnHash" = "$desktop_yarn_hash";
|
||||||
"webYarnHash": "$web_yarn_hash"
|
"webSrcHash" = "$web_src_hash";
|
||||||
|
"webYarnHash" = "$web_yarn_hash";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user