Skip to content

Commit

Permalink
Merge pull request #126 from minijackson/use-mainProgram-and-getExe
Browse files Browse the repository at this point in the history
Use `meta.mainProgram` and `lib.getExe`
  • Loading branch information
stephane-cea authored Jul 29, 2024
2 parents b4cdadb + 5dbbf2f commit e37cfb1
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ioc/modules/nixos-integration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ in {

serviceConfig = {
ExecStart = let
procServ = "${pkgs.epnix.procServ}/bin/procServ";
procServ = lib.getExe pkgs.epnix.procServ;
arch = epnix.lib.toEpicsArch globalConfig.epnix.outputs.build.stdenv.hostPlatform;
in ''
${procServ} ${lib.cli.toGNUCommandLineShell {} config.procServ.options} \
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/ca-gateway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ in {
after = ["network-online.target"];

serviceConfig = {
ExecStart = "${pkg}/bin/gateway ${commandLine}";
ExecStart = "${lib.getExe pkg} ${commandLine}";
# ca-gateway doesn't always exit with a positive status code,
# even on failure
Restart = "always";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/phoebus/alarm-logger.nix
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ in {
"-noshell"
"-properties ${configFile}"
];
in "${pkgs.epnix.phoebus-alarm-logger}/bin/phoebus-alarm-logger ${lib.concatStringsSep " " args}";
in "${lib.getExe pkgs.epnix.phoebus-alarm-logger} ${lib.concatStringsSep " " args}";
DynamicUser = true;
StateDirectory = "phoebus-alarm-logger";
# TODO: systemd hardening
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/phoebus/olog.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ in {
after = ["elasticsearch.service" "mongodb.service"];

serviceConfig = {
ExecStart = "${pkgs.epnix.phoebus-olog}/bin/phoebus-olog --spring.config.location=file://${configFile}";
ExecStart = "${lib.getExe pkgs.epnix.phoebus-olog} --spring.config.location=file://${configFile}";
DynamicUser = true;
# TODO: systemd hardening. Currently level 8.2 EXPOSED
};
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/phoebus/save-and-restore.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ in {
after = lib.mkIf localElasticsearch ["elasticsearch.service"];

serviceConfig = {
ExecStart = "${pkgs.epnix.phoebus-save-and-restore}/bin/phoebus-save-and-restore --spring.config.location=file://${configFile}";
ExecStart = "${lib.getExe pkgs.epnix.phoebus-save-and-restore} --spring.config.location=file://${configFile}";
Restart = "on-failure";
DynamicUser = true;

Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/ca-gateway/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ mkEpicsPackage rec {
meta = {
description = "Channel Access PV gateway";
homepage = "https://epics.anl.gov/extensions/gateway/";
mainProgram = "gateway";
license = epnixLib.licenses.epics;
maintainers = with epnixLib.maintainers; [minijackson];
};
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/lewis/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Let's write intricate simulators";
homepage = "https://github.com/ess-dmsc/lewis";
mainProgram = "lewis";
license = licenses.gpl3Only;
maintainers = with maintainers; [minijackson];
};
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/phoebus/alarm-logger/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ in
meta = {
description = "Records all alarm messages to create an archive of all alarm state changes and the associated actions";
homepage = "https://control-system-studio.readthedocs.io/en/latest/services/alarm-logger/doc/index.html";
mainProgram = "phoebus-alarm-logger";
license = lib.licenses.epl10;
maintainers = with epnixLib.maintainers; [minijackson];
inherit (jdk.meta) platforms;
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/phoebus/archive-engine/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ in
meta = {
description = "Phoebus' RDB Archive Engine Service";
homepage = "https://control-system-studio.readthedocs.io/en/latest/services/archive-engine/doc/index.html";
mainProgram = "phoebus-archive-engine";
license = lib.licenses.epl10;
maintainers = with epnixLib.maintainers; [minijackson];
inherit (jdk.meta) platforms;
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/phoebus/client/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ in
meta = {
description = "Control System Studio's Phoebus client";
homepage = "https://control-system-studio.readthedocs.io/en/latest/index.html";
mainProgram = "phoebus";
license = lib.licenses.epl10;
maintainers = with epnixLib.maintainers; [minijackson];
inherit (jdk.meta) platforms;
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/phoebus/pva/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ in
meta = {
description = "Phoebus' PV Access client and server";
homepage = "https://github.com/ControlSystemStudio/phoebus/tree/master/core/pva";
mainProgram = "phoebus-pva";
license = lib.licenses.epl10;
maintainers = with epnixLib.maintainers; [minijackson];
inherit (jdk.meta) platforms;
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/phoebus/save-and-restore/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ in
meta = {
description = "Implements the MASAR (MAchine Save And Restore) service as a REST API";
homepage = "https://control-system-studio.readthedocs.io/en/latest/services/save-and-restore/doc/index.html";
mainProgram = "phoebus-save-and-restore";
license = lib.licenses.epl10;
maintainers = with epnixLib.maintainers; [minijackson];
inherit (jdk.meta) platforms;
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/phoebus/scan-server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ in
meta = {
description = "Simple, well tested, and robust set of predefined commands for use by Python users";
homepage = "https://epics.anl.gov/tech-talk/2022/msg01072.php";
mainProgram = "phoebus-scan-server";
license = lib.licenses.epl10;
maintainers = with epnixLib.maintainers; [minijackson];
inherit (jdk.meta) platforms;
Expand Down
1 change: 1 addition & 0 deletions pkgs/epnix/tools/procServ/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Wrapper to start arbitrary interactive commands in the background, with telnet or Unix domain socket access to stdin/stdout";
homepage = "https://github.com/ralphlange/procServ";
mainProgram = "procServ";
license = lib.licenses.gpl3Plus;
maintainers = with epnixLib.maintainers; [minijackson];
};
Expand Down

0 comments on commit e37cfb1

Please sign in to comment.