Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

softioc: init at 4.5.0; aioca init at 1.8.1 #203

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ in
pyepics = final.callPackage ./epnix/python-modules/pyepics {};
recceiver = final.callPackage ./epnix/tools/channel-finder/recceiver {};
scanf = final.callPackage ./epnix/tools/scanf {};
epicscorelibs = final.callPackage ./epnix/python-modules/epicscorelibs {};
pvxslibs = final.callPackage ./epnix/python-modules/pvxslibs {};
aioca = final.callPackage ./epnix/python-modules/aioca/default.nix {};
epicsdbbuilder = final.callPackage ./epnix/python-modules/epicsdbbuilder {};
softioc = final.callPackage ./epnix/python-modules/softioc {};

# epicscorelibs needs at least 2.11.
# TODO: remove for NixOS 24.11
setuptools-dso = prev.setuptools-dso.overrideAttrs (old:
final.lib.optionalAttrs (final.lib.versionOlder old.version "2.11") rec {
name = "${old.pname}-${version}";
version = "2.11";

src = old.src.override {
inherit version;
hash = "sha256-lT5mp0TiHbvkrXPiK5/uLke65znya8Y6s3RzpFuXVFY=";
};
});
})
];

Expand Down Expand Up @@ -77,6 +95,7 @@ in
channel-finder-service = callPackage ./epnix/tools/channel-finder/service {};

inherit (final.python3Packages) lewis pyepics;
pythonSoftIOC = final.python3Packages.softioc;
inherit (callPackage ./epnix/tools/lewis/lib.nix {}) mkLewisSimulator;

pcas = callPackage ./epnix/tools/pcas {};
Expand Down
37 changes: 37 additions & 0 deletions pkgs/epnix/python-modules/aioca/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
setuptools-scm,
numpy,
epicscorelibs,
epnixLib,
}:
buildPythonPackage rec {
pname = "aioca";
version = "1.8.1";

pyproject = true;

src = fetchFromGitHub {
owner = "DiamondLightSource";
repo = "aioca";
rev = "${version}";
hash = "sha256-szM/sVqeWWUj84lq/wsxNCf/aZwoCySeTnuLD+hYLyc=";
};

build-system = [setuptools setuptools-scm];
dependencies = [
setuptools
numpy
epicscorelibs
];

meta = {
description = "Asynchronous Channel Access client for asyncio and Python using libca via ctypes";
homepage = "https://DiamondLightSource.github.io/aioca";
license = lib.licenses.asl20;
maintainers = with epnixLib.maintainers; [synthetica];
};
}
30 changes: 30 additions & 0 deletions pkgs/epnix/python-modules/epicscorelibs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
epnixLib,
buildPythonPackage,
fetchPypi,
setuptools,
setuptools-dso,
pip,
numpy,
}:
buildPythonPackage rec {
pname = "epicscorelibs";
version = "7.0.7.99.1.1";

src = fetchPypi {
inherit pname version;
hash = "sha256-+d0sAZE88TlZ6ILHwq/M1dVc1QhL1FlyAeoRn2V1IjE=";
};

dontConfigure = true;

build-system = [setuptools];
dependencies = [setuptools-dso pip numpy];

meta = {
description = "EPICS core libraries packaged as a Python module";
homepage = "https://github.com/epics-base/epicscorelibs";
license = epnixLib.licenses.epics;
maintainers = with epnixLib.maintainers; [synthetica];
};
}
24 changes: 24 additions & 0 deletions pkgs/epnix/python-modules/epicsdbbuilder/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
buildPythonPackage,
fetchFromGitHub,
lib,
epnixLib,
}:
buildPythonPackage rec {
pname = "epicsdbbuilder";
version = "1.5";

src = fetchFromGitHub {
owner = "DiamondLightSource";
repo = pname;
rev = version;
hash = "sha256-H+8dJY6nY/4ogxcoZVmZzI7STI4x0urQKddlTifAqGQ=";
};

meta = {
description = "Tool for building EPICS databases";
homepage = "https://DiamondLightSource.github.io/epicsdbbuilder";
license = lib.licenses.asl20;
maintainers = with epnixLib.maintainers; [synthetica];
};
}
22 changes: 22 additions & 0 deletions pkgs/epnix/python-modules/pvxslibs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
buildPythonPackage,
epnix,
fetchPypi,
setuptools_dso,
epicscorelibs,
}:
buildPythonPackage rec {
pname = "pvxslibs";
inherit (epnix.support.pvxs) version;

src = fetchPypi {
inherit pname version;
hash = "sha256-p9H6nK+iYJ5ML4x3wE0CmTq0sRFS4kGNgsyKEZPb2bU=";
};

configureScript = "true";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
configureScript = "true";
dontConfigure = true;


nativeBuildInputs = [setuptools_dso epicscorelibs];

inherit (epnix.support.pvxs) meta;
}
38 changes: 38 additions & 0 deletions pkgs/epnix/python-modules/softioc/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
lib,
buildPythonPackage,
fetchgit,
setuptools,
epicscorelibs,
pvxslibs,
epicsdbbuilder,
epnixLib,
}:
buildPythonPackage rec {
pname = "softioc";
version = "4.5.0";

pyproject = true;

src = fetchgit {
url = "https://github.com/DiamondLightSource/pythonSoftIOC.git";
rev = version;
fetchSubmodules = true;
hash = "sha256-JXfFkA3MzipqUw0riMTZmgCP9qe4Tfj8vZaFBwqoO+c=";
};

# Set correct version instead of automatically detected version:
postPatch = ''
awk -i inplace "/__version__/ && !x {print; print \"__version__ = '${version}'\"; x=1; next} 1" setup.py
'';

build-system = [setuptools];
dependencies = [setuptools epicscorelibs epicsdbbuilder pvxslibs];

meta = {
description = "Embed an EPICS IOC in a Python process";
homepage = "https://DiamondLightSource.github.io/pythonSoftIOC";
license = lib.licenses.asl20;
maintainers = with epnixLib.maintainers; [synthetica];
};
}
1 change: 1 addition & 0 deletions pkgs/tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
channelfinder-default-python = pkgs.python3Packages.channelfinder;
mrf-driver-default-linux = pkgs.linuxPackages.mrf;
recceiver-default-python = pkgs.python3Packages.recceiver;
aiaoca-default-python = pkgs.python3Packages.aioca;
}