Skip to content

Instantly share code, notes, and snippets.

@paperdigits
Created January 10, 2017 06:15
Show Gist options
  • Save paperdigits/a0663416c58b96a0b9d2bee537ba5040 to your computer and use it in GitHub Desktop.
Save paperdigits/a0663416c58b96a0b9d2bee537ba5040 to your computer and use it in GitHub Desktop.
nix-shell environment for middleman
# nix-shell -p bundler bundix
# bundler lock && bundler package --path vendor/cache --no-install && bundix && exit
# nix-shell
with (import <nixpkgs> {});
let
env = bundlerEnv {
name = "test-package";
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in stdenv.mkDerivation {
name = "test-package";
buildInputs = [
env
ruby
zlib # needed by nokogiri
libiconv # needed by nokogiri
nodejs
];
shellHook = ''
npm install bower
./node_modules/bower/bin/bower install
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment