]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
travis: use recent nixpkgs channel (20.09) to install dependencies 21/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 5 Oct 2020 16:48:57 +0000 (18:48 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Tue, 6 Oct 2020 11:14:16 +0000 (13:14 +0200)
.travis.yml
custom.nix [moved from dhall-1.34.0.nix with 82% similarity]
default.nix [new file with mode: 0644]
tests/kong.py

index 6c68012aa55314df0afe167791acbd12be1ef55e..6c36f0a4babe3b8a4b59d6c5bd5cef902690d05b 100644 (file)
@@ -1,20 +1,17 @@
 ---
 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
similarity index 82%
rename from dhall-1.34.0.nix
rename to custom.nix
index a70d201f47ccfae3c5517f0b2343d2638dc5d6a1..f8fe7ce4bfb02fd577effc0a5718d58394de1ef5 100644 (file)
@@ -1,7 +1,7 @@
 { pkgs ? import <nixpkgs> {} }: with pkgs;
 
 let
-  mkVersion =
+  mkDhallVersion =
     version: sha256:
       stdenv.mkDerivation {
         name = "dhall-${version}";
@@ -19,4 +19,6 @@ let
         '';
       };
 in
-  mkVersion "1.34.0" "0n64jkgbv7a3cmlv3gxpgc11p9b5w0k9nc0zm9am2pzmp6vm6b4n"
+{
+  dhall = mkDhallVersion "1.34.0" "0n64jkgbv7a3cmlv3gxpgc11p9b5w0k9nc0zm9am2pzmp6vm6b4n";
+}
diff --git a/default.nix b/default.nix
new file mode 100644 (file)
index 0000000..6c1756e
--- /dev/null
@@ -0,0 +1,11 @@
+{ pkgs ? import <nixpkgs> {} }: with pkgs;
+
+  let
+    custom = callPackage ./custom.nix {};
+  in
+{
+  inherit ansible_2_8;
+  inherit (custom)dhall;
+  inherit (python38Packages)
+          ansible-lint;
+}
index 32bafb2027906fcc734ee979901c29e0d108ab1c..4e2df2803103b64441089102865dddc25de45e68 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from http.server import HTTPServer, CGIHTTPRequestHandler