diff --git a/flake.nix b/flake.nix
index 190e81760f58ce20daebc8184359790fcc44a312..8533768336e16595626cb6df14d037256c7d2aad 100644
--- a/flake.nix
+++ b/flake.nix
@@ -10,19 +10,22 @@
     flake-utils.lib.eachDefaultSystem (system:
       let
         overlays = [  ];
-        # see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
         pkgs = nixpkgs.legacyPackages.${system};
-      in
-        {
-          packages = {
-            default = self.packages.${system}.myapp;
-          };
+        buildInputs = with pkgs; [
+          R
+          rPackages.RSiena
+        ];
+        name = "run-calc";
+        runCalc = (pkgs.writeScriptBin name (builtins.readFile ./test_rsiena_installation.R));
+      in rec {
+        defaultPackage = packages.runCalc;
+        packages.runCalc = pkgs.symlinkJoin {
+          name = name;
+          paths = [ runCalc ] ++ buildInputs;
+        };
 
           devShells.default = pkgs.mkShell {
-            packages = with pkgs; [
-              R
-              rPackages.RSiena
-            ];
+            packages = buildInputs ++ [runCalc];
           };
         });
 }