Charles Hall
3336d3f812
factor out nix code into new files via `makeScope`
...
This makes the Nix code a lot easier to reason about.
4 months ago
Charles Hall
c9ee4a920e
always go through inputs
...
This way we don't have to modify the destructuring of outputs' argument when adding or removing inputs.
4 months ago
Matthias Ahouansou
5760d98192
chore: upgrade rocksdb in flake
4 months ago
Charles Hall
61cb186b5b
update rocksdb
4 months ago
Charles Hall
8c6ffb6bfc
unpin crane because the bug was fixed
...
Flake lock file updates:
• Updated input 'crane':
'github:ipetkov/crane/2c653e4478476a52c6aa3ac0495e4dea7449ea0e?narHash=sha256-XoXRS%2B5whotelr1rHiZle5t5hDg9kpguS5yk8c8qzOc%3D' (2024-02-11)
→ 'github:ipetkov/crane/55f4939ac59ff8f89c6a4029730a2d49ea09105f?narHash=sha256-Vz1KRVTzU3ClBfyhOj8gOehZk21q58T1YsXC30V23PU%3D' (2024-04-21)
4 months ago
Charles Hall
7f63948db9
Merge branch 'version-extra' into 'next'
...
allow including extra info in `--version` output
See merge request famedly/conduit!601
4 months ago
Charles Hall
68a33862b3
add mdbook to the devshell
5 months ago
Charles Hall
6800e5fd18
build book in ci, deploy it to gitlab pages
5 months ago
Charles Hall
4f8d3953b3
add nix output for the book
5 months ago
Charles Hall
ac22b1bed1
allow including extra info in `--version` output
5 months ago
Charles Hall
10f3f9da49
switch/update rocksdb crate
...
This fork was created because the original seems de-facto unmaintained.
5 months ago
Charles Hall
d5a9c6ac32
use nix-built binary to produce debian package
...
Currently just for `x86_64-unknown-linux-musl`. Theoretically, we can
use this same mechanism for `aarch64-unknown-linux-musl`. Practically,
I'm not sure just this will even work.
6 months ago
Charles Hall
e70f33741c
update flake.lock
...
Also switch names to match the newer upstream nixpkgs code.
Flake lock file updates:
• Updated input 'attic':
'github:zhaofengli/attic/fbe252a5c21febbe920c025560cbd63b20e24f3b' (2024-01-18)
→ 'github:zhaofengli/attic/6eabc3f02fae3683bffab483e614bebfcd476b21' (2024-02-14)
• Updated input 'fenix':
'github:nix-community/fenix/e132ea0eb0c799a2109a91688e499d7bf4962801' (2024-01-18)
→ 'github:nix-community/fenix/c8943ea9e98d41325ff57d4ec14736d330b321b2' (2024-03-05)
• Updated input 'fenix/rust-analyzer-src':
'github:rust-lang/rust-analyzer/9d9b34354d2f13e33568c9c55b226dd014a146a0' (2024-01-17)
→ 'github:rust-lang/rust-analyzer/9f14343f9ee24f53f17492c5f9b653427e2ad15e' (2024-03-04)
• Updated input 'flake-utils':
'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15)
→ 'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/842d9d80cfd4560648c785f8a4e6f3b096790e19' (2024-01-17)
→ 'github:NixOS/nixpkgs/b8697e57f10292a6165a20f03d2f42920dfaf973' (2024-03-03)
6 months ago
Charles Hall
161ad8f9a4
update to latest crane before a regression
...
Once these issues are fixed, or at least just the one against crane, we
can go back to `ref=master`.
Flake lock file updates:
• Updated input 'crane':
'github:ipetkov/crane/c798790eabec3e3da48190ae3698ac227aab770c' (2024-01-28)
→ 'github:ipetkov/crane/2c653e4478476a52c6aa3ac0495e4dea7449ea0e' (2024-02-11)
6 months ago
Raito Bezarius
3a63f9dfb6
feat: support non-flake users
...
This uses flakes-compat to read the `flake.nix` and expose it
to non-flake users.
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
7 months ago
Charles Hall
a43bde69fa
pass pkgsCrossStatic to mkOciImage, not pkgsHost
...
This fixes a bug where the aarch64 OCI image had metadata saying it was
an x86_64 OCI image. On top of that, I think the metadata was actually
right (aside from Conduit's binary): since all other packages were being
pulled from `pkgsHost`, an OCI image cross compiled for aarch64 from a
different architecture would result in unexecutable binaries (e.g. tini)
since they were compiled for the completely wrong architecture.
7 months ago
Charles Hall
c167f7a6ad
switch crane input back to upstream
...
Thanks to the crane maintainer to fixing my issue in a way that doesn't
suck, unlike my attempt in the fork we were briefly using.
7 months ago
Charles Hall
cf8f1f2546
make a bunch of changes so complement works again
...
Well, kinda. It crashed on me after 10 minutes because the tests timed
out like in <https://github.com/matrix-org/complement/issues/394 >.
Sounds like this means it's a them problem though.
I want to use Nix to build this image instead in the future but this
will at least make it work for now and give me a reference for while I'm
porting it. I also want to make Conduit natively understand Complement's
requirements instead of `sed`ing a bunch of stuff and needing a reverse
proxy in the container. Should be more reliable that way.
I'm not making this run in CI until the above stuff is addressed and
until I can decide on a way to pin the revision of Complement being
tested against.
7 months ago
Charles Hall
dffd771e7c
add ca certificates to the OCI image
...
Without this, checking the authority of TLS certificates fails, making
Conduit (rightly) refuse to connect to anything.
7 months ago
Charles Hall
0df5d18fd6
change docker tag back to `next`
...
I misunderstood what the general meaning of the `latest` tag was.
7 months ago
Charles Hall
a7892a28ec
refer directly to stdenv since it's in scope
7 months ago
Charles Hall
9453dbc740
update rust toolchain
...
It comes with a bunch of new lints (yay!) so I fixed them all so CI will
keep working.
Also apparently something about linking changed because I had to change
the checks for deciding the linker flags for static x86_64 builds to
keep working.
7 months ago
Charles Hall
7c1a3e41d9
add package to build an aarch64 oci image
...
And build it as an artifact in CI.
7 months ago
Charles Hall
2a04a361e0
break oci image builder into a function
...
Now it can be reused for different `pkgs` and `package`s.
7 months ago
Charles Hall
0e8e4f1083
add static cross to aarch64-unknown-linux-musl
7 months ago
Charles Hall
81ae579b25
add static cross to x86_64-unknown-linux-musl
7 months ago
Charles Hall
3a3cafe912
preempt cross problems by using my crane fork
...
I imagine this will get fixed/merged upstream in the near future.
7 months ago
Charles Hall
d29591d47d
group packages in attrset literal
...
This will make generating packages for cross possible.
7 months ago
Charles Hall
67d280dd2e
factor package expression into a function
...
We'll need to call it repeatedly to make packages for cross.
7 months ago
Charles Hall
52954f7a11
use fromToolchainFile
...
I *think* this will make it easier to pull in extra rustc targets.
7 months ago
Charles Hall
692a31620d
make let bindings take pkgs as an argument
...
Again, will make cross compilation easier to set up.
7 months ago
Charles Hall
cf4015b830
rename pkgs to pkgsHost
...
This will make organizing cross compilation easier.
7 months ago
Charles Hall
9cef03127b
remove `with` for `nativeBuildInputs`
...
It's going to get more involved and that `with` was too specific.
7 months ago
Charles Hall
249fc7769d
don't bother with mold
...
For now, at least. I suspect it will make cross compilation more
difficult.
7 months ago
Charles Hall
bdc46f6392
add script to build and push to binary cache
...
This is even useful for local development, as you can pre-populate the
binary cache before running CI (assuming you have the token). Also, it
being in a script makes it easier to test.
We've added attic as a flake input even though the flake itself doesn't
use it so that we can use `--inputs-from .` in Nix commands to reference
a locked version of attic. This helps with reproducibility and caching,
and to makes it easy to update attic because it's part of the normal
flake lifecycle.
7 months ago
Charles Hall
4de54db305
redo docker image and build it in ci
7 months ago
Charles Hall
02781e4f9b
use nix-filter to filter sources
...
This prevents nix from rebuilding conduit when files that don't actually
effect the build are changed.
7 months ago
Charles Hall
f8bdfd82b0
update flake.lock
...
Flake lock file updates:
• Updated input 'crane':
'github:ipetkov/crane/8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e' (2023-07-07)
→ 'github:ipetkov/crane/742170d82cd65c925dcddc5c3d6185699fbbad08' (2024-01-18)
• Removed input 'crane/flake-compat'
• Removed input 'crane/flake-utils'
• Removed input 'crane/rust-overlay'
• Removed input 'crane/rust-overlay/flake-utils'
• Removed input 'crane/rust-overlay/nixpkgs'
• Updated input 'fenix':
'github:nix-community/fenix/39096fe3f379036ff4a5fa198950b8e79defe939' (2023-07-16)
→ 'github:nix-community/fenix/e132ea0eb0c799a2109a91688e499d7bf4962801' (2024-01-18)
• Updated input 'fenix/rust-analyzer-src':
'github:rust-lang/rust-analyzer/996e054f1eb1dbfc8455ecabff0f6ff22ba7f7c8' (2023-07-15)
→ 'github:rust-lang/rust-analyzer/9d9b34354d2f13e33568c9c55b226dd014a146a0' (2024-01-17)
• Updated input 'flake-utils':
'github:numtide/flake-utils/919d646de7be200f3bf08cb76ae1f09402b6f9b4' (2023-07-11)
→ 'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/8acef304efe70152463a6399f73e636bcc363813' (2023-07-15)
→ 'github:NixOS/nixpkgs/842d9d80cfd4560648c785f8a4e6f3b096790e19' (2024-01-17)
7 months ago
Charles Hall
6f052fff98
improve nix flake
...
Also fix the comment in `Cargo.toml` about the rust-version stuff.
7 months ago
Charles Hall
e8ac881b2f
add an engage file
...
See <https://charles.page.computer.surgery/engage/ > for info.
7 months ago
Charles Hall
742331e054
Revert "only use musl on x86_64"
...
This reverts commit 56f0f3dfa4
.
This shouldn't be needed anymore since [this][0] reached nixos-unstable.
[0]: https://github.com/NixOS/nixpkgs/pull/242889
1 year ago
Charles Hall
abd8e1bf54
nixpkgs' rocksdb is now new enough :)
...
This reverts commit abd0a014e8
.
1 year ago
Charles Hall
56f0f3dfa4
only use musl on x86_64
...
Since that's all I've tested it on. Apparently this caused issues on
aarch64 even though it allegedly shouldn't.
1 year ago
Charles Hall
abd0a014e8
nixpkgs' rocksdb is too old :(
1 year ago
Charles Hall
4a7d3c7301
upgrade rust in Cargo.toml/flake.nix
...
Looks like this should've happened as part of !479 .
1 year ago
Charles Hall
15e60818c9
pin nixos-unstable, update flake.lock
...
`nixos-unstable` is the rolling release channel of NixOS. The default is
the master branch, which doesn't always have a populated binary cache
and so may result in compiling a bunch of stuff unnecessarily.
1 year ago
Charles Hall
eb4323cc0f
use mold on linux
1 year ago
Charles Hall
a6712627e4
tiny refactor
1 year ago
Charles Hall
3be32c4dac
factor out shared things
1 year ago
Charles Hall
55149e3336
use crane instead of naersk
...
I guess naersk still doesn't support git dependencies using workspace
inheritance, but crane does.
1 year ago