2024-09-11 01:34:47 -07:00
|
|
|
{
|
|
|
|
description = "A TUI for the Canvas LMS.";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-10-29 21:30:17 -07:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
2024-09-12 01:26:38 -07:00
|
|
|
fenix = {
|
|
|
|
url = "github:nix-community/fenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-09-12 01:13:32 -07:00
|
|
|
naersk.url = "github:nix-community/naersk";
|
2024-09-11 01:34:47 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs =
|
2024-10-29 21:30:17 -07:00
|
|
|
inputs@{
|
|
|
|
flake-parts,
|
2024-09-12 01:26:38 -07:00
|
|
|
fenix,
|
2024-09-12 01:13:32 -07:00
|
|
|
naersk,
|
2024-09-11 01:34:47 -07:00
|
|
|
...
|
|
|
|
}:
|
2024-10-29 21:30:17 -07:00
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
systems = [
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
|
|
|
perSystem =
|
|
|
|
{ system, pkgs, ... }:
|
|
|
|
let
|
|
|
|
naersk' = pkgs.callPackage naersk { };
|
|
|
|
defaultBuildOpts = {
|
|
|
|
cargo = fenix.packages.${system}.stable.cargo;
|
|
|
|
rustc = fenix.packages.${system}.stable.rustc;
|
|
|
|
src = ./.;
|
2024-09-12 01:13:32 -07:00
|
|
|
|
2024-10-29 21:30:17 -07:00
|
|
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
|
|
|
buildInputs = with pkgs; [ openssl ];
|
2024-09-12 01:13:32 -07:00
|
|
|
|
2024-10-29 21:30:17 -07:00
|
|
|
mode = "build";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
pkg-config
|
|
|
|
openssl
|
|
|
|
fenix.packages.${system}.stable.completeToolchain
|
|
|
|
cargo-audit
|
|
|
|
];
|
|
|
|
};
|
|
|
|
packages = {
|
|
|
|
default = naersk'.buildPackage defaultBuildOpts;
|
|
|
|
test = naersk'.buildPackage (
|
|
|
|
defaultBuildOpts
|
|
|
|
// {
|
|
|
|
mode = "test";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
2024-09-12 01:13:32 -07:00
|
|
|
};
|
2024-10-29 21:30:17 -07:00
|
|
|
};
|
2024-09-11 01:34:47 -07:00
|
|
|
}
|