altermime: fix darwin build

This commit is contained in:
Ben Siraphob 2021-03-18 22:26:03 +07:00
parent bfde7b6b8d
commit 28a16d05aa

View file

@ -1,12 +1,11 @@
{ lib, stdenv, fetchurl }:
{ lib, gccStdenv, fetchurl }:
stdenv.mkDerivation rec {
baseName = "altermime";
name = "${baseName}-${version}";
gccStdenv.mkDerivation rec {
pname = "altermime";
version = "0.3.11";
src = fetchurl {
url = "https://pldaniels.com/${baseName}/${name}.tar.gz";
url = "https://pldaniels.com/${pname}/${pname}-${version}.tar.gz";
sha256 = "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7";
};
@ -19,14 +18,14 @@ stdenv.mkDerivation rec {
];
postPatch = ''
sed -i Makefile -e "s@/usr/local@$out@"
mkdir -p "$out/bin"
mkdir -p $out/bin
substituteInPlace Makefile --replace "/usr/local" "$out"
'';
meta = with lib; {
description = "MIME alteration tool";
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
platforms = platforms.all;
license.fullName = "alterMIME LICENSE";
downloadPage = "https://pldaniels.com/altermime/";
};