mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 12:23:02 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, telegram-desktop
|
|
, nix-update-script
|
|
}:
|
|
|
|
telegram-desktop.overrideAttrs (old: rec {
|
|
pname = "64gram";
|
|
version = "1.1.39";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "TDesktop-x64";
|
|
repo = "tdesktop";
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
|
hash = "sha256-+slLW177PhNvMb4ARY3X95eKVZiZTxJIPuSurTiGTls=";
|
|
};
|
|
|
|
patches = (old.patches or []) ++ [
|
|
(fetchpatch {
|
|
url = "https://github.com/TDesktop-x64/tdesktop/commit/c996ccc1561aed089c8b596f6ab3844335bbf1df.patch";
|
|
revert = true;
|
|
hash = "sha256-Hz7BXl5z4owe31l9Je3QOXT8FAyKcbsXsKjGfCmXhzE=";
|
|
})
|
|
];
|
|
|
|
cmakeFlags = (old.cmakeFlags or []) ++ [
|
|
(lib.cmakeBool "disable_autoupdate" true)
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script {};
|
|
|
|
meta = with lib; {
|
|
description = "Unofficial Telegram Desktop providing Windows 64bit build and extra features";
|
|
license = licenses.gpl3Only;
|
|
platforms = platforms.all;
|
|
homepage = "https://github.com/TDesktop-x64/tdesktop";
|
|
changelog = "https://github.com/TDesktop-x64/tdesktop/releases/tag/v${version}";
|
|
maintainers = with maintainers; [ clot27 ];
|
|
mainProgram = "telegram-desktop";
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
})
|