From fa2d7a3d093317172c9b85c846a66268f3206c4e Mon Sep 17 00:00:00 2001 From: pegasust Date: Tue, 29 Aug 2023 12:38:35 -0700 Subject: [PATCH] chore!: make cli package/app compatible with flake --- cli.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cli.nix b/cli.nix index 0e013de49..e75d4f43e 100644 --- a/cli.nix +++ b/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 ]}