1{ pkgs, lib, haskellLib }:
13 package.identifier.name = "empty";
18 benchmarks = { bbb = "bbb"; };
19 exes = { eee = "eee"; };
20 foreignlibs = { fff = "fff"; };
23 tests = { ttt = "ttt"; };
25 package.identifier.name = "nnn";
28 testRepo = pkgs.fetchgit {
29 url = "https://github.com/input-output-hk/haskell.nix.git";
30 rev = "487eea1c249537d34c27f6143dff2b9d5586c657";
31 sha256 = "077j5j3j86qy1wnabjlrg4dmqy1fv037dyq3xb8ch4ickpxxs123";
35 # identity function for applyComponents
36 test-applyComponents-id = {
37 expr = haskellLib.applyComponents (componentId: component: component) emptyConfig;
38 expected = emptyConfig.components;
41 # map a component to its component name and check these are correct
42 test-applyComponents-library = {
43 expr = haskellLib.applyComponents (componentId: component: componentId.cname) emptyConfig;
44 expected = emptyConfig.components // { library = "empty"; };
47 test-applyComponents-components = {
48 expr = haskellLib.applyComponents (componentId: component: component) componentsConfig;
49 expected = componentsConfig.components;
52 # testing that the tests work
59 expr = __toJSON (haskellLib.parseBlock "cabal.project" (_: null) ''
61 location: https://github.com/input-output-hk/haskell.nix.git
62 tag: 487eea1c249537d34c27f6143dff2b9d5586c657
63 --sha256: 077j5j3j86qy1wnabjlrg4dmqy1fv037dyq3xb8ch4ickpxxs123
67 otherText = "-- end of block\n";
68 sourceRepo = [testRepo];
73 expr = __toJSON (haskellLib.parseBlock "cabal.project" (_: null) ''
75 location: https://github.com/input-output-hk/haskell.nix.git
76 tag: 487eea1c249537d34c27f6143dff2b9d5586c657
77 --sha256: 077j5j3j86qy1wnabjlrg4dmqy1fv037dyq3xb8ch4ickpxxs123
82 otherText = "-- end of block\n";
83 sourceRepo = [(testRepo + "/dir")];
88 expr = __toJSON (haskellLib.parseBlock "cabal.project" (_: null) ''
90 location: https://github.com/input-output-hk/haskell.nix.git
91 tag: 487eea1c249537d34c27f6143dff2b9d5586c657
92 --sha256: 077j5j3j86qy1wnabjlrg4dmqy1fv037dyq3xb8ch4ickpxxs123
97 otherText = "-- end of block\n";
98 sourceRepo = [(testRepo + "/dir1") (testRepo + "/dir2")];
103 expr = __toJSON (haskellLib.parseBlock "cabal.project" (_: null) ''
105 location: https://github.com/input-output-hk/haskell.nix.git
106 tag: 487eea1c249537d34c27f6143dff2b9d5586c657
107 --sha256: 077j5j3j86qy1wnabjlrg4dmqy1fv037dyq3xb8ch4ickpxxs123
113 expected = __toJSON {
114 otherText = "-- end of block\n";
115 sourceRepo = [(testRepo + "/dir1") (testRepo + "/dir2")];
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list