feat: nix flake for building guestbook
This commit is contained in:
parent
66e314810b
commit
996da6cf8b
1 changed files with 26 additions and 0 deletions
26
flake.nix
Normal file
26
flake.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
description = "Guestbook";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
crane.url = "github:ipetkov/crane";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, crane, flake-utils, ... }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
craneLib = crane.mkLib pkgs;
|
||||||
|
guestbook = craneLib.buildPackage {
|
||||||
|
src = craneLib.cleanCargoSource ./.;
|
||||||
|
buildInputs = with pkgs; [ openssl ];
|
||||||
|
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
packages.default = guestbook;
|
||||||
|
devShells.default = craneLib.devShell {
|
||||||
|
packages = with pkgs; [ cargo rustc rust-analyzer ];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue