Add helpers to main flake

This commit is contained in:
Luc Perkins 2022-07-31 13:12:34 +02:00
parent 0ab8af8409
commit 7775f8a95d
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
15 changed files with 109 additions and 92 deletions

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -13,19 +13,29 @@
inherit (pkgs.lib) optionals;
inherit (pkgs.stdenv) isLinux;
otherFormats = with pkgs.haskellPackages;
[
dhall-bash
dhall-docs
dhall-json
dhall-lsp-server
dhall-nix
dhall-nixpkgs
dhall-openapi
dhall-toml
dhall-yaml
] ++ optionals isLinux
(with pkgs.haskellPackages; [ dhall-csv dhall-haskell dhall-text ]);
# Helper function for building dhall-* tools
mkDhallTools = ls: builtins.map (tool: pkgs.haskellPackages."dhall-${tool}") ls;
dhallTools = mkDhallTools [
"bash"
"docs"
"json"
"lsp-server"
"nix"
"nixpkgs"
"openapi"
"toml"
"yaml"
];
# dhall-* tools available only on Linux
dhallToolsLinux = mkDhallTools [
"csv"
"haskell"
"text"
];
otherFormats = dhallTools ++ optionals isLinux dhallToolsLinux;
inherit (pkgs) mkShell;
in {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -35,8 +35,15 @@
};
}
) // {
lib = {
lib = let
pkgs = nixpkgs;
inherit (pkgs.lib) optionals;
inherit (pkgs.stdenv) isDarwin isLinux;
in {
inherit flake-utils nixpkgs;
darwinOnly = ls: optionals isDarwin ls;
linuxOnly = ls: optionals isLinux ls;
};
templates = {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -51,11 +51,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {

View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1659265069,
"narHash": "sha256-1lwvQPag89K9dAkYetpinXc4we7/P6DBDrZbIvy50Lk=",
"lastModified": 1659265326,
"narHash": "sha256-Te2cVb8d4DzYqa7pzR1MWukNPL1D9puIogr+A4vt+zU=",
"owner": "the-nix-way",
"repo": "dev-templates",
"rev": "5f7ae4d7f102a3d8be37352bf45ac6437c1124dc",
"rev": "0ab8af8409fc01fc47c8495613c43cd8bff3008f",
"type": "github"
},
"original": {
@ -36,11 +36,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659264167,
"narHash": "sha256-5w5j5xaTX+yNAaYjl2sIB35LWSoDpU0wnxHVx8Kzsro=",
"lastModified": 1659265259,
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3de6a330bcd434d59901c9c7f8fbe252e2207e22",
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
"type": "github"
},
"original": {