panorama/flake.nix

93 lines
2.6 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-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
2023-04-09 05:49:15 +00:00
toolchain = with fenix.packages.${system};
combine [
minimal.rustc
minimal.cargo
targets.wasm32-unknown-unknown.latest.rust-std
];
dioxus-cli = pkgs.callPackage ./nix/dioxus-cli.nix { };
2023-03-28 02:34:46 +00:00
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-04-18 07:38:22 +00:00
sqlite
2023-03-23 01:31:24 +00:00
2023-04-09 05:49:15 +00:00
zlib
dioxus-cli
cargo-generate
pkg-config
rust-analyzer
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-04-09 05:49:15 +00:00
toolchain
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
];
2023-04-09 05:49:15 +00:00
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"
];
2023-03-30 05:55:56 +00:00
} // prisma-env);
ci = pkgs.mkShell { packages = with pkgs; [ bash mdbook nodejs ]; };
};
2023-03-23 01:31:24 +00:00
});
}