2023-03-23 01:31:24 +00:00
|
|
|
{
|
2023-03-23 02:24:46 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs";
|
|
|
|
fenix.url = "github:nix-community/fenix";
|
2023-03-31 21:31:41 +00:00
|
|
|
prisma-engines.url = "github:prisma/prisma-engines?ref=4.12.0";
|
2023-03-23 02:24:46 +00:00
|
|
|
};
|
2023-03-23 01:31:24 +00:00
|
|
|
|
2023-03-23 18:32:34 +00:00
|
|
|
outputs = { self, nixpkgs, flake-utils, fenix, prisma-engines }:
|
2023-03-23 01:31:24 +00:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
2023-03-23 18:32:34 +00:00
|
|
|
overlays = [
|
|
|
|
fenix.overlays.default
|
|
|
|
(final: prev: {
|
|
|
|
prisma-engines = prisma-engines.packages.${system}.prisma-engines;
|
|
|
|
})
|
|
|
|
];
|
2023-03-23 01:31:24 +00:00
|
|
|
};
|
|
|
|
|
2023-03-23 18:32:34 +00:00
|
|
|
lib = pkgs.lib;
|
|
|
|
|
|
|
|
prisma-env =
|
|
|
|
import ./nix/prisma-env.nix { inherit (pkgs) prisma-engines; };
|
2023-03-28 02:34:46 +00:00
|
|
|
|
|
|
|
toolchain = pkgs.fenix.default;
|
|
|
|
|
|
|
|
flakePkgs = rec {
|
|
|
|
mdbook-tera =
|
|
|
|
pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
|
|
|
|
};
|
2023-03-23 01:31:24 +00:00
|
|
|
in rec {
|
2023-03-28 02:34:46 +00:00
|
|
|
packages = flake-utils.lib.flattenTree flakePkgs;
|
|
|
|
|
2023-03-30 05:55:56 +00:00
|
|
|
devShells = {
|
|
|
|
default = pkgs.mkShell ({
|
|
|
|
packages = with pkgs; [
|
|
|
|
cargo-deny
|
|
|
|
cargo-edit
|
|
|
|
cargo-expand
|
|
|
|
cargo-flamegraph
|
|
|
|
cargo-watch
|
2023-03-23 01:31:24 +00:00
|
|
|
|
2023-03-30 05:55:56 +00:00
|
|
|
deno
|
|
|
|
openssl
|
|
|
|
yq
|
2023-03-28 02:34:46 +00:00
|
|
|
|
2023-03-30 05:55:56 +00:00
|
|
|
mdbook
|
|
|
|
flakePkgs.mdbook-tera
|
2023-03-23 01:31:24 +00:00
|
|
|
|
2023-03-30 05:55:56 +00:00
|
|
|
(python310.withPackages
|
|
|
|
(p: with p; [ ipython numpy scipy sympy ]))
|
2023-03-23 18:32:34 +00:00
|
|
|
|
2023-03-30 05:55:56 +00:00
|
|
|
pkgs.fenix.minimal.cargo
|
|
|
|
pkgs.fenix.minimal.rustc
|
2023-03-23 01:31:24 +00:00
|
|
|
|
2023-03-30 05:55:56 +00:00
|
|
|
# Get the nightly version of rustfmt so we can wrap comments
|
|
|
|
pkgs.fenix.default.rustfmt
|
|
|
|
];
|
|
|
|
} // prisma-env);
|
|
|
|
|
|
|
|
ci = pkgs.mkShell { packages = with pkgs; [ bash mdbook nodejs ]; };
|
|
|
|
};
|
2023-03-23 01:31:24 +00:00
|
|
|
});
|
|
|
|
}
|