2024-09-11 01:34:47 -07:00
|
|
|
{
|
|
|
|
description = "A TUI for the Canvas LMS.";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
2024-09-12 01:13:32 -07:00
|
|
|
naersk.url = "github:nix-community/naersk";
|
2024-09-11 01:34:47 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
rust-overlay,
|
2024-09-12 01:13:32 -07:00
|
|
|
naersk,
|
2024-09-11 01:34:47 -07:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
overlays = [ (import rust-overlay) ];
|
|
|
|
pkgs = import nixpkgs { inherit system overlays; };
|
2024-09-12 01:13:32 -07:00
|
|
|
naersk' = pkgs.callPackage naersk { };
|
|
|
|
defaultBuildOpts = {
|
|
|
|
cargo = pkgs.rust-bin.stable.latest.default;
|
|
|
|
rustc = pkgs.rust-bin.stable.latest.default;
|
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
|
|
|
buildInputs = with pkgs; [ openssl ];
|
|
|
|
|
|
|
|
mode = "build";
|
|
|
|
};
|
2024-09-11 01:34:47 -07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default = pkgs.mkShell {
|
2024-09-12 00:10:56 -07:00
|
|
|
buildInputs = with pkgs; [
|
2024-09-11 01:34:47 -07:00
|
|
|
pkg-config
|
2024-09-12 00:10:56 -07:00
|
|
|
rust-bin.stable.latest.rust-analyzer
|
2024-09-11 01:34:47 -07:00
|
|
|
rust-bin.stable.latest.default
|
|
|
|
openssl
|
2024-09-12 00:10:56 -07:00
|
|
|
rust-bin.stable.latest.rustfmt
|
2024-09-11 01:34:47 -07:00
|
|
|
];
|
|
|
|
};
|
2024-09-12 01:13:32 -07:00
|
|
|
packages = {
|
|
|
|
default = naersk'.buildPackage defaultBuildOpts;
|
|
|
|
test = naersk'.buildPackage (
|
|
|
|
defaultBuildOpts
|
|
|
|
// {
|
|
|
|
mode = "test";
|
|
|
|
}
|
|
|
|
);
|
2024-09-11 01:34:47 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|