Commit Graph

25 Commits

Author SHA1 Message Date
Wout Mertens
a840710c12 removed unused node2nix flake input 2022-08-01 18:58:00 +02:00
DavHau
7053299bc5 chore: update alejandra 2022-07-24 00:20:26 +02:00
DavHau
b83394e5f2
haskell: init cabal-plan translator (#192)
* haskell: init cabal-plan translator

* simplify cabal2json: take from new nixpkgs

* delete accidental copy of file

* fix example haskell-plan-json

* rename haskell examples
2022-07-12 21:45:29 +02:00
DavHau
ddf087ae91
Merge pull request #164 from nix-community/haskell
stack-lock translator & haskell builder
2022-06-18 15:05:59 +02: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
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
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
Yusuf Bera Ertan
8e170fe1f8
chore(deps): update crane 2022-06-02 14:14:34 +03: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
0722f0d777 update alejandra code formatter 2022-05-19 17:27:20 +02:00
DavHau
84135ea205 update alejandra 2022-04-04 17:08:26 +01:00
DavHau
68478d0772 formatting: add flake apps + prepare hooks 2022-03-07 13:57:22 +07:00
DavHau
958bdd6699 Squashed commit of the following:
commit c580c24b82
Author: Yusuf Bera Ertan <y.bera003.06@protonmail.com>
Date:   Sun Feb 27 21:51:58 2022 +0300

    feat: expose builders in lib.init

commit 2fe01e1715
Author: Yusuf Bera Ertan <y.bera003.06@protonmail.com>
Date:   Sun Feb 27 18:37:39 2022 +0300

    fix(rust/crane): make sure cargo only builds the package we want

...(more)
2022-02-28 11:25:39 +07:00
DavHau
a0fd6b565e update nixpkgs 2022-02-27 15:21:00 +07:00
DavHau
b78958849d remove dependency nix-parsec 2022-02-23 19:12:33 +07:00
Akshat Agarwal
ff9e30b242 add go support using gomod2nix
Co-authored-by: DavHau <hsngrmpf+github@gmail.com>
2021-11-16 23:28:05 +05:30
DavHau
39db511926 improve override system
- add utils.satisfiesSemver (from poetry2nix)
  - nix-parsec add LICENSE from https://github.com/nprindle/nix-parsec/issues/5
  - remove builtin overrides (moved to dreampkgs)
2021-11-07 15:18:28 +07:00
DavHau
c4b110bc38 output schema flakes-style 2021-10-29 16:59:56 +07:00
DavHau
57ca41c059 update flake.lock 2021-10-23 18:50:36 +07:00
DavHau
850dc71568 fix python translator+fetcher+builder 2021-10-20 16:39:11 +07:00
DavHau
e99e002920 Squashed commit of add_yarn_lock:
commit 3415d7f6f834dc3e52cf6898ec02b58ac7df4089
Merge: fca3973 daa71d3
Author: DavHau <hsngrmpf+github@gmail.com>
Date:   Wed Oct 6 10:33:52 2021 +0700

    Merge remote-tracking branch 'happysalada/add_yarn_lock' into dev

commit daa71d3e53
Author: happysalada <raphael@megzari.com>
Date:   Wed Oct 6 00:01:26 2021 +0900

    yarn.lock: initial translator

commit 8f4632ab5e
Author: happysalada <raphael@megzari.com>
Date:   Tue Oct 5 20:52:00 2021 +0900

    translators: add yarn.lock
2021-10-07 11:52:51 +07:00
DavHau
f685e44d59 Add builder for nodejs
- python builder support application
- add version to dream.lock
- allowBuiltinsFetchers config option
- node2nix builder
- handle github sources without hash
2021-09-20 20:52:31 +01:00
DavHau
a1a3e57e05 add translator: npmlock2nix 2021-09-14 03:00:29 +01:00
DavHau
2ce1ddb6f3 implement UI and examples:
- generic translator CLI exposed as flake app
 - flake app 'install' to install the framework
 - generic fetcher
 - simple translator for python
 - simple builer for python
2021-09-09 23:42:56 +02:00