default.nix (714B)
1 { lib, stdenv, fetchFromGitHub, conf ? null }: 2 3 stdenv.mkDerivation rec { 4 pname = "sfm"; 5 version = "0.1"; 6 7 src = fetchFromGitHub { 8 owner = "afify"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-i4WzYaJKityIt+LPWCbd6UsPBaYoaS397l5BInOXQQA="; 12 }; 13 14 patches = [ ./config.patch ]; 15 16 configFile = lib.optionalString (conf!=null) (lib.writeText "config.def.h" conf); 17 18 postPatch = lib.optionalString (conf!=null) "cp ${configFile} config.def.h"; 19 20 installFlags = [ "PREFIX=$(out)" ]; 21 22 meta = with lib; { 23 description = "Simple file manager"; 24 inherit (src.meta) homepage; 25 license = licenses.isc; 26 platforms = platforms.unix; 27 maintainers = [ maintainers.sikmir ]; 28 }; 29 }