nix: wrapper to launch ezidam with env variables
This commit is contained in:
parent
3b9f4792dc
commit
580c212e7d
1 changed files with 5 additions and 12 deletions
17
flake.nix
17
flake.nix
|
|
@ -99,17 +99,10 @@
|
||||||
ezidamAssetStatic
|
ezidamAssetStatic
|
||||||
];
|
];
|
||||||
|
|
||||||
ezidam = pkgs.stdenv.mkDerivation {
|
# How to launch binary
|
||||||
inherit ezidamBinary ezidamAssets;
|
ezidam = pkgs.writeShellScriptBin "ezidam" ''
|
||||||
name = metadata.pname;
|
EZIDAM_TEMPLATE_DIR=${ezidamAssetTemplate} EZIDAM_STATIC_DIR=${ezidamAssetStatic} ${ezidamBinary}/bin/ezidam
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
'';
|
||||||
dontUnpack = true;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp -rv $ezidamBinary $out
|
|
||||||
cp -rv $ezidamAssets $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Docker image
|
# Docker image
|
||||||
dockerImage = pkgs.dockerTools.buildLayeredImage {
|
dockerImage = pkgs.dockerTools.buildLayeredImage {
|
||||||
|
|
@ -142,7 +135,7 @@
|
||||||
{
|
{
|
||||||
apps.default = {
|
apps.default = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${ezidamBinary}/bin/ezidam";
|
program = "${ezidam}/bin/ezidam";
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue