Skip to content

Any improvements I should make to my flake.nix #24

Answered by ipetkov
dpc asked this question in Q&A
Discussion options

You must be logged in to vote

Is there any way to simplify sharing the buildInputs and nativeBuildInputs between phases? I kind of wish inherit ... took care of it automatically or something.

By default, if you call buildPackage or cargoBuild without specifying a value for cargoArtifacts, they will automatically set cargoArtifacts = buildDepsOnly args where args is whatever you passed into buildPackage/cargoBuild.

For example, your flake can be simplified to:

{
  description = "MyCitadel Wallet app for Linux, Windows & MacOS desktop made with GTK+ ";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
    crane.url = "github:ipetkov/crane";
    crane.inputs.nix…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dpc
Comment options

@ipetkov
Comment options

@dpc
Comment options

Answer selected by ipetkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants