about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ni/nixfmt-rfc-style/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/ni/nixfmt-rfc-style/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/ni/nixfmt-rfc-style/package.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/ni/nixfmt-rfc-style/package.nix b/nixpkgs/pkgs/by-name/ni/nixfmt-rfc-style/package.nix
new file mode 100644
index 000000000000..a11e2d29ff69
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/ni/nixfmt-rfc-style/package.nix
@@ -0,0 +1,32 @@
+{
+  haskell,
+  haskellPackages,
+  lib,
+  runCommand,
+  nixfmt-rfc-style,
+}:
+let
+  inherit (haskell.lib.compose) overrideCabal justStaticExecutables;
+
+  overrides = {
+    version = "unstable-${lib.fileContents ./date.txt}";
+
+    passthru.updateScript = ./update.sh;
+
+    maintainers = lib.teams.formatter.members;
+
+    # These tests can be run with the following command.
+    #
+    # $ nix-build -A nixfmt-rfc-style.tests
+    passthru.tests =
+      runCommand "nixfmt-rfc-style-tests" { nativeBuildInputs = [ nixfmt-rfc-style ]; }
+        ''
+          nixfmt --version > $out
+        '';
+  };
+  raw-pkg = haskellPackages.callPackage ./generated-package.nix { };
+in
+lib.pipe raw-pkg [
+  (overrideCabal overrides)
+  justStaticExecutables
+]