Skip to content

Commit aad62b2

Browse files
committed
Update chiptool and form
1 parent b64488a commit aad62b2

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

packages/chiptool.nix

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
lib,
33
fetchFromGitHub,
44
rustPlatform,
5+
writeText,
56
}:
67

78
let
89
forkOwner = "embassy-rs";
9-
rev = "23011236c00a0b97edb2230b9f990b6c1b48a508";
10+
rev = "6651cd0877390fdd3c76af037244e795bb867daa";
1011
in
1112
rustPlatform.buildRustPackage rec {
1213
pname = "chiptool";
@@ -16,9 +17,27 @@ rustPlatform.buildRustPackage rec {
1617
owner = forkOwner;
1718
repo = pname;
1819
rev = "${rev}";
19-
hash = "sha256-bfxeLOBx9ipcyEg8M7ay1yZlLApnYTLQGf0CFh0r9Pw=";
20+
hash = "sha256-l5a184UCqy/IeQ25hR43uWoSUg1cexLX2Dxd7mgOHKQ=";
2021
};
2122

23+
patches = [
24+
# Patch-in the revision, there is no .git directory in src that the build-script could use
25+
(writeText "chiptool-nix-generated-revision.patch" ''
26+
--- a/src/generate/mod.rs
27+
+++ b/src/generate/mod.rs
28+
@@ -136,7 +136,7 @@ pub fn render(ir: &IR, opts: &Options) -> Result<TokenStream> {
29+
root.items = TokenStream::new(); // Remove default contents
30+
31+
let commit_info = {
32+
- let tmp = include_str!(concat!(env!("OUT_DIR"), "/commit-info.txt"));
33+
+ let tmp = " (${rev} from github:kiteshield-ab/nix-utils#chiptool)";
34+
35+
if tmp.is_empty() {
36+
" (untracked)"
37+
38+
'')
39+
];
40+
2241
# Nix's Rust platform does not support git dependencies in lock files.
2342
# Replace `cargoHash`, copy the lockfile over and provide hashes for git dependencies.
2443
# https://github.com/NixOS/nixpkgs/blob/a84ebe20c6bc2ecbcfb000a50776219f48d134cc/doc/languages-frameworks/rust.section.md#importing-a-cargolock-file-importing-a-cargolock-file

packages/form.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
rustPlatform.buildRustPackage rec {
88
pname = "form";
9-
version = "0.12.1";
9+
version = "0.13.0";
1010

1111
useFetchCargoVendor = true;
1212
src = fetchCrate {
1313
inherit pname version;
14-
hash = "sha256-QwiYNmL5oncCw5oEygueyaaudBhydbtYhlpX+hA25zc=";
14+
hash = "sha256-7+5HEyP7480UM5dydavoiclX3YTvW46V8r+Vpqt4xWk=";
1515
};
16-
cargoHash = "sha256-DQSu4UhDF/Lxj12/vjZ6bCPyZpeceL9+5c/s9Gtou08=";
16+
cargoHash = "sha256-ItNBQKye1GD01KFBubMLxksv8OCWIxya/LlZ9g6Jdg8=";
1717

1818
meta = with lib; {
1919
description = "A small script to move inline modules into the proper directory structure";

0 commit comments

Comments
 (0)