From 22f78a7499f76ead5ffc19e556705292e7c525ac Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 3 Jan 2024 13:38:46 +0100 Subject: [PATCH] mkspiffs: fix version number shown in help, cleanup * Replace git invocation for the project itself with the version number from the derivation * Replace git invocation for the submodule with 'unknown' (which is what the Makefile falls back to anyway) * Remove git as a dependency * Update sha256 -> hash --- pkgs/tools/filesystems/mkspiffs/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/filesystems/mkspiffs/default.nix b/pkgs/tools/filesystems/mkspiffs/default.nix index 2b0e2cdadb37..c2712376da6b 100644 --- a/pkgs/tools/filesystems/mkspiffs/default.nix +++ b/pkgs/tools/filesystems/mkspiffs/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, git }: +{ lib, stdenv, fetchFromGitHub }: # Changing the variables CPPFLAGS and BUILD_CONFIG_NAME can be done by # overriding the same-named attributes. See ./presets.nix for examples. @@ -12,11 +12,16 @@ stdenv.mkDerivation rec { repo = "mkspiffs"; rev = version; fetchSubmodules = true; - sha256 = "1fgw1jqdlp83gv56mgnxpakky0q6i6f922niis4awvxjind8pbm1"; + hash = "sha256-oa6Lmo2yb66IjtEKkZyJBgM/p7rdvmrKfgNd2rAM/Lk="; }; - nativeBuildInputs = [ git ]; buildFlags = [ "dist" ]; + + makeFlags = [ + "VERSION=${version}" + "SPIFFS_VERSION=unknown" + ]; + installPhase = '' mkdir -p $out/bin cp mkspiffs $out/bin