tensor: migrate to by-name, use finalAttrs (#506627)

This commit is contained in:
Peder Bergebakken Sundt
2026-04-04 20:03:41 +00:00
committed by GitHub
2 changed files with 11 additions and 16 deletions

View File

@@ -2,17 +2,14 @@
lib,
stdenv,
fetchFromGitHub,
qmake,
wrapQtAppsHook,
qtbase,
qtquickcontrols,
libsForQt5,
makeDesktopItem,
}:
# we now have libqmatrixclient so a future version of tensor that supports it
# should use that
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "tensor";
version = "unstable-2017-02-21";
@@ -25,22 +22,22 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [
qmake
wrapQtAppsHook
libsForQt5.qmake
libsForQt5.wrapQtAppsHook
];
buildInputs = [
qtbase
qtquickcontrols
libsForQt5.qtbase
libsForQt5.qtquickcontrols
];
desktopItem = makeDesktopItem {
name = "tensor";
exec = "@bin@";
icon = "tensor.png";
comment = meta.description;
comment = finalAttrs.meta.description;
desktopName = "Tensor Matrix Client";
genericName = meta.description;
genericName = finalAttrs.meta.description;
categories = [
"Chat"
"Utility"
@@ -65,7 +62,7 @@ stdenv.mkDerivation rec {
install -Dm755 tensor $out/bin/tensor
install -Dm644 client/logo.png \
$out/share/icons/hicolor/512x512/apps/tensor.png
install -Dm644 ${desktopItem}/share/applications/tensor.desktop \
install -Dm644 ${finalAttrs.desktopItem}/share/applications/tensor.desktop \
$out/share/applications/tensor.desktop
substituteInPlace $out/share/applications/tensor.desktop \
@@ -80,6 +77,6 @@ stdenv.mkDerivation rec {
mainProgram = "tensor";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ peterhoeg ];
inherit (qtbase.meta) platforms;
platforms = libsForQt5.qtbase.meta.platforms;
};
}
})

View File

@@ -1621,8 +1621,6 @@ with pkgs;
charles5
;
tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };
libtensorflow = python3.pkgs.tensorflow-build.libtensorflow;
libtorch-bin = callPackage ../development/libraries/science/math/libtorch/bin.nix { };