linien: add
This commit is contained in:
parent
122ca4eed4
commit
512f170488
57
flake.nix
57
flake.nix
|
@ -245,6 +245,63 @@
|
|||
++ (with pkgs.python3Packages; [ numpy pyqt5 pyqtgraph ]);
|
||||
doCheck = false;
|
||||
};
|
||||
linien-client = pkgs.python3Packages.buildPythonPackage rec {
|
||||
pname = "linien-client";
|
||||
version = "0.5.3";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "linien-org";
|
||||
repo = "linien";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-VOT/mw4o9dbkrtMxL0Ar5UcnxsZ7CYcoTj+VVrWADR4=";
|
||||
};
|
||||
propagatedBuildInputs = (with pkgs.python3Packages; [ numpy paramiko plumbum rpyc scipy ]);
|
||||
doCheck = false; # tests ask for pyqt, migen, etc.
|
||||
patchPhase =
|
||||
''
|
||||
echo ${version} > linien/VERSION
|
||||
substituteInPlace setup_client.py --replace "\"uuid>=1.30\"," ""
|
||||
substituteInPlace setup_client.py --replace "rpyc>=4.0,<5.0" "rpyc>=4.0"
|
||||
ln -s setup_client.py setup.py
|
||||
'';
|
||||
};
|
||||
linien-gui-internal = pkgs.python3Packages.buildPythonPackage rec {
|
||||
pname = "linien-gui-internal";
|
||||
inherit (linien-client) version src;
|
||||
propagatedBuildInputs = (with pkgs.python3Packages; [ click numpy paramiko plumbum pyqtgraph pyqt5 rpyc scipy superqt appdirs ]) ++ [ linien-client ];
|
||||
doCheck = false;
|
||||
patchPhase =
|
||||
''
|
||||
echo ${version} > linien/VERSION
|
||||
substituteInPlace setup_gui.py --replace "rpyc>=4.0,<5.0" "rpyc>=4.0"
|
||||
ln -s setup_gui.py setup.py
|
||||
'';
|
||||
postInstall =
|
||||
''
|
||||
# conflicts with linien-client
|
||||
rm -rf $out/lib/python3.9/site-packages/linien/__pycache__
|
||||
'';
|
||||
};
|
||||
# replace broken (as usual) setuptools launcher
|
||||
linien-gui = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "linien-gui";
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
# replace broken setuptools launcher (does this crap ever work?)
|
||||
cat > $out/bin/linien << EOF
|
||||
#!${pkgs.python3.withPackages(ps: [ linien-gui-internal ])}/bin/python
|
||||
import linien.gui.app
|
||||
linien.gui.app.run_application()
|
||||
EOF
|
||||
chmod 755 $out/bin/linien
|
||||
'';
|
||||
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
||||
dontWrapQtApps = true;
|
||||
postFixup = ''
|
||||
wrapQtApp "$out/bin/linien"
|
||||
'';
|
||||
};
|
||||
conda-channel = makeCondaChannel [
|
||||
{
|
||||
name = "sipyco";
|
||||
|
|
Loading…
Reference in New Issue