Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
e09001d6f4 |
1 changed files with 13 additions and 1 deletions
14
flake.nix
14
flake.nix
|
@ -114,6 +114,17 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
binroot = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "aerogramme-bin";
|
||||||
|
version = "0.0.1";
|
||||||
|
dontUnpack = true;
|
||||||
|
dontBuild = true;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp ${(rustRelease.workspace.aerogramme {}).bin}/bin/aerogramme $out/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# docker packaging
|
# docker packaging
|
||||||
archMap = {
|
archMap = {
|
||||||
"x86_64-unknown-linux-musl" = {
|
"x86_64-unknown-linux-musl" = {
|
||||||
|
@ -129,8 +140,9 @@
|
||||||
container = pkgs.dockerTools.buildImage {
|
container = pkgs.dockerTools.buildImage {
|
||||||
name = "dxflrs/aerogramme";
|
name = "dxflrs/aerogramme";
|
||||||
architecture = (builtins.getAttr targetHost archMap).GOARCH;
|
architecture = (builtins.getAttr targetHost archMap).GOARCH;
|
||||||
|
copyToRoot = binroot;
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "${bin}" ];
|
Cmd = [ "/aerogramme" "server" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue