Skip to content

Commit

Permalink
Add a nix flake with the development environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 19, 2021
1 parent 22e1692 commit f1539cc
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
watch_file shell.nix
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
.direnv
helix-term/rustfmt.toml
helix-syntax/languages/
91 changes: 91 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
description = "A post-modern text editor.";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = { nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; };
in rec {
# packages.helix = pkgs.callPackage ./default.nix {};
# defaultPackage = packages.helix;
devShell = pkgs.callPackage ./shell.nix {};
});
}
12 changes: 12 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
nativeBuildInputs = with pkgs; [
rust-bin.nightly.latest.rust
lld_10
# pkgconfig
];
RUSTFLAGS = "-C link-arg=-fuse-ld=lld";
RUST_BACKTRACE = "1";
}

0 comments on commit f1539cc

Please sign in to comment.