master-thesis/python/energy_flow_proper/04_gaussian_nonzero/flake.nix

32 lines
874 B
Nix
Raw Normal View History

2021-12-11 21:34:55 +01:00
{
inputs = {
hops.url = "git+ssh://git@gitlab.hrz.tu-chemnitz.de/s4498638--tu-dresden.de/hops.git?ref=main";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, hops, flake-utils }:
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
config = ./stg.py;
2022-01-17 17:39:32 +01:00
runScript = pkgs.writeShellScriptBin "run"
''
${hops.defaultPackage.${system}}/bin/sp.py -s ${config}
${hops.defaultPackage.${system}}/bin/hi.py -s ${config} client
'';
2021-12-11 21:34:55 +01:00
in {
2022-01-17 17:39:32 +01:00
defaultApp = runScript;
2021-12-11 21:34:55 +01:00
defaultPackage =
pkgs.dockerTools.buildImage {
name = "hello-docker";
config = {
2022-01-17 17:39:32 +01:00
Cmd = [ "${runScript}/bin/run" ];
2021-12-11 21:34:55 +01:00
};
};
}
));
}