-
I need to add some custom binaries from crates.io that are not in nixpkgs yet. (Basically to replace |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You'd need to package the tool just like you would any other program. # Fetch from github:
craneLib.buildPackage rec {
pname = "somecrate";
version = "0.0.1";
src = pkgs.fetchFromGitHub {
owner = "someowner";
repo = "somerepo";
rev = "v${version}";
sha256 = "...";
};
# set buildInputs/nativeBuildInputs as appropriate
} # Fetch from crates.io
craneLib.buildPackage rec {
pname = "somecrate";
version = "0.0.1";
src = pkgs.fetchCrate {
inherit pname version;
sha256 = "...";
};
# set buildInputs/nativeBuildInputs as appropriate
} Then you can pass that derivation into the |
Beta Was this translation helpful? Give feedback.
-
Can we add this to the docs i.e. the FAQ? |
Beta Was this translation helpful? Give feedback.
You'd need to package the tool just like you would any other program.
buildPackage
can totally do that for you, the only difference being using a remote fetcher instead of a local path forsrc
: