Comments (8)
I think this is because dream2nix uses the path dependency source, not the workspace source (eg. it uses ${src}/crates/grep
and not ${src}
), which means other path dependencies won't be available. It also means that cargo
won't be able to access the Cargo.lock
, so even if a path dep had no other path deps, it won't build because of that. Adding a getSourceRoot
function like described in #83 would fix this.
from dream2nix.
crane
will install lib outputs, if there are any. I'm not sure if buildRustPackage
does that. These packages don't really have any lib outputs, so nothing is installed.
For example nix-cargo-integration
works around these by just disabling all outputs for crates default, and makes you add a metadata value to the package Cargo.toml
for enabling outputs for that crate.
But for dream2nix
I would say it's better if all packages are outputted by default, for exposure, and then the user should be able to disable them. It seems rather opinionated to not expose packages because of this, which IMO is better expressed with higher abstraction layers. For example, there could be a use case where a crate has no outputs, but it's build.rs
will build something and put it in target
. This wouldn't be installed by crane
or buildRustPackage
. I think not exposing that would make the user more confused, because first they'd need to expose that, and then find out their output wasn't installed, as opposed to just finding out their output wasn't installed.
from dream2nix.
I fixed this on #83.
from dream2nix.
This should be fixed by #83 being merged.
from dream2nix.
OK, I checked again and all packages build now. Though all of which I tried don't produce any output (empty ./result).
If I switch to the crane builder
, all packages result in ./result/bin/rg
.
from dream2nix.
I guess these are all library packages. Does it even make sense to export them? Maybe we should not.
from dream2nix.
They are library packages, so it may not make sense to export them, unless if the user specifically specifies it to be a dynamic library or whatever.
Though IMO this should be left up to the user, so they can just modify the postInstall
hook to add anything else they want. They should also be able to filter these packages from the output. Maybe it could be useful to add some arguments to makeFlakeOutputs
for this. Eg. exposePackages
that takes a list of strings and makes dream2nix only expose the specified packages.
The crane behaviour sounds a bit weird, it's not supposed to build ripgrep on the library packages. I think that is due to crane
passing the --workspace
flag by default. Will see about overriding the commands for the main derivation so that it is not passed.
from dream2nix.
Though IMO this should be left up to the user, so they can just modify the postInstall hook to add anything else they want.
I'm not quite sure yet about how a use case for this would look like. Let's say someone would want to make a package that should depend upon libraries built with rust, then they would declare the library outputs coming from dream2nix as an input to their derivation, right?
But the result of our build is currently empty. If we want to support that use case then our derivation should have a result/lib
a lib
output that can be built.
Right now I feel we should probably either provide these lib
outputs or not export these derivations.
from dream2nix.
Related Issues (20)
- Trouble Using Yarn Lockfile (nodejs-package-lock-v3) HOT 7
- Basic Documentation HOT 1
- Setuptools Collision HOT 4
- pip: do not know how to unpack source archive xxxx.whl HOT 1
- Separate the pyEnv and devShell parts of pip module into their own module(s)
- Start shell with dependencies without creating a new flake file HOT 2
- PDM Locking fails if only config.deps.python is set HOT 1
- nodejs: native module compilation failure, need help configuring nativeBuildInputs HOT 3
- Pip installed CLI tool not in PATH HOT 3
- WIP - pdm add spyder # python3.12-pyqt5-5.15.10 - pdm.sourceSelector.<function body> is not of type 'string'. HOT 2
- WIP - pdm - Python version from d2n nixpkgs HOT 1
- [help] usage of multi-derivation-package HOT 1
- Question: Python package with libusb dependency HOT 2
- error: infinite recursion encountered # nix run github:nix-community/dream2nix#__pythonEnv extract-msg HOT 2
- realpath: command not found HOT 1
- How to make the lock building process for python proxy aware?
- Error: attribute 'overrideAttrs' missing when running nodejs-granular-v3 devshell
- bad (null) hash for package from extra pypi index
- Unable to provide nativeBuildInputs to nodejs transitive dependencies
- error: No valid filename found in the list of filenames: - PyQt5_Qt5-5.15.13-py3-none-macosx_10_13_x86_64.whl
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dream2nix.