added sqlx cli to flake
This commit is contained in:
parent
0d0cf63c62
commit
7de920f85a
94
flake.nix
94
flake.nix
@ -16,56 +16,54 @@
|
||||
};
|
||||
|
||||
# Flake outputs that other flakes can use
|
||||
outputs =
|
||||
{ self
|
||||
, flake-schemas
|
||||
, nixpkgs
|
||||
, rust-overlay
|
||||
,
|
||||
}:
|
||||
let
|
||||
# Nixpkgs overlays
|
||||
overlays = [
|
||||
rust-overlay.overlays.default
|
||||
(final: prev: {
|
||||
rustToolchain = final.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; };
|
||||
})
|
||||
];
|
||||
outputs = {
|
||||
self,
|
||||
flake-schemas,
|
||||
nixpkgs,
|
||||
rust-overlay,
|
||||
}: let
|
||||
# Nixpkgs overlays
|
||||
overlays = [
|
||||
rust-overlay.overlays.default
|
||||
(final: prev: {
|
||||
rustToolchain = final.rust-bin.stable.latest.default.override {extensions = ["rust-src"];};
|
||||
})
|
||||
];
|
||||
|
||||
# Helpers for producing system-specific outputs
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
|
||||
forEachSupportedSystem = f:
|
||||
nixpkgs.lib.genAttrs supportedSystems (system:
|
||||
f {
|
||||
pkgs = import nixpkgs { inherit overlays system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
# Schemas tell Nix about the structure of your flake's outputs
|
||||
schemas = flake-schemas.schemas;
|
||||
# Helpers for producing system-specific outputs
|
||||
supportedSystems = ["x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux"];
|
||||
forEachSupportedSystem = f:
|
||||
nixpkgs.lib.genAttrs supportedSystems (system:
|
||||
f {
|
||||
pkgs = import nixpkgs {inherit overlays system;};
|
||||
});
|
||||
in {
|
||||
# Schemas tell Nix about the structure of your flake's outputs
|
||||
schemas = flake-schemas.schemas;
|
||||
|
||||
# Development environments
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
# Pinned packages available in the environment
|
||||
packages = with pkgs; [
|
||||
rustToolchain
|
||||
rust-analyzer
|
||||
curl
|
||||
git
|
||||
jq
|
||||
wget
|
||||
nixpkgs-fmt
|
||||
openssl
|
||||
deno
|
||||
];
|
||||
# Development environments
|
||||
devShells = forEachSupportedSystem ({pkgs}: {
|
||||
default = pkgs.mkShell {
|
||||
# Pinned packages available in the environment
|
||||
packages = with pkgs; [
|
||||
rustToolchain
|
||||
rust-analyzer
|
||||
curl
|
||||
git
|
||||
jq
|
||||
wget
|
||||
nixpkgs-fmt
|
||||
openssl
|
||||
deno
|
||||
sqlx-cli
|
||||
];
|
||||
|
||||
# Environment variables
|
||||
env = {
|
||||
RUST_BACKTRACE = "1";
|
||||
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
|
||||
};
|
||||
# Environment variables
|
||||
env = {
|
||||
RUST_BACKTRACE = "1";
|
||||
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user