mznotes/flake.nix

61 lines
1.5 KiB
Nix
Raw Normal View History

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-23 18:32:34 +00:00
prisma-engines.url = "github:prisma/prisma-engines?ref=4.11.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-23 18:32:34 +00:00
devShell = pkgs.mkShell ({
packages = with pkgs; [
2023-03-23 01:31:24 +00:00
cargo-deny
cargo-edit
cargo-expand
cargo-flamegraph
cargo-watch
deno
2023-03-23 18:32:34 +00:00
openssl
2023-03-28 02:34:46 +00:00
yq
mdbook
flakePkgs.mdbook-tera
2023-03-23 01:31:24 +00:00
(python310.withPackages (p: with p; [ ipython numpy scipy sympy ]))
2023-03-23 18:32:34 +00:00
pkgs.fenix.minimal.cargo
pkgs.fenix.minimal.rustc
2023-03-23 01:31:24 +00:00
# Get the nightly version of rustfmt so we can wrap comments
pkgs.fenix.default.rustfmt
2023-03-23 18:32:34 +00:00
];
} // prisma-env);
2023-03-23 01:31:24 +00:00
});
}