2021-01-19 09:54:51 +03:00
|
|
|
{
|
|
|
|
description = "A post-modern text editor.";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2021-02-09 09:39:52 +03:00
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
2021-02-22 11:02:59 +03:00
|
|
|
naersk.url = "github:nmattia/naersk";
|
2021-01-19 09:54:51 +03:00
|
|
|
};
|
|
|
|
|
2021-02-22 11:02:59 +03:00
|
|
|
outputs = inputs@{ self, nixpkgs, naersk, rust-overlay, flake-utils, ... }:
|
2021-01-19 09:54:51 +03:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; };
|
2021-05-03 16:39:53 +03:00
|
|
|
rust = (pkgs.rustChannelOf {
|
|
|
|
date = "2021-05-01";
|
|
|
|
channel = "nightly";
|
|
|
|
}).minimal; # cargo, rustc and rust-std
|
|
|
|
naerskLib = naersk.lib."${system}".override {
|
|
|
|
# naersk can't build with stable?!
|
|
|
|
# inherit (pkgs.rust-bin.stable.latest) rustc cargo;
|
|
|
|
rustc = rust;
|
|
|
|
cargo = rust;
|
2021-02-22 11:02:59 +03:00
|
|
|
};
|
2021-01-19 09:54:51 +03:00
|
|
|
in rec {
|
2021-02-22 11:02:59 +03:00
|
|
|
packages.helix = naerskLib.buildPackage {
|
|
|
|
pname = "helix";
|
|
|
|
root = ./.;
|
|
|
|
};
|
|
|
|
defaultPackage = packages.helix;
|
2021-01-19 09:54:51 +03:00
|
|
|
devShell = pkgs.callPackage ./shell.nix {};
|
|
|
|
});
|
|
|
|
}
|