2018-05-04 09:52:33 -04:00
|
|
|
{ pkgs ? import ./nix {}, useNix1 ? false }:
|
2017-10-29 17:10:26 -04:00
|
|
|
|
2018-04-04 17:13:56 -04:00
|
|
|
let
|
2017-10-29 17:10:26 -04:00
|
|
|
inherit (pkgs) stdenv;
|
|
|
|
|
2017-11-05 09:46:42 -05:00
|
|
|
phpEnv = stdenv.mkDerivation rec {
|
|
|
|
name = "gh-event-forwarder";
|
2017-11-09 07:33:10 -05:00
|
|
|
src = null;
|
2017-11-05 09:46:42 -05:00
|
|
|
buildInputs = with pkgs; [
|
2017-11-29 22:31:40 -05:00
|
|
|
nix-prefetch-git
|
2017-11-05 09:46:42 -05:00
|
|
|
php
|
|
|
|
phpPackages.composer
|
|
|
|
git
|
|
|
|
php
|
|
|
|
curl
|
|
|
|
bash
|
2018-04-04 17:13:56 -04:00
|
|
|
]
|
2018-04-12 15:35:07 -04:00
|
|
|
++ stdenv.lib.optional useNix1 nix1;
|
2017-11-05 09:46:42 -05:00
|
|
|
|
2017-11-29 22:31:40 -05:00
|
|
|
# HISTFILE = "${src}/.bash_hist";
|
2017-11-05 09:46:42 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
rustEnv = stdenv.mkDerivation rec {
|
|
|
|
name = "gh-event-forwarder";
|
|
|
|
buildInputs = with pkgs; [
|
2017-11-29 22:31:40 -05:00
|
|
|
nix-prefetch-git
|
2017-11-05 09:46:42 -05:00
|
|
|
rust.rustc
|
|
|
|
rust.cargo
|
2018-01-21 14:17:25 -05:00
|
|
|
rustfmt
|
2017-11-29 22:31:40 -05:00
|
|
|
carnix
|
2017-11-14 08:32:28 -05:00
|
|
|
openssl.dev
|
|
|
|
pkgconfig
|
2018-01-29 14:27:34 -05:00
|
|
|
git
|
2018-04-04 17:13:56 -04:00
|
|
|
]
|
2018-04-12 15:35:07 -04:00
|
|
|
++ stdenv.lib.optional useNix1 nix1
|
2018-04-04 17:13:56 -04:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin pkgs.darwin.Security;
|
2017-11-05 09:46:42 -05:00
|
|
|
|
2018-04-12 17:23:32 -04:00
|
|
|
postHook = ''
|
|
|
|
checkPhase() {
|
|
|
|
( cd "${builtins.toString ./.}/ofborg" && cargo test --lib )
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
2017-11-09 07:33:10 -05:00
|
|
|
HISTFILE = "${toString ./.}/.bash_hist";
|
2018-04-12 17:23:32 -04:00
|
|
|
RUSTFLAGS = "-D warnings";
|
|
|
|
|
2017-12-04 20:55:44 -05:00
|
|
|
passthru.phpEnv = phpEnv;
|
2017-11-05 09:46:42 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-12-04 20:55:44 -05:00
|
|
|
in rustEnv
|