---
language: nix
-nix: 2.3.1
+nix: 2.3.4
+env:
+ - CUSTOM_NIX_PATH=nixpkgs=channel:nixos-20.09
-
-# Use the new container infrastructure
-sudo: false
+# Travis nix integration will install nix AFTER the environment variables are set
+# and the nix installer will overide NIX_PATH variable thus we need to re-export it
+before_install:
+ - export NIX_PATH="$CUSTOM_NIX_PATH"
install:
- # Update nix channels
- - nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs
- - nix-channel --remove nixpkgs-unstable
- - nix-channel --update
-
- # Install ansible
- - nix-env -i python3 ansible ansible-lint
- - nix-env -if ./dhall-1.34.0.nix
+ # Install dependencies
+ - nix-env -i -f ./default.nix
# Check ansible version
- ansible --version
{ pkgs ? import <nixpkgs> {} }: with pkgs;
let
- mkVersion =
+ mkDhallVersion =
version: sha256:
stdenv.mkDerivation {
name = "dhall-${version}";
'';
};
in
- mkVersion "1.34.0" "0n64jkgbv7a3cmlv3gxpgc11p9b5w0k9nc0zm9am2pzmp6vm6b4n"
+{
+ dhall = mkDhallVersion "1.34.0" "0n64jkgbv7a3cmlv3gxpgc11p9b5w0k9nc0zm9am2pzmp6vm6b4n";
+}
--- /dev/null
+{ pkgs ? import <nixpkgs> {} }: with pkgs;
+
+ let
+ custom = callPackage ./custom.nix {};
+ in
+{
+ inherit ansible_2_8;
+ inherit (custom)dhall;
+ inherit (python38Packages)
+ ansible-lint;
+}