panorama/flake.nix
Michael Zhang b86e9c2f81
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
L
2023-03-31 16:31:41 -05:00

65 lines
1.7 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 = pkgs.fenix.default;
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
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);
ci = pkgs.mkShell { packages = with pkgs; [ bash mdbook nodejs ]; };
};
});
}