diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f42f9e24..be4225ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,5 +22,5 @@ jobs: run: nix shell .#packages.x86_64-linux.reuse -c reuse lint - name: build nixfmt - run: nix build -L .#nixfmt-static + run: nix build -L . if: success() || failure() diff --git a/default.nix b/default.nix index c846559c..fbca1e93 100644 --- a/default.nix +++ b/default.nix @@ -40,14 +40,17 @@ let ]; }; - build = pkgs.haskellPackages.nixfmt; + build = lib.pipe pkgs.haskellPackages.nixfmt [ + haskell.lib.justStaticExecutables + haskell.lib.dontHaddock + (drv: lib.lazyDerivation { derivation = drv; }) + ]; in build // rec { packages = { nixfmt = build; - nixfmt-static = haskell.lib.justStaticExecutables packages.nixfmt; - nixfmt-deriver = packages.nixfmt-static.cabal2nixDeriver; + nixfmt-deriver = build.cabal2nixDeriver; nixfmt-shell = packages.nixfmt.env.overrideAttrs (oldAttrs: { buildInputs = diff --git a/flake.nix b/flake.nix index bbc1f662..7aeb170e 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,7 @@ apps.default = { type = "app"; - program = "${self.packages.${system}.nixfmt-static}/bin/nixfmt"; + program = "${result}/bin/nixfmt"; }; checks = result.checks;