Commit Graph

853 Commits

Author SHA1 Message Date
DavHau
20f9415889
Merge pull request #201 from nix-community/python-docs
python improvements, docs and guide.
2022-07-16 19:07:01 +02:00
DavHau
932ccb13dc fix systemsFromFile
- make use of config.projectRoot to ge relative path of systems file
2022-07-16 18:58:04 +02:00
Yusuf Bera Ertan
43c3bbe8b5
feat(rust): add overrides for zellij and eureka (#200) 2022-07-16 13:57:01 +00: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
Yusuf Bera Ertan
fdd111cca7
fix(rust/crane): make the generated devshells not build the dependencies / crate, comment the code properly 2022-07-15 23:17:26 +03:00
DavHau
1f271055f3
Merge pull request #197 from nix-community/libaries-io
indexer: add libraries-io
2022-07-14 14:20:14 +02:00
DavHau
cc90dbdb76 indexer: add libraries-io
Indexer which utilizes the libraries.io api.
Given a platform (like npm or crates-io), it returns a list of packages sorted
by the highest number of dependents
(the number of other packages which depend on that package).

This indexer requires an api key that must first be created on libraries.io.
Github login is supported, so this is very straight forward.

More options could be added.
libraries.io also supports other interesting popularity metrics:
  - dependent_repos_count
  - stars
  - forks
  - rank (source rank, see https://libraries.io/api#project-sourcerank)
2022-07-14 12:57:19 +02:00
DavHau
b2c7059bc6
Merge pull request #196 from lelit/typos
Fix typos in documentation
2022-07-14 12:13:37 +02:00
Lele Gaifax
c69534abef Fix typos in documentation 2022-07-14 11:31:44 +02:00
DavHau
dbdcb4abc5
Merge pull request #194 from nix-community/nodejs-bin-links
nodejs: improve builder (executable linking)
2022-07-14 10:25:17 +02:00
DavHau
b7e29c539c nodejs: improve builder (executable linking)
- unsure that all executables of transitive dependencies are linked to /lib/node_modules/.bin
- stop adding many store paths to PATH, instead add .bin directory to PATH
- if installMethod=copy, .bin symlinks will now point to the local copy of the dependency instead of the original store path. This improves issues with runtime dependency errors in some situations
2022-07-13 23:18: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
Yusuf Bera Ertan
4bb76f8a1b
fix: check if source type is path in replaceRootSources 2022-07-12 18:56:32 +03:00
Yusuf Bera Ertan
d657fcfac8
docs: fix development roundup section 2022-07-12 16:42:12 +03:00
Yusuf Bera Ertan
05167f7e6f
feat: indexers (#184)
* feat: add translate and shell commands

* feat: add indexer modules

* feat(nodejs): add a basic npm indexer

* feat: add an index app for indexing using an indexer

* feat(rust): add crates-io indexer

* refactor: use configFile in more places

* feat: implement translate-index app

* refactor: move indexers out of subsystems since they aren't subsystem specific

* fix: discard string context for config text

* docs: add a preliminary document for indexers

* docs: add examples for crates-io and npm indexer inputs

* feat: add support for setting sourceRoot in dream-lock, fix translate source patching

* fix: don't discard context from config passed as text

* fix: remove duplicate resolves

* fix: shell command

* refactor: remove useless nix calls, improve the apps

* feat: improve cli apps UX, implement runNixCmdInSrc, remove shell

* docs: more comments

* feat: add generatePackagesFromLocksTree util

* fix: pass args to generatePackagesFromDreamLocks correctly

* Update indexers.md

* chore: remove license from crates-io indexer

* fix: pass config loaded from env vars to loadConfig

* refactor: don't expose dream2nix internally

* feat: add makeOutputsForIndexes utility

* refactor: make make(Flake)OutputsForIndexes interface consistent with make(Flake)Outputs

* fix: allow passing pkgs to makeFlakeOutputsForIndexes

* fix: remove unused code

* fix: rename var to expected name

* refactor(utils/index): improve and fix overrideOutputs arg

* fix(utils/index): actually pass prev outputs to overrideOutputs

* refactor: patch all sources instead of using a seperate field in dream lock

* fix(utils/index): use .program to access the program

* fix: correct jq command in translate app

* refactor: improve translate app performance

* feat: add crates-io-simple indexer

* fix(apps/translate): only set dir if relPath is set

* fix(apps/callNixWithD2N): pin nixpkgs

* fix: unloaded config passed to dlib

* refactor: rewrite root source patching in nix

* tests: add a unit test for replace root sources

Co-authored-by: DavHau <hsngrmpf+github@gmail.com>
2022-07-12 12:33:04 +02:00
DavHau
6eb67f2775
Merge pull request #188 from nix-community/dev-roundups
Add development roundup April - June
2022-07-12 11:07:34 +02:00
DavHau
46ee892b40
Merge pull request #193 from happysalada/puppeteer
puppeteer: initial override
2022-07-12 11:06:13 +02:00
happysalada
51295e04af puppeteer: initial override 2022-07-11 20:14:00 -04:00
DavHau
c246205a90
Merge pull request #187 from blaggacao/main
fix: yarn lock translator & builder
2022-07-07 21:50:29 +02:00
DavHau
8d4b848ac9
Merge pull request #189 from nix-community/feat/rust-devshell
feat(rust): add devshells to rust builder outputs
2022-07-07 21:25:05 +02:00
Yusuf Bera Ertan
0f6dcb0c53
feat(rust): add devshells to rust builder outputs 2022-07-07 21:27:30 +03:00
Yusuf Bera Ertan
757501574f
docs: add more examples for overriding rust-toolchain 2022-07-06 20:30:29 +03:00
Yusuf Bera Ertan
cb09518ff9
docs: mention more stuff in dev roundup 2022-07-06 19:10:51 +03:00
Yusuf Bera Ertan
5e0de19443
docs: move development round ups to separate files 2022-07-06 19:03:04 +03:00
DavHau
4e5e4e4a14 Add development roundup April - June 2022-07-06 16:00:02 +02:00
DavHau
89bfa7c971 docs: rename Concepts and Benefits -> Architectural Considerations 2022-07-06 15:43:21 +02:00
David Arnold
a22566421f
fix: yarn fix-package
- the implicit or explicit specification of `bin:` does not effect
  wether the target needs to exist or not
- in fact, it need not exist
2022-07-04 16:51:17 -05:00
David Arnold
ac8a6ba77c
fix: yarn translator
- the package name is always the first fragment, the second fragment
  is an override

```diff
diff --git a/locks/cardano-sdk/dream-lock.json b/locks/cardano-sdk/dream-lock.json
index d7a4306a5..987ac3c75 100644
--- a/locks/cardano-sdk/dream-lock.json
+++ b/locks/cardano-sdk/dream-lock.json
@@ -851,6 +851,17 @@
         [ "to-fast-properties", "2.0.0" ]
       ]
     },
+    "@blockfrost/blockfrost-js": {
+      "2.0.4": [
+        [ "@blockfrost/openapi", "0.1.27" ],
+        [ "@emurgo/cardano-serialization-lib-nodejs", "8.1.0" ],
+        [ "@emurgo/cip14-js", "2.0.0" ],
+        [ "axios", "0.21.4" ],
+        [ "form-data", "4.0.0" ],
+        [ "retry-axios", "2.6.0" ],
+        [ "url-join", "4.0.1" ]
+      ]
+    },
     "@cardano-foundation/ledgerjs-hw-app-cardano": {
       "5.0.0": [
         [ "@ledgerhq/hw-transport", "5.51.1" ],
@@ -887,7 +898,7 @@
     },
     "@cardano-sdk/blockfrost": {
       "0.3.0": [
-        [ "blockfrost-js-ratelimited", "2.0.4" ],
+        [ "@blockfrost/blockfrost-js", "2.0.4" ],
         [ "@cardano-sdk/core", "0.3.0" ],
         [ "@cardano-sdk/util", "0.3.0" ],
         [ "shx", "0.3.4" ]
@@ -2661,17 +2672,6 @@
         [ "nanoassert", "1.1.0" ]
       ]
     },
-    "blockfrost-js-ratelimited": {
-      "2.0.4": [
-        [ "@blockfrost/openapi", "0.1.27" ],
-        [ "@emurgo/cardano-serialization-lib-nodejs", "8.1.0" ],
-        [ "@emurgo/cip14-js", "2.0.0" ],
-        [ "axios", "0.21.4" ],
-        [ "form-data", "4.0.0" ],
-        [ "retry-axios", "2.6.0" ],
-        [ "url-join", "4.0.1" ]
-      ]
-    },
     "body-parser": {
       "1.19.2": [
         [ "bytes", "3.1.2" ],
@@ -7603,6 +7603,13 @@
         "url": "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz"
       }
     },
+    "@blockfrost/blockfrost-js": {
+      "2.0.4": {
+        "hash": "sha512-kl0K5V98t/Ov9+/7xKevHKu5BKhW08FvqJX/iqHzEvh6js8LHcpre6J0MeOvyaypi3dIYqFkkid1b26Y+fgBig==",
+        "type": "http",
+        "url": "https://registry.yarnpkg.com/blockfrost-js-ratelimited/-/blockfrost-js-ratelimited-2.0.4.tgz"
+      }
+    },
     "@blockfrost/openapi": {
       "0.1.27": {
         "hash": "sha512-lCGFPZ5D87lwhwP6nowJsVsJEaSFSAi87ORIF3RSakohilZRCgxOA5j5xFDA4mccUnfy1vbTc+CaQ8TKOQPaDA==",
@@ -10216,13 +10223,6 @@
         "url": "https://registry.yarnpkg.com/blake2b-wasm/-/blake2b-wasm-1.1.7.tgz"
       }
     },
-    "blockfrost-js-ratelimited": {
-      "2.0.4": {
-        "hash": "sha512-kl0K5V98t/Ov9+/7xKevHKu5BKhW08FvqJX/iqHzEvh6js8LHcpre6J0MeOvyaypi3dIYqFkkid1b26Y+fgBig==",
-        "type": "http",
-        "url": "https://registry.yarnpkg.com/blockfrost-js-ratelimited/-/blockfrost-js-ratelimited-2.0.4.tgz"
-      }
-    },
     "bn.js": {
       "4.12.0": {
         "hash": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",

```
2022-07-04 16:51:12 -05:00
DavHau
47ed5ee21b
Merge pull request #185 from nix-community/python
Improve python subsystem
2022-07-03 13:25:55 +02:00
DavHau
872bfa0648 minor fixes 2022-07-03 13:00:15 +02:00
DavHau
3bc8801c6f fix bug in cargo-toml translator 2022-07-03 12:41:08 +02:00
DavHau
768e63b832 python: remove WIP status of pip translator 2022-07-03 12:35:33 +02:00
DavHau
bea483c936 add overrides for python 2022-07-03 12:17:40 +02:00
DavHau
6f7199e060 python: implement extraSetupDeps, remove extraRequirements 2022-07-03 12:16:12 +02:00
DavHau
da52cf49f4 python: install with --no-build-isolation 2022-07-03 12:15:15 +02:00
DavHau
1477c6d9d8 fix: pass extraArgs defaults to impure translators 2022-07-03 12:14:33 +02:00
DavHau
1a30e4062a rname: builtins.path -> l.path 2022-07-02 15:55:14 +02:00
DavHau
4e75e665ec haskell: add notes on haskell.nix 2022-06-23 11:17:13 +02:00
Yusuf Bera Ertan
52f7dd7b51
refactor: move docs cli nix expression 2022-06-22 21:13:27 +03:00
DavHau
788ff08638
Merge pull request #183 from nix-community/python
fixup/improve python translator and builder
2022-06-22 13:43:18 +02:00
DavHau
30722d2fe0 makeOutputs: remove impure projects warning
- instead generate fake derivations which fail with hint on evalation
2022-06-22 13:16:09 +02:00
DavHau
3aa7a1365d python: apply overrides and fix override system 2022-06-22 13:16:09 +02:00
DavHau
bc029af0ae pip translator: fix bug when parsing .whl filename 2022-06-22 13:16:09 +02:00
DavHau
162e29d280 python discoverer: top level package name main 2022-06-22 13:16:09 +02:00
DavHau
33b53e87df improve pip translator
- keep pname from discovery phase
- allow passing argument extraRequirements
2022-06-22 13:16:09 +02:00
DavHau
0277813f56 resolveImpure: make this a package instead of an app
- the reason for this change is that the flake app structure can only be used inside `apps`. Nix run will not execute it if it is inside any other attribute
2022-06-22 13:16:09 +02:00
DavHau
cd0009e3c8 python: depend on setuptools by default 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
1ba9555ecf
docs: add the haskell subsystem to subsystems doc 2022-06-21 19:16:05 +03:00