Use a patch instead of branch for handlebars-rust

This commit is contained in:
Paul Brinkmeier 2025-03-19 21:11:08 +01:00
parent 046e80f4f7
commit 79104ac007
3 changed files with 1926 additions and 9 deletions

1914
add-cargo-lockfile.patch Normal file

File diff suppressed because it is too large Load Diff

11
flake.lock generated
View File

@ -3,16 +3,15 @@
"handlebars-rust-src": {
"flake": false,
"locked": {
"lastModified": 1739333321,
"narHash": "sha256-McP84Thhkp+MkMYYDSi21Kl+oTuQbl0WVNOp6/xZZmI=",
"owner": "pbrinkmeier-almato",
"lastModified": 1742083927,
"narHash": "sha256-sznEJH+YggDirDtp+DSCIn0pJyEjS1ombF3idL1T2qo=",
"owner": "sunng87",
"repo": "handlebars-rust",
"rev": "689af230cfae35ed38d1b2506125a680ffa7ca38",
"rev": "7d666fb7cf117a951f44abb2a5a40029bd627ef7",
"type": "github"
},
"original": {
"owner": "pbrinkmeier-almato",
"ref": "cargo-lock",
"owner": "sunng87",
"repo": "handlebars-rust",
"type": "github"
}

View File

@ -1,8 +1,7 @@
{
inputs = {
handlebars-rust-src = {
# TODO: Instead of a fork this could be integrated into this repo as a rather simple patch, reducing external depedencies.
url = "github:pbrinkmeier-almato/handlebars-rust/cargo-lock";
url = "github:sunng87/handlebars-rust";
flake = false;
};
naersk.url = "github:nix-community/naersk/master";
@ -18,7 +17,12 @@
in
rec {
packages = {
handlebars-rust = naersk-lib.buildPackage handlebars-rust-src;
# naersk doesnt work without a Cargo.lock => patch it in
handlebars-rust = naersk-lib.buildPackage (pkgs.applyPatches {
name = "patched-handlebars-rust-src";
src = handlebars-rust-src;
patches = [ ./add-cargo-lockfile.patch ];
});
squeezer = naersk-lib.buildPackage ./squeezer;
};
devShells = {