]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
core: define nix env for travis with a unique default.nix file 69/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Fri, 19 Jun 2020 15:37:16 +0000 (17:37 +0200)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 22 Jun 2020 13:40:01 +0000 (15:40 +0200)
.travis.yml
default.nix [new file with mode: 0644]
dhall-1.26.1.nix [deleted file]

index d287c26255826fb7b9a9c0c65afab7e9a586795f..92f6295cf48d8ceaf869d533a17b99479a88fffa 100644 (file)
@@ -1,13 +1,12 @@
 ---
 sudo: false
 language: nix
-nix: 2.2.1
+nix: 2.3.4
 env:
-  - NIX_PATH=nixpkgs=channel:nixos-19.09
+  - NIX_PATH=nixpkgs=channel:nixos-20.03
 
 install:
-  - nix-env -iA pkgs.python37Packages.ansible-lint pkgs.python37Packages.ansible pkgs.shellcheck -f '<nixpkgs>'
-  - nix-env -if ./dhall-1.26.1.nix
+  - nix-env -i -f ./default.nix
 
   # Check ansible version
   - ansible --version
diff --git a/default.nix b/default.nix
new file mode 100644 (file)
index 0000000..15ee01e
--- /dev/null
@@ -0,0 +1,11 @@
+{ pkgs ? import <nixpkgs> {} }:
+
+with pkgs;
+{
+  inherit shellcheck
+          ansible_2_8;
+  inherit (python37Packages)
+          ansible-lint;
+  inherit (haskellPackages)
+          dhall_1_27_0;
+}
diff --git a/dhall-1.26.1.nix b/dhall-1.26.1.nix
deleted file mode 100644 (file)
index 918a528..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{ pkgs ? import <nixpkgs> {} }: with pkgs;
-
-let
-  mkVersion =
-    version: sha256:
-      stdenv.mkDerivation {
-        name = "dhall-${version}";
-        inherit version;
-        src = fetchurl {
-          url = "https://github.com/dhall-lang/dhall-haskell/releases/download/${version}/dhall-${version}-x86_64-linux.tar.bz2";
-          inherit sha256;
-        };
-        unpackPhase = ''
-          tar -xjf $src
-        '';
-        installPhase = ''
-          mkdir -p $out/bin
-          mv bin/dhall $out/bin/
-        '';
-      };
-in
-  mkVersion "1.26.1" "0sl4r3mfairgd6kn26hs1r1lkh8rn992grd73078rhqf5w90ag05"