generated from ElnuDev/rust-project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
{
|
|
description = "Miscellaneous utility APIs hosted on jichan.org";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rust-overlay }:
|
|
let
|
|
overlays = [ (import rust-overlay) ];
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
rustSettings = with pkgs; {
|
|
src = ./.;
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ openssl ];
|
|
cargoHash = nixpkgs.lib.fakeHash;
|
|
};
|
|
in {
|
|
devShells.${system}.default = with pkgs; mkShell {
|
|
packages = [ bacon ];
|
|
inputsFrom = with self.packages.${system}; [ tatoeba images ];
|
|
};
|
|
packages.${system} = {
|
|
tatoeba = pkgs.rustPlatform.buildRustPackage (rustSettings // {
|
|
pname = "tatoeba";
|
|
version = "0.1.0";
|
|
buildAndTestSubdir = "tatoeba";
|
|
cargoHash = "sha256-74Jq3saaUyPvNm/0croVOBuMtpN8xT3S4z37nutJdw4=";
|
|
});
|
|
images = pkgs.rustPlatform.buildRustPackage (rustSettings // {
|
|
pname = "images";
|
|
version = "0.1.0";
|
|
buildAndTestSubdir = "images";
|
|
cargoHash = "sha256-fKmTZTcJj/eYCQE9cjiXB/Pt6BdJNZ/e5cSRgbuPIJs=";
|
|
});
|
|
};
|
|
};
|
|
}
|