2021-04-10 03:24:44 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
defaultPackage = pkgs.rustPlatform.buildRustPackage {
|
|
|
|
pname = "bad-news";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
2021-04-10 03:33:28 +02:00
|
|
|
cargoSha256 = "sha256-thGlVgWeAsBnX8IL4y4pyyUnyGfERugYHU61Te0KEUY=";
|
2021-04-10 03:24:44 +02:00
|
|
|
|
|
|
|
meta = with pkgs.lib; {
|
|
|
|
description = "A Matrix bot, bringer of bad news";
|
|
|
|
homepage = "https://github.com/alarsyo/bad-news";
|
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [ pkg-config cmake ];
|
|
|
|
buildInputs = with pkgs; [ systemd openssl ];
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultApp = flake-utils.lib.mkApp {
|
|
|
|
drv = self.defaultPackage."${system}";
|
|
|
|
};
|
|
|
|
|
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
cargo
|
|
|
|
clippy
|
|
|
|
nixpkgs-fmt
|
|
|
|
rustPackages.clippy
|
|
|
|
rustc
|
|
|
|
rustfmt
|
|
|
|
|
|
|
|
pkg-config
|
|
|
|
cmake
|
|
|
|
systemd
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|