Skip to content

Commit

Permalink
Fix 'nix run'
Browse files Browse the repository at this point in the history
Find `app.program` in a slightly more idiomatic way
  • Loading branch information
raboof committed Feb 6, 2025
1 parent a2c6c6a commit cb040e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
default = {
type = "app";
program =
artifacts.crane-outputs.packages.genealogos-cli.passthru.exePath;
pkgs.lib.getExe artifacts.crane-outputs.packages.genealogos-cli;
};
});

Expand Down
7 changes: 6 additions & 1 deletion nix/crane.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,17 @@ let
cargoExtraArgs = "-p genealogos-cli";
}
// pkgs.lib.attrsets.optionalAttrs binary {
passthru.exePath = "/bin/genealogos";
nativeBuildInputs = common-crane-args.nativeBuildInputs ++ [ pkgs.makeWrapper ];
preFixup = ''
wrapProgram $out/bin/genealogos \
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.nix ]}
'';
meta = {
description = "Takes output from Nix evaluation tools and produces BOM files.";
homepage = "https://github.com/tweag/genealogos";
license = pkgs.lib.licenses.mit;
mainProgram = "genealogos";
};
});

genealogos-api = (common-crane-args // {
Expand Down

0 comments on commit cb040e9

Please sign in to comment.