helix-mirror/flake.nix

27 lines
852 B
Nix
Raw Normal View History

{
description = "A post-modern text editor.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
2021-02-09 10:39:52 +04:00
rust-overlay.url = "github:oxalica/rust-overlay";
2021-02-22 12:02:59 +04:00
naersk.url = "github:nmattia/naersk";
};
2021-02-22 12:02:59 +04:00
outputs = inputs@{ self, nixpkgs, naersk, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; };
2021-02-22 12:02:59 +04:00
naerskLib = pkgs.callPackage naersk {
2021-04-09 14:07:33 +04:00
inherit (pkgs.rust-bin.stable.latest.default) rustc cargo;
2021-02-22 12:02:59 +04:00
};
in rec {
2021-02-22 12:02:59 +04:00
packages.helix = naerskLib.buildPackage {
pname = "helix";
root = ./.;
};
defaultPackage = packages.helix;
devShell = pkgs.callPackage ./shell.nix {};
});
}