Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 164e2ccbe234
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 671a9257c96c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 3, 2019

  1. Copy the full SHA
    8797402 View commit details
  2. Copy the full SHA
    671a925 View commit details
Showing with 41 additions and 2 deletions.
  1. +4 −2 .travis.yml
  2. +37 −0 shell.nix
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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 checkPhase --arg useNix1 false -A mozilla-rust-overlay
37 changes: 37 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -35,6 +35,42 @@ let
# HISTFILE = "${src}/.bash_hist";
};

mozilla-rust-overlay = stdenv.mkDerivation (rec {
name = "mozilla-rust-overlay";
buildInputs = with pkgs; [
latest.rustChannels.stable.rust
git
pkgconfig
openssl.dev
]
++ stdenv.lib.optional stdenv.isDarwin pkgs.darwin.Security;

postHook = ''
checkPhase() (
cd "${builtins.toString ./.}/ofborg"
cargo fmt
git diff --exit-code
cargofmtexit=$?
cargo clippy
cargoclippyexit=$?
sum=$((cargofmtexit + cargoclippyexit))
exit $sum
)
'';

RUSTFLAGS = "-D warnings";
RUST_BACKTRACE = "1";
NIX_PATH = "nixpkgs=${pkgs.path}";
}
// 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; [
@@ -63,6 +99,7 @@ let
RUST_LOG = "ofborg=debug";
NIX_PATH = "nixpkgs=${pkgs.path}";
passthru.phpEnv = phpEnv;
passthru.mozilla-rust-overlay = mozilla-rust-overlay;
}
// stdenv.lib.optionalAttrs stdenv.isLinux {
LOCALE_ARCHIVE_2_21 = "${oldpkgs.glibcLocales}/lib/locale/locale-archive";