mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
packages: refactor cargo rust packages
This commit is contained in:
parent
318ca4fbc6
commit
b9639eb49c
4 changed files with 42 additions and 34 deletions
|
|
@ -3,8 +3,12 @@
|
|||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
name = "typst-mutilate";
|
||||
rustPlatform.buildRustPackage (finalAttrs: let
|
||||
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
||||
cargoLock = finalAttrs.src + "/Cargo.lock";
|
||||
in {
|
||||
pname = "typst-mutilate";
|
||||
version = cargoToml.package.version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "frozolotl";
|
||||
|
|
@ -13,7 +17,7 @@ rustPlatform.buildRustPackage {
|
|||
hash = "sha256-r4fkFv1np8xhff3m8yev1rU1vfKRz8zQMIKIc+fOjew=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-QEOXPf/k+fCMNQxKGsW3FDsgH5XXUKob0XOef3DiB0s=";
|
||||
cargoLock.lockFile = cargoLock;
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
|
|
@ -22,4 +26,4 @@ rustPlatform.buildRustPackage {
|
|||
hash = "sha256-+6DMQo4cjVASgkX4gcYrEkwQ/uxttV/61fDnXBqbNcg=";
|
||||
})
|
||||
];
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue