Skip to content

Commit

Permalink
Add ghaf-robot wrapper script
Browse files Browse the repository at this point in the history
The `ghaf-robot` wrapper script wraps Robot Framework's `robot`-command,
to be run inside environment which has all the necessary Python
packages.

Signed-off-by: Mika Tammi <[email protected]>
  • Loading branch information
Mika Tammi committed Aug 16, 2023
1 parent 9c548ab commit 971e9b2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
28 changes: 27 additions & 1 deletion Robot-Framework/default.nix
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
{hello}: hello
{
PyP100,
python3,
robotframework-advancedlogging,
robotframework-seriallibrary,
stdenv,
writeShellApplication,
}:
writeShellApplication {
name = "ghaf-robot";
runtimeInputs = [
(python3.withPackages (ps: [
# These are taken from nixpkgs
ps.robotframework
ps.robotframework-sshlibrary
ps.pyserial

# These are taken from this flake
robotframework-advancedlogging
robotframework-seriallibrary
PyP100
]))
];
text = ''
robot "$@"
'';
}
6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
pkgs = nixpkgs.legacyPackages.${system};
in {
packages = rec {
ghaf-robot = pkgs.callPackage ./Robot-Framework {};
ghaf-robot = pkgs.callPackage ./Robot-Framework {
PyP100 = self.packages.${system}.PyP100;
robotframework-advancedlogging = self.packages.${system}.robotframework-advancedlogging;
robotframework-seriallibrary = self.packages.${system}.robotframework-seriallibrary;
};
robotframework-seriallibrary = pkgs.python3Packages.callPackage ./pkgs/robotframework-seriallibrary {};
robotframework-advancedlogging = pkgs.python3Packages.callPackage ./pkgs/robotframework-advancedlogging {};
pkcs7 = pkgs.python3Packages.callPackage ./pkgs/pkcs7 {}; # Requirement of PyP100
Expand Down

0 comments on commit 971e9b2

Please sign in to comment.