Commit Graph

152 Commits

Author SHA1 Message Date
Yusuf Bera Ertan
14a56a8d43
tests: fix _d2n-extended-new-subsystem 2022-10-06 22:24:07 +03:00
Yusuf Bera Ertan
55db7931ce
tests: fix unit tests, fix extended examples 2022-10-06 20:53:59 +03:00
Yusuf Bera Ertan
0d56a0f089
tests: fix _d2n-extended test again 2022-10-04 18:11:10 +03:00
Yusuf Bera Ertan
80ec66e77a
tests: fix _d2n-extended test 2022-10-04 16:50:42 +03:00
Yusuf Bera Ertan
b4a93ebbae
feat: make fetchers use modules 2022-10-04 15:46:53 +03:00
DavHau
a5bf4443bb
Merge pull request #317 from leungbk/racket-impure
Racket: add impure translator and simple builder
2022-10-04 12:42:17 +02:00
Yusuf Bera Ertan
fad33143f9
fix: use modules from makeFlakeOutputs, pass dream2nixConfig to modules specialArgs 2022-10-03 15:18:27 +03:00
Yusuf Bera Ertan
74128bba5d
fix: remove extra usage from _d2n-extended-new-subsystem 2022-10-03 15:18:27 +03:00
Yusuf Bera Ertan
6871e9e560
fix: fix extended examples 2022-10-03 15:18:27 +03:00
Brian Leung
c17d995e8d
Add impure Racket translator 2022-10-01 23:33:23 -07:00
Yusuf Bera Ertan
15b8621648
tests: fix _d2n-extended test 2022-09-25 22:54:05 +03:00
Yusuf Bera Ertan
7432b27e13
tests: fix new-subsystem test 2022-09-25 21:01:43 +03:00
DavHau
152d921a30 Merge branch 'bezmuth/main' 2022-09-20 14:57:27 +02:00
DavHau
584e5a5fa1 fix: haskell: stack-lock: extract compiler from snapshot 2022-09-20 14:57:10 +02:00
Yusuf Bera Ertan
8d9756d47f
fix: change examples d2n input urls to github repo 2022-09-15 14:59:19 +03:00
Yusuf Bera Ertan
2ec675e394
feat: add license extraction for nodejs and rust 2022-09-13 21:02:43 +03:00
Martin Toman
f4ed1c9ec1 php: disable checks for composer example 2022-09-12 16:42:11 -07:00
DavHau
e77c129ad6 php: add example flake for building composer 2022-09-12 12:27:31 +02:00
DavHau
3caf3a8a67 fix: crates-io-simple indexer 2022-08-31 12:10:33 +02:00
DavHau
a6a963586c fix: crates-io indexer and makeOutputsForIndexers
- simplify API for makeFlakeOutputsForIndexers (see updated example)
- remove arguments `overrideOutputs` and `indexNames`
- add arguments `indexes`
- add app `ci-job-...` which is a script meant to be executed as a cron action, pushing updates to a separate `data` branch
2022-08-31 12:10:33 +02:00
DavHau
a09c59a7f7 feat: indexers: add tested example for indexers 2022-08-31 12:10:33 +02:00
bezmuth
e4ff799d3e Change compiler version formatting. 2022-08-25 19:38:56 +01:00
DavHau
35921b71d5 fix: debian-binary: remove dep-spec file and discover function
- dep-spec is not needed anymore since project can be specified without a source code
- therefore there is nothing to discover anymore as well
2022-08-24 12:26:57 +02:00
DavHau
c492204d37 refactor: debian translator without source 2022-08-20 18:38:01 +02:00
a-kenji
17dd96f40e fixup! remove flake.lock from examples 2022-08-20 18:38:01 +02:00
a-kenji
1fc7672423 init: impure debian translator
Initialize an impure translator from debian binaries.
2022-08-20 18:38:01 +02:00
bezmuth
f5c39bfc18 Remove hardcoded ghc version. 2022-08-18 19:55:28 +01:00
DavHau
e654ffaa10 feat: module system improvements
- add documentation to the subsystem-loading interface
- expose evaled modules publicly via `framework`
- add option config.modules to allow users to include their own modules
- update examples for extending dream2nix
2022-08-15 15:34:24 +02:00
DavHau
7564d81e50 rafactor: rename rust example 2022-07-31 18:00:52 +02:00
DavHau
cb394b8d7e refactor: rename nodejs workspace example2 2022-07-31 17:59:56 +02:00
DavHau
59f305953f refactor: remove confusing setting from haskell example 2022-07-22 17:31:16 +02:00
DavHau
e8fe3f803f rename examples under ./examples
Apply naming scheme {subsystem}_{test-name}
2022-07-22 16:02:21 +02:00
DavHau
7cd64d386d python improvements, docs and guide.
- add warning to readme and docs stating that dream2nix is unstable software
- refactor structure of docs: remove title .md pages, instead add titles via (# title) to SUMMARY
- change order of doc topics. move `guides` and `subsystems` to the front
- add docs for python subsystem
- add getting started guide for python
- extend ./examples/python to make use of translator options
- add new function to dlib `systemsFromFile` that allows to load the `supportedSystems` from a file. This alows changing the supported systems without touching the flake.
- move pip translator args to extra file `args.nix` to allow embedding in docs
- fix pip translator
- add a .gitignore to the basic flake template
- use new systemsFromFile function in basic flake template
2022-07-16 15:03:37 +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
10fecabe3a
add devShell outputs for nodejs ad python (#186)
* add devShell outputs for nodejs ad python

* nodejs devShell improvements

- do not export NODE_PATH
- create node_modules directory
- add .bin directories of direct dependencies to PATH

* nodejs: revise devShell logic

- fix namespaced modules symlinking to ./node_modules
- add all transitive exectables to ./node_modules/.bin
- add ./node_modules/.bin to PATH

* set nodejs version in eslint example

* nodejs: improve error message on failed node_modules symlink in devShell

* readme: add nodejs version setting to example
2022-07-12 18:54:35 +02:00
DavHau
3aa7a1365d python: apply overrides and fix override system 2022-06-22 13:16:09 +02:00
DavHau
78b14674cd fixup/improve python translator and builder
- translator: ensure setup requirements from pyproject.toml are respected
- builder: ensure setup requirements are installed first before the package is built
- simplify the python translator
- dont depend on mach-nix for dependency extraction
- use only pip download to extract dependencies
- allow impure pip translator to cache downloads
- fix dream-lock.json. location was missing
2022-06-22 13:16:09 +02:00
Yusuf Bera Ertan
5f20f98aa2
feat: implement overrideRustToolchain for crane and build-rust-package (#175) 2022-06-18 18:24:05 +03:00
DavHau
c2a8067aad delete flake.lock of haskell example 2022-06-15 13:26:21 +02: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
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
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
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
db19f7c07a add path-example for nodejs 2022-05-17 12:57:57 +02:00
DavHau
5f8841c794 optimize tests for examples 2022-04-23 15:09:55 +02:00
DavHau
5c037c970d add examples for aggregated fetching 2022-03-28 23:22:54 +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