Commit Graph

88 Commits

Author SHA1 Message Date
DavHau
e37041d443 remove extraDependencies from simpleTranslate2
- this field is unneccessary and `extraObjects` should be sufficient
2022-06-05 16:47:48 +02:00
Yusuf Bera Ertan
9b6638a1a7
feat: implement makeOutputs that outputs systemless structure (#161)
* feat: return underlying d2n instance if pkgs was passed to init, document init pkgs

* feat: implement makeOutputs

* tests: dont fail if resolveImpure fails

* feat: make init return a dream2nix instance, rework makeFlakeOutputs code

* feat: default to source if config.projectRoot is not specified, update examples and readme

* fix: update the simple template

* docs: clarify init in readme

* docs: change readme numbering to back to 1

* refactor: dont default projectRoot to source

* docs: make extensive example use makeFlakeOutputs, link per-pkgs d2n example in readme

* fix: call loadConfig correctly
2022-06-01 22:53:46 +02:00
Yusuf Bera Ertan
645c6fd98e
refactor: implement a validation system for builders / translators, reorganize files (#155)
* refactor: implement a validation system for builders / translators etc, organize files

* refactor: use seq instead of complicated validation function for validator

* feat: allow adding discoverers, translators and builders via config

* refactor: rework discoverers to use makeSubsystemModules as well

* fix: validate extra modules properly

* feat: support inline modules

* feat: use extra attribute for extending

* feat: make fetchers extensible properly

* fix: add name to extra fetchers

* feat: support list for extra

* docs: add some comment to lib/modules.nix

* fix: get extra module args from extraArgs

* fix: collect all modules instead of only collecting modules for built-in subsystems

* refactor: minor improvements

* refactor: improve how default subsystem modules are declared

* fix: translators and builders are directly under subsystem now

* fix: correct attribute path, remove unused argument

* fix: correct translators attribute paths

* fix: correct file paths and translators attribute paths

* fix: use correct translator attr path in wrapPureTranslator

* fix: update unit tests code

* fix: remove extra paranthesis in unit tests code

* tests: add an extended dream2nix example

* refactor: replace recursiveUpdate usage with normal update op

* tests: fix and extend d2n-extended example

* fix: pass config to d2n instance in wrap pure translator script

* fix: correct toFile usage

* fix: pass config to dlib in more places

* fix: pass config to d2n instance in aggregated hashes cli and gomod2nix translator

* refactor: remove unused extra modules validation, add warning for function modules

* fix: remove non-existent inherited variable

* docs: update translator attr path in contributors guide

* docs: add docs for extending dream2nix

* refactor: comment more code, warn for function modules only if extra is an attrset decl

* docs: fix some typos

* docs: explain some stuff in extending d2n better

* fix: print function modules warning when it is a function

* tests: add a new example that tests adding new subsystem and config.extra as nix file

* tests: use cargo-toml as translator on d2n-extended to potentially catch more bugs

* feat: add ifd warning for builders

* tests: use build-rust-package builder instead of crane builder in d2n-extended to also test it instead of only testing crane builder

* fix(rust/builders): always write the generated Cargo.lock so it doesnt get out of sync with our dream-lock

* fix(rust/builders): delete cargo lock before writing it?

* refactor: also print ifd warnings for translators

* docs: link extending d2n doc in readme, link examples in extending d2n

* docs: example naming (translators.new -> translators.example-translator)

* feat: allow setting nix files for modules declarations (eg. subsystems, subsystems.translators)

* refactor: move IFD warnings to src/lib/builders.nix / translators.nix respectively

* refactor: throw instead of warning if function declarations for modules are used

* refactor: fix throw usage

* refactor: improve modules code

* chore(deps): update nixpkgs

* fix: correct some map usages

* fix: use correct attr path for extra modules

* chore: update examples flake inputs

* style: minor formatting changes
2022-05-29 21:42:47 +02:00
DavHau
523b19fa0e fix escaping problem in tests-examples 2022-05-18 20:45:26 +02:00
DavHau
b5d473e2e8 tests-examples: allow passing arguments 2022-05-18 20:42:05 +02:00
DavHau
ed9f030be9 example tests: run all tests despite error 2022-05-17 20:12:26 +02:00
DavHau
4f1b483239 improve testing examples: fail on error 2022-05-17 13:56:08 +02:00
DavHau
2d630b00f2 fix testing examples 2022-05-17 12:17:23 +02:00
DavHau
3a293cc914 automatic unit tests for pure translators
- translators can now enable unit tests via `generateUnitTestsForProjects`
2022-04-24 12:04:08 +02:00
DavHau
e7102302c9 remove deprected ./tests/impure 2022-04-23 15:11:57 +02:00
DavHau
5f8841c794 optimize tests for examples 2022-04-23 15:09:55 +02:00
DavHau
f1f1633804 remove deprecated tests in ./tests/pure 2022-04-20 16:41:37 +02:00
DavHau
feb7eabd0c fixup cargo-lock translator 2022-04-17 14:42:48 +02:00
DavHau
1ac93e4d93 allow executing single test via nix run .#tests-examples {package} 2022-04-15 01:15:37 +02:00
DavHau
28b890821f fix missing git in tests-examples 2022-03-28 23:42:49 +07:00
DavHau
5c037c970d add examples for aggregated fetching 2022-03-28 23:22:54 +07:00
DavHau
502a2fefc5 fix aggregated fetching 2022-03-28 23:20:44 +07:00
DavHau
bc97f186e2 move tests from ./tests/impure to ./examples 2022-03-28 14:14:02 +07:00
DavHau
5b97484a4f improve testing examples 2022-03-28 13:52:35 +07:00
DavHau
f7c034d4ee add ./examples with flake examples 2022-03-27 22:16:45 +07:00
DavHau
c90bcd7389 disable go translator 2022-03-12 23:08:02 +07:00
DavHau
d0cfed18e7 add inject for lib2 2022-03-10 17:05:34 +07:00
DavHau
6b015ff9f5 fixup formatting issues 2022-03-07 18:06:28 +07:00
DavHau
076a1c9aff treewide: format with alejandra 1.0.0
closes #84
2022-03-07 18:06:18 +07:00
DavHau
68478d0772 formatting: add flake apps + prepare hooks 2022-03-07 13:57:22 +07:00
DavHau
07a2e7cd9f fixes for yarn-lock translator 2022-03-02 12:44:12 +07:00
DavHau
767db79095 raname: riseAndShine -> make[Flake]Outputs 2022-02-22 20:21:33 +07:00
DavHau
d7974d45f7 fix translator test for package-json 2022-02-08 17:54:10 +07:00
DavHau
87b6959039 fix updating packages + add test 2021-12-09 15:47:08 +07:00
Yusuf Bera Ertan
bfcd5b6f35
feat: cargo lock translator, rust builder (#59) 2021-11-29 18:34:53 +07:00
DavHau
b8dc44d0f2 feature: translate subdir of source via ?dir=foo 2021-11-24 08:50:05 +07:00
DavHau
9d2d385273 test nix funcs with pytest via nix_ffi.py 2021-11-20 11:34:04 +07:00
DavHau
5ad6855226 fix: aggregated fetching 2021-11-18 12:09:14 +07:00
DavHau
4cf80a1460 add test for aggregated fetching: github source 2021-11-17 17:40:09 +07:00
DavHau
97e2fef121 fix & improve aggregated source fetching 2021-11-17 17:09:25 +07:00
DavHau
2f4ac1e6c2 add tests for gomod2nix 2021-11-17 11:45:04 +07:00
DavHau
3b5b9096e1 hercules ci + improvements
- yarn-lock: add nodejs version argument
 - add impure tests
 - add ci.nix for hercules
2021-11-17 11:23:31 +07:00
DavHau
3cbac60c4d add: support git URLs in package-lock parser 2021-10-21 13:45:49 +07:00