11 Oct 2023 |
cguida | I'm gonna try flakebox myself https://github.com/rustshop/flakebox/blob/master/docs/building-new-project.md | 19:20:13 |
realeinherjar | Hummm this might be a good replacement for crane... | 19:21:27 |
realeinherjar | The features are amazing | 19:22:07 |
cguida | it uses crane | 19:22:13 |
realeinherjar | Yes, and it might be easier less repetitive than crane? | 19:22:36 |
realeinherjar | Oh man... I am getting the same error with flakebox :
… while checking flake output 'packages'
at /nix/store/p58d2j0ac7zvja5jl14xzbc19fakjxh2-source/lib.nix:39:17:
38| {
39| ${key} = (attrs.${key} or { })
| ^
40| // { ${system} = ret.${key}; };
… while checking the derivation 'packages.aarch64-darwin.default'
at /nix/store/2gi1wlrjl6n629fc5sbiz5lgl12pclxx-source/flake.nix:77:9:
76| # Expose external output packages
77| packages.default = multiBuild.package;
| ^
78|
(stack trace truncated; use '--show-trace' to show the full trace)
error: unable to find Cargo.lock at /nix/store/ys1hmv2sxbd3a8a68l35k9qgx3nlj25q-source. please ensure one of the following:
- a Cargo.lock exists at the root of the source directory of the derivation
- set `cargoVendorDir = vendorCargoDeps { cargoLock = ./some/path/to/Cargo.lock; }`
- set `cargoVendorDir = vendorCargoDeps { src = ./src/containing/cargo/lock/file; }`
- set `cargoVendorDir = null` to skip vendoring altogether | 19:51:50 |
| manmeet | 20:01:02 |
| manmeet | 20:03:17 |
manmeet | cc realeinherjar | 20:03:18 |
manmeet | Nix only sees git ls-files | 20:03:19 |
manmeet | * Nix only sees git ls-files | 20:03:20 |
realeinherjar | It is unchanged (st is status alias):
I ~/g/b/bdk einherjar/nix• 1.6s | 1 ❱ git st
On branch einherjar/nix
Your branch is up to date with 'origin/einherjar/nix'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: flake.lock
modified: flake.nix
no changes added to commit (use "git add" and/or "git commit -a") | 20:03:21 |
realeinherjar | And I am adding everything with git add . before a nix flake check | 20:03:32 |
manmeet | I think you can't specify crates in workspace separately, you have to pass repo root and use --package in args | 20:05:24 |
dpc#0812 | realeinherjar I'd be happy to help. Please send me some pointer at commits I could try out locally. Looks like some simple papercut. | 20:14:19 |
dpc#0812 | Also, I made a Matrix channel for Flakebox, so if you're fine with Matrix we could chat there. https://app.element.io/#/room/#flakebox:matrix.org | 20:14:51 |
realeinherjar | Man! I feel stupid!
I ~/g/b/bdk einherjar/nix• ❱ cat .gitignore
/target
Cargo.lock
/.vscode
*.swp
.idea
# Example persisted files.
*.db
manmeet (maan2003) you were right... | 20:14:52 |
realeinherjar | I will see why the f* bdk has a Cargo.lock in the .gitignore ... | 20:15:35 |
realeinherjar | But would be not possible to have a crane thing going on without the Cargo.lock right? | 20:16:10 |
realeinherjar | Will join 🙂 | 20:16:28 |
dpc#0812 | Well, for a library Cargo.lock is ignored. But I don't think there's any real reason not use it for local dev and commit it anyway. | 20:16:50 |
dpc#0812 | I mean - it's ignored by the crates using it when they build. | 20:17:24 |
realeinherjar | Yes but the flake would run in CI and be used by all the devs locally | 20:17:31 |
dpc#0812 | But even if you're working on your library you want stuff to work as it was tested for everyone. | 20:17:50 |
realeinherjar | Now we are back on track | 20:19:47 |
realeinherjar | Thank you all. I will keep working on this. | 20:20:02 |
manmeet | Cargo.lock is added by .gitignore for lib by default 🤔 | 20:20:06 |
realeinherjar | Oh I see, they changed this recently no? | 20:20:20 |
realeinherjar | But BDK was generated a long time ago | 20:20:28 |
manmeet | even on 1.72 /Cargo.lock is in .gitignore with cargo new /tmp/x --lib | 20:21:57 |