From f737496d7c687609ed9b4c1a50b230d8fa332f47 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Fri, 27 Oct 2023 07:28:11 -0700 Subject: [PATCH] flake: drop unnecessary fileContents binding Since the tailscale derivation already has a `pkgs` binding, we can use `pkgs.lib`. Alternatively, we could have used `nixpkgs.lib`, as `fileContents` doesn't need a system to use (anymore?). Signed-off-by: Cole Helbling --- flake.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index e7325b633..b40646c5b 100644 --- a/flake.nix +++ b/flake.nix @@ -41,14 +41,6 @@ }; outputs = { self, nixpkgs, flake-utils, flake-compat }: let - # Grab a helper func out of the Nix language libraries. Annoyingly - # these are only accessible through legacyPackages right now, - # which forces us to indirect through a platform-specific - # path. The x86_64-linux in here doesn't really matter, since all - # we're grabbing is a pure Nix string manipulation function that - # doesn't build any software. - fileContents = nixpkgs.legacyPackages.x86_64-linux.lib.fileContents; - # tailscaleRev is the git commit at which this flake was imported, # or the empty string when building from a local checkout of the # tailscale repo. @@ -74,7 +66,7 @@ name = "tailscale"; src = ./.; - vendorSha256 = fileContents ./go.mod.sri; + vendorSha256 = pkgs.lib.fileContents ./go.mod.sri; nativeBuildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux [ pkgs.makeWrapper pkgs.git ]; ldflags = ["-X tailscale.com/version.GitCommit=${tailscaleRev}"]; CGO_ENABLED = 0;