-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seeking Feedback: What is needed for a 1.0 release? #8
Comments
Thank you @kolloch for making this tool! Here is my two cents. Nix could be used for configuration rather than a This is what Here is a prototype { pkgs ? import <nixpkgs> {},
lib ? pkgs.lib }:
let
crate2nix = import ./nix/crate2nix.nix {};
callCrate2nix = { src }: pkgs.stdenv.mkDerivation ({
name = "default.nix";
buildCommand = ''
# crate2nix needs to open Cargo.lock with write permissions
chmod u+w ${src}/Cargo.lock
${crate2nix}/bin/crate2nix generate -f ${src}/Cargo.toml -o $out
'';
});
project = callCrate2nix { src = ./.; };
crate2nix_package = (pkgs.callPackage project {}).rootCrate.build;
in with pkgs ; pkgs.symlinkJoin {
name = crate2nix_package.name;
paths = [ crate2nix_package ];
buildInputs = [ makeWrapper cargo ];
postBuild = ''
# Fallback to built dependencies for cargo and nix-prefetch-url
wrapProgram $out/bin/${crate2nix_package.name} \
--suffix PATH ":" ${lib.makeBinPath [ cargo nix ]}
rm -rf $out/lib $out/bin/${crate2nix_package.name}.d
'';
} The |
@xcthulhu Thanks, I think about that. Is this the standard pattern for generating nix and using it in the same build? |
Hmm... I think Calling the I'm not sure if |
Two things I really need for this project to be usable in most of my projects:
|
Just a related thought - I wonder if getting this to 1.0 (or even just making progress) would be a suitable project for Summer of Nix? If I had a bit more time, I feel like this would be a nice candidate to propose :) |
@mitchmindtree Nice idea, I would be open to tutoring/supporting an intern if they really spend a considerable time on this (otherwise onboarding overhead might be a big much). |
I as looking into |
What does
crate2nix
miss for feeling ready for a 1.0 version?I have plenty ideas for additional features but this is more about
crate2nix
rock solid for the use cases it already provides,What do you think?
The text was updated successfully, but these errors were encountered: