mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-08 18:51:37 -05:00
Merge pull request #1292 from Pegasust/cli-flake
chore!: make cli package/app compatible with flake
This commit is contained in:
commit
9efb8b299f
1 changed files with 6 additions and 3 deletions
9
cli.nix
9
cli.nix
|
@ -3,9 +3,10 @@
|
|||
}:
|
||||
let
|
||||
inherit (pkgs) python3;
|
||||
pname = "poetry2nix-cli";
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "poetry2nix-cli";
|
||||
inherit pname;
|
||||
version = "0";
|
||||
|
||||
buildInputs = [
|
||||
|
@ -22,6 +23,7 @@ pkgs.stdenv.mkDerivation {
|
|||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
# this is the ./bin/poetry2nix
|
||||
patchShebangs poetry2nix
|
||||
runHook postBuild
|
||||
'';
|
||||
|
@ -29,9 +31,10 @@ pkgs.stdenv.mkDerivation {
|
|||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
mv poetry2nix $out/bin
|
||||
# need to remap this to be consistent with `pkgs.lib.getBin` "standard"
|
||||
mv poetry2nix $out/bin/${pname}
|
||||
|
||||
wrapProgram $out/bin/poetry2nix --prefix PATH ":" ${lib.makeBinPath [
|
||||
wrapProgram $out/bin/${pname} --prefix PATH ":" ${lib.makeBinPath [
|
||||
pkgs.nix-prefetch-git
|
||||
]}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue