Comments (10)
Yes I think something like that might be a good idea. I mean, the cleaner solution would probably be to build these binaries from source if the source is vendored.
from dream2nix.
Here is what I think we should do.
have an override for minor versions that all patch versions will use.
Something like
"add-binary-0.12" = {
_condition = pkg: (lib.versionAtLeast pkg.version "0.12") && (lib.versionOlder pkg.version "0.13");
ESBUILD_BINARY_PATH = let
esbuild = pkgs.buildGoModule rec {
pname = "esbuild";
# using 0.12 latest version
version = "0.12.17";
src = pkgs.fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
sha256 = "sha256-wZOBjNOgGmwIQNCrhzwGPmI/fW/yZiDqq8l4oSDTvZs=";
};
vendorSha256 = "sha256-2ABWPqhK2Cf4ipQH7XvRrd+ZscJhYPc3SV2cGT0apdg=";
};
in "${esbuild}/bin/esbuild";
};
then we have one override for each "major" version. The api supposedly is compatible. So we should have only 3-4 versions that we need to write by hand that would be valid for everything.
If that sounds good to you, happy to give it a go in a PR.
from dream2nix.
Wonderful, I think this is a good approach.
You could shorten the condition by using satisfiesSemver "~0.12"
from dream2nix.
how do I get access from the satisfiesSemver function from outside of dream2nix. I wanted to test on a flake directly before submitting a merge request.
I tried checking into dlib, but didn't find a path after that. And nix repl .
complains that there is no default.nix in the repo
dlib = inputs.dream2nix.lib.dlib
.
I'm going to make an MR and work off the branch for now, but would be nice to have an example in the readme of how to access the satisfiesSemver function from an outside flake.
from dream2nix.
satisfiesSemver
is currently not in dlib. I will put it there soon.
For now it can be used like this:
nix-repl> :lf ./.
Added 17 variables.
nix-repl> lib.x86_64-linux.utils.satisfiesSemver
«lambda @ /nix/store/jrsj7h4ibxlfiv99i5sxmiid3ixmjc8c-source/semver.nix:81:21»
from dream2nix.
nix repl complains for me that there is no default.nix probably my nix is too old.
oh, no, you just have to nix repl flake.nix
, okay my brain is not working.
found the repl and learned about :lf
I've just submitted a PR for esbuild 0.14, I'll be doing more as I encounter them.
I think this can be closed for now.
Thanks for the help!
from dream2nix.
It's probably not the end for this one
Cannot start service: Host version "0.14.23" does not match binary version "0.14.38"
I'm looking for a way to de-activate the version check.
from dream2nix.
I've got a PR ready
from dream2nix.
also, last question, in the flake overrides, how will I access the pkgs
representing nixpkgs. Do you re-export it or is my best alternative to do
pkgs = import inputs.dream2nix.inputs.nixpkgs { system = "x86_64-darwin"; };
was also thinking it would be good to include in the example flakes comment a more involved override just to give a good sense of how to do it.
from dream2nix.
No need to re-import nixpkgs if you don't use overlays (see: https://zimbatm.com/notes/1000-instances-of-nixpkgs). You can access it via:
inputs.dream2nix.inputs.nixpkgs.legacyPackages.x86_64-darwin
.
Yes, I think it would be an amazing idea to add an example flake to the readme that uses all possible features and is commented.
from dream2nix.
Related Issues (20)
- 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
- 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
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.