Michael Zhang
1550d77ca6
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
92 lines
2.6 KiB
Nix
92 lines
2.6 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
|
fenix.url = "github:nix-community/fenix";
|
|
prisma-engines.url = "github:prisma/prisma-engines?ref=4.12.0";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, fenix, prisma-engines }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
fenix.overlays.default
|
|
(final: prev: {
|
|
prisma-engines = prisma-engines.packages.${system}.prisma-engines;
|
|
})
|
|
];
|
|
};
|
|
|
|
lib = pkgs.lib;
|
|
|
|
prisma-env =
|
|
import ./nix/prisma-env.nix { inherit (pkgs) prisma-engines; };
|
|
|
|
toolchain = with fenix.packages.${system};
|
|
combine [
|
|
minimal.rustc
|
|
minimal.cargo
|
|
targets.wasm32-unknown-unknown.latest.rust-std
|
|
];
|
|
|
|
dioxus-cli = pkgs.callPackage ./nix/dioxus-cli.nix { };
|
|
|
|
flakePkgs = rec {
|
|
mdbook-tera =
|
|
pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
|
|
};
|
|
in rec {
|
|
packages = flake-utils.lib.flattenTree flakePkgs;
|
|
|
|
devShells = {
|
|
default = pkgs.mkShell ({
|
|
packages = with pkgs; [
|
|
cargo-deny
|
|
cargo-edit
|
|
cargo-expand
|
|
cargo-flamegraph
|
|
cargo-watch
|
|
sqlite
|
|
|
|
zlib
|
|
|
|
dioxus-cli
|
|
cargo-generate
|
|
pkg-config
|
|
rust-analyzer
|
|
|
|
deno
|
|
openssl
|
|
yq
|
|
|
|
mdbook
|
|
flakePkgs.mdbook-tera
|
|
|
|
(python310.withPackages
|
|
(p: with p; [ ipython numpy scipy sympy ]))
|
|
|
|
toolchain
|
|
|
|
# Get the nightly version of rustfmt so we can wrap comments
|
|
pkgs.fenix.default.rustfmt
|
|
];
|
|
|
|
PKG_CONFIG_PATH = pkgs.lib.concatStringsSep ":" [
|
|
"${pkgs.gnome.libsoup.dev}/lib/pkgconfig"
|
|
"${pkgs.webkitgtk.dev}/lib/pkgconfig"
|
|
"${pkgs.gtk3.dev}/lib/pkgconfig"
|
|
"${pkgs.gtk4.dev}/lib/pkgconfig"
|
|
"${pkgs.glib.dev}/lib/pkgconfig"
|
|
"${pkgs.cairo.dev}/lib/pkgconfig"
|
|
"${pkgs.gdk-pixbuf.dev}/lib/pkgconfig"
|
|
"${pkgs.pango.dev}/lib/pkgconfig"
|
|
"${pkgs.harfbuzz.dev}/lib/pkgconfig"
|
|
"${pkgs.at-spi2-atk.dev}/lib/pkgconfig"
|
|
];
|
|
} // prisma-env);
|
|
|
|
ci = pkgs.mkShell { packages = with pkgs; [ bash mdbook nodejs ]; };
|
|
};
|
|
});
|
|
}
|