~matthiasbeyer/imag

50befbedeb9c987d78b12a5cce81b1a9ea95f535 — Matthias Beyer 1 year, 4 months ago 3b344e0
Replace default.nix with shell.nix

Use the ci.nix and move it to shell.nix.
With this, default.nix is no longer needed.

Docs and CI configuration is adapted.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
4 files changed, 5 insertions(+), 37 deletions(-)

M .builds/nixos.yml
D default.nix
M doc/src/09010-contributing.md
R ci.nix => shell.nix
M .builds/nixos.yml => .builds/nixos.yml +4 -4
@@ 12,19 12,19 @@ tasks:
      bash ./scripts/version-updated
  - install: |
      cd imag
      nix-shell ./ci.nix --run "echo nix-shell ready"
      nix-shell ./shell.nix --run "echo nix-shell ready"
  - userdoc: |
      cd imag
      nix-shell ./ci.nix --run "cargo install mdbook --force"
      nix-shell ./shell.nix --run "cargo install mdbook --force"
      cd doc/user
      ~/.cargo/bin/mdbook build
  - build: |
      cd imag
      nix-shell ./ci.nix --run "cargo build --all --all-features"
      nix-shell ./shell.nix --run "cargo build --all --all-features"
  - prepare-test: |
      git config --global user.name "Test user"
      git config --global user.email "test@user.tld"
  - test: |
      cd imag
      nix-shell ./ci.nix --run "cargo test --all --all-features"
      nix-shell ./shell.nix --run "cargo test --all --all-features"


D default.nix => default.nix +0 -32
@@ 1,32 0,0 @@
{ pkgs ? (import <nixpkgs> {}) }:

let
  env = with pkgs.rustChannels.stable; [
    rust
    cargo
  ];

  dependencies = with pkgs; [
    cmake
    curl
    gcc
    libpsl
    openssl
    pkgconfig
    which
    zlib
    dbus
    libtool
  ];
in

pkgs.stdenv.mkDerivation rec {
    name = "imag";
    src = /var/empty;
    version = "0.0.0";

    buildInputs = env ++ dependencies;

    LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
}


M doc/src/09010-contributing.md => doc/src/09010-contributing.md +1 -1
@@ 25,7 25,7 @@ The prerequisites are simple: `cargo` and `rustc` in current version (stable)
or newer (we do not use nighly features though).

Build dependencies for building are listed in the
[default.nix file](http://git.imag-pim.org/imag/tree/default.nix),
[shell.nix file](http://git.imag-pim.org/imag/tree/shell.nix),
though you do not have to have the `nix` package manager installed to build
imag.
Everything else will be done by `cargo`.

R ci.nix => shell.nix +0 -0