3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix
Marco Hennings e5f0d13a49
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.
2020-06-27 23:54:57 +02:00

33 lines
791 B
Nix

{ stdenv, python3, python3Packages, fetchFromGitHub, git }:
python3Packages.buildPythonApplication rec {
pname = "stgit";
version = "0.22";
src = fetchFromGitHub {
owner = "ctmarinas";
repo = "stgit";
rev = "v${version}";
sha256 = "0xpvs5fa50rrvl2c8naha1nblk5ip2mgg63a9srqqxfx6z8qmrfz";
};
nativeBuildInputs = [ git ];
makeFlags = [ "prefix=$$out" ];
postInstall = ''
mkdir -p "$out/etc/bash_completion.d/"
ln -s ../../share/stgit/completion/stgit-completion.bash "$out/etc/bash_completion.d/"
'';
doCheck = false;
checkTarget = "test";
meta = with stdenv.lib; {
description = "A patch manager implemented on top of Git";
homepage = "http://procode.org/stgit/";
license = licenses.gpl2;
platforms = platforms.unix;
};
}