lychee/flake.nix
Thomas Zahner 31b2525a8d
Move archive functionality to library (#1720)
* Bump flake 1.83.0 -> 1.87.0
* Move archive functionality into lychee-lib
* Create example, update name and docs
* Split function & update tests
* Remove trailing slashes in API calls & update tests
* Apply lint suggestions
* Rename function
* Move module
* Add cargo-nextest to devShell to support 'make test'
2025-06-06 22:24:10 +02:00

68 lines
1.6 KiB
Nix

{
description = "A flake for building and developing lychee";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs =
{
nixpkgs,
rust-overlay,
self,
...
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
rustVersion = "latest"; # using a specific version: "1.62.0"
in
{
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
rust = pkgs.rust-bin.stable.${rustVersion}.default.override {
extensions = [
"rust-src" # for rust-analyzer
"rust-analyzer" # usable by IDEs like zed-editor
"clippy"
];
};
in
{
default = pkgs.mkShell {
packages = [
pkgs.pkg-config
pkgs.openssl
rust
pkgs.cargo-nextest
];
};
}
);
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.lychee.overrideAttrs {
src = ./.;
version = self.rev or self.dirtyShortRev;
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
};
};
}
);
};
}