aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormichzappa <59343378+michzappa@users.noreply.github.com>2022-05-16 00:36:47 -0400
committerGitHub <noreply@github.com>2022-05-15 21:36:47 -0700
commitcececba08fa7cb39a24d0f2c97aebf3dfd70a2cf (patch)
tree2a66d1fb711bf9a51b6323fe7fd53a65c14884a2 /test
parent363d634c5c3d79983fb44d2238fcfdf24fbf81b2 (diff)
Add nixfmt (#98)
* Add nixfmt * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/formatters/installers/nixfmt.bash4
-rw-r--r--test/formatters/samplecode/nixfmt/in.nix13
-rw-r--r--test/formatters/samplecode/nixfmt/out.nix15
3 files changed, 32 insertions, 0 deletions
diff --git a/test/formatters/installers/nixfmt.bash b/test/formatters/installers/nixfmt.bash
new file mode 100644
index 0000000..213a59b
--- /dev/null
+++ b/test/formatters/installers/nixfmt.bash
@@ -0,0 +1,4 @@
+ver="$(latest_release serokell/nixfmt)"
+
+wget "https://github.com/serokell/nixfmt/releases/download/${ver}/nixfmt" -O /usr/local/bin/nixfmt
+chmod +x /usr/local/bin/nixfmt
diff --git a/test/formatters/samplecode/nixfmt/in.nix b/test/formatters/samplecode/nixfmt/in.nix
new file mode 100644
index 0000000..9f804c8
--- /dev/null
+++ b/test/formatters/samplecode/nixfmt/in.nix
@@ -0,0 +1,13 @@
+{
+
+ nixpkgs = {
+ config.allowUnfree = true;
+ overlays = [ (final: prev: {
+ unstable = import self.inputs.nixpkgs-unstable { system = system;
+ config.allowUnfree = true;
+ };
+ })
+ ];
+ };
+
+}
diff --git a/test/formatters/samplecode/nixfmt/out.nix b/test/formatters/samplecode/nixfmt/out.nix
new file mode 100644
index 0000000..d9965e9
--- /dev/null
+++ b/test/formatters/samplecode/nixfmt/out.nix
@@ -0,0 +1,15 @@
+{
+
+ nixpkgs = {
+ config.allowUnfree = true;
+ overlays = [
+ (final: prev: {
+ unstable = import self.inputs.nixpkgs-unstable {
+ system = system;
+ config.allowUnfree = true;
+ };
+ })
+ ];
+ };
+
+}