Merge pull request #1292 from Pegasust/cli-flake

chore!: make cli package/app compatible with flake
This commit is contained in:
adisbladis 2023-09-02 12:50:12 +00:00 committed by GitHub
commit 9efb8b299f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
]}