diff options
Diffstat (limited to 'pkgs/applications/file-managers/sfm/default.nix')
-rw-r--r-- | pkgs/applications/file-managers/sfm/default.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/applications/file-managers/sfm/default.nix b/pkgs/applications/file-managers/sfm/default.nix new file mode 100644 index 0000000000000..800ea9419cbe3 --- /dev/null +++ b/pkgs/applications/file-managers/sfm/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, writeText, conf ? null }: + +stdenv.mkDerivation rec { + pname = "sfm"; + version = "0.4"; + + src = fetchFromGitHub { + owner = "afify"; + repo = pname; + rev = "v${version}"; + hash = "sha256-VwPux6n+azpR4qDkzZJia95pJJOaFDBBoz6/VwlC0zw="; + }; + + configFile = lib.optionalString (conf!=null) (writeText "config.def.h" conf); + + postPatch = lib.optionalString (conf!=null) "cp ${configFile} config.def.h"; + + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + description = "Simple file manager"; + homepage = "https://github.com/afify/sfm"; + license = licenses.isc; + platforms = platforms.unix; + maintainers = with maintainers; [ sikmir ]; + }; +} |