slstatus: unstable-2022-12-19 -> 1.0

+13 -10
+13 -10
pkgs/applications/misc/slstatus/default.nix
··· 7 7 , libXau 8 8 , libXdmcp 9 9 , conf ? null 10 - , patches ? [] 10 + , patches ? [ ] 11 11 }: 12 12 13 13 stdenv.mkDerivation rec { 14 14 pname = "slstatus"; 15 - version = "unstable-2022-12-19"; 15 + version = "1.0"; 16 16 17 17 src = fetchgit { 18 18 url = "https://git.suckless.org/slstatus"; 19 - rev = "c919def84fd4f52f501548e5f7705b9d56dd1459"; 20 - hash = "sha256-nEIHIO8CAYdtX8GniO6GDEaHj7kEu81b05nCMVdr2SE="; 19 + rev = version; 20 + hash = "sha256-cFah6EgApslLSlJaOy/5W9ZV9Z1lzfKye/rRh9Om3T4="; 21 21 }; 22 22 23 - configFile = lib.optionalString (conf!=null) (writeText "config.def.h" conf); 24 - preBuild = '' 25 - ${lib.optionalString (conf!=null) "cp ${configFile} config.def.h"} 26 - makeFlagsArray+=(LDLIBS="-lX11 -lxcb -lXau -lXdmcp" CC=$CC) 27 - ''; 23 + preBuild = 24 + let 25 + configFile = if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.def.h" conf; 26 + in 27 + '' 28 + ${lib.optionalString (conf!=null) "cp ${configFile} config.def.h"} 29 + makeFlagsArray+=(LDLIBS="-lX11 -lxcb -lXau -lXdmcp" CC=$CC) 30 + ''; 28 31 29 32 inherit patches; 30 33 31 34 nativeBuildInputs = [ pkg-config ]; 32 - buildInputs = [ libX11 libXau libXdmcp]; 35 + buildInputs = [ libX11 libXau libXdmcp ]; 33 36 34 37 installFlags = [ "PREFIX=$(out)" ]; 35 38