From 6a0d74cd00175837de927dfe0bc1f2619585e5b6 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Sun, 31 Jul 2022 13:20:10 +0200 Subject: [PATCH] Refactor dhall env --- dhall/flake.lock | 6 +++--- dhall/flake.nix | 22 ++++++++++------------ elixir/flake.lock | 6 +++--- flake.lock | 6 +++--- gleam/flake.lock | 6 +++--- go1.17/flake.lock | 6 +++--- go1.18/flake.lock | 6 +++--- java/flake.lock | 6 +++--- kotlin/flake.lock | 6 +++--- nix/flake.lock | 6 +++--- node/flake.lock | 6 +++--- protobuf/flake.lock | 6 +++--- rust/flake.lock | 6 +++--- scala/flake.lock | 6 +++--- zig/flake.lock | 6 +++--- 15 files changed, 52 insertions(+), 54 deletions(-) diff --git a/dhall/flake.lock b/dhall/flake.lock index 0f83929..b03480e 100644 --- a/dhall/flake.lock +++ b/dhall/flake.lock @@ -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": { diff --git a/dhall/flake.nix b/dhall/flake.nix index 54f3aa1..488f7d3 100644 --- a/dhall/flake.nix +++ b/dhall/flake.nix @@ -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`" diff --git a/elixir/flake.lock b/elixir/flake.lock index 0f83929..b03480e 100644 --- a/elixir/flake.lock +++ b/elixir/flake.lock @@ -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": { diff --git a/flake.lock b/flake.lock index c11e3cc..3dd93cf 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/gleam/flake.lock b/gleam/flake.lock index 0f83929..b03480e 100644 --- a/gleam/flake.lock +++ b/gleam/flake.lock @@ -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": { diff --git a/go1.17/flake.lock b/go1.17/flake.lock index 0f83929..b03480e 100644 --- a/go1.17/flake.lock +++ b/go1.17/flake.lock @@ -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": { diff --git a/go1.18/flake.lock b/go1.18/flake.lock index 0f83929..b03480e 100644 --- a/go1.18/flake.lock +++ b/go1.18/flake.lock @@ -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": { diff --git a/java/flake.lock b/java/flake.lock index 0f83929..b03480e 100644 --- a/java/flake.lock +++ b/java/flake.lock @@ -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": { diff --git a/kotlin/flake.lock b/kotlin/flake.lock index 0f83929..b03480e 100644 --- a/kotlin/flake.lock +++ b/kotlin/flake.lock @@ -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": { diff --git a/nix/flake.lock b/nix/flake.lock index 0f83929..b03480e 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -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": { diff --git a/node/flake.lock b/node/flake.lock index 0f83929..b03480e 100644 --- a/node/flake.lock +++ b/node/flake.lock @@ -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": { diff --git a/protobuf/flake.lock b/protobuf/flake.lock index 0f83929..b03480e 100644 --- a/protobuf/flake.lock +++ b/protobuf/flake.lock @@ -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": { diff --git a/rust/flake.lock b/rust/flake.lock index d3e2076..a2e71a3 100644 --- a/rust/flake.lock +++ b/rust/flake.lock @@ -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": { diff --git a/scala/flake.lock b/scala/flake.lock index 0f83929..b03480e 100644 --- a/scala/flake.lock +++ b/scala/flake.lock @@ -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": { diff --git a/zig/flake.lock b/zig/flake.lock index 0f83929..b03480e 100644 --- a/zig/flake.lock +++ b/zig/flake.lock @@ -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": {