Comments (3)
I did it now a bit different. Alternative 2 has the problem that the other version attributes will be mixed with all other stuff which the derivation passes through. This would be bad for automation. Therefore I went for:
Alternative 3:
packages.{system} = {
foo = {latest-foo-package};
foo.versions."1.0.0" = ...;
foo.versions."1.2.0" = ...;
}
from dream2nix.
Thanks for looking into this. The design is not finalized yet. I totally agree this must be changed. I currently have 2 alternative schemas in mind. Let me know about your opinion.
Alternative 1 (package name and version in attribute name):
packages.{system} = {
foo-latest = {latest-foo-package};
"foo-1.0.0" = ...;
"foo-1.2.0" = ...;
}
Alternative 2 (one attribute for latest package; other versions inside passthru of latest):
packages.{system} = {
foo = {latest-foo-package};
foo."1.0.0" = ...;
foo."1.2.0" = ...;
}
Alternative 1 makes all attributes clearly visible on the top level.
Alternative 2 is better for automation tools which want to simply list all available versions for a specific package.
Maybe we should do a mix of 1 & 2.
from dream2nix.
I prefer the second alternative because it is more obvious which is the canonical version of the package. Also, it avoids exporting the same derivation under two different attributes (foo-latest
and foo-1.2.0
in this example).
The first schema would be more suitable for the checks
output, if you choose to provide that, as it means each individual version is tested by nix flake check
.
from dream2nix.
Related Issues (20)
- pdm: missing `editables` module when entering devShell HOT 14
- 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
- Can't import fsspec gcsfs
- python local developpement example using only requirements.txt and no pyproject.toml
- How to build pip package from source that requires rust toolchain HOT 2
- Support maturin pip build backend HOT 1
- current `dontStrip = true` default causes some python packages to hold on to GCC as a runtime dependency HOT 1
- pdm: not supporting editable dependencies HOT 1
- pdm: groups at the top of pdm.lock don't update once lockfile exists HOT 1
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.