mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 23:23:20 +00:00
nix: Add meta field to package
The most relevant part (and the reason for this change) is the addition of the `mainProgram` attribute. This allows getting the executable name from inside nix expressions with ease: ``` # before lib.getExe' jujutsu "jj" # or "${jujutsu}/bin/jj" ``` ``` # now lib.getExe jujutsu ```
This commit is contained in:
parent
560d66ecee
commit
f1a9f62e3d
1 changed files with 8 additions and 1 deletions
|
@ -118,13 +118,20 @@
|
|||
--fish <($out/bin/jj util completion fish) \
|
||||
--zsh <($out/bin/jj util completion zsh)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Git-compatible DVCS that is both simple and powerful";
|
||||
homepage = "https://github.com/martinvonz/jj";
|
||||
license = pkgs.lib.licenses.asl20;
|
||||
mainProgram = "jj";
|
||||
};
|
||||
};
|
||||
default = self.packages.${system}.jujutsu;
|
||||
};
|
||||
|
||||
apps.default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.jujutsu}/bin/jj";
|
||||
program = pkgs.lib.getExe self.packages.${system}.jujutsu;
|
||||
};
|
||||
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
|
Loading…
Reference in a new issue