sfm: fix build with custom config

This commit is contained in:
Nikolay Korotkiy 2021-07-01 01:29:11 +03:00
parent cd3ed54f6e
commit 8bc38e431c
No known key found for this signature in database
GPG Key ID: D1DE6D7F693663A5

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, conf ? null }:
{ lib, stdenv, fetchFromGitHub, writeText, conf ? null }:
stdenv.mkDerivation rec {
pname = "sfm";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
hash = "sha256-DwXKrSqcebNI5N9REXyMV16W2kr72IH9+sKSVehc5zw=";
};
configFile = lib.optionalString (conf!=null) (lib.writeText "config.def.h" conf);
configFile = lib.optionalString (conf!=null) (writeText "config.def.h" conf);
postPatch = lib.optionalString (conf!=null) "cp ${configFile} config.def.h";