Skip to content

Commit

Permalink
[#188] Prepare Nix shell configuration for frontend and backend
Browse files Browse the repository at this point in the history
Developed Nix shell configurations for both frontend and backend modules
to streamline the build and deployment processes and ensure alignment
with backend setup and dependencies. The new shell configurations
provide necessary tools and dependencies for development environments,
optimizing the overall development workflow.

Changes:
- Updated govtool/backend/default.nix to simplify package retrieval
  using `<nixpkgs>` and removed unnecessary sources file inclusion.
- Created govtool/backend/shell.nix to define additional dependencies
  like awscli, docker, git, and gnumake for the backend module.
- Added govtool/frontend/shell.nix to specify frontend module
  dependencies, ensuring consistency with the backend setup.
  • Loading branch information
placek committed Mar 12, 2024
1 parent e914dfb commit f060578
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
5 changes: 1 addition & 4 deletions govtool/backend/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# TODO: Remove the sources file and use the nixpkgs version provided from the
# flakes lock file instead when the flakes feature is present and enabled in the
# root of the project.
{ pkgs ? (import ./sources.nix).pkgs }:
{ pkgs ? import <nixpkgs> {} }:
let
# This is the version of the Haskell compiler we reccommend using.
ghcPackages = pkgs.haskell.packages.ghc927;
Expand Down
16 changes: 16 additions & 0 deletions govtool/backend/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ pkgs ? import <nixpkgs> {} }:
let
project = import ./default.nix { inherit pkgs; };
in
project.overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ (with pkgs; [
awscli
docker
git
gnumake
]);

shellHook = ''
ln -s ${project}/libexec/yarn-nix-example/node_modules node_modules
'';
})
12 changes: 12 additions & 0 deletions govtool/frontend/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ pkgs ? import <nixpkgs> {} }:
let
project = import ./default.nix { inherit pkgs; };
in
project.overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ (with pkgs; [
awscli
docker
git
gnumake
]);
})

0 comments on commit f060578

Please sign in to comment.