Commit Graph

28 Commits (termwiz)

Author SHA1 Message Date
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.
3 years ago
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.
3 years ago
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.
3 years ago
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 🎉
3 years ago
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.
3 years ago
Erin Kim 0ff3e3ea38
Add `inputs.nixpkgs.follows` to `rust-overlay` in `flake.nix` (#1729)
* add `inputs.nixpkgs.follows` to `rust-overlay`

* Update flake.lock
3 years ago
Blaž Hrastnik 8a7aec6414 fix: nix flake build 3 years ago
Blaž Hrastnik df0d58e9f7 Set flags necessary for cargo-flamegraph 3 years ago
Blaž Hrastnik 8a53e34e66 Try to reuse an existing layer based on layer.ranges 3 years ago
Jared Ramirez a2fad4fcb0
Fix Nix flake (#1455) 3 years ago
Blaž Hrastnik a45df12699 nix: Update to lld 13, drop flake-compat (was unused) 3 years ago
Blaž Hrastnik 4b4e972af0 nix: Update lld to 12 3 years ago
Blaž Hrastnik 182a59b552 Update to rust 1.56 + 2021 edition 3 years ago
Raphael Megzari ae4d37de28
flake: remove hack to fix helix version (#762) 3 years ago
Yusuf Bera Ertan 004c8fd462 chore(nix): update flake inputs and submodule 3 years ago
Yusuf Bera Ertan 41f62c3157 build(nix): fix build issues 3 years ago
Blaž Hrastnik cac6e1b282 nix: Set up cargo-tarpaulin 3 years ago
Yusuf Bera Ertan 6dddd5cd1d build(nix): fetch submodules lazily 3 years ago
Yusuf Bera Ertan a3f01503e2 build(nix): use nix-cargo-integration, make shell.nix use flake devshell 4 years ago
Timothy DeHerrera 01760c3845 embed runtime 4 years ago
Timothy DeHerrera 69378382c3 add overlay 4 years ago
Timothy DeHerrera 1a774d61bb Fix flake package 4 years ago
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.
4 years ago
Blaž Hrastnik 5253f40477 nix: Switch to stable rust. 4 years ago
Blaž Hrastnik 41c0d5828f flake: Packaging definition. 4 years ago
Blaž Hrastnik 755632f231 deps update 4 years ago
Blaž Hrastnik 4b2b62ebc6 Update flake definition. 4 years ago
Blaž Hrastnik f1539cc866 Add a nix flake with the development environment. 4 years ago