Skip to content

Commit

Permalink
Merge pull request #70 from raboof/fix-nix-run
Browse files Browse the repository at this point in the history
Fix 'nix run'
  • Loading branch information
yannham authored Feb 6, 2025
2 parents a2c6c6a + 14891a8 commit a8c7de1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!-- We follow the Keep a Changelog standard https://keepachangelog.com/en/1.0.0/ -->

## [Unreleased]
### Fixed
- [#70](https://github.com/tweag/genealogos/pull/70) fix 'nix run'

## [0.3.0](https://github.com/tweag/genealogos/compare/v0.3.0...v1.0.0)
### Added
Expand Down
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 a8c7de1

Please sign in to comment.