Commit Graph

651 Commits

Author SHA1 Message Date
Yusuf Bera Ertan
f23add2b9c
fix(rust): apply overrideAttrs function properly to the final derivations 2022-06-21 18:44:45 +03:00
Yusuf Bera Ertan
16f11d2469
feat(rust/crane): passthru dependency derivation 2022-06-18 20:52:19 +03:00
Yusuf Bera Ertan
5f20f98aa2
feat: implement overrideRustToolchain for crane and build-rust-package (#175) 2022-06-18 18:24:05 +03:00
DavHau
ddf087ae91
Merge pull request #164 from nix-community/haskell
stack-lock translator & haskell builder
2022-06-18 15:05:59 +02:00
DavHau
2ce89fd481 haskell: clean up and add more comments 2022-06-16 18:49:37 +02:00
DavHau
7bbfd8e940 add documentation strings to stack-lock/utils.nix 2022-06-16 18:37:59 +02:00
DavHau
b45c224383 simpleTranslate2: improve unit tests. Be more lazy 2022-06-16 18:10:04 +02:00
Yusuf Bera Ertan
caa9c4b5ef
docs(cli): implement preview instead of just listing with fzf and bat 2022-06-16 00:01:55 +03:00
Yusuf Bera Ertan
709e4aa139
refactor: move docs script to seperate file 2022-06-15 23:44:18 +03:00
Andrea Ciceri
a65730e23d
Using cabal2json from nixpkgs instead that from a flake (#176)
* Nixpkgs input updated

Starting from now `cabal2json` is available in nixpkgs

* Using `cabal2json` from Nixpkgs

* Using more idiomatic `haskellLib` utils

* Formatting
2022-06-15 15:52:13 +02:00
DavHau
c2a8067aad delete flake.lock of haskell example 2022-06-15 13:26:21 +02:00
Yusuf Bera Ertan
7005441ceb
docs: setup mdbook book for documentation, add CLI app for docs (#173)
* docs: setup mdbook book for documentation

* ci: add github action for docs

* docs: add a cli command for showing docs in terminal

* Update docs/src/subsystems/rust.md

Co-authored-by: Ilan Joselevich <personal@ilanjoselevich.com>

* docs(rust): add example for crane overriding

* docs: add a further reading section to intro

* docs: fix a few links

* docs(readme): move documentation section up and fit some sections into 80 columns

Co-authored-by: Ilan Joselevich <personal@ilanjoselevich.com>
2022-06-13 22:27:05 +03:00
Yusuf Bera Ertan
4c3df83175
Revert "crane builder: apply overrides to -deps derivations"
This reverts commit f13621b7d3.
2022-06-11 17:56:54 +03:00
ners
45e7a3bd50
Fix undefined attribute error (#172) 2022-06-11 13:14:21 +02:00
DavHau
f13621b7d3 crane builder: apply overrides to -deps derivations
fixes #171
2022-06-10 01:50:02 +02:00
DavHau
49ec670653 nodejs builder: support sources starting with dash 2022-06-07 16:39:10 +02:00
DavHau
ee92270f06 fix illegal derivation name introduced by builtins.path 2022-06-07 16:18:37 +02:00
DavHau
ed8a64c463 make builders not depend on dlib and utils 2022-06-07 16:04:20 +02:00
DavHau
31cee1a17a remove node2nix builder 2022-06-05 23:47:27 +02:00
Yusuf Bera Ertan
90b353682e
chore: use numtide devshell instead of nixpkgs mkShell for dream2nix development shell (#169)
chore: use newer devShells output instead of devShell
2022-06-05 19:59:19 +02:00
Yusuf Bera Ertan
7e31c966fb
chore(deps): update crane 2022-06-05 19:02:01 +03:00
DavHau
30401cbc9d fix example for haskell 2022-06-05 16:52:19 +02:00
DavHau
8836a3f422 WIP stack-lock translator & haskell builder 2022-06-05 16:51:37 +02:00
DavHau
d6d94d88db simpleTranslate2: ignore irrelevant dependency objects 2022-06-05 16:51:25 +02:00
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
39eeaaa450
refactor: use new flake output schema for default package and devshells (#168) 2022-06-05 13:17:41 +02:00
Yusuf Bera Ertan
a46486a67e
fix(builder/crane): remove code that triggers IFD, remove dependency on full project source for deps only drv (#166)
* fix(builder/crane): remove code that triggers IFD, remove dependency on full project source for deps only drv

* fix(rust/builders): pass pkgs to utils.nix

* fix(builder/crane): break dependency on whole project source in dependency derivation

* refactor(rust/builders): change nix version to be more close to when reading toFile paths was made non-IFD

* docs(translator/cargo-lock): make the safety comment about unsafeDiscardStringContext usage more clear

* chore(deps): update crane

* fix: use builtins.path to make paths content addressed and named properly in a few places, fix cargo-lock path replacements

* refactor(rust/builders): remove nix version check for writing cargo.lock to store

* tests: update dream2nix input before overriding it

* tests: remove 'flake.lock's, overriding input generates flake.lock correctly

* tests: use nixpkgs from dream2nix input in d2n-init-pkgs

* refactor: remove useless builtins.path calls

* fix: use writeText for writing generated Cargo.lock, toFile causes problems
2022-06-05 13:14:20 +02:00
DavHau
6bc00a70df improve comments in yarn-lock/parser.nix 2022-06-03 14:12:00 +02:00
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