Commit graph

35 commits

Author SHA1 Message Date
Yusuf Bera Ertan
85a5df0391
build(nix): add a way to override what grammars get built (#3141) 2022-07-27 12:52:07 -05:00
Timothy DeHerrera
718c3baebe
nix: pass makeWrapperArgs to wrapProgram (#3003) 2022-07-09 11:17:44 -05:00
Timothy DeHerrera
fefa4d8c59
nix flake: make the binary cache "just work" (#2999) 2022-07-09 11:09:37 -05:00
Yusuf Bera Ertan
8c86cd56cb build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
Daniel Hines
9b9c3e5ae2
add rust-analyzer to shell environment (#2739) 2022-06-11 17:23:18 +09:00
Yusuf Bera Ertan
bb83ea8393
chore(nix): format nix files with alejandra, update deps, minor code refactors (#2683) 2022-06-06 14:24:52 -05:00
Johann Dahm
e529ca1b92
Fix build on aarch64-darwin (#1789)
Co-authored-by: Yusuf Bera Ertan <y.bera003.06@protonmail.com>
2022-05-03 17:32:44 -05:00
Michael Davis
e01c53551d flake: use builtins.fetchTree to shallow-clone grammar repos
Here we perform a shallow fetch using builtins.fetchTree. In order
to make this work, we need to specify the `ref' for any repository
that doesn't have `master' as its default branch (I'm not sure why
this limitation exists since we don't need this when performing
the shallow fetch in `--grammar build')

This `ref' field is ignored by helix, so I have left it undocumented
for now, but I could be open to documenting it.
2022-03-10 17:31:57 +09:00
Michael Davis
37520f46ae fetch and build grammars with nix in flake
This commit replaces the out-of-date builder in the flake which relied
on submodules for fetching and the compiler for building. Now we
disable fetching and building explicitly with the environment variable
and then use builtins.fetchGit and a derivation mostly derived from
upstream to compile the grammars.

Anecdotally, this is still quite slow as builtins.fetchGit does not
seem to do shallow clones. I'm not sure I see a way around it though
without recording sha256s, which seems cumbersome.
2022-03-10 17:31:57 +09:00
Michael Davis
b157c5a8a4 fetch and compile tree-sitter grammars in helix-term build
This restores much of the behavior that existed before this PR:
helix will build the grammars when compiling. The difference is that
now fetching is also done during the build phase and is done much
more quickly - both shallow and in parallel.
2022-03-10 17:31:57 +09:00
Michael Davis
f31e85aca4
use latest nix-cargo-integration which depends on dream2nix (#1758)
https://github.com/nix-community/dream2nix is a fairly new and
cool-looking project for adapting upstream package manager outputs
(lockfiles mostly it would seem) for nix.

This should improve the ability to cross-compile. As a more concrete
measure of improvement, `nix flake check' now succeeds 🎉
2022-03-08 14:14:00 +09:00
Michael Davis
f1e90ac2e3
update helix-syntax revision in flake.nix (#1747)
closes #1746

The queries for Go were updated in ddbf03613d.
The old ref was before this commit, so running helix from the flake

    nix flake run github:helix-editor/helix/d62ad8b595a4f901b9c5dba1bb6e8f70ece395bf -- path/to/file.go

will crash because the old grammar's query analysis will fail (because `iota`
was not yet a named node).

This commit updates the version of the grammars that we pull down when building
the flake so that the queries match the grammars. We'll have to do an update like
this whenever a grammar is bumped in a breaking way (which happens fairly often
in tree-sitter) until #1659 comes along and the version of the grammar becomes
tied to the version declared in source.
2022-03-05 10:10:41 +09:00
Erin Kim
0ff3e3ea38
Add inputs.nixpkgs.follows to rust-overlay in flake.nix (#1729)
* add `inputs.nixpkgs.follows` to `rust-overlay`

* Update flake.lock
2022-03-03 10:45:45 +09:00
Blaž Hrastnik
8a7aec6414 fix: nix flake build 2022-02-15 10:12:37 +09:00
Blaž Hrastnik
df0d58e9f7 Set flags necessary for cargo-flamegraph 2022-01-23 16:04:12 +09:00
Blaž Hrastnik
8a53e34e66 Try to reuse an existing layer based on layer.ranges 2022-01-23 16:04:07 +09:00
Jared Ramirez
a2fad4fcb0
Fix Nix flake (#1455) 2022-01-13 09:40:07 +09:00
Blaž Hrastnik
a45df12699 nix: Update to lld 13, drop flake-compat (was unused) 2021-12-03 10:02:07 +09:00
Blaž Hrastnik
4b4e972af0 nix: Update lld to 12 2021-10-24 16:55:43 +09:00
Blaž Hrastnik
182a59b552 Update to rust 1.56 + 2021 edition 2021-10-22 12:15:18 +09:00
Raphael Megzari
ae4d37de28
flake: remove hack to fix helix version (#762) 2021-09-18 09:59:26 +09:00
Yusuf Bera Ertan
004c8fd462 chore(nix): update flake inputs and submodule 2021-09-12 20:11:04 +08:00
Yusuf Bera Ertan
41f62c3157 build(nix): fix build issues 2021-07-25 19:47:56 +09:00
Blaž Hrastnik
cac6e1b282 nix: Set up cargo-tarpaulin 2021-06-27 23:28:22 +09:00
Yusuf Bera Ertan
6dddd5cd1d build(nix): fetch submodules lazily 2021-06-22 13:29:13 +09:00
Yusuf Bera Ertan
a3f01503e2 build(nix): use nix-cargo-integration, make shell.nix use flake devshell 2021-06-13 14:46:51 +09:00
Timothy DeHerrera
01760c3845 embed runtime 2021-06-10 22:00:53 +09:00
Timothy DeHerrera
69378382c3 add overlay 2021-06-10 22:00:53 +09:00
Timothy DeHerrera
1a774d61bb Fix flake package 2021-06-10 22:00:53 +09:00
Blaž Hrastnik
b6a22e955b Closer to a full flake build via naersk.
Blocked on https://github.com/NixOS/nix/issues/4423, build doesn't see
submodules.
2021-05-03 22:39:53 +09:00
Blaž Hrastnik
5253f40477 nix: Switch to stable rust. 2021-04-09 19:29:01 +09:00
Blaž Hrastnik
41c0d5828f flake: Packaging definition. 2021-02-22 17:02:59 +09:00
Blaž Hrastnik
755632f231 deps update 2021-02-09 15:40:06 +09:00
Blaž Hrastnik
4b2b62ebc6 Update flake definition. 2021-02-04 17:25:54 +09:00
Blaž Hrastnik
f1539cc866 Add a nix flake with the development environment. 2021-01-19 15:54:51 +09:00