From cfb2fd768ee71c68312a2fd02dcda10cdb2d43ad Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Mon, 1 Nov 2021 15:22:10 +0900 Subject: [PATCH] tests.dhall.generateDhallDirectoryPackage: init --- pkgs/test/dhall/default.nix | 1 + .../generateDhallDirectoryPackage/default.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/test/dhall/generateDhallDirectoryPackage/default.nix diff --git a/pkgs/test/dhall/default.nix b/pkgs/test/dhall/default.nix index bdb33acf0238..4c7eba6c9579 100644 --- a/pkgs/test/dhall/default.nix +++ b/pkgs/test/dhall/default.nix @@ -2,4 +2,5 @@ lib.recurseIntoAttrs { buildDhallUrl = callPackage ./buildDhallUrl { }; + generateDhallDirectoryPackage = callPackage ./generateDhallDirectoryPackage { }; } diff --git a/pkgs/test/dhall/generateDhallDirectoryPackage/default.nix b/pkgs/test/dhall/generateDhallDirectoryPackage/default.nix new file mode 100644 index 000000000000..4771e1629806 --- /dev/null +++ b/pkgs/test/dhall/generateDhallDirectoryPackage/default.nix @@ -0,0 +1,17 @@ +{ dhallPackages, fetchFromGitHub }: + +# This file tests that dhallPackages.generateDhallDirectoryPackage works. +# +# TODO: It would be nice to extend this test to make sure that the resulting +# Nix file has the expected contents, but it might be tough to do that easily +# without IFD. + +dhallPackages.generateDhallDirectoryPackage { + src = fetchFromGitHub { + owner = "cdepillabout"; + repo = "example-dhall-nix"; + rev = "e6a675c72ecd4dd23d254a02aea8181fe875747f"; + sha256 = "sha256-c/EZq76s/+hmLkaeJWKqgh2KrHuJRYI6kWry0E0YQ6s="; + }; + file = "mydhallfile.dhall"; +}