···1313 if cfg.forcei686 then pkgs.pkgsi686Linux else pkgs;
14141515 realGrub = if cfg.zfsSupport then grubPkgs.grub2.override { zfsSupport = true; }
1616- else if cfg.trustedBoot.enable
1717- then if cfg.trustedBoot.isHPLaptop
1818- then grubPkgs.trustedGrub-for-HP
1919- else grubPkgs.trustedGrub
2020- else grubPkgs.grub2;
1616+ else grubPkgs.grub2;
21172218 grub =
2319 # Don't include GRUB if we're only generating a GRUB menu (e.g.,
···674670 '';
675671 };
676672677677- trustedBoot = {
678678-679679- enable = mkOption {
680680- default = false;
681681- type = types.bool;
682682- description = lib.mdDoc ''
683683- Enable trusted boot. GRUB will measure all critical components during
684684- the boot process to offer TCG (TPM) support.
685685- '';
686686- };
687687-688688- systemHasTPM = mkOption {
689689- default = "";
690690- example = "YES_TPM_is_activated";
691691- type = types.str;
692692- description = lib.mdDoc ''
693693- Assertion that the target system has an activated TPM. It is a safety
694694- check before allowing the activation of 'trustedBoot.enable'. TrustedBoot
695695- WILL FAIL TO BOOT YOUR SYSTEM if no TPM is available.
696696- '';
697697- };
698698-699699- isHPLaptop = mkOption {
700700- default = false;
701701- type = types.bool;
702702- description = lib.mdDoc ''
703703- Use a special version of TrustedGRUB that is needed by some HP laptops
704704- and works only for the HP laptops.
705705- '';
706706- };
707707-708708- };
709709-710673 };
711674712675 };
···783746 message = "You cannot have duplicated devices in mirroredBoots";
784747 }
785748 {
786786- assertion = !cfg.efiSupport || !cfg.trustedBoot.enable;
787787- message = "Trusted GRUB does not have EFI support";
788788- }
789789- {
790790- assertion = !cfg.zfsSupport || !cfg.trustedBoot.enable;
791791- message = "Trusted GRUB does not have ZFS support";
792792- }
793793- {
794794- assertion = !cfg.trustedBoot.enable || cfg.trustedBoot.systemHasTPM == "YES_TPM_is_activated";
795795- message = "Trusted GRUB can break the system! Confirm that the system has an activated TPM by setting 'systemHasTPM'.";
796796- }
797797- {
798749 assertion = cfg.efiInstallAsRemovable -> cfg.efiSupport;
799750 message = "If you wish to to use boot.loader.grub.efiInstallAsRemovable, then turn on boot.loader.grub.efiSupport";
800751 }
···841792 (mkRenamedOptionModule [ "boot" "grubDevice" ] [ "boot" "loader" "grub" "device" ])
842793 (mkRenamedOptionModule [ "boot" "bootMount" ] [ "boot" "loader" "grub" "bootDevice" ])
843794 (mkRenamedOptionModule [ "boot" "grubSplashImage" ] [ "boot" "loader" "grub" "splashImage" ])
795795+ (mkRemovedOptionModule [ "boot" "loader" "grub" "trustedBoot" ] ''
796796+ Support for Trusted GRUB has been removed, because the project
797797+ has been retired upstream.
798798+ '')
844799 (mkRemovedOptionModule [ "boot" "loader" "grub" "extraInitrd" ] ''
845800 This option has been replaced with the bootloader agnostic
846801 boot.initrd.secrets option. To migrate to the initrd secrets system,
···11-{ lib
22-, stdenv
33-, fetchurl
44-, fetchFromGitHub
55-, fetchpatch
66-, autogen
77-, flex
88-, bison
99-, python2
1010-, autoconf
1111-, automake
1212-, gettext
1313-, ncurses
1414-, libusb-compat-0_1
1515-, freetype
1616-, qemu
1717-, lvm2
1818-, for_HP_laptop ? false
1919-}:
2020-2121-let
2222- pcSystems = {
2323- i686-linux.target = "i386";
2424- x86_64-linux.target = "i386";
2525- };
2626-2727- inPCSystems = lib.any (system: stdenv.hostPlatform.system == system) (lib.mapAttrsToList (name: _: name) pcSystems);
2828-2929- version = if for_HP_laptop then "1.2.1" else "1.2.0";
3030-3131- unifont_bdf = fetchurl {
3232- url = "http://unifoundry.com/unifont-5.1.20080820.bdf.gz";
3333- sha256 = "0s0qfff6n6282q28nwwblp5x295zd6n71kl43xj40vgvdqxv0fxx";
3434- };
3535-3636- po_src = fetchurl {
3737- name = "grub-2.02-beta2.tar.gz";
3838- url = "https://alpha.gnu.org/gnu/grub/grub-2.02~beta2.tar.gz";
3939- sha256 = "1lr9h3xcx0wwrnkxdnkfjwy08j7g7mdlmmbdip2db4zfgi69h0rm";
4040-4141- };
4242-4343-in
4444-4545-stdenv.mkDerivation rec {
4646- pname = "trustedGRUB2";
4747- inherit version;
4848-4949- src = fetchFromGitHub {
5050- owner = "Sirrix-AG";
5151- repo = "TrustedGRUB2";
5252- rev = version;
5353- sha256 =
5454- if for_HP_laptop
5555- then "sha256-H1JzT/RgnbHqnW2/FmvXFuI6gnHI2vQU3W1iq2FqwJw="
5656- else "sha256-k8DGHjTIpnjWw7GNN2kyR8rRl2MAq1xkfOndd0znLns=";
5757- };
5858-5959- nativeBuildInputs = [ autogen flex bison python2 autoconf automake ];
6060- buildInputs = [ ncurses libusb-compat-0_1 freetype gettext lvm2 ]
6161- ++ lib.optional doCheck qemu;
6262-6363- hardeningDisable = [ "stackprotector" "pic" ];
6464-6565- env.NIX_CFLAGS_COMPILE = "-Wno-error"; # generated code redefines yyfree
6666-6767- preConfigure =
6868- '' for i in "tests/util/"*.in
6969- do
7070- sed -i "$i" -e's|/bin/bash|${stdenv.shell}|g'
7171- done
7272-7373- # Apparently, the QEMU executable is no longer called
7474- # `qemu-system-i386', even on i386.
7575- #
7676- # In addition, use `-nodefaults' to avoid errors like:
7777- #
7878- # chardev: opening backend "stdio" failed
7979- # qemu: could not open serial device 'stdio': Invalid argument
8080- #
8181- # See <http://www.mail-archive.com/qemu-devel@nongnu.org/msg22775.html>.
8282- sed -i "tests/util/grub-shell.in" \
8383- -e's/qemu-system-i386/qemu-system-x86_64 -nodefaults/g'
8484- '';
8585-8686- prePatch =
8787- '' tar zxf ${po_src} grub-2.02~beta2/po
8888- rm -rf po
8989- mv grub-2.02~beta2/po po
9090- sh autogen.sh
9191- gunzip < "${unifont_bdf}" > "unifont.bdf"
9292- sed -i "configure" \
9393- -e "s|/usr/src/unifont.bdf|$PWD/unifont.bdf|g"
9494- '';
9595-9696- patches = [
9797- ./fix-bash-completion.patch
9898- (fetchpatch {
9999- # glibc-2.26 and above needs '<sys/sysmacros.h>'
100100- url = "https://github.com/Rohde-Schwarz/TrustedGRUB2/commit/7a5b301e3adb8e054288518a325135a1883c1c6c.patch";
101101- sha256 = "1jfrrmcrd9a8w7n419kszxgbpshx7888wc05smg5q4jvc1ag3xm7";
102102- })
103103- ];
104104-105105- # save target that grub is compiled for
106106- grubTarget = lib.optionalString inPCSystems "${pcSystems.${stdenv.hostPlatform.system}.target}-pc";
107107-108108- doCheck = false;
109109- # On -j16 races with early header creation:
110110- # config.h:38:10: fatal error: ./config-util.h: No such file or directory
111111- enableParallelBuilding = false;
112112-113113- meta = with lib; {
114114- description = "GRUB 2.0 extended with TCG (TPM) support for integrity measured boot process (trusted boot)";
115115- homepage = "https://github.com/Sirrix-AG/TrustedGRUB2";
116116- license = licenses.gpl3Plus;
117117- platforms = platforms.gnu ++ platforms.linux;
118118- };
119119-}
+2
pkgs/top-level/aliases.nix
···16571657 trebleshot = throw "trebleshot has been removed. It was archived upstream, so it's considered abandoned";
16581658 trilium = throw "trilium has been removed. Please use trilium-desktop instead"; # Added 2020-04-29
16591659 truecrypt = throw "'truecrypt' has been renamed to/replaced by 'veracrypt'"; # Converted to throw 2022-02-22
16601660+ trustedGrub = throw "trustedGrub has been removed, because it is not maintained upstream anymore"; # Added 2023-05-10
16611661+ trustedGrub-for-HP = throw "trustedGrub-for-HP has been removed, because it is not maintained upstream anymore"; # Added 2023-05-10
16601662 tuijam = throw "tuijam has been removed because Google Play Music was discontinued"; # Added 2021-03-07
16611663 turbo-geth = throw "turbo-geth has been renamed to erigon"; # Added 2021-08-08
16621664 tvbrowser-bin = tvbrowser; # Added 2023-03-02