diff options
-rw-r--r-- | .travis.yml | 21 | ||||
-rw-r--r-- | custom.nix (renamed from dhall-1.34.0.nix) | 6 | ||||
-rw-r--r-- | default.nix | 11 | ||||
-rwxr-xr-x | tests/kong.py | 2 |
4 files changed, 25 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml index 6c68012..6c36f0a 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -1,20 +1,17 @@ | |||
1 | --- | 1 | --- |
2 | language: nix | 2 | language: nix |
3 | nix: 2.3.1 | 3 | nix: 2.3.4 |
4 | env: | ||
5 | - CUSTOM_NIX_PATH=nixpkgs=channel:nixos-20.09 | ||
4 | 6 | ||
5 | 7 | # Travis nix integration will install nix AFTER the environment variables are set | |
6 | # Use the new container infrastructure | 8 | # and the nix installer will overide NIX_PATH variable thus we need to re-export it |
7 | sudo: false | 9 | before_install: |
10 | - export NIX_PATH="$CUSTOM_NIX_PATH" | ||
8 | 11 | ||
9 | install: | 12 | install: |
10 | # Update nix channels | 13 | # Install dependencies |
11 | - nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs | 14 | - nix-env -i -f ./default.nix |
12 | - nix-channel --remove nixpkgs-unstable | ||
13 | - nix-channel --update | ||
14 | |||
15 | # Install ansible | ||
16 | - nix-env -i python3 ansible ansible-lint | ||
17 | - nix-env -if ./dhall-1.34.0.nix | ||
18 | 15 | ||
19 | # Check ansible version | 16 | # Check ansible version |
20 | - ansible --version | 17 | - ansible --version |
diff --git a/dhall-1.34.0.nix b/custom.nix index a70d201..f8fe7ce 100644 --- a/dhall-1.34.0.nix +++ b/custom.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { pkgs ? import <nixpkgs> {} }: with pkgs; | 1 | { pkgs ? import <nixpkgs> {} }: with pkgs; |
2 | 2 | ||
3 | let | 3 | let |
4 | mkVersion = | 4 | mkDhallVersion = |
5 | version: sha256: | 5 | version: sha256: |
6 | stdenv.mkDerivation { | 6 | stdenv.mkDerivation { |
7 | name = "dhall-${version}"; | 7 | name = "dhall-${version}"; |
@@ -19,4 +19,6 @@ let | |||
19 | ''; | 19 | ''; |
20 | }; | 20 | }; |
21 | in | 21 | in |
22 | mkVersion "1.34.0" "0n64jkgbv7a3cmlv3gxpgc11p9b5w0k9nc0zm9am2pzmp6vm6b4n" | 22 | { |
23 | dhall = mkDhallVersion "1.34.0" "0n64jkgbv7a3cmlv3gxpgc11p9b5w0k9nc0zm9am2pzmp6vm6b4n"; | ||
24 | } | ||
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..6c1756e --- /dev/null +++ b/default.nix | |||
@@ -0,0 +1,11 @@ | |||
1 | { pkgs ? import <nixpkgs> {} }: with pkgs; | ||
2 | |||
3 | let | ||
4 | custom = callPackage ./custom.nix {}; | ||
5 | in | ||
6 | { | ||
7 | inherit ansible_2_8; | ||
8 | inherit (custom)dhall; | ||
9 | inherit (python38Packages) | ||
10 | ansible-lint; | ||
11 | } | ||
diff --git a/tests/kong.py b/tests/kong.py index 32bafb2..4e2df28 100755 --- a/tests/kong.py +++ b/tests/kong.py | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python3 |
2 | 2 | ||
3 | from http.server import HTTPServer, CGIHTTPRequestHandler | 3 | from http.server import HTTPServer, CGIHTTPRequestHandler |
4 | 4 | ||