Skip to content

Commit

Permalink
Initial nix
Browse files Browse the repository at this point in the history
  • Loading branch information
syntacticsagar committed Apr 7, 2024
1 parent cf9414a commit a1dcb12
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .envrc
use flake
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.

39 changes: 39 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
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.postgresql_16_jit
pkgs.nodejs_21
pkgs.redis
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 = {};
}

0 comments on commit a1dcb12

Please sign in to comment.