22 lines
506 B
Nix
22 lines
506 B
Nix
with (import <nixpkgs> {});
|
|
let
|
|
env = bundlerEnv {
|
|
name = "postfix_exporter-bundler-env";
|
|
inherit ruby;
|
|
gemfile = ./Gemfile;
|
|
lockfile = ./Gemfile.lock;
|
|
gemset = ./gemset.nix;
|
|
};
|
|
in stdenv.mkDerivation {
|
|
name = "postfix-exporter";
|
|
buildInputs = [ pkgs.libffi pkgs.systemd pkgs.ruby env env.gems.puma ];
|
|
buildPhase = ''
|
|
echo "Build postfix_exporter
|
|
mkdir -p "$out/lib"
|
|
for f in ${pkgs.systemd}/lib/libsystemd*
|
|
do
|
|
ln -s "$f" "$out/lib/"
|
|
done
|
|
'';
|
|
}
|