diff --git a/changelog.md b/changelog.md index f7ce493d..a1aed825 100644 --- a/changelog.md +++ b/changelog.md @@ -15,6 +15,7 @@ * Allow multiple flags to be passed as a list in the OCs `enable`, `disable` and `configure`. * Apply the `buildInputs` OC to `pkgs` when it is a function, as documented. * Apply package-set and env OCs separately when reading pregenerated overrides. +* Add OC `github` as a convenience wrapper of `source`. ### Environments and toolchain diff --git a/lib/deps/api.nix b/lib/deps/api.nix index 00cebaf6..90487497 100644 --- a/lib/deps/api.nix +++ b/lib/deps/api.nix @@ -108,13 +108,18 @@ let else c2n.hackageAt conf.location ; + + github = {owner, repo, rev, hash, path ? null}: let + src = config.pkgs.fetchFromGitHub { inherit owner repo rev hash; }; + in if path == null then c2n.source.root src else c2n.source.sub src path; + in transformers // { inherit (c2n) hackageAt source; inherit self super pkgs; final = self; prev = super; inherit reset transform transform_ noHpack cabalOverrides cabal2nixOverrides cabal2nixArgs revision drv; - inherit hackageConfGen hackageConf hackage; + inherit hackageConfGen hackageConf hackage github; inherit (spec) option; hsLib = pkgs.haskell.lib; inherit hsLibC; diff --git a/packages/hix/lib/Hix/Managed/Data/ReleaseConfig.hs b/packages/hix/lib/Hix/Managed/Data/ReleaseConfig.hs index efdbf275..05a8812e 100644 --- a/packages/hix/lib/Hix/Managed/Data/ReleaseConfig.hs +++ b/packages/hix/lib/Hix/Managed/Data/ReleaseConfig.hs @@ -58,7 +58,6 @@ data ReleaseConfig = -- | Run Nix flake checks before uploading. Defaults to False; must be explicitly enabled with --check. check :: Bool, -- | Merge the release branch back into the initial branch after successful uploads. - -- A temporary release branch is always created. Use --merge to merge it back. merge :: Bool, -- | Use the global Cabal configuration file instead of hermetic @/dev/null@. -- This allows using credentials configured in @~\/.cabal\/config@ but sacrifices reproducibility.