2024-06-22 16:40:56 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-09-23 19:46:53 +02:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-06-22 16:40:56 +02:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
fenix.url = "github:nix-community/fenix";
|
|
|
|
fenix.inputs.nixpkgs.follows = "nixpkgs";
|
2024-09-23 19:46:53 +02:00
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
|
|
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
2024-06-22 16:40:56 +02:00
|
|
|
};
|
|
|
|
|
2024-08-08 23:26:13 +02:00
|
|
|
outputs =
|
2024-09-23 19:46:53 +02:00
|
|
|
inputs:
|
2024-08-08 23:26:13 +02:00
|
|
|
inputs.flake-utils.lib.eachSystem (with inputs.flake-utils.lib.system; [ x86_64-linux ]) (
|
|
|
|
system:
|
|
|
|
let
|
2024-10-05 03:22:19 +02:00
|
|
|
# pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system}.extend inputs.fenix.overlays.default;
|
2024-09-23 21:12:04 +02:00
|
|
|
# pkgs = inputs.nixpkgs.legacyPackages.${system}.extend (import inputs.rust-overlay);
|
|
|
|
# pkgs = import inputs.nixpkgs {
|
|
|
|
# inherit system;
|
|
|
|
# overlays = [ (import inputs.rust-overlay) ];
|
|
|
|
# };
|
2024-09-23 19:46:53 +02:00
|
|
|
# toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default);
|
|
|
|
# toolchain = pkgs.rust-bin.stable.latest.default;
|
2024-10-05 03:22:19 +02:00
|
|
|
rust-toolchain = pkgs.fenix.complete.toolchain;
|
2024-10-04 15:17:15 +02:00
|
|
|
spkgs = inputs.self.packages.${system};
|
2024-08-08 23:26:13 +02:00
|
|
|
inherit (pkgs) lib;
|
|
|
|
in
|
|
|
|
{
|
2024-10-04 15:17:15 +02:00
|
|
|
packages = {
|
2024-10-05 03:22:19 +02:00
|
|
|
inherit rust-toolchain;
|
|
|
|
|
2024-10-04 15:17:15 +02:00
|
|
|
kazesawa = pkgs.callPackage ./nix/kazesawa.nix { };
|
|
|
|
exo = pkgs.callPackage ./nix/exo.nix { };
|
|
|
|
geosans-light = pkgs.callPackage ./nix/geosans-light.nix { };
|
2024-09-09 18:06:07 +02:00
|
|
|
|
2024-10-04 15:17:15 +02:00
|
|
|
shimmering-fonts = pkgs.callPackage ./nix/fonts.nix {
|
|
|
|
# Pass custom-packaged fonts
|
|
|
|
inherit (spkgs) exo kazesawa geosans-light;
|
|
|
|
};
|
2024-09-09 18:06:07 +02:00
|
|
|
|
2024-10-04 15:17:15 +02:00
|
|
|
default = spkgs.shimmeringmoon;
|
|
|
|
shimmeringmoon = pkgs.callPackage ./nix/shimmeringmoon.nix {
|
2024-10-05 03:22:19 +02:00
|
|
|
inherit (spkgs) shimmering-fonts rust-toolchain;
|
2024-09-09 18:06:07 +02:00
|
|
|
};
|
|
|
|
};
|
2024-10-04 15:17:15 +02:00
|
|
|
|
|
|
|
# {{{ Devshell
|
2024-09-23 21:12:04 +02:00
|
|
|
devShell = pkgs.mkShell rec {
|
2024-09-23 19:46:53 +02:00
|
|
|
nativeBuildInputs = with pkgs; [
|
2024-10-05 03:22:19 +02:00
|
|
|
# pkgs.cargo
|
|
|
|
# pkgs.rustc
|
|
|
|
# pkgs.clippy
|
|
|
|
# pkgs.rust-analyzer
|
|
|
|
# pkgs.rustfmt
|
|
|
|
spkgs.rust-toolchain
|
2024-09-24 22:49:09 +02:00
|
|
|
|
2024-10-05 03:22:19 +02:00
|
|
|
pkgs.ruff
|
|
|
|
pkgs.imagemagick
|
|
|
|
pkgs.pkg-config
|
2024-09-23 19:46:53 +02:00
|
|
|
];
|
2024-10-04 15:17:15 +02:00
|
|
|
|
2024-09-23 19:46:53 +02:00
|
|
|
buildInputs = with pkgs; [
|
|
|
|
freetype
|
|
|
|
fontconfig
|
2024-08-08 23:26:13 +02:00
|
|
|
leptonica
|
|
|
|
tesseract
|
|
|
|
sqlite
|
|
|
|
];
|
2024-06-22 16:40:56 +02:00
|
|
|
|
2024-09-23 21:12:04 +02:00
|
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
2024-11-09 12:22:35 +01:00
|
|
|
SHIMMERING_FONT_DIR = spkgs.shimmering-fonts;
|
2024-08-08 23:26:13 +02:00
|
|
|
};
|
2024-10-04 15:17:15 +02:00
|
|
|
# }}}
|
2024-08-08 23:26:13 +02:00
|
|
|
}
|
|
|
|
);
|
2024-06-22 16:40:56 +02:00
|
|
|
|
|
|
|
# {{{ Caching and whatnot
|
|
|
|
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="
|
|
|
|
];
|
|
|
|
};
|
|
|
|
# }}}
|
|
|
|
}
|