From b03c7591f4857a443d8d3ae8a8bf011d47feaab2 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Thu, 6 Apr 2023 15:59:50 -0700 Subject: [PATCH] Simplify the nix file --- flake.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index 5a034a7e006..a70cdbe6fdf 100644 --- a/flake.nix +++ b/flake.nix @@ -56,16 +56,8 @@ BARRETENBERG_TRANSCRIPT = pkgs.barretenberg-transcript00; }; - # if file exists in git tree, commit hash wil bea read from it - # or unknown value will be assigned - COMMIT_HASH = - if builtins.pathExists ./.commit - then builtins.readFile ./.commit - else "unknown"; - - # rev attribute meta is only available when nix build https://github.com/noir-lang/noir - # is issued therefore reading this info from file is a hack for CI - GIT_COMMIT = if (self ? rev) then self.rev else COMMIT_HASH; + # The `self.rev` property is only available when the working tree is not dirty + GIT_COMMIT = if (self ? rev) then self.rev else "unknown"; GIT_DIRTY = if (self ? rev) then "false" else "true"; commonArgs = { @@ -143,6 +135,7 @@ packages.default = noir; + # TODO: Look into installable apps with Nix flakes # apps.default = flake-utils.lib.mkApp { drv = nargo; }; devShells.default = pkgs.mkShell.override { stdenv = pkgs.llvmPackages.stdenv; } { @@ -150,8 +143,6 @@ buildInputs = packages.default.buildInputs; - inherit COMMIT_HASH; - LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib"; nativeBuildInputs = with pkgs; [