json2nix: add compiler as a package option

This commit is contained in:
Oystein Kristoffer Tveit 2022-11-29 15:31:48 +01:00
parent 42758507b6
commit 93cc90c97b
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 5 additions and 4 deletions

View File

@ -56,7 +56,8 @@
# nix-packages-json = pkgs.emptyFile;
# Internal Tools
json2nix = pkgs.callPackage ./internals/json2nix { };
json2nix =
pkgs.callPackage ./internals/json2nix { compiler = "ghc924"; };
};
overlays.default = _: prev: prev // self.packages.${system};

View File

@ -1,7 +1,7 @@
{ pkgs, ... }:
{ pkgs, compiler ? "ghc924", ... }:
let
overlayedPkgs = pkgs.extend
(pkgs.callPackage ./haskell-overlay.nix { compiler = "ghc924"; });
overlayedPkgs =
pkgs.extend (pkgs.callPackage ./haskell-overlay.nix { inherit compiler; });
in overlayedPkgs.writers.writeHaskellBin "json2nix" {
libraries = with overlayedPkgs.haskellPackages; [ aeson nixfmt extra text ];
} (builtins.readFile ./json2nix.hs)