File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed
Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 3333 pyyaml
3434 scipy
3535 screeninfo
36+ GitPython
3637 ] ) )
3738 ] ;
3839 libPath = pkgs . lib . makeLibraryPath mtfgDependencies ;
6465 pkgs . python39 . override { inherit packageOverrides ; self = customPythonPackages ; } ;
6566 in
6667 {
67- packages . ${ system } . mtfg = pkgs . stdenv . mkDerivation {
68+ packages . ${ system } . mtfg = pkgs . python39Packages . buildPythonPackage {
6869 pname = "MTFG" ;
6970 version = "0.5.3" ;
7071 src = pkgs . fetchgit {
7475 } ;
7576 buildInputs = mtfgDependencies ;
7677 QT_QPA_PLATFORM = "xcb" ;
78+ postInstall = ''
79+ mkdir -p "$out/bin"
80+ cp -rfv "$src" "$out/bin/"
81+ '' ;
82+
7783 } ;
7884 defaultPackage . ${ system } = self . packages . x86_64-linux . mtfg ;
7985 formatter . ${ system } = pkgs . nixpkgs-fmt ;
Original file line number Diff line number Diff line change 1111INCLUDE_REQUIREMENTS = False
1212DOCS = ['docs/app/site' , 'docs/code/_build/html' ]
1313
14- TAGS = sorted (git .Repo ('.' ).tags , key = lambda x : x .commit .committed_datetime ) if os .path .exists ('.git' ) else []
14+ try :
15+ TAGS = sorted (git .Repo ('.' ).tags , key = lambda x : x .commit .committed_datetime ) if os .path .exists ('.git' ) else []
16+ except :
17+ print ("Warning: not a git repository" )
18+ TAGS = []
1519VERSION = str (TAGS [- 1 ]) if len (TAGS ) > 0 else "0.0.0"
1620
17- src = [os .path .join ('..' , x ) \
18- for x in git .Git ('.' ).ls_files ().splitlines () \
19- if x .startswith (PACKAGE + os .sep ) \
20- and os .path .exists (x )]
21+ try :
22+ src = [os .path .join ('..' , x ) \
23+ for x in git .Git ('.' ).ls_files ().splitlines () \
24+ if x .startswith (PACKAGE + os .sep ) \
25+ and os .path .exists (x )]
26+ except :
27+ # TODO untested
28+ print ("Warning fallback to glob" )
29+ src = [f for f in glob .glob (PACKAGE + os .sep + "*" )]
2130
2231docs = []
2332for docs_dir in DOCS :
You can’t perform that action at this time.
0 commit comments