2024-06-22 16:40:56 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/release-24.05";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
fenix.url = "github:nix-community/fenix";
|
|
|
|
fenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-08-08 23:26:13 +02:00
|
|
|
outputs =
|
|
|
|
{ ... }@inputs:
|
|
|
|
inputs.flake-utils.lib.eachSystem (with inputs.flake-utils.lib.system; [ x86_64-linux ]) (
|
|
|
|
system:
|
|
|
|
let
|
|
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system}.extend inputs.fenix.overlays.default;
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
in
|
|
|
|
{
|
2024-09-09 18:06:07 +02:00
|
|
|
packages.shimmeringmoon = pkgs.rustPlatform.buildRustPackage {
|
|
|
|
pname = "shimmeringmoon";
|
|
|
|
version = "unstable-2024-09-06";
|
|
|
|
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"hypertesseract-0.1.0" = "sha256-G0dos5yvvcfBKznAo1IIzLgXqRDxmyZwB93QQ6hVZSo=";
|
|
|
|
"plotters-0.4.0" = "sha256-9wtd7lig1vQ2RJVaEHdicfPZy2AyuoNav8shPMZ1EuE=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-08-08 23:26:13 +02:00
|
|
|
devShell = pkgs.mkShell rec {
|
|
|
|
packages = with pkgs; [
|
|
|
|
(fenix.complete.withComponents [
|
|
|
|
"cargo"
|
|
|
|
"clippy"
|
|
|
|
"rust-src"
|
|
|
|
"rustc"
|
|
|
|
"rustfmt"
|
|
|
|
])
|
|
|
|
rust-analyzer-nightly
|
|
|
|
ruff
|
|
|
|
imagemagick
|
|
|
|
fontconfig
|
|
|
|
freetype
|
2024-06-22 16:40:56 +02:00
|
|
|
|
2024-08-08 23:26:13 +02:00
|
|
|
clang
|
|
|
|
llvmPackages.clang
|
|
|
|
pkg-config
|
2024-06-22 16:40:56 +02:00
|
|
|
|
2024-08-08 23:26:13 +02:00
|
|
|
leptonica
|
|
|
|
tesseract
|
|
|
|
openssl
|
|
|
|
sqlite
|
|
|
|
];
|
2024-06-22 16:40:56 +02:00
|
|
|
|
2024-08-08 23:26:13 +02:00
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath packages;
|
2024-06-22 16:40:56 +02:00
|
|
|
|
2024-08-08 23:26:13 +02:00
|
|
|
# compilation of -sys packages requires manually setting LIBCLANG_PATH
|
|
|
|
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2024-06-22 16:40:56 +02:00
|
|
|
|
|
|
|
# {{{ Caching and whatnot
|
|
|
|
# TODO: persist trusted substituters file
|
|
|
|
nixConfig = {
|
2024-08-08 23:26:13 +02:00
|
|
|
extra-substituters = [ "https://nix-community.cachix.org" ];
|
2024-06-22 16:40:56 +02:00
|
|
|
|
|
|
|
extra-trusted-public-keys = [
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
|
|
|
};
|
|
|
|
# }}}
|
|
|
|
}
|