add nix-shell for local development
This commit is contained in:
parent
28287ad4aa
commit
1e404025d9
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
let
|
let
|
||||||
f = (path: type: ! builtins.elem (baseNameOf path) [ ".git" "node_modules" "result" ]);
|
src = import ./source.nix;
|
||||||
src = builtins.filterSource f ./.;
|
|
||||||
in
|
in
|
||||||
pkgs.mastodon.override {
|
pkgs.mastodon.override {
|
||||||
pname = "mastodon-queer-af";
|
pname = "mastodon-queer-af";
|
||||||
|
|
24
shell.nix
Normal file
24
shell.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
let
|
||||||
|
src = import ./source.nix;
|
||||||
|
gems = pkgs.bundlerEnv {
|
||||||
|
name = "mastodon-gems";
|
||||||
|
gemdir = ./.;
|
||||||
|
};
|
||||||
|
yarns = pkgs.mkYarnPackage {
|
||||||
|
pname = "mastodon-yarns";
|
||||||
|
yarnNix = ./yarn.nix;
|
||||||
|
packageJSON = ./package.json;
|
||||||
|
version = "0.0.0";
|
||||||
|
inherit src;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = [ gems gems.wrappedRuby pkgs.yarn pkgs.nodejs pkgs.foreman ];
|
||||||
|
|
||||||
|
RAILS_ENV = "development";
|
||||||
|
|
||||||
|
# The rails bits default to this, but the node bits don't, which cause weird
|
||||||
|
# errors trying to run the streaming component without sourcing a .envrc.
|
||||||
|
DB_HOST = "/var/run/postgresql";
|
||||||
|
}
|
4
source.nix
Normal file
4
source.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
let
|
||||||
|
f = (path: type: ! builtins.elem (baseNameOf path) [ ".git" "node_modules" "result" ]);
|
||||||
|
in
|
||||||
|
builtins.filterSource f ./.
|
Loading…
Reference in a new issue