mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
deploy: add build and deploy script as flake app
This commit is contained in:
parent
0a3b09df75
commit
28e2fde133
6 changed files with 116 additions and 155 deletions
34
scripts/deploy.nix
Normal file
34
scripts/deploy.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
|
||||
{ nixpkgs, system }:
|
||||
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
runtimePackages = with pkgs; [
|
||||
coreutils
|
||||
git
|
||||
gnugrep
|
||||
gnused
|
||||
gnutar
|
||||
gzip
|
||||
jq
|
||||
nix
|
||||
openssh
|
||||
rsync
|
||||
];
|
||||
in
|
||||
|
||||
pkgs.runCommand
|
||||
"deploy"
|
||||
{
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
''
|
||||
install -D -m755 ${./deploy.sh} $out
|
||||
|
||||
substituteInPlace $out \
|
||||
--subst-var-by bash "${pkgs.bash}" \
|
||||
--subst-var-by path "${pkgs.lib.makeBinPath runtimePackages}"
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue