Commit graph

52 commits

Author SHA1 Message Date
Asger Juul Brunshøj
a1cda3c19e
in flake mkShell default RUSTFLAGS to an empty string if unset (#10880) 2024-06-10 17:08:39 +02:00
Tanguy
510928618d
Fix version of Nix package (#9013) 2023-12-09 03:04:09 +09:00
Evan Richter
455b206a8c
nix: update flake inputs (#8943)
* removed non-existent crane flake input overrides
2023-12-04 01:46:17 +01:00
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.
2023-09-01 08:57:38 +09:00
Tanguy
40d7e6c9c8
Copy desktop and icon files to Nix output (#7979) 2023-08-29 16:22:03 +09:00
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.
2023-07-28 13:30:26 +09:00
Yt
ff442eecd0
nix: add overlay for convenient package usage (#7078) 2023-05-19 22:21:05 +09:00
Yusuf Bera Ertan
c3c87741d9
build(nix): update flake dependencies, remove deprecated code from flake 2023-04-02 01:58:10 +03:00
Yusuf Bera Ertan
309735aa2d
build(nix): fix devshell 2023-02-25 07:06:30 +03:00
Yusuf Bera Ertan
e5af0f1d49
build(nix): update flake to use flake-parts and nci flake-parts module 2023-02-25 06:27:13 +03:00
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.
2023-02-17 15:17:38 +09:00
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`.
2023-01-03 01:12:32 +09:00
Yusuf Bera Ertan
48e44720e4
build(nix): don't run tests in builds since CI runs them already, update inputs (#4834) 2022-11-21 09:06:43 -06:00
Yusuf Bera Ertan
3881fef39d
build(nix): update nci, fixup flake (#4537) 2022-10-31 19:52:03 -05:00
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.
2022-09-13 22:50:53 +09:00
Yusuf Bera Ertan
e917a8e0be
build(nix): update nci, refactor flake, seperate wrapping, add source filtering (#3657) 2022-09-02 17:54:07 -05:00
Charlie Groves
9f4802e101
Only add cargo-tarpaulin on x86_64 (#3252)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2022-07-31 14:52:54 -05:00
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