Commit Graph

49 Commits (e0d5b79a73b2faf807b934fbb145d003df575b84)

Author SHA1 Message Date
Michael Davis 7cf775d512
Build flake packages with stable Rust (#8133)
We can continue to use the MSRV for local development and checks while
building release executables with the latest stable Rust, as we do in
CI.
1 year ago
Tanguy 40d7e6c9c8
Copy desktop and icon files to Nix output (#7979) 1 year ago
Michael Davis d6856cfeec
Refactor Nix flake to use crane (#7763)
This resolves a build issue with nci/dream2nix and git dependencies.
We can keep most of the helix-specific parts of the flake, we just need
to switch from configuring nci to calling craneLib functions.

We also switch to flake-utils from flake-parts:

* Using rust-overlay with flake-parts directly is unergonomic
  (see https://github.com/hercules-ci/flake-parts/discussions/83).
* Removing flake-parts reduces the overall dependencies: rust-overlay
  already depends on flake-utils.
1 year ago
Yt ff442eecd0
nix: add overlay for convenient package usage (#7078) 1 year ago
Yusuf Bera Ertan c3c87741d9
build(nix): update flake dependencies, remove deprecated code from flake 2 years ago
Yusuf Bera Ertan 309735aa2d
build(nix): fix devshell 2 years ago
Yusuf Bera Ertan e5af0f1d49
build(nix): update flake to use flake-parts and nci flake-parts module 2 years ago
Austreelis f7edc34e7b
flake: pass helix' wrapper through (#5994)
This allows easily (re)making helix (wrapped)
from an overriden helix-unwrapped derivation,
e.g. if one wanted to patch helix from nix.
2 years ago
Michael Davis d6704ed117
flake: Fix devshell for darwin hosts (#5368)
Runs of `cargo build` would fail with `ld: framework not found
CoreFoundation` inside a devshell (`nix develop`) on a Darwin host.

This is fixed with two changes:

* Including the `CoreFoundation` package within the devshell's
  derivation.
* Switching from `value` to `eval` so that we append to the `RUSTFLAGS`
  environment variable rather than overwriting it. `numtide/devshell`
  already exposes the `Library/Frameworks` path within the devshell
  derivation but it was being overwritten by the manual setting of
  `RUSTFLAGS` in `env`.
2 years ago
Yusuf Bera Ertan 48e44720e4
build(nix): don't run tests in builds since CI runs them already, update inputs (#4834) 2 years ago
Yusuf Bera Ertan 3881fef39d
build(nix): update nci, fixup flake (#4537) 2 years ago
Michael Davis ec81ec1e8d
flake: Fix devShell on aarch64-darwin (#3810)
LLDB is marked broken on all arches except for x86_64-linux. With this
change, I can use `nix develop` on aarch64-darwin.
2 years ago
Yusuf Bera Ertan e917a8e0be
build(nix): update nci, refactor flake, seperate wrapping, add source filtering (#3657) 2 years ago
Charlie Groves 9f4802e101
Only add cargo-tarpaulin on x86_64 (#3252)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Yusuf Bera Ertan 85a5df0391
build(nix): add a way to override what grammars get built (#3141) 2 years ago
Timothy DeHerrera 718c3baebe
nix: pass makeWrapperArgs to wrapProgram (#3003) 2 years ago
Timothy DeHerrera fefa4d8c59
nix flake: make the binary cache "just work" (#2999) 2 years ago
Yusuf Bera Ertan 8c86cd56cb build(nix): update flake deps, add default.nix file 2 years ago
Daniel Hines 9b9c3e5ae2
add rust-analyzer to shell environment (#2739) 2 years ago
Yusuf Bera Ertan bb83ea8393
chore(nix): format nix files with alejandra, update deps, minor code refactors (#2683) 2 years ago
Johann Dahm e529ca1b92
Fix build on aarch64-darwin (#1789)
Co-authored-by: Yusuf Bera Ertan <y.bera003.06@protonmail.com>
3 years ago
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 3 years ago
Timothy DeHerrera 01760c3845 embed runtime 3 years ago
Timothy DeHerrera 69378382c3 add overlay 3 years ago
Timothy DeHerrera 1a774d61bb Fix flake package 3 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