gitAndTools.stgit: Fix broken package. (#84198)

The stgit package is installing using make, which leaves the application in a state where it can not properly find the installed package stgit.

---
File "/run/current-system/sw/bin/stg", line 35, in <module>
    from stgit.main import main
ImportError: No module named stgit.main
---

This is fixed by using buildPythonApplication instead of stdenv.mkDerivation.
This commit is contained in:
Marco Hennings 2020-06-27 23:54:57 +02:00 committed by GitHub
parent 32b95b2c70
commit e5f0d13a49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,8 @@
{ stdenv, fetchFromGitHub, python2, git }:
{ stdenv, python3, python3Packages, fetchFromGitHub, git }:
let
name = "stgit-${version}";
python3Packages.buildPythonApplication rec {
pname = "stgit";
version = "0.22";
in
stdenv.mkDerivation {
inherit name;
src = fetchFromGitHub {
owner = "ctmarinas";
@ -14,7 +11,7 @@ stdenv.mkDerivation {
sha256 = "0xpvs5fa50rrvl2c8naha1nblk5ip2mgg63a9srqqxfx6z8qmrfz";
};
buildInputs = [ python2 git ];
nativeBuildInputs = [ git ];
makeFlags = [ "prefix=$$out" ];