42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{
|
|
description = "Non-creative project name";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
overlays = [ (import rust-overlay) ];
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
rust = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
|
|
extensions = [ "rust-src" ];
|
|
});
|
|
in
|
|
with pkgs;
|
|
{
|
|
devShells.default = mkShell rec {
|
|
buildInputs = [ rust ] ++ [
|
|
rust-analyzer
|
|
pkg-config
|
|
postgresql
|
|
sqlfluff
|
|
sqlx-cli
|
|
];
|
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
|
# ssh -NL /home/honbra/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432 <user>@<host>
|
|
# good luck setting up /home/honbra on your machine
|
|
DATABASE_URL = "postgresql:///ncpn?host=/home/honbra&user=honbra";
|
|
};
|
|
}
|
|
);
|
|
}
|