You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
malachite/flake.nix

60 lines
1.3 KiB
Nix

2 years ago
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
2 years ago
utils.url = "github:numtide/flake-utils";
naersk = {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
2 years ago
};
2 years ago
outputs = {
self,
nixpkgs,
utils,
naersk,
...
2 years ago
}:
utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages."${system}";
naersk-lib = naersk.lib."${system}";
2 years ago
in rec
{
packages.malachite = naersk-lib.buildPackage {
pname = "Malachite";
root = ./.;
};
2 years ago
packages.default = packages.malachite;
2 years ago
apps.malachite = utils.lib.mkApp {
2 years ago
drv = packages.malachite;
};
2 years ago
apps.default = apps.malachite;
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
rustc
cargo
cargo-audit
rustfmt
2 years ago
clippy
rust-analyzer
# For `alpm` libs
pkg-config
pacman
openssl
libarchive
libgpg-error
gpgme
2 years ago
];
# For rust-analyzer
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
2 years ago
};
formatter = pkgs.alejandra;
});
}