-
-
Save pta2002/a99db82cde6c5d141d550da0789c53a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, bundlerEnv, ruby, v8, pkgs, which, python }: | |
let | |
gems = bundlerEnv { | |
name = "feedbin-env"; | |
inherit ruby; | |
gemdir = ./.; | |
gemConfig = pkgs.defaultGemConfig // { | |
libv8 = attrs: { | |
buildFlags = [ "--with-system-v8=true" "--with-v8-dir=${v8}" ]; | |
buildInputs = [ v8 python which ]; | |
dontBuild = false; | |
postPatch = '' | |
substituteInPlace ext/libv8/extconf.rb \ | |
--replace "location = Libv8::Location::Vendor.new" \ | |
"location = Libv8::Location::System.new" | |
''; | |
}; | |
}; | |
}; | |
in stdenv.mkDerivation { | |
name = "feedbin"; | |
src = ./.; | |
buildInputs = [ gems ruby ]; | |
installPhase = '' | |
mkdir -p $out/{bin,share/feedbin} | |
cp -r * $out/share/feedbin | |
bin=$out/bin/feedbin | |
cat > $bin <<EOF | |
#!/bin/sh -e | |
exec ${gems}/bin/bundle exec foreman start | |
EOF | |
chmod +x $bin | |
''; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment