Skip to content

Commit

Permalink
Merge pull request #100 from holochain/chore_add_formatter_and_nix_fmt
Browse files Browse the repository at this point in the history
Chore add formatter and nix fmt
  • Loading branch information
steveej authored May 24, 2024
2 parents ab15426 + 2de81cf commit de9436f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
pkgs.mkShell {
packages =
[
self'.formatter

pkgs.yq-go

inputs'.nixos-anywhere.packages.default
Expand Down
56 changes: 25 additions & 31 deletions lib/make-system-directory.nix
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
{ stdenv
, closureInfo
, pixz

, # The files and directories to be placed in the directory.
{
stdenv,
closureInfo,
pixz,
# The files and directories to be placed in the directory.
# This is a list of attribute sets {source, target} where `source'
# is the file system object (regular file or directory) to be
# grafted in the file system at path `target'.
contents

, # In addition to `contents', the closure of the store paths listed
contents,
# In addition to `contents', the closure of the store paths listed
# in `packages' are also placed in the Nix store of the tarball. This is
# a list of attribute sets {object, symlink} where `object' if a
# store path whose closure will be copied, and `symlink' is a
# symlink to `object' that will be added to the tarball.
storeContents ? [ ]

storeContents ? [],
# Extra commands to be executed before archiving files
, extraCommands ? ""

extraCommands ? "",
# extra inputs
, extraInputs ? [ ]
}:

let
extraInputs ? [],
}: let
symlinks = map (x: x.symlink) storeContents;
objects = map (x: x.object) storeContents;
in
stdenv.mkDerivation {
name = "system-directory";
builder = ./make-system-directory.sh;
nativeBuildInputs = extraInputs;

stdenv.mkDerivation {
name = "system-directory";
builder = ./make-system-directory.sh;
nativeBuildInputs = extraInputs;

inherit extraCommands;
inherit extraCommands;

# !!! should use XML.
sources = map (x: x.source) contents;
targets = map (x: x.target) contents;
# !!! should use XML.
sources = map (x: x.source) contents;
targets = map (x: x.target) contents;

# !!! should use XML.
inherit symlinks objects;
# !!! should use XML.
inherit symlinks objects;

closureInfo = closureInfo {
rootPaths = objects;
};
}
closureInfo = closureInfo {
rootPaths = objects;
};
}

0 comments on commit de9436f

Please sign in to comment.