summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorJohn Soo <jsoo1@asu.edu>2020-04-10 21:01:46 -0700
committerLeo Famulari <leo@famulari.name>2020-05-29 10:44:34 -0400
commit9ff667ea05d0807b4e6512c92914ae517b9ec755 (patch)
tree3357fc3939c4e717425ad6214d4d9b5450245c45 /gnu/packages/patches
parentb7250901f6e0143a6838d924742397986c1764b0 (diff)
downloadguix-9ff667ea05d0807b4e6512c92914ae517b9ec755.tar.gz
gnu: Add dhall.
* gnu/packages/dhall.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
(dist_patch_DATA): Add new patch.
* gnu/packages/patches/dhall-remove-network-tests.patch: Add patch to remove
dhall network tests.

Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/dhall-remove-network-tests.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/gnu/packages/patches/dhall-remove-network-tests.patch b/gnu/packages/patches/dhall-remove-network-tests.patch
new file mode 100644
index 0000000000..c260e7844d
--- /dev/null
+++ b/gnu/packages/patches/dhall-remove-network-tests.patch
@@ -0,0 +1,97 @@
+diff a/dhall-lang/tests/import/failure/referentiallyInsane.dhall b/dhall-lang/tests/import/failure/referentiallyInsane.dhall
+--- a/dhall-lang/tests/import/failure/referentiallyInsane.dhall
++++ /dev/null
+@@ -1,13 +0,0 @@
+-{- The following remote import attempts to import an environment variable, which
+-   must be disallowed by the referential sanity check
+-
+-   One reason for doing this is to protect against remote imports exfiltrating
+-   environment variables (such as via custom headers).  Only referentially
+-   opaque imports (i.e. local imports) have permission to refer to other
+-   referentially opaque imports in order to protect against this attack.
+-
+-   The referential sanity check also ensures that remote imports are
+-   referentially transparent.  Or in other words, any import that is globally
+-   addressable must have a meaning that is not context-sensitive.
+--}
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall
+diff a/dhall-lang/tests/import/success/customHeadersA.dhall b/dhall-lang/tests/import/success/customHeadersA.dhall
+--- a/dhall-lang/tests/import/success/customHeadersA.dhall
++++ /dev/null
+@@ -1,3 +0,0 @@
+-https://httpbin.org/user-agent
+-  using [ { mapKey = "User-Agent", mapValue = "Dhall" } ]
+-  as Text
+diff a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall b/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
+--- a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{- The purpose of this test is to verify that the custom headers supplied to
+-   this import are not forwarded to the transitive import of
+-   https://httpbin.org/user-agent
+--}
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/success/customHeadersA.dhall
+-  using [ { mapKey = "User-Agent", mapValue = "Secret" } ]
+diff a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall b/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
+--- a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/example.txt as Text
+diff a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall b/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
+--- a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simple.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simpleLocation.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
++++ /dev/null
+@@ -1 +0,0 @@
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
++++ /dev/null
+@@ -1,5 +0,0 @@
+-{-
+-    This test verifies that `env:VAR as Location` isn't rejected as referentially opaque,
+-    as `env:VAR` on its own would.
+--}
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/EnvA.dhall
+diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
+--- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{- This test verifies that `missing as Location` succeeds when chained since:
+-   * The `missing` is never actually resolved (due to the `as Location`)
+-   * The `missing` should be treated as referentially transparent (and therefore
+-     be a valid transitive dependency of a remote import)
+--}
+-https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/MissingA.dhall
+diff a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
+--- a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{-
+-    This URL returns (probably) a different result for each request. This test
+-    ensures that import results for a given URL are correctly cached within an
+-    execution of dhall.
+--}
+-let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text in 0
+diff a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall b/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
+--- a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
++++ /dev/null
+@@ -1,5 +0,0 @@
+-{-
+-    This URL returns (probably) a different result for each request. This test
+-    ensures that import locations are canonicalized before being cached.
+--}
+-let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/../csrng/csrng.php?min=0&max=1000 as Text in 0