vuls: init at 0.27.0
[NixPkgs.git] / lib / tests / modules / types.nix
blob7c43a6819e0e878343f07691443d01fd408d0bdc
1 { lib, ... }:
2 let
3   inherit (builtins)
4     storeDir;
5   inherit (lib)
6     types
7     mkOption
8     ;
9 in
11   options = {
12     pathInStore = mkOption { type = types.lazyAttrsOf types.pathInStore; };
13   };
14   config = {
15     pathInStore.ok1 = "${storeDir}/0lz9p8xhf89kb1c1kk6jxrzskaiygnlh-bash-5.2-p15.drv";
16     pathInStore.ok2 = "${storeDir}/0fb3ykw9r5hpayd05sr0cizwadzq1d8q-bash-5.2-p15";
17     pathInStore.ok3 = "${storeDir}/0fb3ykw9r5hpayd05sr0cizwadzq1d8q-bash-5.2-p15/bin/bash";
18     pathInStore.bad1 = "";
19     pathInStore.bad2 = "${storeDir}";
20     pathInStore.bad3 = "${storeDir}/";
21     pathInStore.bad4 = "${storeDir}/.links"; # technically true, but not reasonable
22     pathInStore.bad5 = "/foo/bar";
23   };