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