From c69f479b008b4d04032c8bf49b3aceb62a779164 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 24 Feb 2025 13:31:15 +0200 Subject: [PATCH] texpresso.tectonic: nixfmt --- .../typesetting/tex/texpresso/tectonic.nix | 73 ++++++++++--------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/pkgs/tools/typesetting/tex/texpresso/tectonic.nix b/pkgs/tools/typesetting/tex/texpresso/tectonic.nix index 2beebaf35263..6b9719245327 100644 --- a/pkgs/tools/typesetting/tex/texpresso/tectonic.nix +++ b/pkgs/tools/typesetting/tex/texpresso/tectonic.nix @@ -1,34 +1,41 @@ -{ tectonic-unwrapped, fetchFromGitHub, rustPlatform }: -tectonic-unwrapped.overrideAttrs (finalAttrs: prevAttrs: { - pname = "texpresso-tonic"; - src = fetchFromGitHub { - owner = "let-def"; - repo = "tectonic"; - rev = "b38cb3b2529bba947d520ac29fbb7873409bd270"; - hash = "sha256-ap7fEPHsASAphIQkjcvk1CC7egTdxaUh7IpSS5os4W8="; - fetchSubmodules = true; - }; - useFetchCargoVendor = true; - cargoHash = "sha256-mqhbIv5r/5EDRDfP2BymXv9se2NCKxzRGqNqwqbD9A0="; - # rebuild cargoDeps by hand because `.overrideAttrs cargoHash` - # does not reconstruct cargoDeps (a known limitation): - cargoDeps = rustPlatform.fetchCargoVendor { - inherit (finalAttrs) src; - name = "${finalAttrs.pname}-${finalAttrs.version}"; - hash = finalAttrs.cargoHash; - patches = finalAttrs.cargoPatches; - }; - # binary has a different name, bundled tests won't work - doCheck = false; - postInstall = '' - ${prevAttrs.postInstall or ""} +{ + tectonic-unwrapped, + fetchFromGitHub, + rustPlatform, +}: - # Remove the broken `nextonic` symlink - # It points to `tectonic`, which doesn't exist because the exe is - # renamed to texpresso-tonic - rm $out/bin/nextonic - ''; - meta = prevAttrs.meta // { - mainProgram = "texpresso-tonic"; - }; -}) +tectonic-unwrapped.overrideAttrs ( + finalAttrs: prevAttrs: { + pname = "texpresso-tonic"; + src = fetchFromGitHub { + owner = "let-def"; + repo = "tectonic"; + rev = "b38cb3b2529bba947d520ac29fbb7873409bd270"; + hash = "sha256-ap7fEPHsASAphIQkjcvk1CC7egTdxaUh7IpSS5os4W8="; + fetchSubmodules = true; + }; + useFetchCargoVendor = true; + cargoHash = "sha256-mqhbIv5r/5EDRDfP2BymXv9se2NCKxzRGqNqwqbD9A0="; + # rebuild cargoDeps by hand because `.overrideAttrs cargoHash` + # does not reconstruct cargoDeps (a known limitation): + cargoDeps = rustPlatform.fetchCargoVendor { + inherit (finalAttrs) src; + name = "${finalAttrs.pname}-${finalAttrs.version}"; + hash = finalAttrs.cargoHash; + patches = finalAttrs.cargoPatches; + }; + # binary has a different name, bundled tests won't work + doCheck = false; + postInstall = '' + ${prevAttrs.postInstall or ""} + + # Remove the broken `nextonic` symlink + # It points to `tectonic`, which doesn't exist because the exe is + # renamed to texpresso-tonic + rm $out/bin/nextonic + ''; + meta = prevAttrs.meta // { + mainProgram = "texpresso-tonic"; + }; + } +)