f3: clean-ups and compile on darwin (#98365)
* f3: clean-ups and compile on darwin * fixed from feedback
This commit is contained in:
parent
731fd9efe3
commit
5f19b74d13
@ -1,13 +1,11 @@
|
|||||||
{ stdenv, fetchFromGitHub
|
{ stdenv, lib, fetchFromGitHub
|
||||||
, parted, udev
|
, parted, systemd ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "f3";
|
pname = "f3";
|
||||||
version = "7.2";
|
version = "7.2";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "AltraMayor";
|
owner = "AltraMayor";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
@ -15,24 +13,45 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy";
|
sha256 = "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ parted udev ];
|
postPatch = ''
|
||||||
|
sed -i 's/-oroot -groot//' Makefile
|
||||||
|
|
||||||
patchPhase = "sed -i 's/-oroot -groot//' Makefile";
|
for f in f3write.h2w log-f3wr; do
|
||||||
|
substituteInPlace $f \
|
||||||
|
--replace '$(dirname $0)' $out/bin
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
buildFlags = [ "all" # f3read, f3write
|
buildInputs = [
|
||||||
"extra" # f3brew, f3fix, f3probe
|
parted
|
||||||
|
]
|
||||||
|
++ lib.optional stdenv.isLinux systemd;
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
buildFlags = [
|
||||||
|
"all" # f3read, f3write
|
||||||
|
]
|
||||||
|
++ lib.optional stdenv.isLinux "extra"; # f3brew, f3fix, f3probe
|
||||||
|
|
||||||
|
installFlags = [
|
||||||
|
"PREFIX=${placeholder "out"}"
|
||||||
];
|
];
|
||||||
|
|
||||||
installFlags = [ "PREFIX=$(out)"
|
installTargets = [
|
||||||
"install"
|
"install"
|
||||||
"install-extra"
|
]
|
||||||
];
|
++ lib.optional stdenv.isLinux "install-extra";
|
||||||
|
|
||||||
meta = {
|
postInstall = ''
|
||||||
|
install -Dm555 -t $out/bin f3write.h2w log-f3wr
|
||||||
|
install -Dm444 -t $out/share/doc/${pname} LICENSE README.rst
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "Fight Flash Fraud";
|
description = "Fight Flash Fraud";
|
||||||
homepage = "http://oss.digirati.com.br/f3/";
|
homepage = "http://oss.digirati.com.br/f3/";
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = licenses.gpl3Plus;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
maintainers = with maintainers; [ makefu ];
|
||||||
maintainers = with stdenv.lib.maintainers; [ makefu ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user