Michael Zhang
4ec8018de6
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
94 lines
2.6 KiB
Nix
94 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 [
|
|
stable.rustc
|
|
stable.cargo
|
|
# targets.wasm32-unknown-unknown.latest.rust-std
|
|
];
|
|
|
|
flakePkgs = rec {
|
|
# mdbook-tera = pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
|
|
};
|
|
in rec {
|
|
packages = flake-utils.lib.flattenTree flakePkgs;
|
|
|
|
devShells = {
|
|
default = pkgs.mkShell ({
|
|
allowUnfree = true;
|
|
permittedInsecurePackages = [ "openssl-1.1.1u" ];
|
|
|
|
packages = with pkgs; [
|
|
cargo-deny
|
|
cargo-edit
|
|
cargo-expand
|
|
cargo-flamegraph
|
|
cargo-watch
|
|
sqlite
|
|
|
|
zlib
|
|
|
|
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"
|
|
];
|
|
|
|
GIO_MODULE_DIR = "${pkgs.glib-networking}/lib/gio/modules";
|
|
} // prisma-env);
|
|
|
|
ci = pkgs.mkShell { packages = with pkgs; [ bash mdbook nodejs ]; };
|
|
};
|
|
});
|
|
}
|