From 212823586cedd0d5d9fea03941785f37a01a6cfe Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 22 Mar 2023 21:36:28 +0100 Subject: get rid of crane & naersk the only thing this makes more complicated is typst; most of the other benefits I don't use in any case. --- pkgs/typst.nix | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'pkgs/typst.nix') diff --git a/pkgs/typst.nix b/pkgs/typst.nix index 0290899..597a81a 100644 --- a/pkgs/typst.nix +++ b/pkgs/typst.nix @@ -1,10 +1,22 @@ -{ craneLib, fetchFromGitHub, lib, git }: +{ rustPlatform, fetchFromGitHub, lib, git, rust-bin, ... }: -craneLib.buildPackage rec { +rustPlatform.buildRustPackage rec { pname = "typst-cli"; version = "22-03-21-2"; - cargoExtraArgs = "-p typst-cli"; + cargoBuildFlags = "-p typst-cli"; + cargoLock = { + lockFile = "${src}/Cargo.lock"; + outputHashes = { + "biblatex-0.6.3" = "sha256-TfH2tk7B61HHqpdGY48TdPKelp4+78x+8LRFobAg8QA="; + "comemo-0.1.0" = "sha256-zg056kUc8sVLQ8vvT4uOuRJnyrCORsGYUvsjBJEkFPg="; + "hayagriva-0.1.1" = "sha256-HGQ+jNAnejxUBQNaqXPw57zfAC3qNXSWUVzDALZTXg0="; + "iai-0.1.1" = "sha256-EdNzCPht5chg7uF9O8CtPWR/bzSYyfYIXNdLltqdlR0="; + "lipsum-0.8.2" = "sha256-deIbpn4YM7/NeuJ5Co48ivJmxwrcsbLl6c3cP3JZxAQ="; + "pixglyph-0.1.0" = "sha256-8veNF3rzV21ayzk9gh2x0mQA8nHGM662ohvh084a0vk="; + "unicode-math-class-0.1.0" = "sha256-NkwDzj1SfUe570UcfotmVP6bIEYwiegZd0j8TPEWoOk="; + }; + }; src = fetchFromGitHub { owner = "typst"; repo = "typst"; @@ -14,5 +26,8 @@ craneLib.buildPackage rec { }; # the build.rs script wants a version hash from git. - buildInputs = [ git ]; + nativeBuildInputs = [ + git + rust-bin.stable.latest.minimal + ]; } -- cgit v1.2.3