Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial nix #12347

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .envrc
use flake
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ gem "mime-types" # required by fog
gem "validates_lengths_from_database"
gem "valid_email2"

gem 'packwerk'

gem "catalog", path: "./engines/catalog"
gem 'dfc_provider', path: './engines/dfc_provider'
gem "order_management", path: "./engines/order_management"
Expand Down
23 changes: 23 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ GEM
base64 (0.2.0)
bcp47_spec (0.2.1)
bcrypt (3.1.20)
better_html (2.1.1)
actionview (>= 6.0)
activesupport (>= 6.0)
ast (~> 2.0)
erubi (~> 1.4)
parser (>= 2.4)
smart_properties
bigdecimal (3.0.2)
bindata (2.5.0)
bindex (0.8.1)
Expand Down Expand Up @@ -232,6 +239,7 @@ GEM
ruby-rc4 (>= 0.1.5)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
constant_resolver (0.2.0)
crack (1.0.0)
bigdecimal
rexml
Expand Down Expand Up @@ -486,6 +494,17 @@ GEM
validate_url
webfinger (~> 2.0)
orm_adapter (0.5.0)
packwerk (3.2.0)
activesupport (>= 6.0)
ast
better_html
bundler
constant_resolver (>= 0.2.0)
parallel
parser
prism (>= 0.24.0)
sorbet-runtime (>= 0.5.9914)
zeitwerk (>= 2.6.1)
pagy (5.10.1)
activesupport
paper_trail (15.1.0)
Expand All @@ -509,6 +528,7 @@ GEM
ruby-rc4
ttfunk
pg (1.2.3)
prism (0.25.0)
private_address_check (0.5.0)
pry (0.13.1)
coderay (~> 1.1)
Expand Down Expand Up @@ -734,6 +754,8 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
smart_properties (1.17.0)
sorbet-runtime (0.5.11346)
spreadsheet_architect (5.0.0)
caxlsx (>= 3.3.0, < 4)
rodf (>= 1.0.0, < 2)
Expand Down Expand Up @@ -926,6 +948,7 @@ DEPENDENCIES
omniauth_openid_connect
openid_connect
order_management!
packwerk
pagy (~> 5.1)
paper_trail
paranoia (~> 2.4)
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
description = "The Open Food Network is an online marketplace for local food.";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils }:
let
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
outputs = flake-utils.lib.eachSystem systems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in rec {
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.ruby
pkgs.bundler
pkgs.gcc
pkgs.postgresql_16_jit
pkgs.nodejs_21
pkgs.redis
pkgs.rubyPackages.prism
pkgs.shared-mime-info
pkgs.libyaml
pkgs.yarn
] ;
# shellHook = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
# export CPATH=$(xcrun --sdk macosx --show-sdk-path)/usr/include

# '';
};
});
in outputs // {};

nixConfig = {};
}
Loading