build phase for rust pedantry
This commit is contained in:
parent
164e2ccbe2
commit
87974028d1
|
@ -3,9 +3,11 @@ nix: 2.1
|
|||
sudo: true
|
||||
matrix:
|
||||
include:
|
||||
- name: checkPhase - Nix 2
|
||||
script: nix-shell --run checkPhase --arg useNix1 false
|
||||
- name: checkPhase - Nix 2
|
||||
script: nix-shell --run checkPhase --arg useNix1 false
|
||||
- name: checkPhase - Nix 1
|
||||
script: nix-shell --run checkPhase --arg useNix1 true
|
||||
- name: nix-build
|
||||
script: nix-build -A ofborg.rs
|
||||
- name: cargo pedantry
|
||||
script: nix-shell --run pedantryPhase --arg useNix1 false -A mozilla-rust-overlay
|
||||
|
|
34
shell.nix
34
shell.nix
|
@ -35,6 +35,40 @@ let
|
|||
# HISTFILE = "${src}/.bash_hist";
|
||||
};
|
||||
|
||||
mozilla-rust-overlay = stdenv.mkDerivation (rec {
|
||||
name = "gh-event-forwarder";
|
||||
buildInputs = with pkgs; [
|
||||
bash
|
||||
nix-prefetch-git
|
||||
rust.rustc
|
||||
rust.cargo
|
||||
#rustfmt
|
||||
#carnix
|
||||
openssl.dev
|
||||
pkgconfig
|
||||
git
|
||||
]
|
||||
++ stdenv.lib.optional useNix1 oldpkgs.nix1
|
||||
++ stdenv.lib.optional stdenv.isDarwin pkgs.darwin.Security;
|
||||
|
||||
postHook = ''
|
||||
checkPhase() {
|
||||
( cd "${builtins.toString ./.}/ofborg" && cargo build && cargo test)
|
||||
}
|
||||
'';
|
||||
|
||||
HISTFILE = "${toString ./.}/.bash_hist";
|
||||
RUSTFLAGS = "-D warnings";
|
||||
RUST_BACKTRACE = "1";
|
||||
RUST_LOG = "ofborg=debug";
|
||||
NIX_PATH = "nixpkgs=${pkgs.path}";
|
||||
passthru.phpEnv = phpEnv;
|
||||
}
|
||||
// stdenv.lib.optionalAttrs stdenv.isLinux {
|
||||
LOCALE_ARCHIVE_2_21 = "${oldpkgs.glibcLocales}/lib/locale/locale-archive";
|
||||
LOCALE_ARCHIVE_2_27 = "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
||||
});
|
||||
|
||||
rustEnv = stdenv.mkDerivation (rec {
|
||||
name = "gh-event-forwarder";
|
||||
buildInputs = with pkgs; [
|
||||
|
|
Loading…
Reference in a new issue