summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/beef/default.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-10-01 17:54:06 +0200
committerlassulus <lassulus@lassul.us>2017-10-01 17:54:06 +0200
commitd7f65ea679866f24e4ca52b51bd6f068a6b38195 (patch)
tree6a09e7cc2a4c9af0507bdc189652c78832a2f952 /makefu/5pkgs/beef/default.nix
parentd973c779eb71749af464edb1ed0216b0d5317eb2 (diff)
parente62f376e6177f3efb0e0bcd3aad97a991c3b6d60 (diff)
Merge branch 'master' into staging/17.09
Diffstat (limited to 'makefu/5pkgs/beef/default.nix')
-rw-r--r--makefu/5pkgs/beef/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/makefu/5pkgs/beef/default.nix b/makefu/5pkgs/beef/default.nix
new file mode 100644
index 000000000..82540cde9
--- /dev/null
+++ b/makefu/5pkgs/beef/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, bundlerEnv, ruby, fetchFromGitHub }:
+# nix-shell --command "bundler install && bundix" in the clone, copy gemset.nix, Gemfile and Gemfile.lock
+let
+ gems = bundlerEnv {
+ name = "beef-env";
+ inherit ruby;
+ gemdir = ./.;
+ };
+in stdenv.mkDerivation {
+ name = "beef-2017-09-21";
+ src = fetchFromGitHub {
+ owner = "beefproject";
+ repo = "beef";
+ rev = "69aa2a3";
+ sha256 = "1rky61i0wzpwcq3kqfa0m5hf6wyz8q8jgzs7dpfh04w9qh32ic4p";
+ };
+ buildInputs = [gems ruby];
+ installPhase = ''
+ mkdir -p $out/{bin,share/beef}
+
+ cp -r * $out/share/beef
+ # set the default db path, unfortunately setting to /tmp does not seem to work
+ # sed -i 's#db_file: .*#db_file: "/tmp/beef.db"#' $out/share/beef/config.yaml
+
+ bin=$out/bin/beef
+ cat > $bin <<EOF
+#!/bin/sh -e
+exec ${gems}/bin/bundle exec ${ruby}/bin/ruby $out/share/beef/beef "\$@"
+EOF
+ chmod +x $bin
+ '';
+
+ # crashes with segfault
+ # also, db cannot be set
+ meta.broken = true;
+
+}