Refactor dhall env
This commit is contained in:
parent
b2d022db75
commit
6a0d74cd00
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -4,19 +4,23 @@
|
||||||
inputs = { dev.url = "github:the-nix-way/dev-templates"; };
|
inputs = { dev.url = "github:the-nix-way/dev-templates"; };
|
||||||
|
|
||||||
outputs = { self, dev }:
|
outputs = { self, dev }:
|
||||||
let inherit (dev.lib) flake-utils nixpkgs;
|
let
|
||||||
|
inherit (dev.lib) flake-utils nixpkgs;
|
||||||
in flake-utils.lib.eachDefaultSystem (system:
|
in flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
dhall = pkgs.dhall;
|
dhall = pkgs.dhall;
|
||||||
|
|
||||||
|
inherit (pkgs) mkShell;
|
||||||
inherit (pkgs.lib) optionals;
|
inherit (pkgs.lib) optionals;
|
||||||
inherit (pkgs.stdenv) isLinux;
|
inherit (pkgs.stdenv) isLinux;
|
||||||
|
|
||||||
# Helper function for building dhall-* tools
|
# Helper function for building dhall-* tools
|
||||||
mkDhallTools = ls: builtins.map (tool: pkgs.haskellPackages."dhall-${tool}") ls;
|
mkDhallTools = ls:
|
||||||
|
builtins.map (tool: pkgs.haskellPackages."dhall-${tool}") ls;
|
||||||
|
|
||||||
dhallTools = mkDhallTools [
|
# dhall-* tools available only on all platforms
|
||||||
|
dhallToolsCommon = mkDhallTools [
|
||||||
"bash"
|
"bash"
|
||||||
"docs"
|
"docs"
|
||||||
"json"
|
"json"
|
||||||
|
@ -29,19 +33,13 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# dhall-* tools available only on Linux
|
# dhall-* tools available only on Linux
|
||||||
dhallToolsLinux = mkDhallTools [
|
dhallToolsLinux = optionals isLinux (mkDhallTools [ "csv" "haskell" "text" ]);
|
||||||
"csv"
|
|
||||||
"haskell"
|
|
||||||
"text"
|
|
||||||
];
|
|
||||||
|
|
||||||
otherFormats = dhallTools ++ optionals isLinux dhallToolsLinux;
|
dhallTools = dhallToolsCommon ++ dhallToolsLinux;
|
||||||
|
|
||||||
inherit (pkgs) mkShell;
|
|
||||||
in {
|
in {
|
||||||
devShells = {
|
devShells = {
|
||||||
default = mkShell {
|
default = mkShell {
|
||||||
buildInputs = [ dhall ] ++ otherFormats;
|
buildInputs = [ dhall ] ++ dhallTools;
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "dhall `${dhall}/bin/dhall --version`"
|
echo "dhall `${dhall}/bin/dhall --version`"
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265259,
|
"lastModified": 1659266323,
|
||||||
"narHash": "sha256-zxZ54QZkw4IK6w/+wFLkB20/K75k4sw9W1kV1S1L2BI=",
|
"narHash": "sha256-DzPQWjrOQzq0fiXhYDHTgMA3frZStOgEsTSMGsQ5XIw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7ded42e3567f41aaf26f93bf5d40e14a011d10a6",
|
"rev": "33c5f1b8315d2edec8f02f6bf337ee85b146e896",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659265954,
|
"lastModified": 1659266141,
|
||||||
"narHash": "sha256-sgQkSxmS1/C8kI1iERyIHgINdykItwA/K92mGDNX5Vc=",
|
"narHash": "sha256-Hl7Y1glo8G5yTVpXQsu2v2yzARzH5B3TlDgXAHm3Txk=",
|
||||||
"owner": "the-nix-way",
|
"owner": "the-nix-way",
|
||||||
"repo": "dev-templates",
|
"repo": "dev-templates",
|
||||||
"rev": "7775f8a95d6356ceb10e282e15266845255fd071",
|
"rev": "b2d022db758cdb8d63eefcdacdfb0df1e21a654c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
Loading…
Reference in a new issue