Skip to content

Instantly share code, notes, and snippets.

@grahamc
Forked from kalbasit/shell.nix
Last active January 4, 2019 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/f7672646a6d067240ea7b702f80eba52 to your computer and use it in GitHub Desktop.
Save grahamc/f7672646a6d067240ea7b702f80eba52 to your computer and use it in GitHub Desktop.
# This allows overriding nixpkgs by passing `--arg pkgs ...`
{ pkgs ? import ./devtools/lib/nix/nixpkgs.nix {}
, lib ? pkgs.lib
}:
with pkgs;
with lib;
let
ruby = ruby_2_3;
in stdenv.mkDerivation {
name = "keeptruckin-development-environment";
buildInputs = [
# The ruby environment
ruby.devEnv
# Gem dependencies
libxml2 # dependency of the nokogiri Gem
postgresql # dependency of the pg Gem
sqlite # dependency of the sqlite3 Gem
openssl
] ++ optional stdenv.isDarwin [
docker-machine
# Gem dependencies
libiconv # dependency of the nokogiri Gem
] ++ optional stdenv.isLinux [
# TODO: make wkhtmltopdf compatible with Mac!
wkhtmltopdf
];
BUNDLE_BUILD__LIBV8 = "--with-system-v8";
BUNDLE_BUILD__SQLITE3-RUBY = "--with-sqlite3-include=${getDev sqlite}/include --with-sqlite3-lib=${getDev sqlite}/lib";
phases = ["nobuildPhase"];
nobuildPhase = ''
echo
echo "This derivation is not meant to be built, aborting";
echo
exit 1
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment