Format repo
This commit is contained in:
parent
eed797fb13
commit
5341235bc3
21 changed files with 1200 additions and 1076 deletions
|
@ -1,23 +1,31 @@
|
|||
{ nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
{
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
createScript = { name, runtimeInputs, scriptPath, extraWrapperFlags ? "", ... }:
|
||||
let
|
||||
script = (pkgs.writeScriptBin name (builtins.readFile scriptPath)).overrideAttrs (old: {
|
||||
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||
});
|
||||
in
|
||||
createScript = {
|
||||
name,
|
||||
runtimeInputs,
|
||||
scriptPath,
|
||||
extraWrapperFlags ? "",
|
||||
...
|
||||
}: let
|
||||
script = (pkgs.writeScriptBin name (builtins.readFile scriptPath)).overrideAttrs (old: {
|
||||
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||
});
|
||||
in
|
||||
pkgs.symlinkJoin {
|
||||
inherit name;
|
||||
paths = [ script ] ++ runtimeInputs;
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
paths = [script] ++ runtimeInputs;
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = "wrapProgram $out/bin/${name} --set PATH $out/bin ${extraWrapperFlags}";
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
packages.bootstrap = createScript {
|
||||
name = "bootstrap";
|
||||
runtimeInputs = with pkgs; [ sops coreutils nixos-anywhere ];
|
||||
runtimeInputs = with pkgs; [sops coreutils nixos-anywhere];
|
||||
scriptPath = ./bootstrap.sh;
|
||||
};
|
||||
})
|
||||
|
|
Reference in a new issue