Skip to content

Commit

Permalink
Merge pull request #1292 from Pegasust/cli-flake
Browse files Browse the repository at this point in the history
chore!: make cli package/app compatible with flake
  • Loading branch information
adisbladis authored Sep 2, 2023
2 parents fa6927c + fa2d7a3 commit 9efb8b2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
}:
let
inherit (pkgs) python3;
pname = "poetry2nix-cli";
in
pkgs.stdenv.mkDerivation {
pname = "poetry2nix-cli";
inherit pname;
version = "0";

buildInputs = [
Expand All @@ -22,16 +23,18 @@ pkgs.stdenv.mkDerivation {

buildPhase = ''
runHook preBuild
# this is the ./bin/poetry2nix
patchShebangs poetry2nix
runHook postBuild
'';

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
]}
Expand Down

0 comments on commit 9efb8b2

Please sign in to comment.