3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/sfm/default.nix

28 lines
710 B
Nix
Raw Normal View History

2021-06-30 23:29:11 +01:00
{ lib, stdenv, fetchFromGitHub, writeText, conf ? null }:
2021-06-01 13:26:42 +01:00
stdenv.mkDerivation rec {
pname = "sfm";
2021-08-04 09:43:51 +01:00
version = "0.3.1";
2021-06-01 13:26:42 +01:00
src = fetchFromGitHub {
owner = "afify";
repo = pname;
rev = "v${version}";
2021-08-04 09:43:51 +01:00
hash = "sha256-NmafUezwKK9bYPAWDNhegyjqkb4GY/i1WEtQ9puIaig=";
2021-06-01 13:26:42 +01:00
};
2021-06-30 23:29:11 +01:00
configFile = lib.optionalString (conf!=null) (writeText "config.def.h" conf);
2021-06-01 13:26:42 +01:00
postPatch = lib.optionalString (conf!=null) "cp ${configFile} config.def.h";
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 ];
};
}