build-bazel-package: added rm of extra local folders for toolchain configuration...
[NixPkgs.git] / pkgs / by-name / po / postiats-utilities / package.nix
blob8e00897e79cd936fe1a29eb4c5f40a541a6ccffb
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   python3,
6   python3Packages,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "postiats-utilities";
11   version = "2.1.1";
12   src = fetchFromGitHub {
13     owner = "Hibou57";
14     repo = "PostiATS-Utilities";
15     rev = "v${version}";
16     sha256 = "sha256-QeBbv5lwqL2ARjB+RGyBHeuibaxugffBLhC9lYs+5tE=";
17   };
19   meta = with lib; {
20     homepage = "https://github.com/Hibou57/PostiATS-Utilities";
21     license = licenses.bsd2;
22     platforms = platforms.linux;
23     maintainers = [ maintainers.ttuegel ];
24   };
26   buildInputs = [
27     python3
28     python3Packages.wrapPython
29   ];
31   postPatch = ''
32     for f in pats-* postiats/*.py; do
33       sed -i "$f" -e "1 s,python3,python,"
34     done
35   '';
37   installPhase = ''
38     libdir="$out/${python3.sitePackages}"
39     mkdir -p "$libdir"
40     cp -r postiats "$libdir"
42     mkdir -p "$out/bin"
43     install pats-* "$out/bin"
45     wrapPythonPrograms
46   '';