-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
flake.nix
38 lines (34 loc) · 1.18 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
description = "scrape hydra for the build status of a package";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
hydra-check = pkgs.callPackage ./package.nix { };
default = self.packages.${system}.hydra-check;
};
devShells.default = self.packages.${system}.hydra-check.overrideAttrs ({ nativeBuildInputs, ... }: {
nativeBuildInputs = with pkgs.buildPackages; [
cargo # with shell completions, instead of cargo-auditable
cargo-insta # for updating insta snapshots
] ++ nativeBuildInputs;
env = with pkgs.buildPackages; {
# for developments, e.g. symbol lookup in std library
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
# for debugging
RUST_LIB_BACKTRACE = "1";
};
});
});
}