Skip to content

Commit

Permalink
Merge branch 'epics-extensions:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lcaouen authored Jul 26, 2024
2 parents 8af037b + e98e81c commit 02cbede
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 11 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Update flake.lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows write access to
# the GitHub repository. This means that it should not evaluate user input in a
# way that allows code injection.

permissions:
contents: read

jobs:
lockfile:
strategy:
matrix:
branch:
- master
- nixos-23.11
- nixos-23.05
permissions:
contents: write # to create branch
pull-requests: write # to create PR to backport
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ matrix.branch }}
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
- uses: DeterminateSystems/update-flake-lock@db4ee38117a597ea8df8f7f75a187dd65093eade # v23
with:
branch: "update-flake-lock/${{ matrix.branch }}"
pr-title: "[${{ matrix.branch }}] Update flake.lock"
pr-labels: |
dependencies
6 changes: 1 addition & 5 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ in

pcas = callPackage ./epnix/tools/pcas {};

phoebus = callPackage ./epnix/tools/phoebus/client {
# TODO: uncomment when this works:
# TODO: add libjfxwebkit.so into openjfx
# jdk = final.openjdk17.override {enableJavaFX = true;};
};
phoebus = callPackage ./epnix/tools/phoebus/client {};
phoebus-alarm-server = callPackage ./epnix/tools/phoebus/alarm-server {};
phoebus-alarm-logger = callPackage ./epnix/tools/phoebus/alarm-logger {};
phoebus-archive-engine = callPackage ./epnix/tools/phoebus/archive-engine {};
Expand Down
28 changes: 22 additions & 6 deletions pkgs/epnix/tools/phoebus/client/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@
lib,
epnixLib,
stdenv,
substituteAll,
maven,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
epnix,
jdk,
openjfx,
python3,
}: let
buildDate = "2022-02-24T07:56:00Z";
in
stdenv.mkDerivation {
pname = "phoebus";
inherit (epnix.phoebus-deps) version src;

patches = [
(substituteAll {
src = ./fix-python-path.patch;
python = lib.getExe python3;
})
];

# TODO: make a scope, so that we don't pass around the whole `epnix`
nativeBuildInputs = [
maven
Expand All @@ -32,21 +41,28 @@ in
})
];

# Put runtime dependencies in propagated
# because references get thrown into a jar
# which is compressed,
# so the Nix scanner won't always be able to see them
propagatedBuildInputs = [
python3
];

desktopItems = [
(makeDesktopItem {
name = "phoebus";
exec = "phoebus -server 4918 -resource %f";
desktopName = "Phoebus";
keywords = ["epics" "css"];
# https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry
categories = [
# Main
"Office"
"Graphics"
"GUIDesigner"
"Viewer"
"Science"
"Physics"
"Monitor"

# Additional
"Java"
"Viewer"
];
})
];
Expand Down
17 changes: 17 additions & 0 deletions pkgs/epnix/tools/phoebus/client/fix-python-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/app/console/src/main/resources/console_preferences.properties b/app/console/src/main/resources/console_preferences.properties
index e00d6f8ec..e3bc52f3e 100644
--- a/app/console/src/main/resources/console_preferences.properties
+++ b/app/console/src/main/resources/console_preferences.properties
@@ -28,9 +28,9 @@ prompt_info=Enter console command
# /bin/bash
#
# Value may include properties.
-shell=/usr/bin/python -i
+shell=@python@ -i

# Folder where the shell process should be started
#
# Value may include properties.
-directory=$(user.home)
\ No newline at end of file
+directory=$(user.home)

0 comments on commit 02cbede

Please sign in to comment.