Commit Graph

723 Commits

Author SHA1 Message Date
Yusuf Bera Ertan
33e2a3e39f
fix: add projectRoot to simple template 2022-06-02 17:46:35 +03:00
Yusuf Bera Ertan
8e170fe1f8
chore(deps): update crane 2022-06-02 14:14:34 +03:00
DavHau
073fed4eb2 yarn-lock: add more comments to parser.nix 2022-06-02 09:48:53 +02:00
DavHau
505a3d9976
Merge pull request #165 from nix-community/simpler-discover
Simpler discover
2022-06-01 23:41:12 +02:00
DavHau
4484d3bd75 Revert "simpleTranslate2: ignore irrelevant dependency objects"
This reverts commit c7c59c8353.
2022-06-01 23:29:53 +02:00
DavHau
aab1b396e8 feat: strongly simplified discoverers.
This aims to reduce the complexity of adding support for new ecosystems to dream2nix.

Now`discoverProject` can be defined in a translator, which allows to detect projects for that translator with a simple 3-liner.

This should be the default, and only later if complexity is required a fully featured discoverer needs to be implemented.
2022-06-01 23:29:47 +02:00
DavHau
2047caab52 python ffi: ensure store paths don't lose context 2022-06-01 23:07:40 +02:00
DavHau
7c02eb5e0b fix builder template to fit #155 2022-06-01 23:04:12 +02:00
DavHau
c7c59c8353 simpleTranslate2: ignore irrelevant dependency objects 2022-06-01 23:02:15 +02:00
DavHau
965d1b1a31 cleanup: remove dead code from getDreamLockPath 2022-06-01 23:01:55 +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
ca7f4d0a7f
fix(rust/builders): dont default to rev as ref part while generating Cargo.lock (#163) 2022-05-30 23:58:15 +03:00
DavHau
39facf29df fix templates for pure/impure translator 2022-05-30 18:30:05 +02:00
DavHau
3d0ed21c2a fix contribute app and templates.
adapt to changes from #155
2022-05-30 14:14:56 +02:00
Yusuf Bera Ertan
8d275a1dc9
fix: expose all builder outputs (#162)
* fix: expose all builder outputs

* fix: don't recursively update into derivations
2022-05-29 22:16:44 +02:00
DavHau
c83389fd43 Fix: #152 parse npm:package-name@ver correctly
closes #160

Co-authored-by: tgunnoe
2022-05-29 22:01:08 +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
4b3dfb101f fix broken tsconfig converter script
-  see 72e73fa255 (r74144832)
2022-05-21 14:18:51 +02:00
olaf
bc499a3003
Update README.md (#154)
fix pkgs variable
2022-05-21 10:37:44 +03:00
DavHau
cf39c16a6b yarn-lock: generate unit tests for cardano-js-sdk 2022-05-20 15:35:31 +02:00
DavHau
01c0df4eaf Merge remote-tracking branch 'nrdxp/yarn-fix' 2022-05-20 15:35:22 +02:00
Yusuf Bera Ertan
3a5ed1a596
refactor(builder/crane): use runCommandNoCC instead of runCommand 2022-05-20 15:07:32 +03:00
Timothy DeHerrera
58cafa92ab
fix: bad regex in yarn translator
Also don't allow evaluation to fail, but instead provide default value.
2022-05-19 14:37:56 -06:00
DavHau
7b0162c227 fix builders template 2022-05-19 18:30:06 +02:00
DavHau
fb3789c9a1 update contributors guide 2022-05-19 17:58:08 +02:00
DavHau
0722f0d777 update alejandra code formatter 2022-05-19 17:27:20 +02:00
DavHau
13b7536e28 improve builder template 2022-05-19 17:26:28 +02:00
DavHau
efe9698305 refactor: clean up builder interface 2022-05-19 16:54:32 +02:00
DavHau
1215fff66b readme: fix typo 2022-05-19 16:07:34 +02:00
Yusuf Bera Ertan
ce73e1a256
fix(rust/builders): change a null default to a string default so hasPrefix doesnt error 2022-05-18 22:52:12 +03:00
DavHau
2cdf24dfb7
Merge pull request #147 from yusdacra/main
Follow up fixes for #144
2022-05-18 20:49:16 +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
Yusuf Bera Ertan
1bfa39b68e
fix(translator/cargo-toml): fix comment, actually inherit options from cargo-lock 2022-05-18 19:16:07 +03:00
Yusuf Bera Ertan
00bef62ae7
fix(rust/builders): remove IFD while using writeCargoLock 2022-05-18 19:13:40 +03:00
Yusuf Bera Ertan
a4c4b64bd7
fix(examples): remove dream-lock.json files from git 2022-05-18 19:10:31 +03:00
Yusuf Bera Ertan
2fd96e44e9
feat: implement cargo-toml impure translator for rust subsystem (#144) 2022-05-18 09:21:56 +03:00
DavHau
ed9f030be9 example tests: run all tests despite error 2022-05-17 20:12:26 +02:00
DavHau
ad48c2134c Merge remote-tracking branch 'jaen/resolve-path-sources-relative-to-source-root' 2022-05-17 20:11:55 +02:00
DavHau
0ace4f5e05
fix src/fetchers/default-fetcher.nix 2022-05-17 20:11:32 +02:00
DavHau
bb5be4955d fix typo in builder template 2022-05-17 19:31:47 +02:00
DavHau
4f1b483239 improve testing examples: fail on error 2022-05-17 13:56:08 +02:00
DavHau
db19f7c07a add path-example for nodejs 2022-05-17 12:57:57 +02:00
DavHau
1e016126ef fix path sources not supplied with root[Name|Version] 2022-05-17 12:57:03 +02:00
DavHau
2d630b00f2 fix testing examples 2022-05-17 12:17:23 +02:00
DavHau
8574ecf381 nodejs: account for empty dependencies 2022-05-17 12:16:49 +02:00
Yusuf Bera Ertan
34a272a39c
fix(fetcher): make sourceRoot be used after rootName and rootVersion are tried for path sources 2022-05-15 23:11:37 +03:00
DavHau
9003aed816 readme: ad section funding 2022-05-15 19:04:07 +02:00
Tomek Mańko
15b822a040 Resolve path sources relative to the source root 2022-05-08 21:29:01 +02:00
DavHau
e5d0e9cdb0 fix comment python discoverer 2022-05-06 15:47:47 +02:00