From 7b7fed23db5c745498e5bc66b3dbc881c977f93a Mon Sep 17 00:00:00 2001 From: urlordjames <32751441+urlordjames@users.noreply.github.com> Date: Mon, 21 Jun 2021 22:51:53 -0400 Subject: [PATCH 1/4] add Nix package instructions --- ENG-02-Installation.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/ENG-02-Installation.md b/ENG-02-Installation.md index 4bd8bcf..bef6d3e 100644 --- a/ENG-02-Installation.md +++ b/ENG-02-Installation.md @@ -278,4 +278,32 @@ __if you haven't install vcpkg:__ We also provide a pre-build docker image on the [docker hub](https://hub.docker.com/r/drogonframework/drogon). All dependencies of Drogon and Drogon itself are already installed in the docker environment, where users can build Drogon-based applications directly. -# 03 [Quick Start](ENG-03-Quick-Start) \ No newline at end of file +## Use Nix Package + +There is a Nix package offered for Drogon. Currently, if you wish to use this package you must use the unstable channel. You can add this channel with the alias "unstable" by running: + +``` +sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable +``` + +You can use the package by adding the following `shell.nix` to your project root: + +``` +{ pkgs ? import {} }: +pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + cmake + ]; + + buildInputs = with pkgs; [ + drogon + ]; +} +``` + +Enter the shell by running `nix-shell` in the root of your project. This will install Drogon and enter you into an environment with all its dependancies. + +__if you haven't installed Nix:__ +To install Nix, you can follow the instructions on the [NixOS website](https://nixos.org/download.html). + +# 03 [Quick Start](ENG-03-Quick-Start) From 80baab782d491786fafc224af2ab35ad88172224 Mon Sep 17 00:00:00 2001 From: urlordjames <32751441+urlordjames@users.noreply.github.com> Date: Tue, 22 Jun 2021 11:32:29 -0400 Subject: [PATCH 2/4] reformat Nix package installation instructions - use tabs instead of spaces - reword "if you haven't installed Nix" --- ENG-02-Installation.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ENG-02-Installation.md b/ENG-02-Installation.md index bef6d3e..18f041e 100644 --- a/ENG-02-Installation.md +++ b/ENG-02-Installation.md @@ -280,7 +280,7 @@ We also provide a pre-build docker image on the [docker hub](https://hub.docker. ## Use Nix Package -There is a Nix package offered for Drogon. Currently, if you wish to use this package you must use the unstable channel. You can add this channel with the alias "unstable" by running: +There is a Nix package offered for Drogon. Currently, if you wish to use this package you must use the unstable channel. You can add this channel with the alias "unstable" by running: ``` sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable @@ -301,9 +301,8 @@ pkgs.mkShell { } ``` -Enter the shell by running `nix-shell` in the root of your project. This will install Drogon and enter you into an environment with all its dependancies. +Enter the shell by running `nix-shell`. This will install Drogon and enter you into an environment with all its dependancies. -__if you haven't installed Nix:__ -To install Nix, you can follow the instructions on the [NixOS website](https://nixos.org/download.html). +__if you haven't installed Nix:__ You can follow the instructions on the [NixOS website](https://nixos.org/download.html). # 03 [Quick Start](ENG-03-Quick-Start) From dceb7884f52ee9223d7d6013b7356055ef6f4a9b Mon Sep 17 00:00:00 2001 From: urlordjames <32751441+urlordjames@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:53:31 -0400 Subject: [PATCH 3/4] document options for Nix package --- ENG-02-Installation.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ENG-02-Installation.md b/ENG-02-Installation.md index 18f041e..500bebf 100644 --- a/ENG-02-Installation.md +++ b/ENG-02-Installation.md @@ -303,6 +303,25 @@ pkgs.mkShell { Enter the shell by running `nix-shell`. This will install Drogon and enter you into an environment with all its dependancies. +The Nix package has a few options which you can configure according to your needs: + +| option | default value | +| --- | --- | +| sqliteSupport | true | +| postgresSupport | false | +| redisSupport | false | +| mysqlSupport | false | + +Here is an example of how you can change their values: + +``` + buildInputs = with pkgs; [ + (drogon.override { + sqliteSupport = false; + }) + ]; +``` + __if you haven't installed Nix:__ You can follow the instructions on the [NixOS website](https://nixos.org/download.html). # 03 [Quick Start](ENG-03-Quick-Start) From fa3bb1550a5978aaaaa0cad77634766aff6f44c3 Mon Sep 17 00:00:00 2001 From: urlordjames <32751441+urlordjames@users.noreply.github.com> Date: Tue, 22 Jun 2021 21:06:34 -0400 Subject: [PATCH 4/4] add additional command to Nix unstable instructions --- ENG-02-Installation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ENG-02-Installation.md b/ENG-02-Installation.md index 500bebf..321269e 100644 --- a/ENG-02-Installation.md +++ b/ENG-02-Installation.md @@ -284,6 +284,7 @@ There is a Nix package offered for Drogon. Currently, if you wish to use this pa ``` sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable +sudo nix-channel --update ``` You can use the package by adding the following `shell.nix` to your project root: