Skip to content

Commit

Permalink
chore!: make cli package/app compatible with flake
Browse files Browse the repository at this point in the history
  • Loading branch information
Pegasust authored and htran-opencolo committed Aug 29, 2023
1 parent 5b3a515 commit fa2d7a3
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 fa2d7a3

Please sign in to comment.