459cf94991
The motivation for this change is to enable a new Dhall command-line utility called `dhall-to-nixpkgs` which converts Dhall packages to buildable Nix packages. You can think of `dhall-to-nixpkgs` as the Dhall analog of `cabal2nix`. You can find the matching pull request for `dhall-to-nixpkgs` here: https://github.com/dhall-lang/dhall-haskell/pull/1826 The two main changes required to support `dhall-to-nixpkgs` are: * Two new `buildDhall{Directory,GitHub}Package` utilities are added `dhall-to-nixpkgs` uses these in the generated output * `pkgs.dhallPackages` now selects a default version for each package using the `prefer` utility All other versions are still buildable via a `passthru` attribute
27 lines
741 B
Nix
27 lines
741 B
Nix
{ buildDhallGitHubPackage, lib }:
|
|
|
|
let
|
|
makeDhallKubernetes =
|
|
version: { rev, sha256 }:
|
|
buildDhallGitHubPackage {
|
|
name = "dhall-kubernetes-${version}";
|
|
owner = "dhall-lang";
|
|
repo = "dhall-kubernetes";
|
|
file = "package.dhall";
|
|
|
|
inherit rev sha256;
|
|
};
|
|
|
|
in
|
|
lib.mapAttrs makeDhallKubernetes {
|
|
# 2.1.0 was the first version to introduce a top-level `package.dhall` file
|
|
"2.1.0" = {
|
|
rev = "bbfec3d8548b605f1c9628f34029ab4a7d928839";
|
|
sha256 = "10zkigj05khiy6w2sqcm5nw7d47r5k52xq8np8q86h0phy798g96";
|
|
};
|
|
|
|
"3.0.0" = {
|
|
rev = "3c6d09a9409977cdde58a091d76a6d20509ca4b0";
|
|
sha256 = "1r4awh770ghsrwabh5ddy3jpmrbigakk0h32542n1kh71w3cdq1h";
|
|
};
|
|
}
|