panorama/flake.nix
2023-03-27 21:34:46 -05:00

60 lines
1.5 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
fenix.url = "github:nix-community/fenix";
prisma-engines.url = "github:prisma/prisma-engines?ref=4.11.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 = pkgs.fenix.default;
flakePkgs = rec {
mdbook-tera =
pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
};
in rec {
packages = flake-utils.lib.flattenTree flakePkgs;
devShell = pkgs.mkShell ({
packages = with pkgs; [
cargo-deny
cargo-edit
cargo-expand
cargo-flamegraph
cargo-watch
deno
openssl
yq
mdbook
flakePkgs.mdbook-tera
(python310.withPackages (p: with p; [ ipython numpy scipy sympy ]))
pkgs.fenix.minimal.cargo
pkgs.fenix.minimal.rustc
# Get the nightly version of rustfmt so we can wrap comments
pkgs.fenix.default.rustfmt
];
} // prisma-env);
});
}