2023-07-09 05:13:32 +00:00
|
|
|
{
|
|
|
|
description = "A terminal UI client for the matrix chat protocol";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
|
|
|
|
# inputs for following
|
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
crane = {
|
|
|
|
url = "github:ipetkov/crane";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-compat.follows = "flake-compat";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
rust-overlay.follows = "rust-overlay";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
inputs = {};
|
|
|
|
};
|
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
crane,
|
|
|
|
flake-utils,
|
|
|
|
rust-overlay,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [(import rust-overlay)];
|
|
|
|
};
|
|
|
|
|
|
|
|
#rust-nightly = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default);
|
|
|
|
rust-stable = pkgs.rust-bin.stable.latest.default;
|
|
|
|
|
|
|
|
craneLib = (crane.mkLib pkgs).overrideToolchain rust-stable;
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
craneBuild = craneLib.buildPackage {
|
|
|
|
src = craneLib.cleanCargoSource ./.;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
inherit nativeBuildInputs buildInputs;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
packages.default = craneBuild;
|
|
|
|
|
|
|
|
app.default = {
|
|
|
|
type = "app";
|
|
|
|
program = "${self.packages.${system}.default}/bin/trinitix";
|
|
|
|
};
|
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
packages = with pkgs; [
|
|
|
|
nil
|
|
|
|
alejandra
|
|
|
|
statix
|
|
|
|
ltex-ls
|
|
|
|
|
|
|
|
rust-stable
|
|
|
|
rust-analyzer
|
|
|
|
cargo-edit
|
2023-07-12 19:48:51 +00:00
|
|
|
cargo-expand
|
2023-07-09 05:13:32 +00:00
|
|
|
];
|
2023-07-09 05:53:15 +00:00
|
|
|
inherit nativeBuildInputs buildInputs;
|
2023-07-09 05:13:32 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
# vim: ts=2
|
|
|
|
|