nixpkgs/pkgs/applications/misc/sfm/default.nix

30 lines
740 B
Nix
Raw Normal View History

2021-07-01 00:29:11 +02:00
{ lib, stdenv, fetchFromGitHub, writeText, conf ? null }:
2021-06-01 14:26:42 +02:00
stdenv.mkDerivation rec {
pname = "sfm";
2021-11-08 08:26:35 +01:00
version = "0.4";
2021-06-01 14:26:42 +02:00
src = fetchFromGitHub {
owner = "afify";
repo = pname;
rev = "v${version}";
2021-11-08 08:26:35 +01:00
hash = "sha256-VwPux6n+azpR4qDkzZJia95pJJOaFDBBoz6/VwlC0zw=";
2021-06-01 14:26:42 +02:00
};
2021-07-01 00:29:11 +02:00
configFile = lib.optionalString (conf!=null) (writeText "config.def.h" conf);
2021-06-01 14:26:42 +02:00
postPatch = lib.optionalString (conf!=null) "cp ${configFile} config.def.h";
2021-11-11 19:01:52 +01:00
makeFlags = [ "CC:=$(CC)" ];
2021-06-01 14:26:42 +02:00
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 ];
};
}