Haskell-Optparse-Generic-Li.../flake.nix

31 lines
761 B
Nix
Raw Normal View History

{ inputs = {
nixpkgs.url = github:NixOS/nixpkgs/release-22.05;
utils.url = github:numtide/flake-utils;
};
outputs = { nixpkgs, utils, ... }:
utils.lib.eachDefaultSystem (system:
let
config = { };
overlay = pkgsNew: pkgsOld: {
haskellPackages = pkgsOld.haskellPackages.override (old: {
overrides = pkgsNew.haskell.lib.packageSourceOverrides {
optparse-generic = ./.;
};
});
};
pkgs =
import nixpkgs { inherit config system; overlays = [ overlay ]; };
in
rec {
packages.default = pkgs.haskellPackages.optparse-generic;
devShells.default = pkgs.haskellPackages.optparse-generic.env;
}
);
}